On Learning to Code (for 2019)
1. The initial programming language(s) you learn should align with your goals
You’ll sometimes see senior engineers encourage others to try and first learn a language like C because they’ll gain a better understanding of important computer science concepts. The problem with this is that you can in fact learn how to code and get a software engineering job
If someone is learning to code so that they can design websites and get a better paying job, then they should not be introduced to programming through lambda calculus or Lisp — they should probably start with HTML, CSS, and JavaScript. If someone wants to become an Android developer, they should try and learn Java.
Yaron Minsky from Jane Street wrote an article that is very informative on what language he would teach in an introductory programming course. He makes the following comment:
In many ways, Python is the ideal interview language… But what I saw was that students who learn Python often walk away with a rather rough model of the semantics of the language. You might be surprised at what fraction of students who have programmed extensively in Python can’t guess how Python lists might be implemented, to say nothing of their ability to explain the semantics of language features like generators or decorators.
Based on this paragraph, it might seem to someone new to programming that for them to be a good programmer and get a job they’ll need to learn a language like C, and then if they do decide to pick up Python they’ll need to understand how generators are actually implemented or the interviewer will think that they’re not good programmers. This isn’t true though.
If your goal is to pivot your career and land your first software developer job, then you most likely do not need to understand those things in the previous paragraph (not that it wouldn’t help if you did). On the other hand, if you already have a programming job and your goal is to gain a better understanding of how a computer works, then sure, maybe learning C or Assembly is a good idea, but it all depends on your goals.
Here is a good article from freeCodeCamp about what programming languages to learn and the things you can do with each of them, and here’s the Stack Overflow 2018 Developer Survey which has a ranking of the most popular languages. Peter Norvig also has a good (but geared more towards CS students) essay on learning to code, where at the end he writes:
My recommendations for a first programming language would be Python or Scheme. Another choice is Javascript, not because it is perfectly well-designed for beginners, but because there are so many online tutorials for it.
Takeaway: Make sure you align what you’re learning with your goals. Don’t just choose C or Lisp simply because that’s what they teach in computer science programs.