Daily Curious Perversion of Programming #7

Kommentek rulez, avagy más kódját karbantartani mindig vicces:

Az egyszerűség mindig szíven üt:


    private boolean whatEverVariable; // It would be good to know what it is.

És az all time kedvenc, kb. 15 soros kódrészletem elemzése:


    // XXX: this code below makes _ZERO_ sense to me, for the following reasons:
    //      1., this is the only reference to blaFooBar, therefore it's always null
    //      2., this block contains the only reference to Class.getBlaFooBarInit(),
    //          which in turn has the only reference to Class.blaFooBarInitValue variable
    //          therefore it always returns null;
    //      3., because of the above reasons, loc_blaFooBar will always be null
    //      4., because of the above reasons, the fooBar never gets marked as used
    //      5., additionally, the function's arg_blaFooBar argument is first overwritten, 
    //          and then never used.
    // Happy fixing. - Charlie (2008.09.16)

Ja, azóta sincs kijavítva. Az majd most jön, általam. Szép az élet.

Hozzászólások

Happy fixing :)
==
`Have some wine,' the March Hare said in an encouraging tone.
Alice looked all round the table, but there was nothing on it but tea.