Click here to Skip to main content
15,887,683 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: Beware while using Japanese language Pin
Peter_in_278027-Sep-10 15:37
professionalPeter_in_278027-Sep-10 15:37 
GeneralRe: Beware while using Japanese language Pin
skcsknathan00129-Sep-10 5:08
skcsknathan00129-Sep-10 5:08 
GeneralWhich one is better [modified] Pin
Khaniya24-Sep-10 20:06
professionalKhaniya24-Sep-10 20:06 
GeneralRe: Which one is better Pin
PIEBALDconsult24-Sep-10 21:41
mvePIEBALDconsult24-Sep-10 21:41 
GeneralRe: Which one is better Pin
DaveAuld25-Sep-10 2:54
professionalDaveAuld25-Sep-10 2:54 
GeneralRe: Which one is better Pin
PIEBALDconsult25-Sep-10 10:23
mvePIEBALDconsult25-Sep-10 10:23 
GeneralRe: Which one is better Pin
Khaniya26-Sep-10 0:27
professionalKhaniya26-Sep-10 0:27 
GeneralRe: Which one is better Pin
DaveAuld26-Sep-10 1:29
professionalDaveAuld26-Sep-10 1:29 
Even if it does involve an expensive operation, with the code structure we can see, i still cannot see how it makes a difference.

If the code before the 'if' checks the isOk to perform the operation then maybe, but if isOK is already true, and you need to set it back to false if i<100, then maybe the whole way the operation is being done need to be reviewed.

If your logic requires for the the operation to continue until i > 100, then it doesn't matter what happens with isOK, or if it is true already. just set it back to false and get on with what you need to do.

I am maybe not explaining very well what i'm trying to say, but i hope you catch my drift.
Dave
Find Me On: Web|Facebook|Twitter|LinkedIn

CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.

GeneralRe: Which one is better Pin
Richard A. Dalton25-Sep-10 21:59
Richard A. Dalton25-Sep-10 21:59 
GeneralRe: Which one is better Pin
PIEBALDconsult26-Sep-10 4:42
mvePIEBALDconsult26-Sep-10 4:42 
GeneralRe: Which one is better Pin
Electron Shepherd26-Sep-10 11:20
Electron Shepherd26-Sep-10 11:20 
GeneralRe: Which one is better Pin
AspDotNetDev27-Sep-10 7:42
protectorAspDotNetDev27-Sep-10 7:42 
GeneralRe: Which one is better Pin
elitig28-Sep-10 22:27
elitig28-Sep-10 22:27 
GeneralTake a Nap PinPopular
Chris Meech22-Sep-10 8:07
Chris Meech22-Sep-10 8:07 
GeneralRe: Take a Nap Pin
fjdiewornncalwe22-Sep-10 11:45
professionalfjdiewornncalwe22-Sep-10 11:45 
GeneralRe: Take a Nap Pin
The Man from U.N.C.L.E.24-Sep-10 1:50
The Man from U.N.C.L.E.24-Sep-10 1:50 
GeneralRe: Take a Nap Pin
fjdiewornncalwe24-Sep-10 3:32
professionalfjdiewornncalwe24-Sep-10 3:32 
GeneralRe: Take a Nap Pin
The Man from U.N.C.L.E.24-Sep-10 4:25
The Man from U.N.C.L.E.24-Sep-10 4:25 
GeneralRe: Take a Nap Pin
Graham Cottle24-Sep-10 3:36
professionalGraham Cottle24-Sep-10 3:36 
GeneralRe: Take a Nap Pin
Chris Meech24-Sep-10 4:37
Chris Meech24-Sep-10 4:37 
GeneralRe: Take a Nap Pin
Gary Wheeler29-Sep-10 0:36
Gary Wheeler29-Sep-10 0:36 
GeneralRe: Take a Nap Pin
ghle29-Sep-10 19:30
ghle29-Sep-10 19:30 
GeneralRe: Take a Nap Pin
Peter_in_278029-Sep-10 20:14
professionalPeter_in_278029-Sep-10 20:14 
GeneralWhew Pin
Richard A. Dalton22-Sep-10 6:47
Richard A. Dalton22-Sep-10 6:47 
GeneralRe: Whew Pin
Chris Meech22-Sep-10 7:37
Chris Meech22-Sep-10 7:37 

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.