Blog Home  Home Feed your aggregator (RSS 2.0)  
.Net Jonesie - Note to Self - Operator Overloading in C#
A simple programmers blog
 
# Wednesday, January 25, 2006
Habbits are a bad thing.  Automatic assumptions are the root of all evil.  Challenge everything.
 
    int i = 42;
    Trace.WriteLine("The answer is " + i.ToString());
 
OR
 
    Trace.WriteLine("The answer is " + i);
 
Could have saved myself:
 
        const double TimeToPressKey = 0.3;
       
    string wastedKeyStrokeString = ".ToString()";
        int perDay = 25;
    int workingDays = 5 * 48;
    int years = 3;
        double savings = TimeToPressKey * wastedKeyStrokeString.Length() * workingDays * years;
 
Or thereabouts.
Wednesday, January 25, 2006 8:30:55 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [1]   General  | 
Wednesday, January 25, 2006 9:55:28 AM (New Zealand Daylight Time, UTC+13:00)
Surly you don't type all of ".ToString()" I would think for most object's ".tos" would be enough to give unique intellisense +[enter] + "()" would do it.

Thus
int intellisenseSaving = 3;
timeNotActuallySaved = TimeToPressKey * intellisenseSaving * workingDays * years
Comments are closed.
Copyright © 2012 Peter G Jones. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: