“If I had 4 hours to chop down a tree, I’d spend the first 2 hours sharpening the saw”
— Unknown
I’ve always wanted to write about programmers and what influences their productivity. There are many things that could enhance a programmer’s productivity. A calm workspace, meetings-free calendar, a good internet connection, etc. But that’s not what I’m interested in talking about, neither am I qualified enough to talk about that as it involves a lot of psychology behind why a calm workspace, for instance, makes a programmer more productive. Rather what I’m interested in talking about is the practices, tools, or tricks of the trade, that could make an average programmer a 10x programmer. What does it take for an average programmer to become better? Let’s cover the obvious ones first: many hours of practising programming, knowing a couple of programming languages at the least, knowing data structures and their internals, and the mainstream algorithms, you know, the sorting, searching, tree/graph traversals and such. Now, are there more, that makes an average programmer a better one?
Unsurprisingly, the answer is yes. While the areas mentioned above all deal with the mental exercise of knowing and learning, there are these entirely different M.Os, that make a programmer better.
Ever seen a carpenter at work? Each one of his tools is as per his choosing, including the length and sharpness, completely customized to his version of perfection, enabling him to do the highest quality work. His skills and his tools work in tandem with each other producing the best piece of furniture.
I wish there is a way to measure a programmer’s productivity objectively so as to be able to analyze what makes one better than the other, but alas, we’re at a loss as it’s near impossible to measure a programmer’s productivity objectively. But what I’ve seen over the last 8 odd years is that most of the good programmers have certain characteristics in common of which I want to touch upon three major areas today.
Touch Typing
One of the most underrated skill is touch typing, i.e., typing without looking at the keyboard. Steve Yegge has a nice blog about it, a brilliant read. Learn to touch type. Period. It’s not that difficult and it makes you 5 times, heck, 10 times better. It doesn’t just make you faster in terms of typing, because if you can type what comes to your mind quickly, you’re now forced to think quicker too. It has a feedback effect. You can quickly type what you think and now that you’ve typed out what was in your mind, you’ve to come up with the next thought for you to be able to type out quickly. It’s like your fingers and mind are in a constant tussle between each other. Over a period of time, you automatically start thinking faster as you’re used to that speed.
Every great programmer I know can touch type, every single one! I’m not talking about child prodigies who grew up to become programmers who can solve every single problem in ACM ICPC. Although, I’m almost sure that they’d put in the time to learn touch typing as every minute in an international programming event counts. They’re not going to be hunting-and-pecking at the keyboard when they’re solving a difficult Dynamic Programming problem. I’m talking about the programmers in the industry who have at least a few years of experience writing code for a living. You have to know to touch type even if your uber-cool IDE can provide the most correct suggestion when you press ctrl+space(or some weird key combination). Because guess what, once you know to touch type you will be able to type object.methodName(arg1, arg2) faster than your IDE frantically scrambling to its feet to suggest you multiple possibilities, ranking them in the order of most possible to the least possible for overloaded methods.
Quite honestly, it doesn’t take much time to learn. Let me tell you this, no matter what your age is today, it’s still not late. I learnt when I was 1.5 years into the software industry but some of my friends learnt after 5 years of coding. So it’s never late. Learn to touch type.
Recommendations:
I learnt touch typing in typingweb.com. It’s a good place to start. Once in a while, I practice in Typeracer. It’s a car race simulator where you’ll race with other anonymous folks and the faster you type the faster your car moves. Another quick way to practice in the middle of a workday is 10fastfingers.com. Try that after you’ve learnt the basics of touch typing and you’ll love it. I recommend 30 minutes a day for roughly 2-3 months. You’ll never regret the time spent.
A good extensible Text Editor
As silly as it may sound, a good extensible text editor makes a programmer’s life better. Every programmer should have a favourite text editor, and it cannot be Notepad. Not that Notepad is bad, it’s good at what it’s supposed to do, basic text editing. But your text editor needs to be extensible, in the sense that you should be able to build/configure shortcuts, program it to do things that you want it to do to and bind it to the shortcuts that you want.
While you may not be writing code in your text editor all the time, you’d certainly use it to edit most text, JSON, XML, Shell scripts, properties files, and myriad other file extensions that you can think of. So your editor of choice should be capable of understanding the extension so as to be able to highlight keywords or to some degree, the syntax of the language. And a bonus point if you can run your terminal inside it so that you don’t have to fumble your way between the terminal and your editor. But if you’re already good at alt-tabbing, then you don’t have to worry.
Just like touch typing, pick an editor of your choice and learn it. And by learning it, I mean you should actually use it to it’s (almost) fullest potential and see what features you can pick up and tune it to your comfort. Use that editor as much as possible for all tasks until you’re able to execute your common operations without even having to think much. It must be like muscle memory, for instance, do you think of the shortcut for auto-complete in your favourite IDE? No right? the same logic. Some editors like Emacs(yeah, I’m a little biased) provide keyboard macros i.e., you can record a bunch of keystrokes and run them again and again. Even if you already have found your editor of choice, go through its documentation to find out its capabilities and hey, you may find something new!
Recommendations:
Two great editors that have stood the test of time are Emacs and Vim. They’re such strong contenders that no other editor has even remotely come close to them, let alone take either of them on. Such is their legend that Wikipedia has a dedicated page for them. I recommend you pick one of them. Personally, I’m a fan of Emacs, but Vim is equally good. Both Emacs and Vim has a steep learning curve¹, but it’s worth learning it in the long run. In case you’re looking for modern text editors, Sublime Text and Atom seem to be good. When I started some 7 years ago, I had only heard about them, so I picked Emacs as some of my favourite programmers use it. But take a look and pick out the one you like. I guarantee you, you’ll never look back.
Understanding Computers
It’s a blanket term, I know. Allow me to explain. To be a better programmer, one has to understand computers better. Just like a musician knows his instrument in and out, just like a psychologist understands the inner workings of the human psyche, the programmer should understand the inner workings of a computer, both hardware and software. You have to understand the Processor, Memory, Disk, Network Interface, and what each of them does and how they work together. Similarly, for software, the knowledge of Virtual Memory, Paging, File System, Scheduling, Multi-threading, all are needed.
Let me give you an example to justify my point. Have you ever come across issues in another environment which hasn’t been your Test/Stage environment that your QE team signed off? These issues would almost always not be your application/code issues. Server crashes, network connectivity issues, certificate issues when you make a REST call over https, are almost always environmental² and understanding computers as a whole would certainly help debug and fix those issues. I know the above example is probably a little crude, but trust me, I’ve actually faced all the issues mentioned above in the real world.
Now, where can we find a few unified materials that cover the above areas you ask? No? Okay, let’s assume some do. Remember the courses/papers that you chose or rather shoved down our throats as part of our CS degree? Computer Organization By Carl Hamacher, et. al., Data Communications and Networking by Behrouz Forouzan, Operating System Concepts by Silberschatz, Galvin, Gagne? There’s a reason why those papers were and still are part of our curriculum because they’re some of the core areas that any CS graduate is expected to know.
It’s not like we remember everything we studied, but the point I’m trying to make is to go back and brush up the concepts once in every few years. I’m going to dust my consolidated mark sheet across all semesters to find out the core papers that I studied and brush up on it again. I recommend you do the same.
Recommendations:
Take a look at the papers that you studied during your CS degree and brush up on them. These days you can find older versions of some of the books online as an eBook for free. Dust your mark sheets, in case you don’t remember all the papers you studied, because that’s what I did. If you did not do a full-time CS degree, then look up B.S Computer Science curriculum³ and check out the courses that are mandatory.
There are more topics that I should have covered, but given the size that this blog has already reached, I’ll reserve them for another post, or probably never. But I think this is a good start. If my post motivated or helped you in any way, drop me an email, I’d love to hear from you.
Note: The thoughts and opinions expressed above are solely my own and does not reflect my employers, current or past.
- Emacs probably has a steeper learning curve compared to Vim.
- If it’s a coding issue, your Dev/Test team should have caught the bug in the lower environments.
- You can find MIT’s C.S curriculum details here.