Dimitry likes it when the bad code he finds can be sung aloud. This particular line can be sung to the tune of “Rule Britannia”.
for (var html in data["html"]) $(data["html"][html][0]).html(data["html"][html][1]);
Blake was surprised by this line. I guess you could say… he was shell-shocked .
if ($error = shell_exec("$mysql -h'$db_host' -u'$grantor_user' -p'$grantor_pass' mysql < $tmppath 2>&1 1>/dev/null")) { #handle the error… }
Jeremy’s ex-co-worker is the sort of person who would wear a belt with suspenders.
initialTab = 0; if (isNaN(initialTab)) { initialTab = 0; }
The ternary operator is a convenient shorthand for conditionals. When people discover it for the first time, some of them get a little carried away with it. Bernard had to give someone a little lesson on “order of operations”.
public Money getFinanceCredit() { return (isEdited() ? ((!usePercentage()) ? editedFixedAmount : ((percentageOfBasis == null) ? NullMoney.NULL_AMOUNT : basis.multiply(percentageOfBasis))) : NullMoney.NULL_AMOUNT); }
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!