Why I'm focusing only on some programming languages
Since I started programming and creating my first websites, I always seeked novelty: first starting with HTML and PHP because websites were the way I interacted with computers/internet at the time and were the first thing that came to my mind when thinking about programming. Then I wanted to go at a lower level, learning C and some assembly, later learning something higher level like Python. Then reading about these eye opening languages like Scheme, Haskell or Forth I spent some time learning them, too. Then Rust came and promised a secure, fast and high-level programming language for us all. Liking Plan9 and being an avid reader of cat-v, when I found out about Go and that Rob Pike was one of the creators, I learnt that too.
I tried so many languages and tried to do so much, that in the end I don’t know nothing deep enough to do useful stuff at a reasonable speed. To paraphrase a well-known quote:
I know the trade-offs of everything, but the depths of nothing.
This is why from now on, I’m going to learn and focus only on some languages and tools.
Debian + Xfce
In the past I tried a bunch of distros and other OSes like Arch/Parabola, Trisquel, FreeBSD, even Plan9. While enjoyable, reconfiguring my computer the way I wanted every time was no fun. That’s why I choosed Debian which I love for its rock-solid base, vast package availability, awesome community and social contract.
I’ve always avoided Python because I prefer statically typed languages, and because of its popularity as a “slow” language and the purist in me prefers languages that can get the maximum out of the hardware, but I must admit that raw speed is not the top priority when choosing a language. Python has a vast and diverse community, lots of tooling and libraries, and lots of documentation, books, tutorials, conferences, etc.
Learning Python in depth will pay off multiple times because of its use in different areas of computing (including web development, scientific computing, Machine learning, etc.).
Right now I’m using it for Keep Me On Top, taking advantage of mature software like Django, Celery, requests, lxml etc.
Rust is the language that comes nearer to the ideals of the purist in me. It can compile to fast binaries, it has high-level zero-cost abstractions and it makes it easier to write concurrent code. Even though I learnt the basics, and used it for some toy mini-projects, I must admit that it imposes some “limits” (and rightly so) which makes prototyping a bit slower. It still misses some mature libraries corresponding to the Python’s ones (e.g. Django, Celery, etc.), but the good news is that a lot of companies are investing in its future. Being a runtime-less language, it can easily target Wasm, which makes it ideal for both frontend and backend. The community is amazing and welcoming, the tooling is great (even though it has to mature a bit) and it has a bright future ahead of it. I love how easily it integrates with other languages: for example to replace parts of C libraries or speedup Python.
A big downside for me is the slow compile time, which makes the edit-compile-debug workflow a bit of a pain.
For the time being, I plan to use it only to speedup the performance of critical parts of my codebases.
Wasm is probably the future of the web, and we may be writing Rust compiled to Wasm for the frontend in the future, but for the time being, I’ll write my frontend in Typescript and, when it makes sense, build PWAs. I used Typescript for some games and wrote about the experience.
Similarly to programming languages, I’ll stick to the same tools, and I will use something different only if it makes sense. That includes:
- PostgreSQL as a relational DB, because, while MariaDB has its own advantages, it makes no sense to learn both, unless technically required;
- Redis as an in-memory Key-value store and message broker. RabbitMQ may be faster and has more advanced features since its only purpose is to be a broker, but Redis is more flexible and learning, installing and monitoring both is not worth it.
Emacs was born in 1976, Debian in 1993, Python in 1989, PostgreSQL in 1986, Make in 1976, etc. Some of the greatest software in use today has been around for a long time. What I learn today, will be useful 20 years from now. I stand on the shoulders of giants.
Programming is like craftsmanship and it requires a good knowledge of the tools, which takes a lot of effort, since one has to:
- Know how to properly configure them
- Know their features, standard library and limits
- Be familiar with the community
- Learn the idioms, gotchas and best practices
- Know the best libraries/modules for a given job, their status and their future
From now on I’ll stick to tried and true tools in my toolbox, solving real problems in an efficient and pragmatic way, resolving to exploration only when facing a problem bigger than my available toolset.