Click here to Skip to main content
14,363,089 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
AnotherKen12-Sep-19 5:19
professionalAnotherKen12-Sep-19 5:19 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 5:20
memberhoney the codewitch12-Sep-19 5:20 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 798912212-Sep-19 5:20
memberMember 798912212-Sep-19 5:20 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 5:23
memberhoney the codewitch12-Sep-19 5:23 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 798912212-Sep-19 7:15
memberMember 798912212-Sep-19 7:15 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 8:17
memberhoney the codewitch12-Sep-19 8:17 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 798912212-Sep-19 10:37
memberMember 798912212-Sep-19 10:37 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 11:58
memberhoney the codewitch12-Sep-19 11:58 
Member 7989122 wrote:
In many cases, the compiler can suppress the runtime check, e.g. for int literals,


Plenty of developers overestimate the compilers they provide with .NET. They don't typically do optimizations like that. (Although in .NET you can explicitly turn overflow checks on and off on a per cast basis in your code)

Experience has shown me time and again, when it comes to .NET, if there's any doubt about whether or not the compiler will optimize something, no matter how obvious, assume it won't.

You're far more likely to be right than wrong that way.

Spend enough time decompiling .NET asms and you learn the hard way to optimize your own code.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 798912212-Sep-19 14:37
memberMember 798912212-Sep-19 14:37 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 14:40
memberhoney the codewitch12-Sep-19 14:40 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Alister Morton12-Sep-19 5:42
memberAlister Morton12-Sep-19 5:42 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
TrinityRaven12-Sep-19 5:47
memberTrinityRaven12-Sep-19 5:47 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 5:52
memberhoney the codewitch12-Sep-19 5:52 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
TrinityRaven12-Sep-19 6:23
memberTrinityRaven12-Sep-19 6:23 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 6:54
memberhoney the codewitch12-Sep-19 6:54 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 798912212-Sep-19 7:50
memberMember 798912212-Sep-19 7:50 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
TrinityRaven12-Sep-19 8:46
memberTrinityRaven12-Sep-19 8:46 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 798912212-Sep-19 11:13
memberMember 798912212-Sep-19 11:13 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Bruce Greene12-Sep-19 5:51
memberBruce Greene12-Sep-19 5:51 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Ira Greenstein12-Sep-19 6:07
memberIra Greenstein12-Sep-19 6:07 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 798912212-Sep-19 7:52
memberMember 798912212-Sep-19 7:52 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Ira Greenstein12-Sep-19 9:11
memberIra Greenstein12-Sep-19 9:11 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Roger House12-Sep-19 9:05
memberRoger House12-Sep-19 9:05 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 9:07
memberhoney the codewitch12-Sep-19 9:07 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Member 798912212-Sep-19 10:40
memberMember 798912212-Sep-19 10:40 

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.