Page 1 of 2

Someone remind me not to unit test when drunk!

Posted: Sun Feb 25, 2007 12:30 pm
by Chris Corbyn
I have just spent the best part of an hour swearing at MySQL, re-installing PHP and MySQL from fink and working up a sweat because a the minutes that were being returned as part of a unit test were matching the hours, not the minutes. After all this faffing about I suddenly decided it kight be a good idea to look over my test case again and discovered I'd mis-typed "hours" instead of "minutes". Grr... unit testing sucks :lol:

feyd | okay, that misspelling in the title has driven me nuts long enough, fixed.

Re: Someone reming me not to unit test when drunk!

Posted: Sun Feb 25, 2007 12:33 pm
by Christopher
d11wtq wrote:Grr... unit testing sucks :lol:
Were the units pints or code? ;)

Posted: Sun Feb 25, 2007 12:33 pm
by feyd
I wouldn't recommend coding at all when drunk. ... or even getting drunk. Bad d, bad!

Posted: Sun Feb 25, 2007 12:35 pm
by Chris Corbyn
The stupid thing is, I'm not even drunk. I've had a (large) glass of sth australian red, but it's enough to make coding a complete waste of time yes :P

The question is, should I come to the conclusion: "Don't code when drunk" or "Don't rely too heavily on unit tests to prove my code works" ?

Posted: Sun Feb 25, 2007 12:55 pm
by feyd
I'd side with the former, but after modifying it to "don't code while under the influence," CUI, if you will.

Posted: Sun Feb 25, 2007 1:03 pm
by Chris Corbyn
feyd wrote:I'd side with the former, but after modifying it to "don't code while under the influence," CUI, if you will.
CUI? If it refers to drug taking then yes, I'll bear it in mind :) Of course, d11 would never do anythng like that ;)

Posted: Sun Feb 25, 2007 1:25 pm
by Charles256
yeah...one time i spent about two hours wondering why

Code: Select all

<?php
   if(int i=0;i<50;i+)
   {
       echo i
    }
?>
wouldn't work. lesson learned, no coding when drunk.

Posted: Sun Feb 25, 2007 1:41 pm
by feyd
d11wtq wrote:CUI? If it refers to drug taking then yes, I'll bear it in mind :) Of course, d11 would never do anythng like that ;)
Yeah, CUI.. Coding Under the Influence. I don't recall the UK equivalent of DUI (or DWI in some states).. Driving Under the Influence (or Driving While Intoxicated.)

edit: boo-boo

Posted: Mon Feb 26, 2007 9:58 am
by Maugrim_The_Reaper
What's wrong with coding while under the influence? :roll:

j/k. If you're going to code right, don't drink alcoholic beverages. It makes you do some pretty stupid things once it hits your brain. ;).

Posted: Mon Feb 26, 2007 10:10 am
by Jenk
Maugrim_The_Reaper wrote:What's wrong with coding while under the influence? :roll:
It would be the Irish one to say that :P [/stereotype]

The UK have "Driving under the influence of ..." but we aren't as acronymic as the US :)

Posted: Mon Feb 26, 2007 10:21 am
by Maugrim_The_Reaper
Ah, but me love's me stereotype, mo chara ;).

Posted: Mon Feb 26, 2007 2:37 pm
by jyhm
Eye, its whats me 'sposed to do laddy, :wink:
and Patties Day just a month away!

I don't know how or if they make corned beef and cabbage over there Reaper, but here a lot of places boil the h3ll out of everything and you get one big soggy mess, its gross. I personally throw every thing in a crock pot with veggies on bottom, corned beef sitting on the veggies, and the cabbage cut in wedges sitting on top of the beef. This way the cabbage is steamed and still crisp. And you can elect how much of each you want on your plate, without sifting through a big soggy mess.

Sorry to digress from topic. I don't believe drinking while coding is good. The only time is when you put a shot in your coffee to loosen up or get rid of a head ache. When its time for a drink, log off and go to happy hour at your local pub, and play a game of billiards, or darts or what ever. I like billiards, its an excellent challenge for the mind and still loosens you up. I've never played English billiards though, only pockets for me. :)

Posted: Mon Feb 26, 2007 3:13 pm
by Maugrim_The_Reaper
They do indeed ;). But I prefer a non-soggy mess too - cabbage is only good lightly steamed. Otherwise its green mush...

On topic, being true to the stereotype I do drink and code but not excessively. You definitely get more error prone, but I find it's acceptable if you're TDD'ing and not just unit testing (the instant feedback loop helps). Likely that's just a bit of an Irish attitude - we do drink a bit more than is good for us (stereotype isn't inaccurate there I'm afraid).

Posted: Mon Feb 26, 2007 3:44 pm
by jyhm
I'm afraid the stereotype in the States is a bit over glorified and taken with immaturity. Where by I was told by an Italian man who was my language teacher that most Europeans know that the Irish drink more than most but the connotations associated isn't quite like it is here in the States.

It's ok to have fun and raise a pint but I think a proper demeanor should be kept about yourself at all times. And for goodness sake (note to self) be within the legal limits when you turn that ignition key.

Posted: Mon Feb 26, 2007 3:47 pm
by Chris Corbyn
I think most of Britain is full of plonkies to be honest. It's embedded in the culture. We all go out and get sloshed more than we should do... the sad thing is that we have a "reputation" for it though. It just takes that small minority to not be sensible about having a good time and it reflects badly on everyone else. The worst you'll get from me when I'm drunk is long boring ramblings about stuff that seems really interesting at the time :P