The obsession with making everything overly complex
[Fri May 29 15:04:45 CDT 2020]

I know I have mentioned this a few times already, but it seems clear that we are getting further and further away from the classic UNIX philosophy that stressed the importance of simplicity. On the contrary, what appears to be prized these days is adding lots of froth and flavors to your coffee, Starbucks style, to the point that it's quite difficult to call it coffee anymore. The same applies to the world of technology and programming, it seems. So, for example, today, while reading an article on 20 productivity tools to use from the terminal, I came across a short piece on wego, a tool to view the whether forecast. To my surprise, it looks as if all the tool does is retrieve the data from wttr.in and display it on the terminal screen. Yet, when checking Github repo I find, to my surprise, that it is written in the Go programming language, it consists of multiple folders, needs to be compiled, and it may (I say "may" because, to be honest, didn't bother to give it a very in-depth look) provide the ability to use different colors and other customizations. So, what's wrong with that? Well, only that the wttr.in data can easily be accessed via curl or any similar piece of software, and I already wrote my own bash shell script ages ago to provide the very same functionality... except that my approach consists of 27 lines of code, it is written in bash and, therefore, runs pretty much anywhere, does not need to be compiled, and chances are it will still run in 30 years, as long as the wttr.in service is still available. I just don't understand this obsession with making things far more complex than they ought to be. Worse yet, I don't understand why this determination to always write tools in overly complex languages when it could be done perfectly in simple bash. My feeling is that, for the most part, people don't choose the best tool for the job. They just put the cart in front of the ox, decide that they would like to learn a new language, and then proceed to write their program using it, whether or not it makes any sense. {link to this entry}

Using file encryption with vim
[Fri May 22 15:01:41 CDT 2020]

Here is a feature of the vim text editor that I didn't even know if existed. As it turned out, you can encrypt your files from within vim itself. Just use the option -x when editing a file:

$ vim -x myfile
Easy, and also useful for certain files. Sure, nothing as reliable as real filesystem encryption, but useful nonetheless. {link to this entry}

Yanking URLs in w3m
[Fri May 1 14:44:48 CDT 2020]

I have been using the text-based w3m browser more often lately. At one point, I had the need to yank the current page's URL into the clipboard, and couldn't figure out how to do it. Well, here is the solution. Simply install xsel, and then configure w3m to use the following as the second external browser:

sh -c 'echo "$0" | xsel -b'
After that, simply enter 2M to yank the URL for the current page into the clipboard, or Esc-2M to yank the URL of a link. It works like a charm. {link to this entry}