Learning About Algorithms (Pt. 1)

A good programmer working intensively on his own code can hold it in his mind the way a mathematician holds a problem he’s working on. Your code is your understanding of the problem you’re exploring.

– Paul Graham on Holding a Program in One’s Head

My first lines of JavaScript involved too much jQuery. Understanding programming meant understanding certain $ methods. I didn’t even know what a method was. JavaScript was magic and writing it involved hours of googling things like “jquery click outside menu”. It was frustrating not understanding what was going on. To Graham’s definition, I was not a good programmer and, honestly, I didn’t consider myself to be one.

Eventually curiosity took its course and I learned about variables, methods, constructors, for loops, type systems, and everything else that comes with learning a programming language. JavaScript was no longer magic because I understood how it worked. But knowing how something works is different than knowing why something works. Why is code structured the way it is? Why does it perform the way it does?

Let’s forget about JavaScript or whatever programming language and think about code as code – as a system of communication. Then we can focus on learning about this system through the computational perspective. This will expand our understanding of the problem we’re exploring (that of programming), by learning about the theoretical aspects of computer science.

Back to School

One of the core aspects of theoretical computer science is algorithms. My goal is to learn about algorithms and become proficient enough use them to my advantage to solve whatever programatic or mathematical problem. I’ve chosen to start this process by taking this free Coursea.org course on algorithms and I’ll be documenting each step on this blog.

Because the course is geared toward developers, there’s some emphasis on knowing Java (not JavaScript). I’ve never written more than 100 lines of Java so the first step here will be to get familiar with the syntax. I’ll do that by taking The Java Tutorials at Oracle’s site. I don’t think this process will take more than a couple of days because I’m already familiar with most basic programming concepts but I’m also not used to the static typing system so it should be an interesting challenge.

Take this course with me, maybe we can learn something new!