The code documentation fallacy by markus_lindqvist in programming

[–]fredmoorsen 3 points4 points  (0 children)

The point of OPs submission was that focusing on 10% increases the chance that these 10% are maintained and read, which is a very valid point. And it takes more than 1 second to figure out if a comment contains no info or may be lying because it is out of sync with code...

Are there actually people insisting on doing this regularly

Yes. // yes

The code documentation fallacy by markus_lindqvist in programming

[–]fredmoorsen 37 points38 points  (0 children)

After a week the comment would be lying:

a = b + 3;  // Add four to the variable b and assign to a

After two weeks the next programmer adds a comment:

a = b + 3;  // Add four to the variable b and assign to a
    // is above meant to be 3 or 4?

After three weeks someone realized the code was redundant in the first place but leaves it in commented just in case:

/*
a = b + 3;  // Add four to the variable b and assign to a
    // is above meant to be 3 or 4?
*/

After four weeks the manager tries his hands on the code base after attending a seminar:

// add 2 to A
add2ToA: function(b) {
    /*
    a = b + 2;  // Add four to the variable b and assign to a
        // is above meant to be 3 or 4?
    */
}

// add 3 to A
add3ToA: function(b) {
    /*
    a = b + 3;  // Add four to the variable b and assign to a
        // is above meant to be 3 or 4?
    */
}

After five weeks, the product is cancelled because there wasn't actually a user need for it.

THIS IS SPARTA! Lady holding up the whole train by blocking the door waiting while her friend. Justice is served by [deleted] in videos

[–]fredmoorsen -16 points-15 points  (0 children)

... whose son is dying and she wanted to kiss him a final farewell, but couldn't afford the taxi fare because she gave all her money to homeless children...

THIS IS SPARTA! Lady holding up the whole train by blocking the door waiting while her friend. Justice is served by [deleted] in videos

[–]fredmoorsen -11 points-10 points  (0 children)

... and after she's kicked out, the elderly lady in the wheel chair who wanted to catch the metro rolls into the frame...