Click here to Skip to main content
15,868,016 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: shame to my tester or me? Pin
kdgupta872-May-12 23:25
kdgupta872-May-12 23:25 
GeneralRe: shame to my tester or me? Pin
grralph12-May-12 23:53
grralph12-May-12 23:53 
GeneralRe: shame to my tester or me? Pin
Paulo_JCG3-May-12 0:10
professionalPaulo_JCG3-May-12 0:10 
GeneralRe: shame to my tester or me? Pin
Michael Kingsford Gray3-May-12 0:38
Michael Kingsford Gray3-May-12 0:38 
GeneralRe: shame to my tester or me? Pin
englebart3-May-12 2:33
professionalenglebart3-May-12 2:33 
GeneralRe: shame to my tester or me? Pin
Anna-Jayne Metcalfe3-May-12 4:49
Anna-Jayne Metcalfe3-May-12 4:49 
GeneralRe: shame to my tester or me? Pin
Eugene Peng3-May-12 13:43
Eugene Peng3-May-12 13:43 
GeneralRe: shame to my tester or me? Pin
KP Lee5-May-12 11:21
KP Lee5-May-12 11:21 
Eugene Peng wrote:
what is the right format?
For an established receiver of data, the right format is the receiver's format.

Shame on the receiver if they didn't supply the format to begin with.
Testers exist because it is a known problem that coders write bugs. It is the tester's responsibility to assume the programmer screwed up and find out where (s)he did.
The fact the test period was only one day puts nearly all the fault at the tester's feet. (s)he didn't even have time to build a valid case model for testing.

You as a coder have a right to slap your own head, say "What an idiot", and fix the bug.

Reminds me of a bug I created. Wrote an app to clean up a table by truncating it when it is a week old. Supposed to run 5 minutes before midnight. So I scheduled it to do so. Forgot the date was UTC. Should have scheduled the job to run at 3:55 PM and coded the logic to sleep until the UTC time was reached. (UTC is 7 to 8 hours ahead of my local time.)

The tester caught it on my last day of work. Over a year later, I'm reading proposed changes another group was making. My former group. They were adjusting job schedules to be based on UTC time and offsetting the start time based the former time setting because the app was moving to a different time zone.

I had to explain to the head SQL person there is a bug written against the app, he needed to set the UTC time to run at 22:55 UTC instead of 07:55 UTC, it will run 5 minutes to 2 hours early depending on when the scheduling job code runs and the code needs to be modified to wait until 5 minutes before UTC Midnight to run.

Everyone makes mistakes. Checking for valid date information being passed is 101 testing. (It is the programmer's job to do 101 testing as well as the tester's job to not believe (s)he did anything right.)
GeneralRe: shame to my tester or me? Pin
pietvredeveld4-May-12 7:58
pietvredeveld4-May-12 7:58 
GeneralRe: shame to my tester or me? Pin
KP Lee5-May-12 10:11
KP Lee5-May-12 10:11 
GeneralSetDate Pin
loctrice26-Apr-12 8:06
professionalloctrice26-Apr-12 8:06 
GeneralRe: SetDate Pin
Brisingr Aerowing26-Apr-12 8:15
professionalBrisingr Aerowing26-Apr-12 8:15 
GeneralRe: SetDate Pin
loctrice26-Apr-12 8:52
professionalloctrice26-Apr-12 8:52 
GeneralRe: SetDate Pin
GibbleCH26-Apr-12 9:00
GibbleCH26-Apr-12 9:00 
GeneralRe: SetDate Pin
Brisingr Aerowing26-Apr-12 9:06
professionalBrisingr Aerowing26-Apr-12 9:06 
GeneralRe: SetDate Pin
Brisingr Aerowing26-Apr-12 9:05
professionalBrisingr Aerowing26-Apr-12 9:05 
GeneralRe: SetDate Pin
loctrice26-Apr-12 11:01
professionalloctrice26-Apr-12 11:01 
GeneralRe: SetDate Pin
Brisingr Aerowing26-Apr-12 12:54
professionalBrisingr Aerowing26-Apr-12 12:54 
GeneralRe: SetDate Pin
loctrice26-Apr-12 16:01
professionalloctrice26-Apr-12 16:01 
JokeRe: SetDate Pin
AspDotNetDev26-Apr-12 13:45
protectorAspDotNetDev26-Apr-12 13:45 
GeneralRe: SetDate Pin
Bernhard Hiller26-Apr-12 22:02
Bernhard Hiller26-Apr-12 22:02 
GeneralRe: SetDate Pin
loctrice27-Apr-12 1:53
professionalloctrice27-Apr-12 1:53 
GeneralRe: SetDate Pin
R. Giskard Reventlov27-Apr-12 12:39
R. Giskard Reventlov27-Apr-12 12:39 
GeneralThats why i hate c++ Pin
Vasily Tserekh24-Apr-12 3:35
Vasily Tserekh24-Apr-12 3:35 
GeneralRe: Thats why i hate c++ Pin
Vasily Tserekh24-Apr-12 3:43
Vasily Tserekh24-Apr-12 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.