“The defining quality of an ideologue, whether on the left or the right, is to acquire one’s opinions in bulk.”-:Paul Graham, “The Two Kinds of Moderate.” PaulGraham.com. December 2019.
Tim Ferriss has a currently popular blog post, “Ten Lessons I Learned While Teaching Myself to Code,” that I’ve seen mentioned in a few places. While it is largely good advice, there is one point that is wrong. It does matter what language you learn. Here’s the ten lessons from his article:
- The online world is your friend, start there.
Don’tstress over what language to pick.
- Code every day.
- Automate your life.
- Prepare for constant, grinding frustration.
- Build things. Build lots of things.
- “View Source”: Take other people’s code, pick it apart, and reuse it.
- Build things for you—code you need and want.
- Learn how to learn.
- Reach out to other coders.
The programming language you choose matters. If what you are doing is trivial, then yes, you can use any programming language. To quote from Paul Graham’s essay, “Revenge of the Nerds“:
“The disadvantage of believing that all programming languages are equivalent is that it’s not true. But the advantage is that it makes your life a lot simpler. And I think that’s the main reason the idea is so widespread. It is a comfortable idea…There are, of course, projects where the choice of programming language doesn’t matter much. As a rule, the more demanding the application, the more leverage you get from using a powerful language. But plenty of projects are not demanding at all. Most programming probably consists of writing little glue programs, and for little glue programs you can use any language that you’re already familiar with and that has good libraries for whatever you need to do. If you just need to feed data from one Windows app to another, sure, use Visual Basic.”
Tim Ferriss is writing trivial programs. So, for his use case, the choice of language is irrelevant. It might be for your use case as well.
But, computer languages are not the same. They have different strengths and weaknesses. For example, in this blog post, a professional programmer discusses why Rust is not a good replacement for C. The short version, Rust is a young language that isn’t stable, and it lacks features older languages have, such as a specification.
Some languages are simply more powerful, mature and give you more options. If you are going to go through the trouble to learning how to program, why not ground yourself in a language with more capabilities?
Your first choice of programming language is going to shape how you think about programming. It can take a long time to broaden your sense of the possible if you pick a language with limited features when you first start learning.
There are many good, powerful programming languages. Arguments can be made for any language you like. However, Paul Graham’s article mentioned above makes a good case that Lisp is a very powerful language. In Pascal Costanza’s Highly Opinionated Guide to Lisp, there’s an interesting observation:
…”Lisp is, in some sense, the mother of all [computer programming] languages…the mindset of Lisp asserts that expressive power is the single most important property of a programming language. Nothing should get in your way when you want to use that power. A programming language should not impose its view of the world on the programmer. It is the programmer who should be able to adapt the language to his/her needs, and not the other way around.”
Lisp is old. It’s stable. It is powerful. Textbooks teaching it date back to the early 1990s. But, they are still relevant and can be bought for almost nothing. So, why not learn Common Lisp? It’s a good question. The most common answer is that computer programming languages are subject to fads and new languages are more popular. But, given Lisp’s flexibility, it’s difficult to make the case that they are better.
Ok, suppose for a moment I’ve convinced you. Now, the question is: how do you go about learning Common Lisp? Last year, Steve Losh provided an answer. He put together a blog post called “A Road to Common Lisp,” that explains the Lisp language in detail and how he went about learning it. In short:
- Install SBCL or if you’re using MacOS and want a single GUI app you can download from the App Store, choose Clozure CL. My preference is for Emacs, SBCL, quicklisp and SLIME (tutorial), but you should use an editor that is comfortable to you that can balance parentheses, highlight comments and strings, and autoindent Lisp code. Atom can be a good choice if you haven’t use a text editor before. But, it would be better if you learned either Emacs or Vim.
- Read Common Lisp: A Gentle Introduction to Symbolic Computation (<$2 on Alibris, online for free). Do all the exercises and grok in fullness. This book is aimed at intelligent beginners with no prior programming knowledge. Take your time and noodle with this text. It’s going to take time to develop a fluency, and it’s a different style of thinking.
- Then read Practical Common Lisp (<$25 on Alibris, online for free). Work through some of this book every day until you complete it. Type in the code if it is going to help you understand it. It doesn’t have exercises.
- Write some code for something easy, e.g., Project Euler.
- Then, flesh out your understanding further with Paradigms of Artificial Intelligence Programming (<$25 on Alibris).
- Now, you’re ready to program something serious and need a weighty reference text, i.e., Common Lisp Recipes (<$50 on Alibris).
- Finally, I suspect that Patterns of Software: Tales from the Software Community (<$10 on Alibris) is recommended because it’s a help with understanding how to work on software projects, but the purpose of the recommendation is kept unclear to prevent spoilers.