The Essential Programming Language Toolbox
Everybody has a different idea of which languages are important. And the answer really depends on who you are and what you believe is important. I came to programming through a theoretical computer science route which initially gave me a shallow understanding of a wide breadth of topics. In this school of thought, languages are just a vehicle for learning about the big ideas in computer science. And to get at all of the ideas, you need to use a language that lends itself to the topic.
How would you understand memory management and pointers in Java? How would you learn about data structures in assembly? You can’t. Thats how. Java hides the details of memory management and pointers so you don’t have to deal with it, but knowing what is going on under the covers will make you a better programmer. Assembly is so low level that if you use it as a vehicle for implementing a B-tree you will loose most of the big ideas about the data structure and algorithms in a sea of register manipulation and instruction set details. This list is for people who want to get at all the big ideas in computer science, which necessitates learning a wide breadth of languages. It’s strongly in the language-as-a-vehicle camp, not the language-as-a-career camp.
Assembly will get you right down to the bare metal, working with registers and architecture-specific instruction sets. In short, assembler requires learning the fundamental architectural principles of modern computing equipment, which is essential for writing better higher level code that takes advantage of bare metal. It will also give you a fine appreciation for the dangers of writing spaghetti code.
Usage of assembly today is fairly limited, but encompasses many interesting areas such as reverse engineering, embedded systems, viruses, real-time systems, and compilers. There are a variety of assembly languages out there. MIPs is a good choice for its simple instruction set, and x86 is a good choice for its ubiquity.
Big ideas: bare metal, compilers, optimization, self-modifying code
C is the direct ancestor of some of the most widely used modern languages: C++, Java, C#, and PHP just to name a few. Knowing any one of these languages will allow you to pick up any of the others easily, and to communicate ideas with developers from a variety of backgrounds. In short, C is the lingua franca. Learning C has the added benefit of introducing memory management and pointers – things that higher languages like Java hide with automatic garbage collection and object references.
C is used all over the place: in every modern non-toy OS, Java VMs, the Ruby interpreter, and the Apache web server.
Big ideas: Memory management, pointers, complexity analysis
A Lisp Dialect
Lisp will make you think differently. I can think of no better way to put it than that. The language is simply structured in such a way as to make both problems and their solutions look differently. The structure of the languages begs the usage of recursion, maps, and closures – things that aren’t seen nearly as often in other languages.
Lisp is worth learning for… the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot. – Eric Raymond, How to Become a Hacker
Lisp dialects are used heavily in artificial intelligence, and as scripting languages within other applications such as Emacs and AutoCAD. Scheme is a good dialect to learn since it is the language used in SICP – one of the best computer science texts of all time. Or learn Emacs Lisp for a foray into dynamic scoping.
Big ideas: recursion, closures, artificial intelligence
A Scripting Language
In an era where we have hackable Coffee Makers and everything is online, scripting languages are the glue that binds the world together. These higher level languages can be a way of really strutting your stuff and a platform for putting into practice many of the big ideas in computer science – regular expressions, concurrency, complexity analysis, scalability, architecture, data structures, databases, and so on.
Scripting languages are commonly used for lightweight web applications and are often a good substitute for shell scripting. Pick up one of the P’s in the LAMP stack (Perl, PHP, Python) or Ruby.
Big ideas: complexity analysis, scalability, architecture, data structures, databases, etc.
The above four categories of languages have enough breadth to get a taste for the vast majority of the big concepts in computer science, after which it is much easier to absorb select topics in-depth, write solid code in any language, and pick up the unique paradigms of any new language you learn.
What programming languages would you put in your own essential toolbox, and why?
Image attribution: kimberly hurst
The Essential Programming Language Toolbox
by Jess Johnson in Programming Languages
Leave a reply