Click here to Skip to main content
11,412,526 members (72,621 online)

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, embarrasing 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: Pass by value and pass by reference Pin
Joe Woodbury at 19-Jul-08 10:07
memberJoe Woodbury19-Jul-08 10:07 
GeneralRe: Pass by value and pass by reference Pin
KarstenK at 21-Jul-08 3:42
memberKarstenK21-Jul-08 3:42 
AnswerRe: Pass by value and pass by reference Pin
Mitendra Anand at 21-Jul-08 21:58
memberMitendra Anand21-Jul-08 21:58 
GeneralRe: Pass by value and pass by reference Pin
jon_175 at 23-Jul-08 13:00
memberjon_17523-Jul-08 13:00 
GeneralRe: Pass by value and pass by reference Pin
Mitendra Anand at 23-Jul-08 22:01
memberMitendra Anand23-Jul-08 22:01 
GeneralPadding an ID to six digits Pin
ClementsDan at 14-Jul-08 16:57
memberClementsDan14-Jul-08 16:57 
GeneralRe: Padding an ID to six digits Pin
_Damian S_ at 14-Jul-08 18:01
member_Damian S_14-Jul-08 18:01 
GeneralRe: Padding an ID to six digits Pin
PIEBALDconsult at 15-Jul-08 5:31
memberPIEBALDconsult15-Jul-08 5:31 
GeneralRe: Padding an ID to six digits Pin
Stephen Hewitt at 14-Jul-08 18:53
mvpStephen Hewitt14-Jul-08 18:53 
GeneralRe: Padding an ID to six digits Pin
leppie at 14-Jul-08 22:26
memberleppie14-Jul-08 22:26 
GeneralRe: Padding an ID to six digits Pin
ClementsDan at 19-Jul-08 18:49
memberClementsDan19-Jul-08 18:49 
GeneralRe: Padding an ID to six digits Pin
geoffs at 14-Jul-08 21:50
membergeoffs14-Jul-08 21:50 
GeneralRe: Padding an ID to six digits Pin
BadKarma at 14-Jul-08 22:41
memberBadKarma14-Jul-08 22:41 
GeneralRe: Padding an ID to six digits Pin
PIEBALDconsult at 15-Jul-08 5:39
memberPIEBALDconsult15-Jul-08 5:39 
He didn't simply append one zero in each case block and then fall through? Confused | :confused:
Did he ensure the strValue was trimmed?

I'm curious what you replaced it with.

Of course, in .net, providing the proper format string to int.ToString() will do it in one swell foop.
GeneralRe: Padding an ID to six digits Pin
Ri Qen-Sin at 17-Jul-08 4:42
memberRi Qen-Sin17-Jul-08 4:42 
GeneralRe: Padding an ID to six digits Pin
PIEBALDconsult at 17-Jul-08 9:38
memberPIEBALDconsult17-Jul-08 9:38 
GeneralRe: Padding an ID to six digits Pin
Paul Conrad at 16-Jul-08 10:15
memberPaul Conrad16-Jul-08 10:15 
GeneralRe: Padding an ID to six digits Pin
supercat9 at 18-Jul-08 6:30
membersupercat918-Jul-08 6:30 
GeneralRe: Padding an ID to six digits Pin
dybs at 16-Aug-08 19:18
memberdybs16-Aug-08 19:18 
General// Enforce Method Contract Pin
Josh Smith at 13-Jul-08 15:05
mvpJosh Smith13-Jul-08 15:05 
GeneralRe: // Enforce Method Contract Pin
DownUnderDev at 13-Jul-08 15:40
memberDownUnderDev13-Jul-08 15:40 
GeneralRe: // Enforce Method Contract Pin
CPallini at 13-Jul-08 22:10
mvpCPallini13-Jul-08 22:10 
GeneralRe: // Enforce Method Contract Pin
Simon Capewell at 15-Jul-08 3:16
memberSimon Capewell15-Jul-08 3:16 
GeneralRe: // Enforce Method Contract Pin
CIDev at 2-Sep-08 12:48
memberCIDev2-Sep-08 12:48 
GeneralRe: // Enforce Method Contract Pin
Paul Conrad at 14-Jul-08 8:03
memberPaul Conrad14-Jul-08 8:03 
GeneralRe: // Enforce Method Contract Pin
Pete O'Hanlon at 14-Jul-08 10:07
mvpPete O'Hanlon14-Jul-08 10:07 
GeneralRe: // Enforce Method Contract Pin
Josh Smith at 14-Jul-08 10:28
mvpJosh Smith14-Jul-08 10:28 
GeneralRe: // Enforce Method Contract Pin
Stephen Hewitt at 14-Jul-08 22:31
mvpStephen Hewitt14-Jul-08 22:31 
GeneralRe: // Enforce Method Contract Pin
David Kentley at 15-Jul-08 7:19
memberDavid Kentley15-Jul-08 7:19 
GeneralBoolean Variable Name Pin
Daniel Kanev at 11-Jul-08 5:19
memberDaniel Kanev11-Jul-08 5:19 
GeneralRe: Boolean Variable Name Pin
Rage at 11-Jul-08 5:57
memberRage11-Jul-08 5:57 
GeneralRe: Boolean Variable Name Pin
Daniel Kanev at 11-Jul-08 6:42
memberDaniel Kanev11-Jul-08 6:42 
GeneralRe: Boolean Variable Name Pin
williamnw at 13-Jul-08 23:10
memberwilliamnw13-Jul-08 23:10 
GeneralRe: Boolean Variable Name Pin
Philippe Lhoste at 11-Jul-08 12:10
memberPhilippe Lhoste11-Jul-08 12:10 
GeneralRe: Boolean Variable Name Pin
killabyte at 11-Jul-08 15:08
memberkillabyte11-Jul-08 15:08 
GeneralRe: Boolean Variable Name Pin
supercat9 at 14-Jul-08 7:13
membersupercat914-Jul-08 7:13 
GeneralRe: Boolean Variable Name Pin
CDP1802 at 21-Jul-08 3:00
memberCDP180221-Jul-08 3:00 
GeneralRe: Boolean Variable Name Pin
killabyte at 21-Jul-08 20:28
memberkillabyte21-Jul-08 20:28 
GeneralRe: Boolean Variable Name Pin
Paul Conrad at 12-Jul-08 8:18
memberPaul Conrad12-Jul-08 8:18 
GeneralRe: Boolean Variable Name Pin
gajatko at 16-Jul-08 12:29
membergajatko16-Jul-08 12:29 
GeneralRe: Boolean Variable Name Pin
CDP1802 at 21-Jul-08 3:07
memberCDP180221-Jul-08 3:07 
GeneralRe: Boolean Variable Name Pin
gajatko at 21-Jul-08 7:48
membergajatko21-Jul-08 7:48 
GeneralRe: Boolean Variable Name Pin
CDP1802 at 23-Jul-08 5:09
memberCDP180223-Jul-08 5:09 
GeneralRe: Boolean Variable Name Pin
gajatko at 23-Jul-08 5:48
membergajatko23-Jul-08 5:48 
GeneralRe: Boolean Variable Name Pin
CDP1802 at 23-Jul-08 5:53
memberCDP180223-Jul-08 5:53 
GeneralIt's horrible Pin
jamie550 at 9-Jul-08 19:44
memberjamie5509-Jul-08 19:44 
GeneralRe: It's horrible Pin
Paul Conrad at 9-Jul-08 19:55
memberPaul Conrad9-Jul-08 19:55 
GeneralRe: It's horrible Pin
_Damian S_ at 9-Jul-08 20:14
member_Damian S_9-Jul-08 20:14 
JokeRe: It's horrible Pin
Paul Conrad at 10-Jul-08 17:39
memberPaul Conrad10-Jul-08 17:39 
GeneralRe: It's horrible Pin
PIEBALDconsult at 10-Jul-08 4:58
memberPIEBALDconsult10-Jul-08 4:58 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150427.1 | Last Updated 27 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid