How to Become an Efficient Programmer

Good programmers usually have one thing in common. They work efficiently. These are my own rules on how to get better and foremost more efficient when it comes to programming stuff. Whether you do C#, Ruby or even LOLCode, these rules apply to all of them. Sure, you can be a master of Zen in one or two languages, but that doesn't mean that you are an efficient and good programmer overall. Do give me feedback if you know something this post lacks!

Automate the stuff you are able to automate

When it comes to stuff you do daily on your computer or programming device (I know people that hack on their cellphone), you should always try to automate that stuff as much as you can. Try to find tasks that can be automated and automate them. It could be file transfers or creation of a base template application.

Depending on the project you are working on tests are great to automate when possible. As for Ruby, Autotest/Zentetest is a great tool for automating tests.

Learn the shortcuts

I'm not only talking about keyboard shortcuts or the ones you can click on to get to a different location in your file structure. Try to always be on your watch when programming or even just using the OS for smart and fast ways to get from A to B. Especially tasks that you repeat often will save you a lot of time in the long run.

Use Version Control

Keep your projects in a Source Version Control. Git is a great tool to do that. Whenever you make a change, you can commit it to your repository and later on switch back to a commit you did earlier if something goes wrong. Keep your changes small and describe them well, so that you easily can look back in history when you are in need for that. Too small changes though makes you inefficient and finding a balance might take a while.

Do Instead of Talk

A golden rule that I used to ignore. The worst thing that can happen if you start doing stuff before planning is that you fail. Then you get to do it all over again. And what comes with that? That's right, experience. Try to get feedback more often while developing a feature instead of planning how it will look like when its done. Chances are that you will fail along the way anyway and have to go back to the planning stage. The best solutions are usually those, which are tested and tried out by users who will use them.

Do the right things

One thing that separates efficient programmers from inefficient ones is what is actually produced and prioritized. Quite often you can implement a solution during different time scopes. Consider the following:

  • Solution barely gets the job done - takes 5 hours of programming
  • Solution gets the job done and has 100% code coverage - takes 10 hours of programming
  • Solution is modular, well tested and refactored five times - takes 20 hours of programming

I really canĀ“t put enough emphasis on this. The best and most efficient programmers I've worked with during my entire carrier are those that are able to plan and focus completely on the core problem and then finding a solution for that.

Keep a Library

While Google is a great code library, there are some snippets of code you will never find there. Keep a personal code library of stuff you have done. This way, you will always be able to go back and fetch code from a project later on to reuse in the next one. This saves you time and makes your life as a programmer easier.

Focus

Get rid of the noise that's bothering you. You might not even notice, but your IM, cellphone and e-mail client doesn't always deserve the amount of attention that you are giving them.

A couple of years ago during a super hectic time at work/school, I did them both at the same time, I simply closed down my e-mail client only launched it three times a day. One time in the morning, one before lunch and one half an hour before i finished work. This has kept me from focusing on my customers problems or requests all day long. Remember, you are not saying no to your customers/colleagues, you are simply putting them on hold for you to be totally focused on them later on.

IM and texts are a great tool of communication. Thats a fact. But not at all times! Interruptions are usually a bad thing when you are programming. Think about it!

This is really a subject of saying no!

I know there are great tools that can help you follow these rules and I would really appreciate some feedback about just those.