Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Possible Duplicate:
As a programmer what single discovery has given you the greatest boost in productivity?

I have seen programmers use a variety of techniques to measure and improve their productivity. What has been the productivity tip/method you have gained from most.

Do mention the details esp. if you use any tools to help yourself in implementing the method or tracking your progress.

Some things I can think of are GTD, pomodoro or using a software/utility like Rescuetime or keepfocussed.

share|improve this question
1  
I outsource my day job ;) - it saves a lot of time. – Job Dec 6 '10 at 21:53
@job: How much time does it take to fix all the bugs (on code that you haven't written) or do you get extra money for that – Amit Wadhwa Dec 7 '10 at 6:23
1  
@ChrisF: What's the point of closing a question as a duplicate of another question that's already been closed? – Robert Harvey Dec 28 '10 at 21:59
@Robert - Looks like I selected the wrong option. I should have double checked what I was doing. It should be closed as "not constructive". I'm pretty sure that if I reopen I won't be able to close with the correct option without getting another moderator involved. – ChrisF Dec 28 '10 at 22:02
I don't believe this is a dup as the top answers for the other questions are "Code completion", "Syntax highlighting", "Google" etc. which are definitely not appropriate answers for this question – Amit Wadhwa Jan 5 '11 at 19:14
show 2 more comments

marked as duplicate by ChrisF Dec 28 '10 at 18:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

13 Answers

up vote 21 down vote accepted

Always take the time to make a plan.

There is absolutely no substitute for a genuine lack of planning. To put it another way...

You can use an eraser on the drafting table or a sledge hammer on the construction site. -- Frank Lloyd Wright

share|improve this answer
3  
+1 for the great quote - thinking a little more always saves time and effort – Gary Rowe Dec 3 '10 at 21:26
2  
But we can save a few hours planning by spending a few more months coding! – Alan Dec 4 '10 at 20:09

Learn all the keyboard shortcuts that you can. Taking your hand off the keyboard to put it on the mouse and click on something probably wastes more time than anything else I can think of.

Like me having to click on the "Post Your Answer" button instead of there being a hotkey for it.

share|improve this answer
6  
It's Tab, Enter when you post an answer, and Tab, Tab, Enter when you're done editing a answer. :) Oh, and +1 from a fellow keyboard aficionado, because I wanted to post this exact answer myself. – sbi Dec 3 '10 at 21:22
Absolutely! I try to keep my hands on the keyboard as much as possible. Not just for productivity's sake, but also for the sake of my entire mousing arm. The mouse is an ergonomics atrocity. – George Marian Dec 3 '10 at 23:20
+1, I really like this idea, even though I have a wonderful logitech MX revolution mouse (wonderfully ergonomic), time is still wasted moving it... I already have the VS2010 Keyboard Shortcuts cheat sheet ready to learn... – Dal Dec 4 '10 at 0:16
I must have done something the first time to screw up focus, I did try the tab, enter assuming post would be next focus. Will try again :) – BlackICE Dec 6 '10 at 13:25

Mastering a Text Editor

I use vim, but it doesn't matter which you use as long as you pick a powerful one and stick with it. Being able to jump around and edit anything in a source file without touching the mouse is great -- even better is when it becomes automatic, and you don't have to think about it. Syntax highlighting makes it much easier to visually scan a file, and find-and-replace makes refactoring much easier.

I can't believe I used to think that Notepad was a "text editor."

share|improve this answer
1  
+1. Watching a good programmer at the keys of a real text editor like vim or emacs is like watching a master piano player. – Kristo Dec 4 '10 at 2:23
I hate VI/Vim... but it's so invaluable when trudging thru Linux. – WernerCD Dec 6 '10 at 21:49
I use Emacs, but I find something new to learn everyday in my climb to becoming automatic. But whatever I have learned so far has effectively killed my mouse usage. A huge time saver, I realise after converting to Emacs. – vpit3833 Dec 6 '10 at 22:03
I can't tell you how many new documents I have opened when working in a non-emacs editor, trying to move down in the file (C-n C-n C-n) – Carson Myers Dec 7 '10 at 5:44

Talk your problem with a fellow programmer

Sometimes you can get really great ideas that get you going.

share|improve this answer
4  
If you are dealing with a bug, a rubber duck can sometimes do just as well. – Zeke Dec 4 '10 at 0:04
Yeah, but when you are working with non tech people they may think you're crazy... F them!. – eiefai Dec 4 '10 at 0:10
@Zeke You may need to explain that having a rubber duck on your desk that you explain bugs to can help. (Just Java 2 Peter van der Linden) – Gary Rowe Dec 4 '10 at 0:11
1  
Things can change. It used to be that people wandering around on the sidewalk holding a loud one-sided conversation were thought crazy. Nowadays, they're thought sane as long as they perform the mystic gesture of holding something to their ear. – David Thornley Dec 6 '10 at 21:06

Whiteboard with user story cards on it

We use the Agile methodology at work, and having those user story cards stuck to the whiteboard provides a great boost to productivity. That is because we can see what is being worked on by our team, and other teams as we wander by their desks. This promotes conversations about their work that introduce commonality and cool new designs that others have come up with. These then get shared into our projects (if appropriate) and overall productivity is boosted.

share|improve this answer
1  
also, corkboard.me can be used for geo-distributed teams – eiefai Dec 5 '10 at 22:00

A quiet room or a great set of headphones and music...

My productivity increases big time if I can tune people out. I try never to complain though since I might be the one making the noise next time. In our office we have a nice big side room where anyone that wants to work in peace can go to concentrate. In that room we also have a projector that can be used for team programming. Its like the escape zone to get things done.

share|improve this answer
2  
+1 for headphones - I have a playlist that just goes round and round and helps me reach the flow. – Gary Rowe Dec 3 '10 at 21:25
Noise redux is a big plus! – Jonn Dec 4 '10 at 2:07
Good in-ears plug out sound easily. I usually have mine on low volume. – user1249 Dec 4 '10 at 20:30

Books

Read good books on programming, software development process, and project management. This way you pick up useful tricks from smart people.

For instance, I have recently read "Clean Code" which, among other things, talks about how functions should be very small. If you have logical sections in your function that you can describe with a comment, you should make them into separate functions with descriptive names, even if they are only a few lines long and you only use them once.

Keeping functions small seems like an obvious thing that every programmer knows. However, this rule is often ignored, and it is almost never taken to such extreme. I tried doing that, and it has worked wonders for code readability, maintainability, and testability.

share|improve this answer
Taking it to such an extreme always seemed silly to me. If I write a function to find x to the y th power, putting the loop in a separate function would just be an unnecessary addition that would make readers jump around the code. – Maxpm Dec 7 '10 at 0:38
Obviously, a power function is a only a few lines of code already, and it makes no sense to break that up. On the other hand, let's say you need to raise x to the yth power in some larger function, and let's say you've decided to hand-code that for whatever reason. Then you should definitely wrap that into a separate function. Anyway, try it. It really helps. – Dima Dec 7 '10 at 12:21

The Best (Coding) Tools Money Can Buy

And it's even better as most of them are free:

  • Emacs (for coding) + org-mode (for tasks) + gnus (for e-mails) + other modes (for everything else)
  • Eclipse (for analyzing code and refactoring)
  • Freemind (for charting ideas and brainstorms)
  • JIRA (for issue-tracking)
  • Google Calendar (for time management, reminders, TODO-lits)
  • Virtual Box (to have specialized environments... and seamless VMs are great!)
  • Awesome (as your tiling window manager)

NOTE: you can use these full-screen to behave more or less like zero-distraction software and stay focused, as long as you don't tweak them too much to make coffee for you, read out loud your RSS feeds and so on, considering all the stuff you can do with emacs and eclipse... Awesome WM helps with that as well, or tiling windows managers in general.

A good pair of head-phones or earphones (preferably headphones for long-term use) is also a good help. A private or semi-private office also helps (which is also a point mentioned in the link).

share|improve this answer
3  
The best tools money can buy, can make your employer go out of business... – user1249 Dec 4 '10 at 20:04
@Thorbjørn Ravn Andersen: yeah sure, but you don't need to be sooooo in love with your tools that you manage money like a perfect idiot. I mean if that were to happen, then there's not so much you could have done in terms of productivity. Your manager needs to learn to, well, manage... The best money tools money can buy doesn't mean always the best and/or the most expensive. It means the best you can have for your budget without being a rat about it and instead of spending the money of useless corporate attire or consulting services. – haylem Dec 4 '10 at 21:43
1  
ok, so not "best" anyway... – user1249 Dec 4 '10 at 22:03
1  
@haylem, but are there BETTER tools then, than money can buy? – user1249 Dec 4 '10 at 22:58
1  
@haylem, your idea of what "the best tools that money can buy" means is interesting. Allow me to point out e.g. IntellJ and the IBM Rational suite of programs which arguably is better than the free IDE's for many purposes. Only thinking in "the best free tools that money can buy" is missing JOels point. – user1249 Dec 5 '10 at 16:20
show 6 more comments

Close Outlook, log out of IM.

share|improve this answer

Safari Books Online is my constant companion while I'm coding or architecting. I used to purchase every book under the sun but now having it all online and searchable is unbelievably helpful. I can't imagine coding without it.

share|improve this answer

Copy, Paste & RegExp

I think it's really the best way to create most of a code you planned before and to fix bugs.

Some examples:

  • To quickly find a place in already existing code you should search for a part of a message like "You've got 13 new messages" → search for "ve got .* new mess".
  • When you create code that is bean-like you can usually copy a part (or whole) class and then simply replace some words. You can even write some transform macros.
  • When you write HTML it is very useful to be able to quickly change your structure decisions like say remove all style attributes from span elements ("<span style.*?>" → "<span>" for simple cases or a macro/function for advanced).

That is why I think mastering RegExp gives you a significant productivity boost. That and probably learning to type fast :-).

share|improve this answer
Better... use an IDE that supports text templates/snippets. – MIA Dec 4 '10 at 1:15
Snippets are nice when you are working on one project, but even then you still have to change some stuff in them and there is nothing better for mass changes then regular expressions. – Nux Dec 5 '10 at 21:44

Time Machine for OS X.

A perfect supplement to a source repository allowing to go back in time for local files if needed.

share|improve this answer

Ability to do glue code -- stuff like sed, awk, utilities like sort, uniq in *NIX, Linux and general shell scripting in all other platforms.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.