It's ... it's beautiful. And evil.
Aug. 20th, 2013 10:26 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Via
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:
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
Examples:
#define struct union
#define if while
#define true ((rand()&15)!=15)
#define if(x) if ((x) && (rand() < RAND_MAX * 0.99))
no subject
Date: 2013-08-21 03:05 am (UTC)no subject
Date: 2013-08-21 06:16 am (UTC)temp = true;
true = false;
false = temp;
no subject
Date: 2013-08-21 08:14 pm (UTC)no subject
Date: 2013-08-22 02:31 am (UTC)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?