This has got to be a typical scenario. I'm working on a system that has been half-written by another team and never quite made it into production. I started work yesterday on a chunk of software dev work that I expected to take about 1/2 a day...so I'd allowed myself a full day to do because we all know to expect the unexpected.
There are four bits to this job, all of them similar. So I'm expecting the first one to take up about half of the time (identify the approach, solve it, test it), and then the other three would flow on pretty easily from there taking the other half of the time. This is one of those cases when 1/4 = 1/2!
So I'm making good progress on the first bit - I'm just testing it out and I'm on target...maybe even ahead of schedule...could be time to nip out for a coffee or a paddle? But then the test results start looking all wrong...further investigation reveals that there is already a bug in the system here and it isn't doing what it should.
Bugger! What do I do? This is a one in ten bug so I really have to fix it. The paddle is definitely off but the coffee could still happen (might have to be a short black though!). So I fix it and find that this is a bit of a b$#%h to test - it requires an exact setup and you've got to do things in the right order. Time ticks on - a good thng I allowed a full day!
But then these tests start to look a bit screwy and lo, it turns out that there is another bug in a fundamental area that this depends on. SH%$#T!
You get the idea, before long I've forgotten what the original job was. By the end of the day (a rather LONG day) all I've succeeded in doing is the first 1/4 of the job, and now I'm faced with writing up all these other little bugs I've found to justify how I've spent the day. And by the time I've done that I'll have lost the flow on the original job and that will end up taking another day.
C'est la vie!
(and it is a good thing I get paid by the hour!) :-)