Click here to Skip to main content
15,893,594 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch11-Sep-19 13:30
mvahoney the codewitch11-Sep-19 13:30 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Tony.ADV12-Sep-19 8:35
Tony.ADV12-Sep-19 8:35 
PraiseRe: do any of you others have little coding mantras that save your behind? Pin
Kent K12-Sep-19 2:49
professionalKent K12-Sep-19 2:49 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
David O'Neil11-Sep-19 12:09
professionalDavid O'Neil11-Sep-19 12:09 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch11-Sep-19 12:12
mvahoney the codewitch11-Sep-19 12:12 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 916705711-Sep-19 20:57
Member 916705711-Sep-19 20:57 
PraiseRe: do any of you others have little coding mantras that save your behind? Pin
Gary Wheeler12-Sep-19 2:04
Gary Wheeler12-Sep-19 2:04 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
kalberts12-Sep-19 4:07
kalberts12-Sep-19 4:07 
That is also one of the mantras I preached when teaching programming. But even though we had been teaching the kids about limited precision, it was very difficut for the to understand that "if ((1/3)*3 == 1)" could fail. (Except that if you really used constants, or compile-time-evaluated expressions, an optimizing compiler might remove the entire "if".)

Students often have a vague understanding of terms like "integer" and "float" (or "real"). So I preferred to refer to them as "counts" and "measurements". That made it a lot easier for them to understand how both integers and floats behave in the computer.

One of the great details of the APL language is the environment variable quadFUZZ (if my memory of the name is correct): When comparing floats, if the difference is less than quadFUZZ, the values are treated as equal. (I belive that the fuzz was actually scaled by the actual float value, so it was a realative, not absolute tolerance, but I am not sure - APL is too long ago!)
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 916705712-Sep-19 4:11
Member 916705712-Sep-19 4:11 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
kalberts12-Sep-19 5:53
kalberts12-Sep-19 5:53 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Peter R. Fletcher12-Sep-19 4:12
Peter R. Fletcher12-Sep-19 4:12 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 916705712-Sep-19 4:15
Member 916705712-Sep-19 4:15 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Peter R. Fletcher12-Sep-19 4:39
Peter R. Fletcher12-Sep-19 4:39 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Kiriander12-Sep-19 20:12
Kiriander12-Sep-19 20:12 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
xtofl11-Sep-19 22:28
xtofl11-Sep-19 22:28 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Rick York12-Sep-19 4:47
mveRick York12-Sep-19 4:47 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Richard Deeming11-Sep-19 23:49
mveRichard Deeming11-Sep-19 23:49 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 4:09
mvahoney the codewitch12-Sep-19 4:09 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
S Houghtelin12-Sep-19 1:19
professionalS Houghtelin12-Sep-19 1:19 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
kalberts12-Sep-19 4:09
kalberts12-Sep-19 4:09 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 1226197312-Sep-19 1:40
Member 1226197312-Sep-19 1:40 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Slow Eddie12-Sep-19 3:10
professionalSlow Eddie12-Sep-19 3:10 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
decaffeinatedMonkey12-Sep-19 3:18
decaffeinatedMonkey12-Sep-19 3:18 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
agolddog12-Sep-19 3:29
agolddog12-Sep-19 3:29 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Rick York12-Sep-19 4:50
mveRick York12-Sep-19 4: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.