Click here to Skip to main content
15,860,844 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.

 
JokeRe: Wonderful description strings! Pin
Michael Bookatz27-May-09 0:55
Michael Bookatz27-May-09 0:55 
GeneralRe: Wonderful description strings! Pin
Jeroen De Dauw27-May-09 9:02
Jeroen De Dauw27-May-09 9:02 
GeneralRe: Wonderful description strings! Pin
BillW3311-Aug-09 8:21
professionalBillW3311-Aug-09 8:21 
GeneralThe While If Pin
bulg19-May-09 8:24
bulg19-May-09 8:24 
GeneralRe: The While If Pin
PIEBALDconsult19-May-09 9:26
mvePIEBALDconsult19-May-09 9:26 
GeneralRe: The While If Pin
supercat919-May-09 11:24
supercat919-May-09 11:24 
GeneralRe: The While If Pin
PIEBALDconsult19-May-09 12:19
mvePIEBALDconsult19-May-09 12:19 
GeneralRe: The While If Pin
supercat919-May-09 13:55
supercat919-May-09 13:55 
PIEBALDconsult wrote:
No, that horror is by people who think it's less of a horror than a goto.


Many modern languages support exceptions on the basis that conventional structured programming constructs can't practically handle everything that programs need to do. In languages which support exceptions, they should be used when appropriate. What would you suggest doing, if not a 'goto' or 'break', in situations where an exception would be appropriate but the language doesn't support them?

BTW, I wish some standards agency would draft an extension of the C99 standard which would allow something like exceptions but only within a particular function (C++, which allows full-fledged extensions, already exists, but run-time support for exceptions requires too much overhead to be practical on some smaller microcontrollers; limited support for exceptions within a function could improve program structure without impacting code size, speed, or RAM requirements.
GeneralRe: The While If Pin
PIEBALDconsult19-May-09 15:12
mvePIEBALDconsult19-May-09 15:12 
GeneralRe: The While If Pin
Nagy Vilmos19-May-09 22:11
professionalNagy Vilmos19-May-09 22:11 
GeneralRe: The While If Pin
PIEBALDconsult20-May-09 3:08
mvePIEBALDconsult20-May-09 3:08 
GeneralRe: The While If Pin
bolivar12322-May-09 9:05
bolivar12322-May-09 9:05 
GeneralConversion logic Pin
Jeroen De Dauw15-May-09 11:03
Jeroen De Dauw15-May-09 11:03 
RantRe: Conversion logic Pin
Samer Aburabie16-May-09 22:05
Samer Aburabie16-May-09 22:05 
GeneralRe: Conversion logic PinPopular
PIEBALDconsult17-May-09 3:20
mvePIEBALDconsult17-May-09 3:20 
GeneralRe: Conversion logic Pin
Samer Aburabie17-May-09 4:14
Samer Aburabie17-May-09 4:14 
GeneralJust a MessageBox :S [modified] Pin
Samer Aburabie15-May-09 5:12
Samer Aburabie15-May-09 5:12 
GeneralRe: Just a MessageBox :S Pin
PIEBALDconsult15-May-09 10:33
mvePIEBALDconsult15-May-09 10:33 
GeneralRe: Just a MessageBox :S Pin
Jeroen De Dauw15-May-09 10:54
Jeroen De Dauw15-May-09 10:54 
GeneralRe: Just a MessageBox :S PinPopular
J4amieC21-May-09 1:19
J4amieC21-May-09 1:19 
GeneralRe: Just a MessageBox :S Pin
BillW3311-Aug-09 8:11
professionalBillW3311-Aug-09 8:11 
JokeFalls under worse practices..maybe? I don't know. Pin
puromtec114-May-09 6:59
puromtec114-May-09 6:59 
GeneralRe: Falls under worse practices..maybe? I don't know. Pin
Chris Meech14-May-09 8:15
Chris Meech14-May-09 8:15 
GeneralRe: Falls under worse practices..maybe? I don't know. Pin
PIEBALDconsult14-May-09 12:52
mvePIEBALDconsult14-May-09 12:52 
GeneralWho is teaching these people? PinPopular
OriginalGriff12-May-09 22:50
mveOriginalGriff12-May-09 22:50 

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.