Bram Cohen on what it takes to be a great programmer.

Bram’s complete words here.

There are only two coding skills which mostly people who are completely self-taught as a programmer miss out on: proper encapsulation, and unit tests. For proper encapsulation, you should organize your code so that changes which require modifying code in more than one module are as rare as possible, and for unit tests you should write them to be pass/fail so that all unit tests can be run as a comprehensive suite. And now you know everything you need to about those two things. Anyone who is taught the above guidelines, and decides they really want to learn those skills, will with sufficient practice become good at them.

Coding skill is all well and good, and you can’t become a great programmer without it, but it’s far from everything. I’m decent at raw coding, but I know many people who are better, and some of them are abysmal programmers. I in particular can’t deal with being tasked with fixing up spaghetti code. My brain simply locks down and refuses to make any modifications which it isn’t convinced will work, which is of course impossible when the source material is an incurably bug-ridden mess.

I’ve felt this way about my own code with almost everything I’ve written to date. It has been a struggle for me, to go from an unstructured mess to something other people might be able to look at without throwing up.

It is apparent why people might skip over the ‘proper encapsulation and unit tests’ while teaching themselves software programming in a non-formal way. They are easily overlooked, and without a grade-book shaped stick hovering over your backside to force that sort of formality, one could easily just slide past these skills and program off the cuff. One of my challenges in learning to program has been to build things properly, to not re-invent the wheel every single time I sit down to make something meaningful in software. My preference is to stand on the shoulders of those that have come before me, and use the collective knowledge of masters, past and present, to expand my understanding and knowledge in appropriate directions. The trick is to do all of this with an open mind. We need to evaluate  new ideas and differing opinions without locking onto one particular nerd dogma. I don’t know that I will ever be a great programmer, but I will have fun trying.

Here’s another interesting piece regarding software education and what it takes to be a great programmer: Who Killed the Software Engineer? (Hint: It Happened in College)