Click here to Skip to main content
15,886,919 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: How to Train Your Programmer PinPopular
OriginalGriff2-Jan-12 22:48
mveOriginalGriff2-Jan-12 22:48 
GeneralRe: How to Train Your Programmer Pin
Rajesh_Francis2-Jan-12 23:00
professionalRajesh_Francis2-Jan-12 23:00 
GeneralRe: How to Train Your Programmer Pin
OriginalGriff2-Jan-12 23:19
mveOriginalGriff2-Jan-12 23:19 
GeneralRe: How to Train Your Programmer Pin
BobJanova3-Jan-12 2:30
BobJanova3-Jan-12 2:30 
GeneralRe: How to Train Your Programmer Pin
Rajesh Anuhya3-Jan-12 19:51
professionalRajesh Anuhya3-Jan-12 19:51 
GeneralRe: How to Train Your Programmer Pin
Nagy Vilmos3-Jan-12 0:23
professionalNagy Vilmos3-Jan-12 0:23 
GeneralRe: How to Train Your Programmer Pin
bosedk3-Jan-12 1:05
bosedk3-Jan-12 1:05 
GeneralRe: How to Train Your Programmer Pin
Manfred Rudolf Bihy3-Jan-12 2:27
professionalManfred Rudolf Bihy3-Jan-12 2:27 
bosedk wrote:
The conditionals could be moved inside the constructor


I hope not!
This would only be advisable if the differentiation between the 5 strings were something inherent to that class, but then OP should have used an enumeration instead of strings.

Regards,

Manfred

"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925

GeneralRe: How to Train Your Programmer Pin
bosedk3-Jan-12 2:50
bosedk3-Jan-12 2:50 
GeneralRe: How to Train Your Programmer Pin
0bx3-Jan-12 4:18
0bx3-Jan-12 4:18 
GeneralRe: How to Train Your Programmer Pin
Lutosław3-Jan-12 10:38
Lutosław3-Jan-12 10:38 
GeneralRe: How to Train Your Programmer Pin
RobCroll3-Jan-12 14:36
RobCroll3-Jan-12 14:36 
GeneralRe: How to Train Your Programmer Pin
Nagy Vilmos3-Jan-12 22:57
professionalNagy Vilmos3-Jan-12 22:57 
GeneralRe: How to Train Your Programmer Pin
Bernhard Hiller3-Jan-12 23:19
Bernhard Hiller3-Jan-12 23:19 
GeneralRe: How to Train Your Programmer Pin
Jeroen De Dauw4-Jan-12 0:34
Jeroen De Dauw4-Jan-12 0:34 
GeneralRe: How to Train Your Programmer Pin
johannesnestler11-Jan-12 3:37
johannesnestler11-Jan-12 3:37 
GeneralGem code Pin
zenwalker198528-Dec-11 3:00
zenwalker198528-Dec-11 3:00 
GeneralRe: Gem code Pin
Paladin200028-Dec-11 4:09
Paladin200028-Dec-11 4:09 
GeneralRe: Gem code Pin
zenwalker198528-Dec-11 15:02
zenwalker198528-Dec-11 15:02 
GeneralRe: Gem code PinPopular
ekolis29-Dec-11 11:52
ekolis29-Dec-11 11:52 
GeneralRe: Gem code Pin
zenwalker198529-Dec-11 18:37
zenwalker198529-Dec-11 18:37 
GeneralRe: Gem code Pin
krumia14-Feb-12 19:20
krumia14-Feb-12 19:20 
GeneralCool bitwise trick page PinPopular
Lutosław28-Dec-11 0:46
Lutosław28-Dec-11 0:46 
GeneralRe: Cool bitwise trick page PinPopular
harold aptroot28-Dec-11 1:35
harold aptroot28-Dec-11 1:35 
GeneralRe: Cool bitwise trick page Pin
Rajesh Anuhya30-Dec-11 2:10
professionalRajesh Anuhya30-Dec-11 2:10 

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.