On having a favorite programming language

Sometimes I get asked “What is your favorite programming language?”, “What programming language would you use when starting to learn programming?”, “What do you think of programming language $X?”, “What programming languages do you use?”.

Let me elaborate.

Back in school we got taught Delphi. Don’t remember much about it. The programming was done through some kind of interface builder. In university I got to do Prolog and Java.

Back then one was able to use Java a lot because Android was quite new. Android apps were - and still can be - written in Java.

Later, after reading suggestions on prominent YouTube lectures, I was able to play with Scheme. Python was added when a course on using MongoDB was relying on it. The course made use of the bottle framework. Python was also the first language where I wrote tests. Later Python was used throughout the “Programming Bitcoin” book by Jimmy Song using jupyter notebooks. Due to working with AngularJS and Backbone.js at my first job I was able to pick up some JavaScript. JavaScript stuck with me and it is what I use today if I need to create a quick scripts using Node.js. By getting into Angular, often called Angular2 at my second job I was able to work with TypeScript.

By following the Ethereum ecosystem for a while I got to do some programming with Solidity. The default smart contract programming language back then.

After spending way too much time on hackernews, and seeing again and again how every programmer should know Assembly and C I went through a PDF for Assembly and the beginning of Learn C the Hard Way. Back then the book was free and not yet finished.

After functional programming started to become all the rage I got my feet wet in Clojure by spending some time with the book Clojure for the Brave and True. Later Haskell by working through half of the haskell book.

By following the TDD and Clean Code community I was able to see a lot of Ruby in presentations and code snippets. Ruby was later revisted by working through Programming Languages Part A, Part B and Part C by Dan Grossman on coursera. The course also made you wirte code in ML and Racket.

In 2018 I had the fortune to introduce Kotlin into a, until then, pure Java codebase. Instead of resistance the change was welcomed with open arms by fellow developers. Both the possibility to learn something new, and to be paid for it, plus the ability to write, or to be honest generate, less boilerplate.

Kotlin is what I use to this day in most backend related work.

As Rust became popular, it was supposed to be the new C, I did spend some time with the book The Rust Programming Language.

While getting into iOS development I was able to quickly pick up Swift and SwiftUI.

Once I read the statement you are only able to state you know a certain programming language if you are able to write Fizz buzz in it. A low bar. It will only prove you remember the basic syntax. I would be able to write Fizz buzz in Java, Kotlin, JavaScript, Swift and Python. Mainly because I used all of them recently. For all the others I would have to brush up my knowledge for a few minutes.

How do you learn a programming language then? You don’t need to know generics to write a simple Java command line application. You don’t need to know the difference between class and struct before writing an iOS app in Swift. It will become apparent at one point in your journey. Right when you need it.

Neither do you need to read a book on the programming language. Is reading the book helpful? Sure, you might pick up a few tricks while reading it and remember parts of the codebase you can apply it to. Is it required? No.

In my day to day work I sometimes get the question during pairing “Would this syntax work here?”. Even when you know the answer (Yes/No) the better answer is “Let’s write a test and see”. The moment you have a test we can play around with the implementation details, learn what works and iteratively improve it if necessary.

So what is my favorite programming language?

I don’t have one. Saves me quite some time when discussing what to use for a new project. What I care more about is the tooling around the language. I enjoy working more with Kotlin than with Swift because I consider IntelliJ to be superior to Xcode. But then, Xcode might be a lot easier than setting up your Haskell tooling. (To be fair it has been a while I have looked into Haskell tooling). Do I thus like Kotlin more than Swift because I enjoy working with it more? Fair enough. I guess the answer is a Yes. For now.

What program language would you use when starting out to learn programming?

Depends on what you would want to do. The easiest might be where you have all the required tools, a browser, already installed. Thus JavaScript. Then again you are trying to solve a problem. It doesn’t really matter in the beginning. Use what your friends use, use what the guy on YouTube uses or use what your colleagues use.

In the end it is all if, else, loops and pattern matching for the functionally inclined.

I reject the notion of “Do $X to become a better programmer”. To become a better programmer you program. You program to solve problems. Even if the problem is not having anything better to do on a lazy sunday afternoon.