Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I find that when I'm working on hourly-billable projects (in particular, those that are research/design/architecture-oriented as opposed to straight coding) that I'm easily distracted by any number of things (email, grab a drink (loss of focus, but nature happens), link off the webpage I was reading, wandering mind (easy when the job calls for a lot of thinking), etc.) This results in very fragmented time, far too incremental IMO to accurately track with a timeclock, and some time very gray. I frequently end up billing for only some fraction of the elapsed time I spent in order to feel fair, but sometimes it takes a really long time to put in an 8-hour day.

By contrast, when I've worked for salary I've not worried about whether I'm actively working at any given minute, I just get the job done, and I've never had anything but stellar reviews/feedback from past salaried employers, so I think I get the job done well. I personally believe in an 80/20 cycle: I get 80% of my work done during an inspired 20% of my time. But I have to screw around the other 80% of the time in order to get that first 20%.

So the question: what billing/time-tracking policy can I adopt in order to be fair to my hourly customers without having to write off my own less-productive 80% that a salaried employer is willing to overlook in light of the complete package?

Note: This question is not about how to be more productive or focused. It's about how to work around whatever salient limitations that I have in a way that's both fair to me and to my customers.

Update: A little clarification (to pre-emptively stop some righteous indignation): I currently have a half dozen different project/client groups. It's not a great situation and I'm working at reducing it down to two, but that's my current reality. It's very easy to get off on a thread related to a different project than the one I'm clocking, and I'm not always conscious of it at the time. [I did not intend the question to mean that I was off playing games or making personal calls, etc., and have adjusted wording above to be clearer. Most of the time. I am only human, and sometimes the mind does force you to take a break! :-)]

share|improve this question

closed as off-topic by Jim G., MichaelT, GlenH7, psr, Robert Harvey Jul 7 '14 at 20:34

  • This question does not appear to be about software development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

I'm interested in this too. In a similar but different situation: Remote work. I'm salaried, but still running into the same issues regarding focus and what to put on my timesheets. – Matthew Scharley Feb 23 '11 at 2:04
I don't know why this is even a question. I'm sure you know right from wrong. You bill for the time you put in to the customer's problem. If you can't focus it shouldn't be at your customer's expense. @Matt, If you can't focus at home and give your employer an honest weeks work for a weeks pay then you shouldn't be a telecommuter. I'm sure you think you're awesome and get a weeks worth of work done in a few hours but just because your employer doesn't know any better doesn't make it right. – Dunk Feb 23 '11 at 2:33
This may belong on – blueberryfields Feb 23 '11 at 2:36
@Dunk I do as well or even better at home as I do in the office (I work 50/50). My comment was in relation to keeping track of work on multiple different projects, some of which I may need to jump to at a moments notice (client rings, etc). In fact, this affects me in the office too. – Matthew Scharley Feb 23 '11 at 2:38
This question appears to be off-topic because it is about a billing issue; not about software development. – Jim G. Jul 6 '14 at 0:32

11 Answers 11

up vote 23 down vote accepted

Get a chess clock. Or a virtual-chess clock

Whenever you switch your focus, hit that button. At the end of the day, look at your totals and see how much time you actually spent working on the project vs how much was spent elsewhere.

I'm sure there's plenty of free ones online, or you can create one. I took about an hour to make one which is nothing more than a little box with some toggle buttons that floats around on my screen on top of other windows.

share|improve this answer
I think this is a good approach. Plus, drawing attention to the distractions in this way may help Greg to reduce their frequency over time. – Marcie Feb 23 '11 at 21:04
At first I didn't think this would do much for me, but I tried one today and I found it was very effective. I'm not sure if it's really the timekeeping aspect, but because it forced me to be acutely aware of what I was officially doing at any given time I do feel that I had a better picture (at least for today). It turns out that the distractions aren't quite as time-consuming as I thought, but it could also be that the timeclock kept me more focused than usual. We'll see as the novelty wears off whether the positive effect continues, but I'm optimistic thus far. – Greg Feb 24 '11 at 2:12

A client pays for results. Productivity per hour and focus per hour are not necessarily linearly related. If you made an hours worth of progress towards the result (and the client agrees by continuing to contract and pay you after seeing the results and your bill), it doesn't matter what percentage of any hour you spent unconsciously cogitating while looking out the window at the wildlife (or whatever), versus typing code.

The converse is also true.

share|improve this answer

As a rule of thumb when I realize that a time period has heavy interruptions I bill either half (or if its really bad 25%) of the time. So if I worked two hours but it wasn't consistent, I'll bill it as 1.

Another trick I use is TimeSnapper, it does a good job at telling me what time was spent in VStudio versus IE, Outlook, etc..

share|improve this answer
What happens if you're doing web apps where you will spend a large portion of time in your browser anyway? – Matthew Scharley Feb 23 '11 at 2:16
@Matthew I don't know if TimeSnapper does it, but other similar tools like RescueTime will tell you which sites you spent time on while in the browser. – Adam Lear Feb 23 '11 at 2:24
This estimation: bill half or 25% is what I do now. Something like TimeSnapper is probably not relevant in my case either - much of the time is spent thinking (or whiteboarding or reading paper), which means whatever window was up on my screen stays up for a long time. – Greg Feb 23 '11 at 2:53

Stop It

You have sold the client an hour of your time. Shut off the distractions and give the client what they paid for.

ADDENDUM: I'm not trying to be harsh. The question is asking for a technical solution to a non-technical problem.

ADDENDUM 2: OK, okay, okay! @Matthew has a good point, some people are natural multitaskers. If that's not the case, here is a technical solution: pomodairo and the underlying Pomadoro Technique. It still takes self-discipline, but the technique can help you learn it gradually.

share|improve this answer
Actually, I'm selling my clients results; nobody buys hours. An hour of time is an invoicing mechanism. I was pretty specific in my question that productivity/focus improvements are an obvious resolution but that is not what the question asked for. A better response might be "bill the client a fixed fee for that result" – Greg Feb 23 '11 at 2:48
Programming, or any creative work really, is inherently difficult to schedule into fine-grained units of time. – Charles Salvia Feb 23 '11 at 3:16
I have to -1 this, especially since it's been so popular. I agree in principle, but in reality not everyone can disconnect their phone, turn off their email and hang a 'do not disturb' sign on their door so they don't get distracted by co-workers (if they have a door). – Matthew Scharley Feb 23 '11 at 3:28
@Greg: "I'm working on hourly-billable projects". You have sold your time. Shut off the voluntary interruptions and focus, or flat-bid the project and be as inefficient/ineffective as you want. Think about the 20% of the time that you are "in the zone" - how do you get there? Can you engineer your environment to get there reliably? Given your context, there are only two ethical choices: change your ways, or change your billing method. For the record, I flat-bid projects, but not because I can't focus for a solid hour, but because I have multiple interleaved projects to manage. – Steven A. Lowe Feb 23 '11 at 4:09
@Steven With all due respect, some people may just work differently than you (likely accounting for the mixed bag of votes). The flip side of this issue is that if I have to "take a break, go find [my] focus" as @jmort523 said, for the sole purpose of getting some "inspired coding" done, I just gave away that hour or whatever for free, since it wouldn't have been needed if not for the client. – NickC Feb 23 '11 at 5:10

One solution is to stop billing by the hour and instead go for contracts that are paid on delivery.

Since you likely have to come up with an estimate of the number of hours a project will take you to complete a project anyways, you could just multiply that out and charge the lump sum.

share|improve this answer

If you have a brain that keeps switching tasks regardless of how much willpower you exert, like me, there are a few things that can help.

  • Use time tracking software like ManicTime (recommended by @Jon in another answer), RescueTime, or ChronosX that accurately records your activity, including the foremost app, the document or website URL associated with the app, and the actual time spent. This level of detail can be very helpful for:

    • Determining how much time you're actually spending on projects, and
    • Seeing which distractions are particularly potent, allowing for the possibility of reducing their prominence.
  • Use something like the Pomodoro technique to set up small stretches of time where you can try to keep at a task, knowing that you'll be able to break focus soon. I've found that while a pure "just focus" willpower effort doesn't work, one that only requires a shorter period of focus time that has the guaranteed promise of a near-term break can help. The full 25-minute pomodoro may be a bit much at first, but most of the apps out there allow you to adjust it to whatever works.

  • If you know you're going to have to regularly switch tasks in order to get anything done at all, do what you can to set yourself up with multiple productive tasks to switch between. I've found that if I have three different useful projects available to work just a keystroke away, I can still get a lot of work done despite the switching. Mind you, it helps if only one of the tasks is programming, or if not, the other programming task is part of the same larger project: if the "program structure" in your brain can be left reasonably undisturbed while you do some writing or other non-dev work, you won't have to rebuild the whole thing when you switch back to that task.

  • Lastly, as I mentioned in a comment, it can't hurt to look into whether your lack of sustained focus qualifies as adult ADD/ADHD, in which case you may be able to get some medication and/or training to help focus for longer periods.

share|improve this answer

This is one of the reasons that I like Their app makes starting/stopping work as easy as clicking on a button. So you can just get in the habit of clicking the button, do something, switch back and click the button again to be on the clock. If you mess up, you can correct the time tracking later, but for the most part getting it right was so easy that I couldn't mess up.

It also was great for the situation where I kicked off a large job for a client, which I checked in on occasionally while doing something else. Tracking the 5 minutes to login and check whether it was still going was a cinch, so I didn't lose track of that (billable) time spent on that client.

share|improve this answer

You may find ManicTime a helpful utility; I think it is similar to Timesnapper (what someone else mentioned) but is free. It shows what applications & web pages you visited throughout the day, as well as when the computer is idle. That way you can block out areas that are definitely "breaks".

I have found this more convenient to work with on a daily basis than having a program where I have to manually press start/pause/stop.

share|improve this answer

I answered a similar question with the following: As long as you aren't blatantly cheating the client (say, by inflating your hours worked by an inordinate amount to bilk more money) and providing valuable work, it doesn't matter if you technically are billing him for 8 hours when you only spent, say, 6 doing the actual work. Chances are you spend time you aren't actually typing away thinking about problems or researching techniques that can aid you on the problem (either immediately or down the road).

share|improve this answer

You have kind of answered your own question already.

You said "when I've worked for salary I've not worried about whether I'm actively working at any given minute, I just get the job done,..."

I would start keep track of the amount of time spent on each type of job and the goal is to correctly estimate the amount of time needed for any job, before each job/project. With this information quote the client a fix amount to complete the job and stick with it.

This way, the number of hours you worked/not work will only impact your efficiency/effectiveness; thus, the number of jobs/projects you can work through in a given amount of time. The "being fair to the client" question does not exist anymore.

Billing hourly is a rather strange concept to me, granted that I work in a profession that bill hourly. The hourly rate multiples by the number of hours worked on a project is always described as the cost of doing a project. However, this cost does not take into account of the wage to hourly rate ratio, overtime (for salary people, at very little cost to the company) and effectiveness of the people. The true cost to a company are salary, benefits, rent, equipment, insurance and utilities, etc. These are relatively stable and controllable factors. The way to increase profit is to generate more revenue. Hourly rate and hours worked on a project, in this case only have an indirect relationship with profit - it can somewhat serve as an indicator of effectiveness; thus, it impact the number of projects (revenue) can be worked (generated) within a given time frame.

share|improve this answer

If 20% of your time is worth 80% of the contract, why waste your time with the other 20% of the contract?

Find someone who's willing and able to do the work that takes you 80% of the time at the same speed as the rest of the work, and sub-contract. Free up your time to get more work that you can do at 4x the speed, and quadruple your income. Or play video-games with it. I have yet to find someone who would not be willing to take a 20% pay cut if it means they get to only work 1.5 days a week.

share|improve this answer
while that may be more economical, I find that completing a project thoroughly brings a sense of closure that I wouldn't get if I stopped at 80%. Additionally, dealing with a sub-contractor can end up eating more of your time just with finding, signing, and billing. – zzzzBov Feb 23 '11 at 18:25
You only have to find him once. – blueberryfields Feb 23 '11 at 18:57
I really like this answer, because it considers the true cost of time. Most coders forget that there's more to life than writing code for other peoples' projects. – Mr. JavaScript Mar 7 '14 at 16:28
most people think of this in terms of economics - how much money is this going to make me. that's, i think, a mistake - the question isn't how much money you'll make, but how happy you'll be making it. it's very rare to find that you're awesome at 20% of your work (and not so awesome at the rest), and also hate the 20% you're awesome at. this is a system for making sure that you're spending most of your time, doing the things you really like doing (and, as a side effect, making the most money possible at the same time) – blueberryfields Mar 7 '14 at 16:46

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