Oct 24, 2015 12:00
art,
nudity,
behaviour,
work,
cultural_appropriation,
monkey,
pranks,
law,
preferences,
puppy,
microbiome,
economics,
lotr,
niceness,
disease,
unicode,
hormones,
sex,
painting,
comic,
links,
history,
viral,
uk,
votes,
funny,
diet,
slash,
video,
software,
japan,
dogs,
toys,
xkcd,
culture,
parenting,
maps,
gender,
tolkien,
nsfw,
health,
china,
politics,
penis
Reply
The effect would be to turn every do-while loop into an executed-once bare block (or single statement) followed by an entirely separate bodyless while loop. And it doesn't rely on any high-tech Unicode wizardry, which I think makes it a more elegant prank :-)
(Though it doesn't quite cover all possibilities. Code of the form
if (condition1)
do { /* stuff */ } while (condition2);
else
/* stuff */;becomes a syntax error under this transformation - now the if statement terminates at the closing brace of the do-block, orphaning the else clause. So a developer on guard against this prank might make a point of including a construction like this in their application as a defence!)
Reply
Reply
So perhaps the person to deploy them against is someone who's neglected to use version control!
(But it would be mean to do it to a total novice, of course. Someone who isn't using version control but should know better.)
Reply
Reply
Leave a comment