Click here to Skip to main content
15,879,326 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: If only there were a language construct to handle this case... Pin
lewax0015-Aug-13 3:49
lewax0015-Aug-13 3:49 
GeneralRe: If only there were a language construct to handle this case... Pin
Dan Neely19-Aug-13 3:24
Dan Neely19-Aug-13 3:24 
GeneralRe: If only there were a language construct to handle this case... Pin
Rob Grainger26-Aug-13 22:27
Rob Grainger26-Aug-13 22:27 
GeneralI just made a secret GOTO Pin
peterchen13-Aug-13 7:15
peterchen13-Aug-13 7:15 
GeneralRe: I just made a secret GOTO Pin
Lutosław13-Aug-13 23:40
Lutosław13-Aug-13 23:40 
GeneralRe: I just made a secret GOTO Pin
Argonia13-Aug-13 23:53
professionalArgonia13-Aug-13 23:53 
GeneralRe: I just made a secret GOTO Pin
Freak3013-Aug-13 23:50
Freak3013-Aug-13 23:50 
GeneralRe: I just made a secret GOTO Pin
peterchen14-Aug-13 1:24
peterchen14-Aug-13 1:24 
That's a bit mroe complex than this simplified example of course (surprisingly, I don't have variales named "thingie" in there) - depending on the forma,t it's read only access or no access at all, indeed.

Since the conversion runs in a separate process, I'm in the middle of a transaction, and I have to be careful to throw more milliseconds into that piece of code, tat "close, convert and retry" seems to be the best approach.

Alternatively, I thought of an inner function that returns either the newly initialized session, or information about how to upgrade, but that code doesn#t look much better either.

NewsSomething original Pin
Super Lloyd6-Aug-13 21:03
Super Lloyd6-Aug-13 21:03 
JokeRe: Something original PinPopular
Argonia6-Aug-13 21:24
professionalArgonia6-Aug-13 21:24 
GeneralRe: Something original Pin
Super Lloyd7-Aug-13 2:57
Super Lloyd7-Aug-13 2:57 
GeneralRe: Something original Pin
BotCar6-Aug-13 22:01
BotCar6-Aug-13 22:01 
GeneralRe: Something original Pin
Argonia6-Aug-13 23:36
professionalArgonia6-Aug-13 23:36 
GeneralRe: Something original Pin
MarkRHolbrook6-Sep-13 3:20
MarkRHolbrook6-Sep-13 3:20 
GeneralRe: Something original Pin
MarkRHolbrook6-Sep-13 6:18
MarkRHolbrook6-Sep-13 6:18 
GeneralRe: Something original Pin
AlexCode6-Aug-13 23:45
professionalAlexCode6-Aug-13 23:45 
GeneralRe: Something original Pin
Argonia7-Aug-13 0:19
professionalArgonia7-Aug-13 0:19 
GeneralRe: Something original Pin
AlexCode7-Aug-13 1:09
professionalAlexCode7-Aug-13 1:09 
GeneralRe: Something original Pin
Super Lloyd7-Aug-13 3:00
Super Lloyd7-Aug-13 3:00 
GeneralRe: Something original Pin
PIEBALDconsult7-Aug-13 4:41
mvePIEBALDconsult7-Aug-13 4:41 
GeneralRe: Something original Pin
Sentenryu7-Aug-13 9:18
Sentenryu7-Aug-13 9:18 
GeneralRe: Something original Pin
Super Lloyd7-Aug-13 14:13
Super Lloyd7-Aug-13 14:13 
GeneralRe: Something original Pin
Brisingr Aerowing8-Aug-13 2:38
professionalBrisingr Aerowing8-Aug-13 2:38 
GeneralRe: Something original Pin
Lutosław13-Aug-13 5:45
Lutosław13-Aug-13 5:45 
GeneralRe: Something original Pin
Sentenryu13-Aug-13 6:32
Sentenryu13-Aug-13 6:32 

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.