Would you like to receive similar articles straight to your inbox?

Productivity Tips for Programmers

This article is written by SatyaNarayan who worked as a Developer at Thoughtworks and is now moving to orbismedia – a startup in mobile space.

This post is dedicated to programmers who believe that spending more time on the project (in the office) is directly proportional to productivity of the programmer. Okay, I’ll break a secret here. “IT’S NOT“. Obviously you need to be in front of a computer to type, but the similarity with programming just ends there. Okay. So what should programmers do with their time?
Utilize portion of your working time honing your skills and updating on getting more productive. Here are a few simple things you can do:
1. Write Unit tests for higher productivity. (if you’re not already)
This is pretty basic stuff. But there are so many programmers who don’t do that. Well.. you should. This not only improves your code quality, it improves your productivity too. You’re not only more confident of releasing and modifying your code, you save a lot of time in the process as well.
Imagine you writing a large web application, a small code change means, rebuilding the application,deploying it and checking the feature (probably hidden under 5 links). Imagine doing it time after time. Now replace this with testing only that small change. This is a fairly practical example and with practice you can really gain a lot of time by testing effectively.
2. Practice your programming.
This is a no-brainer too. Look at other professionals. Cricketers improve their skills with ‘net practice‘. Musicians practice their instrument. Singers with their ‘Riyaaz‘. Amazingly, most of the programmers don’t practice.You should.
Take up a book like Effective Java, Design Patterns and practice few principles per day. Take a few problems from Project Euler and solve them with your favorite language.
Unlike your regular projects, where you have a deadline, practice programs need not be time limited. So take your time. Do things the right way. With this practice your productivity will improve a lot in your regular work. It’s obvious, isn’t it.
3. Use libraries and help improve them.
There are many programmers who are library averse. They’d rather code it themselves than using a library. The primary reasons are:

  • They don’t know the library.
  • The library does lot of other things they don’t need.
  • They feel more in control with their own code.

Think about this

  • A library has been well tested and covers more scenarios,saving you lot of time.
  • When you improve on the library, it can help a larger community. Improving your private code couldn’t possibly have that impact.
  • To top it all, other folks are working on improving that library too. That indirectly helps your code.

In short, use a library unless it is too unsuited or heavy for your requirement.
4. Read code and technical stuff
Reading code and modifying is as difficult if not more than writing it in first place. There’s lot of good code available for reading in the open-source world. Pick up your favorite library and open up its code and start reading. You may not comprehend all of it immediately.. but with practice, you’ll be able to identify different patterns used and can incorporate them in your code too.
Apart from code, also subscribe to few technical blogs from good software experts and keep yourself updated on the trends.
Well, there are many other things you can do to improve your skills and be more productive in your work. These top my list. Do share things you do..

Comments (42)

  • Little Tips, and precise ones.. Good Work Satya..

    • Bharat Goyal
    • October 12, 2010 at 5:05 am
    • Reply
  • MR.satya , done a gud job.
    the hints r inspiring. its not only for developers, but it applies to all depatrments of s/w proffession.
    “work hard, get fruitful results.”

  • Good post, short and sweet. I recommend to everyone to read the Pragmatic Programmer due to its shortness but wide range of advice.
    Would you recommend reading bad code? Maybe to develop your code nose…

  • Thanks @Bharat and @Sushma
    @AlexBowe Thanks Alex. Agree with you on the book Pragmatic Programmer. Its a terrific book.
    Reading bad code occassionally is fine to identify common code smells.. but shouldn’t be overdone.

  • Don’t be too quick in dismissing writing your own libraries, you can put that as a “practice” exercise. I wrote a post encouraging more programmers to re-invent the wheel (8 Reasons for Re-Inventing the Wheel as a Programmer: you should not be afraid of it (unless a nuclear reactor can blow, or a car start accelerating, or whatever really critical).

  • Here are some more things I have found useful:
    1) Master command-line tools, they can be very productive. I even use some Unix tools on Windows (like grep, m4 macro processor…)
    2) Save your keystrokes, define macros and templates in your IDE etc.
    3) Learn keyboard shortcuts for the programs you use most often

    • Ivan Milosaveljvic
    • October 12, 2010 at 12:19 pm
    • Reply
  • As Alex mentioned. Read The Pragmatic Programmer. I am almost done with it now, and it has changed how I approach programming. Great Read.

  • Nice post. Can you suggest some good technical blogs that you follow to keep up with trends?

    • Manish
    • October 12, 2010 at 1:28 pm
    • Reply
  • @Scott Agreed Scott. Thanks.
    @Ivan Thanks for sharing the tips. Mastering your tools is a great way to code faster. A good programmer struggling to type doesn’t really make a good picture.
    @Ruben I’d suggest writing your own library after looking at other libraries and not being satisfied with it. If there is stuff you can build upon, you should do that. In absence of that, ofcourse go ahead and build one. Thanks for sharing, and like your article too.
    @Manish Some of the folks that I read are:
    1. Joel’s articles
    2. Martin Fowler
    3. Kent Beck
    4. Google’s tech talks
    5. Few other folks like Steve Yegge, Jason Gorman, Mark Needham, Neal Ford, Jim HighSmith, Uncle Bob Martin.
    6. Follow Stackoverflow
    I can go on.. Make sure you don’t spend your work-time on it. But you should follow their writings.

  • Very much agree with Point # 1.
    It gives confidence when releasing the project / patches.

  • Manish, Hacker News is the best place. Make sure you don’t overspend your time there. It’s kind of addictive once you start liking it.

  • Ah, I’ve forgot one more tip: automate as much as you can, as long as it is reasonable and cost-effective. Automate tests, build, deployment, code generation. Also, keep in mind that not a single technique will boost your productivity, but when you apply several of them then you will see a real difference. Happy programming!

    • Ivan Milosavljevic
    • October 12, 2010 at 4:21 pm
    • Reply
  • very nice article.Surely there are more things someone can do to become more productive but those you mention are truly essential

  • Here’s an even better tip: read the requirements. Then read them again. And again. Then use a pencil and a piece of paper. Then write some code, when you really have to.

  • I really get a productivity boost by using a good IDE and knowing how it works and what the keyboard shortcuts are.

  • In my case following are additional things which improves productivity-
    For smaller task – identify essence (most critical part) of problem early.
    For Bigger projects – Proper Abstraction.

    • Sunil
    • October 13, 2010 at 11:29 am
    • Reply
  • It’s a great post.

    • Luiz Henrique
    • October 13, 2010 at 12:43 pm
    • Reply
  • To boost my skill, I read open source code, VS IDE short cut, NUnit etc.
    For all small work I create batch file.
    1. Backup my Db.
    2. Deployment menas copying from dev to test server.
    3. web service prox generation.
    4. Modifying Class template.
    5. IIS reset & clean Asp.net cache.

  • Your comments on libraries are a little naive. I am sure the thousands of web developers that have had to roll back to previous versions of the AjaxControlToolkit due to crippling bugs in new releases would disagree with the testing bit. And then all of the people who added log4net to their projects expecting “other people to be working on it” have been disappointed that it hasn’t been updated since 2007 and throws all sorts of warnings when you move a project from 1.1 framework to something newer. And before anyone says that is because it’s .Net, I remember when cgi-lib.pl was abandonded in favor of CGI.pm and could come up with plenty of examples for various langugages and platforms.

    • Tim
    • October 13, 2010 at 2:56 pm
    • Reply
  • Have dual monitors and customize the IDE and toolset such that you don’t need to switch windows back and forth. It’s good for having documentation/tutorial/example code on the right and your work on the left.

    • Dave
    • October 13, 2010 at 3:16 pm
    • Reply
  • Step away from the computer and think a little before you start coding. I’ve started taking a short walk before starting a new feature. As often as not I come up with a solution that’s better then my initial idea by forcing myself to think a little before jumping right into the code.

  • @Dave Nice one. Dual Monitors, Good keyboards, Nice office conditions really affect the productivity of an individual
    @Eric thats a nice tip too. Step away from the problem for a while. Also, discussing the problem with somebody is a nice way.
    @Tim I agree with your comment. There have been libraries that haven’t kept their promise. One needs to choose libraries with some research. Look at the community that drives that library. Discuss on their forums. Be careful of libraries run by single person. But few instances shouldn’t really discourage that trend.
    Nice discussions here.. and on the hacker news page too.. Some really good tips.

  • @Eric.. that is so right.
    I might have been working on a coding problem for hours and only solve it by getting up and thinking about it away from the computer. I often come up with a much more efficient way to code something by doing this.
    To be honest.. many of my big breakthroughs occur not in the office, but in the john. hehehe

    • Gary
    • October 13, 2010 at 5:11 pm
    • Reply
  • Learn the tool and become one with it – then learn grep and xdebug. Unit Tests are great when you assume you are developing the project from scratch which not usually the case so it would be better to learn how to debug and trace the code. Reading about your job?! Not a chance too much of the same is really bad.

    • kingletas
    • October 13, 2010 at 7:31 pm
    • Reply
  • 1.How many of us doing pseudo code in a scribbling pad before starting programming. (stresses here programming not project)
    It avoids to miss any connection points in the overall view.
    2.also donot keep on pressing Control +S (aka related) while doing your coding in IDE and compile as and when you write your code. It shows the inconfidence about your own writing. Need to follow the scribble pad notes and complete the sizeable portion of code before hitting save, compile.
    Just my views,

    • sahridhayan
    • October 14, 2010 at 9:50 am
    • Reply
  • Very cool article, but for me all this advices really general and not concrete.

  • Thanks for informative post. I am J2EE developer having 5 years of experience Can you please let me know how can I improve my design (OO programming and design pattern wise) and architecture skills? Thanks in advance

    • dhaval
    • November 17, 2010 at 2:01 pm
    • Reply

Leave a Reply

Your email address will not be published. Required fields are marked *