Welcome...



...All those moments will be lost in time, like tears in rain....

- soliloquy from Blade Runner


Bits and bytes do get lost, awash in the rain of data flow that is Internet. They slip away from us, never to found again... some of them will be captured here, many more will not... like tears in rain...



Wednesday, August 22, 2012

The science of estiamates

 That dreadful question - how long something will take...

  First solution I've heard was from my professor at University - it boiled down to "take your best estimate then multiply by 3". Needless to say, I thought that as overly cynical view of life until I started working :)

 What happened next was that I either worked in companies that didn't really asked for estimates, just for job done in order of priority, with appreciation on faster the better, or I had to give estimate to project manager, in which case neither of us really knew what's the problem is. Me, because at that point I didn't have enough information to understand the whole problem, project manager because it was not their job to understand technical problem, just to manage resources and timelines. And in those cases I rarely had a chance to revise my estimates based on improved understanding, so above mentioned maxim was very useful when I finally started to see the wisdom in it.

  Second time I really had to think about way I estimate thing was on the interview. Question was about guessing how many golf balls will fit into school bus. It was not fun, since I had no idea how big actual school bus is! I did look it up, and BTW, maximum length is 12.5 meters = 40ft.

After some discussion, it turned out that interviewer wasn't really interested in the anything but the estimation process. He explained that basically, you start with arbitrary number that you know is wrong - i.e. bus is less than 1 yard (or meter) long. Since you know it's wrong, you go to the other end - bus is longer than 15 yards (meters). Well, wrong again. So your length of the bus is average of those 2 - that's the answer. Even if this is more than actual bus length (or less), whatever, that's your starting point of estimate.

  It will take less than a day? Wrong. It will take more than a week? Wrong. Ok it will take 2-3 days then.

 That interview didn't work out in the end, unfortunately,  since what they really needed was Web Forms person, not MVC specialist like me, but it was fun and challenging interview.

  Today I've found this table at http://coding.abel.nu/2012/06/programmer-time-translation-table/

Estimate The Programmer Thinks What the Programmer Forgot Actual Time
30 seconds There’s just a small change to the code to be done. I know exactly what to type and where. It takes 30 seconds to type. Time for starting the computer, the development environment and getting the right source. The time to build, test, check in and document the fix 1 hour
5 minutes It’s a minor thing, I just have to look up the exact syntax on google and fix it. It’s quite rare to find exactly the right information on the first try. Even if it is found, it probably needs some adjustments before it works. Add time for building, testing etc. 2 hours
1 hour I know how to do it, but it’s some code to write so it will take some time. 1 hour is too tight to have any margin for unforeseen problems. Something always fails. 2 hours
4 hours It’s some code to write, but I roughly know the step. I know the Wizzabanga module of our standard framework can do it, but I have to check the documentation on exactly how to call it. This is probably the only realistic estimation. It is large enough to have some margin for unexpected problems, while the task is still small enough to grasp. 4 hours
8 hours I first have to refactor the Balunga class into two, then I’ll add a call to the Wizzabanga code and finally add the new fields to the GUI There’s a lot of dependencies on the Balunga class from different parts of the system. About 40 different files have to be adjusted. The newly added field in the GUI has to be added in the database as well. 8 hours is too large to grasp completely. There will be more steps than the programmer thought of when estimating. 12-16 hours
2 days It’s really quite a lot to code. I have to add some new tables to the database, a GUI for those and then the logic to read and write data to the tables. 2 days of work is too large to overview for most developers. There will surely be things that are missed. Not just small things, but entire major pieces of functionality required will be forgotten during the estimation. 5 days
1 week Ouch… that’s a HUGE task. I don’t have a clue on how to do it, but I can’t say I don’t know. One week should be enough, I hope, I really hope, but I can’t ask for more or they’ll think I’m not competent enough. The task is way too large to get an understanding of for most programmers. It has to be sent back to an architect that can help splitting it in smaller parts and provide some direction how it should be solved. The architect might find a simple way to do it – or find that there’s a lot more work than expected. 2-20 day

Sherlock

  One of the best TV shows I have seen in the long time is "Sherlock", BBC production. It's brilliant, witty and gripping - modern Sherlock Holmes/John Watson in 21st century London. Sherlock texting and Watson having a blog :) Life can't get better than that ;)

  Seriously, great series, and I can't wait to get next season - both actors took a break to film Hobbit in 2012, so I have to wait for at least another year :( Netflix has first season (3 episodes) and other 3 (second season) were aired on TV.

 I've stumbled upon this article this morning:

http://io9.com/5933869/stop-calling-sherlock-a-sociopath-thanks-a-psychologist

 and it was good to read that, since Sherlock does not deserve being called sociopath even by himself :)

 I do remember when reading "IT", Stephen King's masterpiece, he was portraying Patrick Hockstatter, and it was scary and terrible portrait. This boy fits in all those 4 categories easily and that chapter scared daylight out of me at the time. It just goes to say how very good Stephen King is at painting his characters - no cardboard characters for him, even for a fairly insignificant boy who shows up only in one or two places. I think "IT" is King's best book, those seven kids felt like an old friends to me after reading the book.

 It also reminded me a bit of Ray Bradbury when protagonists were flashbacking to their childhood and getting nostalgic for a different time; it felt so real, and at the same time so weird to hear things like how much you could buy for a dollar ;( or how rock and roll was forbidden...