More
MENU TOP

Coding Confessional

Anonymous Confessions from Programmers.

More

Absolves: 34 | Condemns: 396

07/04/2013



Comments

Bruce:
That is the true sign of a weak programmer.
guchi:
It gets better.
sivaji:
x = expression :) :)
Anonymous:
x = (bool) expression;
Anonymous:
The guy I replaced did this everywhere...
Anonymous:
The 1 line version is more efficient in LOC, if not real performance. But woe unto the lead dev who now has to spend a 1/2 hour explaining it to a junior dev who doesn't get it. The multi-line version is at least explicit about what it's doing.
Anonymous:
brillant! but just to be extra supa dupa clear, you should write it instead as follows: if expression==True: x = True if expression==False: x = False
Anonymous:
Maybe "True" and "False" are objects.
(optional)