Click here to Skip to main content
15,891,248 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: So how the heck do you explain this? Pin
James Curran28-May-15 4:43
James Curran28-May-15 4:43 
GeneralRe: So how the heck do you explain this? Pin
SeattleC++28-May-15 4:58
SeattleC++28-May-15 4:58 
GeneralRe: So how the heck do you explain this? Pin
patbob28-May-15 5:18
patbob28-May-15 5:18 
GeneralRe: So how the heck do you explain this? Pin
nedo_00728-May-15 21:09
nedo_00728-May-15 21:09 
GeneralRe: So how the heck do you explain this? Pin
KP Lee29-May-15 23:23
KP Lee29-May-15 23:23 
GeneralRe: So how the heck do you explain this? Pin
BotReject31-May-15 23:14
BotReject31-May-15 23:14 
GeneralRe: So how the heck do you explain this? Pin
Member 107319441-Jun-15 15:42
Member 107319441-Jun-15 15:42 
GeneralRe: So how the heck do you explain this? Pin
Stefan_Lang3-Jun-15 6:03
Stefan_Lang3-Jun-15 6:03 
Your 'test program' makes the mistake to immediately define all inputs, and your son immediately optimized away the need for variables (good job! Wink | ;-) ) By providing the inputs, you immediately nixed the reason for writing the program, and your son understood that (clever guy! Poke tongue | ;-P )

Maybe you've started it all wrong: you basicaly asked your son to play the role of the computer/debugger. Instead he played the role of an interpreter, that's why he doesn't understand the hassle of 'a' and 'b'.

It would be better to first confront him with an actual problem that introduces the idea to use an abstract container (a variable). E. g. evaluate football results from a list of matches. Sometimes you need to do repetitive calculations, and that is where variables come in handy...
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralYou don't always get what you pay for Pin
Slacker00727-May-15 1:59
professionalSlacker00727-May-15 1:59 
GeneralRe: You don't always get what you pay for Pin
Johnny J.27-May-15 2:04
professionalJohnny J.27-May-15 2:04 
GeneralRe: You don't always get what you pay for Pin
CDP180227-May-15 2:06
CDP180227-May-15 2:06 
GeneralRe: You don't always get what you pay for Pin
Rage27-May-15 2:13
professionalRage27-May-15 2:13 
GeneralRe: You don't always get what you pay for Pin
Slacker00727-May-15 2:22
professionalSlacker00727-May-15 2:22 
GeneralRe: You don't always get what you pay for Pin
Sascha Lefèvre27-May-15 2:31
professionalSascha Lefèvre27-May-15 2:31 
GeneralRe: You don't always get what you pay for Pin
OriginalGriff27-May-15 2:24
mveOriginalGriff27-May-15 2:24 
GeneralRe: You don't always get what you pay for Pin
Sascha Lefèvre27-May-15 2:32
professionalSascha Lefèvre27-May-15 2:32 
GeneralRe: You don't always get what you pay for Pin
Rage27-May-15 2:33
professionalRage27-May-15 2:33 
GeneralRe: You don't always get what you pay for Pin
OriginalGriff27-May-15 4:35
mveOriginalGriff27-May-15 4:35 
GeneralRe: You don't always get what you pay for Pin
Sascha Lefèvre27-May-15 4:58
professionalSascha Lefèvre27-May-15 4:58 
GeneralRe: You don't always get what you pay for Pin
OriginalGriff27-May-15 5:06
mveOriginalGriff27-May-15 5:06 
GeneralRe: You don't always get what you pay for Pin
Sascha Lefèvre27-May-15 5:12
professionalSascha Lefèvre27-May-15 5:12 
GeneralRe: You don't always get what you pay for Pin
Gary R. Wheeler27-May-15 7:46
Gary R. Wheeler27-May-15 7:46 
GeneralRe: You don't always get what you pay for Pin
Mike Hankey27-May-15 3:10
mveMike Hankey27-May-15 3:10 
GeneralRe: You don't always get what you pay for Pin
Slacker00727-May-15 3:37
professionalSlacker00727-May-15 3:37 
GeneralRe: You don't always get what you pay for Pin
Maximilien27-May-15 3:16
Maximilien27-May-15 3:16 

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.