The Three Problems of Programming

Then I began thinking that really the process of learning to program requires understanding the three problems of programming:

1. Problems software engineers made for you (the API problem)
2. Problems computer engineers made for you (the hardware problem)
3. Problems the universe made for you (the algorithm problem)

Of course, I should probably add “problems your project manager or business manager made for you” and while that’s a whole different class of issues, it’s something that anyone with a career in programming needs to understand.

I think there’s something to say about the order of the problems too. Restrictions and problems in the API layer are completely human in origin. Problems in the hardware layer add some actual physical dimensions and limits to what you can or cannot do. But the ultimate dictator is the algorithm problem (think about the P=NP problem).

Also, APIs, libraries, and languages are designed to help solve or abstract away the lower level problems of hardware and algorithm. But they tend to create new problems (or leak) which can be just as complex. Consequently, API solutions change more often than hardware solutions or algorithm solutions (which rarely change). For example, consider how few fundemental hardware advances we’ve had (think vacuum tubes to transistors) or the fact that sorting hasn’t changed since quicksort.

A “real programmer” needs to understand these three dimensions of programming as well as master the proper tools to handle them. In the end, that may mean knowing Ruby and C and Lisp and Javascript and a little Awk and Perl and perhaps some Java or Fortran (I still like Fortran). But all that said, I still think you should probably start with Ruby or Python or the like.