There are three scenarios where I am asked to predict how long it will take:
- I know I can solve the problem without further consultation of anything (that is, there is no unknown in the problem. I already have all the knowledge to solve the problem)
- I know the problem can be solved but I need to do a lot of experimentation to see how things work (for example, you may know a car tire is easy to change, but if you have never changed it, you may run into issues that you will avoid/correct the next time around, thus making your prediction of how long it will take, better... yes, this I know is one of the answers to my question here... experience)
- I am told the problem can be solved, but I have no idea where to begin so I start breaking it down into small pieces and go to Step 2 (where I know it can be solved, but needs experimentation)
I am generally bad at predicting how long something will take even if I have done something similar before. I always run into a snag I did not foresee. My question is mostly directed towards Point 1 and somewhat toward Point 2 (in Point 3, I know my predictions will always be wrong). I know that it requires experience, which will allow me to do good predictions but there has to be some basic rules I can follow to at least start making somewhat accurate predictions. Right now I feel like I will never be able to make good predictions, no matter how much experience I gain. One rule that I have heard is something along the lines of predict how long it will take, then multiply it by 2, then add two more weeks
(more of a joke... or maybe not?)
Now I know that predicting how long a task will take is a general problem in the industry, but people still predict to some extent and can't always be wrong (specifically on smaller tasks). In my case, if somebody tells me How long do you think a linked list with these features will take?
I will give a wrong prediction even though I know how to make one without consulting any body/book.
So my request is to SO (especially veterans in the industry) is to give me (us) pointers on how to get better at predicting how long a task will take.
Background
I am currently a Masters student working at a company. I am very young in terms of industry experience and experience in general. I am reading lots of books on better programming, design etc. (most of them recommended here at SO) and my knowledge of programming is ever increasing thanks to work/school and SO; but of course, there is literally tons more that I need to absorb.