Estimation, The second kind of

July 19, 2009 19:46
We developers are often asked how long it would take to finish a piece of code.  We've become quite skilled at that. We look at the scope, get a rough estimation, adjust it to have time on any issues we might face, add up time for comunication, add coffee breaks, multiply the result by 3 and let business to decide whether they still want the feature.

What we are asked much less often is
how long it would take to run a piece of code.

Enums turmoil

May 3, 2009 20:12

Do you think enums are simple? Well, they are not. Look at the following code

public enum Price
    Inexpensive = Cheap
public static void Main()

Ok so I hear you saying, "It will print Cheap". Cool stuff. You're right! If multiple enum members share the same value, the "main" member acts as a source for ToString. Now we move on - I will just add a few more members.