rmd: (fuck-logic)
[personal profile] rmd
Via [livejournal.com profile] solarbird's recent post, this is delightfully evil - suggestions for evil things to commit just before a big code commit (the comments are actually readable and amusing, too)

Examples:
#define struct union
#define if while
#define true ((rand()&15)!=15)
#define if(x) if ((x) && (rand() < RAND_MAX * 0.99))

Date: 2013-08-21 03:05 am (UTC)
ceo: (code)
From: [personal profile] ceo
I'm going to hang onto this to show people when they try to persuade me that macros aren't evil.

Date: 2013-08-21 06:16 am (UTC)
From: [identity profile] deguspice.livejournal.com
Years ago, I remember seeing a Pascal program that began

temp = true;
true = false;
false = temp;

Date: 2013-08-21 08:14 pm (UTC)
From: [identity profile] adb-foldem.livejournal.com
You are going to hell.

Date: 2013-08-22 02:31 am (UTC)
From: [identity profile] prock.livejournal.com
Far too obvious.

A much better MO:

1. Find an intermittent and vexing bug.
2. Ensure that the bug has not been reported in any issue tracking software.
3. Fix the bug, with obfuscated code which looks incorrect and buggy, but which is golden.
4. Develop unit tests to ensure that your buggy looking code does in fact fix the bug.
5. Throw away said unit tests.
6. Check in ugly bug fixing monstrosity alongside another commit relating to a different bug in the same code region.
7. Soon before leaving, "fix the buggy code" along side another unrelated bug fix, preferably in the same code region.
8. Develop unit tests to "demonstrate" that your patch does in fact fix the bug.
9. Check in your patch, the false bug fix and the other bug fix, and the unit tests in a single commit.
...
profit?
Edited Date: 2013-08-22 02:32 am (UTC)

Profile

rmd: (Default)
rmd

June 2025

S M T W T F S
1234567
89 1011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 29th, 2025 04:12 pm
Powered by Dreamwidth Studios