Click here to Skip to main content
15,880,651 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: "...using the best programming practice..." yes sure Pin
BillW3323-Nov-15 9:12
professionalBillW3323-Nov-15 9:12 
GeneralRe: "...using the best programming practice..." yes sure Pin
RugbyLeague22-Dec-15 4:06
RugbyLeague22-Dec-15 4:06 
GeneralRe: "...using the best programming practice..." yes sure Pin
Patrice T22-Dec-15 6:34
mvePatrice T22-Dec-15 6:34 
GeneralRe: "...using the best programming practice..." yes sure Pin
KarstenK2-Dec-15 6:26
mveKarstenK2-Dec-15 6:26 
GeneralLets make sure, shall we Pin
k50546-Nov-15 7:41
mvek50546-Nov-15 7:41 
GeneralRe: Lets make sure, shall we Pin
Richard Deeming6-Nov-15 8:16
mveRichard Deeming6-Nov-15 8:16 
GeneralRe: Lets make sure, shall we PinPopular
User 110609796-Nov-15 8:43
User 110609796-Nov-15 8:43 
GeneralRe: Lets make sure, shall we Pin
MacSpudster19-Nov-15 12:30
professionalMacSpudster19-Nov-15 12:30 
What if test_fn() does change a global such that, when the next time it runs, may not return true?

That makes perfect sense to call a function after already calling validating it.

I've set a flag that, when true, also calls a function within an If statement.
I once-again call the function to see if we're still good to go, especially in a parallel processing app that can change datapoints before another process gets to it.

I then recursion into the function during the function to ensure that no externals have changed while it is in process, for it calls additional functions.

And, if you believe I do all this, then hire me at $1 million a year and I'll gladly implement this into yer project!

GeneralRe: Lets make sure, shall we Pin
Xmen Real 16-Dec-15 2:55
professional Xmen Real 16-Dec-15 2:55 
GeneralRe: Lets make sure, shall we Pin
User 1106097918-Dec-15 5:38
User 1106097918-Dec-15 5:38 
GeneralRe: Lets make sure, shall we Pin
Nguyen.H.H.Dang21-Aug-16 15:06
professionalNguyen.H.H.Dang21-Aug-16 15:06 
GeneralWhy name things sensibly, when you could also not? PinPopular
r_hyde2-Nov-15 14:16
r_hyde2-Nov-15 14:16 
GeneralRe: Why name things sensibly, when you could also not? Pin
PIEBALDconsult2-Nov-15 14:29
mvePIEBALDconsult2-Nov-15 14:29 
JokeRe: Why name things sensibly, when you could also not? Pin
Amarnath S2-Nov-15 17:18
professionalAmarnath S2-Nov-15 17:18 
GeneralRe: Why name things sensibly, when you could also not? Pin
r_hyde2-Nov-15 20:13
r_hyde2-Nov-15 20:13 
GeneralRe: Why name things sensibly, when you could also not? Pin
Super Lloyd2-Nov-15 17:22
Super Lloyd2-Nov-15 17:22 
GeneralRe: Why name things sensibly, when you could also not? Pin
Bernhard Hiller3-Nov-15 1:01
Bernhard Hiller3-Nov-15 1:01 
GeneralRe: Why name things sensibly, when you could also not? Pin
Brisingr Aerowing5-Nov-15 4:54
professionalBrisingr Aerowing5-Nov-15 4:54 
GeneralRe: Why name things sensibly, when you could also not? Pin
Gary R. Wheeler7-Dec-15 12:59
Gary R. Wheeler7-Dec-15 12:59 
GeneralRe: Why name things sensibly, when you could also not? Pin
zandam23-Dec-15 1:10
zandam23-Dec-15 1:10 
GeneralRe: Why name things sensibly, when you could also not? Pin
BillW3323-Nov-15 11:21
professionalBillW3323-Nov-15 11:21 
GeneralRe: Why name things sensibly, when you could also not? Pin
Sinisa Hajnal23-Nov-15 20:25
professionalSinisa Hajnal23-Nov-15 20:25 
GeneralWho needs security through obscurity? Pin
PIEBALDconsult31-Oct-15 16:45
mvePIEBALDconsult31-Oct-15 16:45 
GeneralRe: Who needs security through obscurity? Pin
Nicolas Dorier31-Oct-15 19:20
professionalNicolas Dorier31-Oct-15 19:20 
GeneralRe: Who needs security through obscurity? Pin
Richard Deeming2-Nov-15 2:30
mveRichard Deeming2-Nov-15 2:30 

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.