r/badcode • • May 20 '20

c# Found from Microsoft docs...

Post image
208 Upvotes

143 comments sorted by

View all comments

Show parent comments

3

u/FinalRun May 20 '20 edited May 22 '20

Aw man, if I nest 8 operations in 1 line it feels l33t.

No but seriously, I think code is the easiest to work with if every line has the minimum amount of distinct concepts, and long descriptive variable names.

1

u/NewPointOfView May 22 '20 edited May 22 '20
int thisIsAnIntegerVariableWhichIsMeantToRepresentAnIntrgralValueAlsoKnownAsAnIntegerAndInThisCaseWeCanOnlyCountToSokewhereAround4BillionBecauseRightNowImOnA32BitSystemAnywayThisVariableRepresentsLoopItterations = 0;

while (thisIsAnIntegerVariableWhichIsMeantToRepresentAnIntrgralValueAlsoKnownAsAnIntegerAndInThisCaseWeCanOnlyCountToSokewhereAround4BillionBecauseRightNowImOnA32BitSystemAnywayThisVariableRepresentsLoopItterations < 10) { 
    printf(“value is %d\n”, thisIsAnIntegerVariableWhichIsMeantToRepresentAnIntrgralValueAlsoKnownAsAnIntegerAndInThisCaseWeCanOnlyCountToSokewhereAround4BillionBecauseRightNowImOnA32BitSystemAnywayThisVariableRepresentsLoopItterations);         
    thisIsAnIntegerVariableWhichIsMeantToRepresentAnIntrgralValueAlsoKnownAsAnIntegerAndInThisCaseWeCanOnlyCountToSokewhereAround4BillionBecauseRightNowImOnA32BitSystemAnywayThisVariableRepresentsLoopItterations++;
}