Coding while drunk
- 20thCenturyBoy
- Baaaaa!

- Posts: 1093
- Joined: Fri Oct 01, 2004 8:16 am 0
- Location: Perth, Australia
Coding while drunk
Nothing good ever comes of it, does it?
Can anyone prove me wrong?
Can anyone prove me wrong?
Re: Coding while drunk
Seriously... I've made some great breakthroughs at 2am after coming home drunk - it focuses my mind!20thCenturyBoy wrote:Nothing good ever comes of it, does it?
Can anyone prove me wrong?
- sack
- Baaaaaaa!

- Posts: 7077
- Joined: Fri May 10, 2002 4:13 pm 0
- XBL Gamertag: evilgopher
- PSN: sixFiveOhTwo
- Location: Rijswijk, The Netherlands
- Contact:
I've done good things when nicely stoned.
One bit of code I had to do was all a bit abstract and I was having problems fully grokking what I should be doing so to be entirely honest I gave up and went out with no intention of even doing the code.
Went out, got stoned, looked at it. Closed my eyes for a minute, visualised my data in the way only a mildly stoned person can and wrote the code to handle it.
Job done
One bit of code I had to do was all a bit abstract and I was having problems fully grokking what I should be doing so to be entirely honest I gave up and went out with no intention of even doing the code.
Went out, got stoned, looked at it. Closed my eyes for a minute, visualised my data in the way only a mildly stoned person can and wrote the code to handle it.
Job done
I've never managed to write anything other than complete bollocks when either wasted or drunk and in charge of a compiler
Though at the time I'm convinced it's really ace stuff, the next morning it tends to be ctrl+a delete, or revert 
Just don't try it anymore.. Though I know one programmer who does amazing shit whilst stoned off his face
Just don't try it anymore.. Though I know one programmer who does amazing shit whilst stoned off his face
Grand Master Turing once dreamed that he was a machine. When he awoke he exclaimed:
"I don't know whether I am Turing dreaming that I am a machine, or a machine dreaming that I am Turing!''
"I don't know whether I am Turing dreaming that I am a machine, or a machine dreaming that I am Turing!''
- randomdude
- Baaaaaa!

- Posts: 4609
- Joined: Sat Aug 02, 2003 3:54 am 0
I find that being drnk lets me code brilliantly. I can make code to do a task no problem.
But when I look at it in the morning, I haven't got a fucking clue - and theres inevitably subtle bugs that corrupt the heap
But when I look at it in the morning, I haven't got a fucking clue - and theres inevitably subtle bugs that corrupt the heap
I am both the king and the queen of cheese.
<Wife_of_Snake> Random the sugar rush fairy!
<}stinky_beast{> I'd do a zebra if it'd stand still
<Wife_of_Snake> Random the sugar rush fairy!
<}stinky_beast{> I'd do a zebra if it'd stand still
One of my collegues does "drunken coding".
The code that he writes does spectacularly good things.
The source is a completely unmaintainable intelligable mess that no one can understand. Even he doesn't know why or how he wrote it. If asked why something does what it does, he just says.. "It's works. What more do you want."
Ironically, the only way we can get changes to the code is to ply him with drink and let him loose. I think that there's something ethically wrong with this..
The code that he writes does spectacularly good things.
The source is a completely unmaintainable intelligable mess that no one can understand. Even he doesn't know why or how he wrote it. If asked why something does what it does, he just says.. "It's works. What more do you want."
Ironically, the only way we can get changes to the code is to ply him with drink and let him loose. I think that there's something ethically wrong with this..
"Observation is the path to understanding. Self-observation is the path to self-understanding."
Been there, done that.
Sometimes the code works perfectly well, but the next day you realise that you can optimize it considerably by taking out all the repetition.
The drunken mind seems to be designed to focus on smaller tasks rather than looking at the big picture. Demonstrated by the fact that with concentration it's very easy to get the key in the front door, but in the process you've probably woken up half the street and been sick all over your doorstep.
Sometimes the code works perfectly well, but the next day you realise that you can optimize it considerably by taking out all the repetition.
The drunken mind seems to be designed to focus on smaller tasks rather than looking at the big picture. Demonstrated by the fact that with concentration it's very easy to get the key in the front door, but in the process you've probably woken up half the street and been sick all over your doorstep.
- randomdude
- Baaaaaa!

- Posts: 4609
- Joined: Sat Aug 02, 2003 3:54 am 0
- piku
- Sheepie Whore

- Posts: 20960
- Joined: Wed Apr 24, 2002 10:44 am 0
- Website: Http://Www.ncot.uk
- Location: Wakefield
- Contact:
I find the more drunk I am, the less code I produce and the more daft comments I write...
MAPENTRY() of course being a #define. I think I know what this code should do, but it definitely never worked 
Then again, I just think I shouldn't be allowed anywhere near a computer when slightly blind
Code: Select all
/* This function brought to you by Flaming Sambuca... the drink you /really/ don't want to spill ;-)
this is also brought to you by some Underworld */
void makeSprites()
{
int xx, yy;
numsprites = 0;
spriteinfo[numsprites].alive = 1;
spriteinfo[numsprites].x = x;
spriteinfo[numsprites++].y = y;
for (xx = 0; xx < 32; xx++) {
for (yy = 0; yy < 24; yy++) {
if (MAPENTRY(0,xx,yy) == EGG) {
spriteinfo[numsprites].x = (xx*8)-8;
spriteinfo[numsprites].y = yy*8;
spriteinfo[numsprites].alive = 1;
setAnim (numsprites++, 0, 192, 200);
MAPENTRY(0,xx,yy) = 0;
} else if (MAPENTRY(0,xx,yy) == BIRDSEED) {
spriteinfo[numsprites].x = (xx*8)-8;
spriteinfo[numsprites].y = yy*8;
spriteinfo[numsprites].alive = 1;
setAnim (numsprites++, 0, 200, 208);
MAPENTRY(0,xx,yy) = 0;
}
}
}
}
Then again, I just think I shouldn't be allowed anywhere near a computer when slightly blind
return (0);


