09-03-2021 Preface: This is by far my longest blog entry ever. It may not actually be that long, considering my other entries were quite short, but there is a summary at the bottom of the page if you want to get my view on the situation straight away. The Go programming language seems to be gaining in popularity as of late. Not only are people talking about it, but there has been an increase in jobs requiring expertise in this particular programming language. In my honest opinion, this is a negative trend, and I will try to explain why. Go is at heart a simple language. It shares a lot of qualities with C, being created by people who have worked with that programming language for many years (Rob Pike and Ken Thompson). However, this was a choice made out of necessity; code bases at Google were growing and it became clear that maintaining their sizeable C++ codebases would be difficult in the future. Go is therefore a direct response to the idea that more features are good. Instead of following the C++ or Perl philosophy of "there is more than one way to do it", they have streamlined the development process and made conscious efforts to minimize differences in programming styles. One clear example which may surprise programmers with a C or C++ background is that Go enforces tabs for indentation and disallows the use a whole line for opening curly braces. For anyone that has been forced to deal with programs written in a bad style, this may be a virtue of Go. I would rather argue that it is further restricting the developers options. Sometimes, one style may be better at conveying one specific type of information. Additionally, modern tools like clang-format exist for C and C++ for making a project comply to a certain style, if they like. Removing the ability to choose a style in C is therefore a solution to a non-problem. Restricting the programmers options is by no means a positive aspect of a language, either. On the one hand, you have C++ which features several different ways of declaring a simple variable, and 12 different string types. On the other, you have Go, which enforces strict style and features few ways to achieve a given goal. Do not get me wrong, C++ is not a very well designed language. I feel the ideal should be somewhere in the middle. One brilliant example is Scheme. It is a minimal language, but gives the programmer the tools to do whatever they want. Macros provide endless extensibility, but the language core is not as bloated as, say, Common Lisp. However, if Scheme is such a great language compared to Go, why is it the latter that sees the great amount of success in the professional market? The truth is that managers adore Go's lack of features. In a corporate setting, expressivity is frowned upon. The programmer is merely a resource for the company. With capital interests, interchangability between programmers becomes quite alluring to businesses. Instead of creating a language for art, for personal expression and creativity, Go is a language made to "get stuff done". This is evident in Rob Pike's explanation on why he wanted to create Go: "The key point here is our programmers are Googlers, they're not researchers. They're typically fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They're not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt." It should be mentioned that Go is not the only language like this. Java too has a reputation of being loved by management. What I want does not at all correspond to the opinions of managers. My main point of this short essay is that because of what Go represents, learning it and using it for jobs by free will makes it easier for corporations to control their work force. You directly sacrifice some of your freedom of expression in favour of, what exactly? Is it an easier language than most others? Maybe. I would rather suggest getting good at C or a language like Scheme. But I may be misinterpreting your intentions. Maybe you are one of those programmers who just want to "get stuff done", and do not care about the act of programming in itself. In this case, I can not sympathize with you. To summarize: Go is a simple language, made simple to make programmers interchangable to corporations. Pushing for it's adoption in work places is immoral because it takes power away from the workers responsible for the company's success, and gives power to the ruling class.
14-07-2020 Smileys are ubiquitous on the internet today. They are, however, unefficient. Take, for example, the two smilies often used to express happiness: :) and :D The first is used for general happiness, the other for extraordinary happiness. This is, in my opinion, way too limiting. It's also too difficult to type. Reaching that far across your keyboard to type first a colon, then a parenthesis or other symbol, is way too complex for a simple chat message in certain situations, like online games where you can't pause for messaging for too long. So, what's the solution? I introduce you to... Russian smiley notation! It works like this: Instead of mimicking a face with eyes and optional nose, it's just the mouth. A simple smiley-face is written like this: ) Stronger opinions are expressed by adding more parentheses. A very big smile: )))))))))))) Now, this looks like lisp code, but it's very expressive, and that's why I like it. There's no real reason to use a colon, we recognize it as a smiley without it. And that is why I like the Russian notation method. It's basically an optimization and improvement over the more common method.
19-06-2020 Discovered a really cool tool today I'll be using for C development/prototyping. It's called picoC and tries to be a very minimal C interpreter written in only 3500 lines of C. I use it primarily for prototyping and experimenting with C without having to recompile and run a program every time I want to see a change. For example, if I'm a complete beginner and want to know what value the EOF constant has, I can simply fire up picoC and write printf("%d", EOF); to get my answer. I actually started looking for a program like this after watching someone do a project in Haskell using the GHCi compiler, an interactive compiler for the language. GHCi lets you recompile the program while in the interpreter and from there interact with the program. This makes it much easier to debug the program. Ever since I saw GHCi in use, I've wanted something similar for the language I'm learning, C. picoC doesn't quite fulfill this role, but it sure is useful for prototyping and testings stuff out. GDB, the GNU debugger, looks to be approximately what I want, but I find it to be extremely buggy, ironically.
07-06-2020: Finally fixed up my blog. This time, instead of using fancy programs and scripts, I just use a single php page that cat(1)'s out a .txt file. Incredibly minimal, only two lines to get it working: <?php $output = shell_exec('cat posts.txt'); echo "<pre>$output</pre>"; ?> (Of course, you can do this in one line, I just think it looks better with two.) Update: Found out this also works wiht html tags, so I can format my text .