Click here to Skip to main content
15,897,032 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.

 
JokeRe: Favorite way to categorize programming languages? Pin
trønderen11-Feb-22 10:32
trønderen11-Feb-22 10:32 
GeneralRe: Favorite way to categorize programming languages? Pin
OriginalGriff11-Feb-22 9:50
mveOriginalGriff11-Feb-22 9:50 
GeneralRe: Favorite way to categorize programming languages? Pin
Jon McKee11-Feb-22 10:35
professionalJon McKee11-Feb-22 10:35 
GeneralRe: Favorite way to categorize programming languages? Pin
trønderen11-Feb-22 10:59
trønderen11-Feb-22 10:59 
GeneralRe: Favorite way to categorize programming languages? Pin
Jon McKee11-Feb-22 12:37
professionalJon McKee11-Feb-22 12:37 
GeneralRe: Favorite way to categorize programming languages? Pin
trønderen11-Feb-22 15:26
trønderen11-Feb-22 15:26 
GeneralRe: Favorite way to categorize programming languages? Pin
Memtha12-Feb-22 9:14
Memtha12-Feb-22 9:14 
GeneralRe: Favorite way to categorize programming languages? Pin
englebart12-Feb-22 17:09
professionalenglebart12-Feb-22 17:09 
That is what I call a submarine error.

You are sailing along nicely, and out of no where, it pops up and blows you out of the water.

“Where did that (null) come from?”

Nice catch.

This where a constructor that requires all values might protect you.

Or else have a validate method such that you

return obj.validate();

I remember one particular nasty code path, but with only 4 paths.

I defined a handful of booleans and left them uninitialized. In each code branch, I initialized some of the booleans. At the bottom of the method, I added a check like

Bool cya = b1 or b2 or b3 etc.

Compiler would catch me if it I tried to use an uninitialized variable.
After testing, you can remove the extra checks.

GeneralRe: Favorite way to categorize programming languages? Pin
Memtha11-Feb-22 17:23
Memtha11-Feb-22 17:23 
GeneralRe: Favorite way to categorize programming languages? Pin
Chris Schaller14-Feb-22 11:06
professionalChris Schaller14-Feb-22 11:06 
GeneralRe: Favorite way to categorize programming languages? Pin
trønderen14-Feb-22 12:27
trønderen14-Feb-22 12:27 
GeneralRe: Favorite way to categorize programming languages? Pin
Memtha14-Feb-22 12:51
Memtha14-Feb-22 12:51 
GeneralRe: Favorite way to categorize programming languages? Pin
James Lonero17-Feb-22 7:46
James Lonero17-Feb-22 7:46 
GeneralRe: Favorite way to categorize programming languages? Pin
atali14-Feb-22 16:24
atali14-Feb-22 16:24 
RantRe: Favorite way to categorize programming languages? Pin
Memtha14-Feb-22 16:58
Memtha14-Feb-22 16:58 
GeneralRe: Favorite way to categorize programming languages? Pin
obermd14-Feb-22 6:20
obermd14-Feb-22 6:20 
GeneralRe: Favorite way to categorize programming languages? Pin
Mike Hankey11-Feb-22 10:37
mveMike Hankey11-Feb-22 10:37 
GeneralRe: Favorite way to categorize programming languages? Pin
trønderen11-Feb-22 15:08
trønderen11-Feb-22 15:08 
GeneralRe: Favorite way to categorize programming languages? Pin
Memtha11-Feb-22 17:35
Memtha11-Feb-22 17:35 
GeneralRe: Favorite way to categorize programming languages? Pin
trønderen12-Feb-22 4:09
trønderen12-Feb-22 4:09 
GeneralRe: Favorite way to categorize programming languages? Pin
Memtha12-Feb-22 9:07
Memtha12-Feb-22 9:07 
GeneralRe: Favorite way to categorize programming languages? Pin
englebart12-Feb-22 17:39
professionalenglebart12-Feb-22 17:39 
GeneralRe: Favorite way to categorize programming languages? Pin
trønderen13-Feb-22 6:11
trønderen13-Feb-22 6:11 
GeneralRe: Favorite way to categorize programming languages? Pin
Myron Dombrowski14-Feb-22 3:32
Myron Dombrowski14-Feb-22 3:32 
GeneralRe: Favorite way to categorize programming languages? Pin
Rick York11-Feb-22 11:34
mveRick York11-Feb-22 11:34 

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.