Click here to Skip to main content
15,891,726 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: When I say "goto", my parrot says "Spaghetti Code" Pin
CarelAgain7-Jun-18 19:44
professionalCarelAgain7-Jun-18 19:44 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
DKWatson7-Jun-18 21:43
DKWatson7-Jun-18 21:43 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
soulesurfer7-Jun-18 22:33
soulesurfer7-Jun-18 22:33 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
englebart8-Jun-18 2:09
professionalenglebart8-Jun-18 2:09 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
bleahy488-Jun-18 3:23
bleahy488-Jun-18 3:23 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
obermd8-Jun-18 3:27
obermd8-Jun-18 3:27 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
Member 136445608-Jun-18 4:29
Member 136445608-Jun-18 4:29 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
SeattleC++8-Jun-18 5:16
SeattleC++8-Jun-18 5:16 
Every programmer is taught that goto leads to spaghetti code. When they are new, they struggle to do without goto, adding termination variables and writing weirdly nested loops.

They pass through an intermediate stage where they occasionally give in to the urge to use goto, typically to get out of a deeply nested loop or in case of error. They then author threads like this one, seeking to justify their need for goto to the world as, "It's not so bad if used <like i="" just="" used="" it="">."

If they don't change careers, and if they keep on improving their skills, developers eventually reach a point where the last time they used a goto is receding in the rearview mirror of time. They write smaller, simpler functions. They don't nest loops so much because they get better at understanding termination conditions. They learn to do tricks with break and continue, which provides somewhat more structured alternatives to the goto.

And they read threads like this one and sigh.
Generalgoto considered useful Pin
Martijn Smitshoek8-Jun-18 7:39
Martijn Smitshoek8-Jun-18 7:39 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
TNCaver8-Jun-18 15:17
TNCaver8-Jun-18 15:17 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
AnotherKen8-Jun-18 15:52
professionalAnotherKen8-Jun-18 15:52 
GeneralRe: When I say "goto", my parrot says "Spaghetti Code" Pin
jschell9-Jun-18 4:58
jschell9-Jun-18 4:58 
GeneralThought of the Day Pin
OriginalGriff7-Jun-18 5:00
mveOriginalGriff7-Jun-18 5:00 
GeneralRe: Thought of the Day Pin
den2k887-Jun-18 5:02
professionalden2k887-Jun-18 5:02 
GeneralRe: Thought of the Day Pin
megaadam7-Jun-18 5:09
professionalmegaadam7-Jun-18 5:09 
GeneralRe: Thought of the Day Pin
Ravi Bhavnani7-Jun-18 5:33
professionalRavi Bhavnani7-Jun-18 5:33 
GeneralRe: Thought of the Day Pin
jeron17-Jun-18 7:04
jeron17-Jun-18 7:04 
GeneralRe: Thought of the Day Pin
Ravi Bhavnani7-Jun-18 8:38
professionalRavi Bhavnani7-Jun-18 8:38 
GeneralRe: Thought of the Day Pin
jeron17-Jun-18 9:23
jeron17-Jun-18 9:23 
GeneralRe: Thought of the Day Pin
PeejayAdams7-Jun-18 5:30
PeejayAdams7-Jun-18 5:30 
GeneralRe: Thought of the Day Pin
GuyThiebaut7-Jun-18 5:44
professionalGuyThiebaut7-Jun-18 5:44 
GeneralRe: Thought of the Day Pin
W Balboos, GHB7-Jun-18 8:18
W Balboos, GHB7-Jun-18 8:18 
GeneralNew job - Windows 10 only [update] Pin
  Forogar  7-Jun-18 3:53
professional  Forogar  7-Jun-18 3:53 
GeneralRe: New job - Windows 10 only Pin
den2k887-Jun-18 3:56
professionalden2k887-Jun-18 3:56 
GeneralRe: New job - Windows 10 only Pin
  Forogar  7-Jun-18 4:40
professional  Forogar  7-Jun-18 4: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.