So how the heck do you explain this?
-
This whole thread explains what's wrong with programmers and why so many projects go belly up :laugh:
How do you know so much about swallows? Well, you have to know these things when you're a king, you know.
Why not take it one step further: You put two cat items and three mice items into a closed box with no way to inspect the interior. Once you have closed and sealed the box, you will be unable to determine the total number of items in the box at any given time, until you break the seal. If Schrödinger had designed sucn an experiment, he probably would have suggested two large dog items and three kitten items - rumours are that he wasn't very much in favor of protecting cats from harm.
-
Why not take it one step further: You put two cat items and three mice items into a closed box with no way to inspect the interior. Once you have closed and sealed the box, you will be unable to determine the total number of items in the box at any given time, until you break the seal. If Schrödinger had designed sucn an experiment, he probably would have suggested two large dog items and three kitten items - rumours are that he wasn't very much in favor of protecting cats from harm.
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
When you go on to constant declarations, you may pick up some hints from the famous Xerox Fortran programming manual (in Fortran, constants are defined by DATA statements), to explain the rationale behind named constants: The primary purpose of the DATA statement is to give names to constants; instead of referring to PI as 3.141592653589797, at every appearance, the variable PI can be given that value with a DATA statement, and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of PI change.
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
I would get two containers and label them a and b. Bowls, boxes, etc. Then I would say something like: Every day I am going to count the number of your toys that are in the living room. I will write that number on a slip of paper and put it in bowl a. Your Mom will count the number of toys in your room and write that number down on a slip of paper and put it in bowl b. So everyday I want to know the total. I could say add the number in bowl a to the number in bowl b but to make things simple I say a+b which means the same thing.
bleahy
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
It's a developmental thing. I could not help my son when he was in first grade. It seemed he couldn't get anything. Then at 12 he got into a spot of bother and I took him to a night class I was taking. He sat at a computer next to me and said show me some C. I opened an IDE for him and showed him a couple of things, and went to my own work for the class. After a while he said look at this, and he ran a command line program he had written that prompted the user for a password, (hard coded), and did some small thing. He had never seen C code. He's a developer now. Take heart and let the kid grow.
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
Not knowing for sure how old your son is. Algebra is the best way to explain it. Area = WxL Programming is about abstracting one solution to solve many problems, just like Algebra. The other way is to use coins. You enter how many quarters, nickels and dimes you have, and it tells you how much it is worth. Again static formula. I had 2yrs of BASIC programming before I learned ASSEMBLER and Realized that a variable was just a reference to a specific memory address. It was a cool day...
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
What happens in the event that figure "A" is attracted to figure "B" and wants to get married, but figure "A" is already married to, say, figure "C," and figure "B" is engaged to figure "D"? But figure "A" can't keep his hands off of figure " B," because she's got such a great figure? from M*A*S*H episode "Dear Dad"
Brent
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
Start with 2 + _ = 5 What goes in the blank? 3 What if instead of using the blank I say 2 + @ = 5 What is the value of @? 3 What if instead of using the blank I say 2 + a = 5 What is the value of a? 3 What if I say: _ + _ = 5 or _ + @ = 5 or a + b = 5 This forms a "Fact Family" Plot the fact family on a piece of graph paper hooked. If they understand negative numbers (direction or debit/credit) make sure you graph some negative numbers as well. Then worry about computer memory and the like. A good analogy for computer memory/nicknames Addresses/mailboxes on a street, but you say "Bobby's House" "Sally's House" etc.
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
Hmmm...the concept of variables/memory locations. OK. His best friend's phone number. "671-1375" isn't his best friend, but it using it will get him his best friend. Not a perfect analogy, but might get him pointed in the right direction.
We won't sit down. We won't shut up. We won't go quietly away. YouTube and My Mu[sic], Films and Windows Programs, etc.
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
If you want to teach variables, don't use terrible variable names. If you example wouldn't pass a code review it isn't a good teaching example. Also with abstract concepts relate them to something concrete. Let PricePerTooth = $0.25 Let NumberOfLostTeeth = 4 HaulFromToothFairy = PricePerTooth * NumberOfLostTeeth
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
You're problem is that you are thinking abstract, and your son isn't. Get some physical objects and label them. Like paper cups and marbles.
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
You're discussing a 'pointer to a memory address area" to a KID???? Good Lord.... Heck, I probably wouldn't discuss memory pointers during the first SEMESTER of a programming course. They are an unimportant implementation detail. As others have pointed out, better to go with boxes drawn on a sheet of paper, or bags of candy. Talk of the concepts rather than the mechanics.
Truth, James
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
Wow, having to describe what a name is to a first-grader. Glad I dodged that bullet. I'm going to assume you wanted a straight answer to this question, so ... The Alice-in-Wonderland answer below is an awesome answer, but is probably a bit too hard for a first grader. So you could say, "A name is a short word to describe something. We call you Bob (whatever his name is), or Bobby, or sweetie-pie, because it's faster than calling you 'skinny red-headed kid with the lopsided grin and the goofy sense of humor' all the time. Your name isn't you, it's something we say that picks you out of a crowd. Now 'a' and 'b' are names. They name little boxes in the computer that each can hold a number. There are millions of these little boxes, so we have to give them names to pick them out of the crowd. When we say 'let a = 2' we are saying, put the number '2' into the box whose name is 'a'. When we say 'c = a + b' we are saying, take the number out of the box named 'a', take the number out of the box named 'b', add the numbers together, and put them in the box named 'c'. I actually had the grown-up version of this problem when first learning to program. I didn't understand the difference between symbolic constants, where the name actually meant a number, from variables, where the name meant a storage location into which you could put a number. I didn't get why the assembler (yeah, they taught programming using assemblers, what were they thinking) produced an error when I tried to assign a new value to a symbolic constant.
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
rnbergren wrote:
Ideas? I didn't get anywhere
It sounds like you didn't manage to connect to the concrete knowledge he knows, before you tried to extend his knowledge into something abstract. Perhaps try again, using x & y as variable names. That should make the equation "x + y" look more like something he's familiar with from algebra classes. Explain it as how the computer is computing the result of the algebraic equation. And whatever you do, keep the how-a-computer-does-stuff talk out of any explanation. None of it is relevant to beginning programmers, and just serves to confuse and demoralize them.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
-
If you want to teach variables, don't use terrible variable names. If you example wouldn't pass a code review it isn't a good teaching example. Also with abstract concepts relate them to something concrete. Let PricePerTooth = $0.25 Let NumberOfLostTeeth = 4 HaulFromToothFairy = PricePerTooth * NumberOfLostTeeth
And then... My first programming experience was with BASIC, in those days when it really was BASIC! Numeric variable names were restricted to A to Z and A0 to A9, B0 to B9 etc. up to Z0 to Z9 - 286 numeric variables, if you used them all. String variables were $A to $Z - 26 in all. If your background is like that, statements like "Let NumberOfLostTeeth = 4" makes no sense at all. It provokes a SYNTAX ERROR message, or something of that sort. (Sort of if you - anno 2015 - try to use non-ASCII letters or spaces in a file name on a *nix system... Yes, the underlaying file system can handle it, in principle, but nine out of ten application barf if you simply give them such a filename, plainly, with none of the seven, or is it eight, or nine, different escape/quoting alternatives, only one of which is understood by the application.)
-
I'm at the same stage - I try to explain things in terms of "boxes". Box "a" contains two items, box "b" contains three items, how many items have I got if I add what's in box "a" to what's in box "b"? Pointers and memory addresses are a future topic :laugh:
How do you know so much about swallows? Well, you have to know these things when you're a king, you know.
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
Usually when it comes to variables i use this analogy. Let any variable be a room in a file cabinet. We stick on one of them the letter a, that is our variable. We stick on another the letter b, being another variable. In the first, a room, we put the number 2. In the second one, b, we put the number 3. What would result from adding the content of a and the content of b?
-
"Pointers and memory addresses are a future topic Laugh | :laugh:" There are those that never ever get the concept of pointers. These people usually switch majors from programming to marketing. :-O
Fletcher Glenn
I never understood the fuss about pointers, they always seemed pretty straightforward to me. Trying to teach a 6 year old about hex or binary is probably pushing things a bit though :laugh:
How do you know so much about swallows? Well, you have to know these things when you're a king, you know.
-
My son and I often have interesting discussions. Last night was no exception. So I being the geek I am often try to steer the discussion to programming and logic problems. Yesterday we were discussing variable assignments. Something I have notice with other "normal" people. My son is fairly normal even after my influence. (Must be mom). So I as talking about let a=2 and let b=3 So if we add a to b we get what? responses from son ranged from "ab" or "c" I then went into the whole memory address thing where a is just a name for a pointer to a memory address area where the value of "a" is stored. Soon as I asked for the value of "a". His response. "The value of "a" is always "a" right?" *sigh* no "a" is just the name for the pointer to the memory the variable name we use for then storing that value we will use later. "Well why not just type in 2+3 if you are going to add 2 and 3 together?" Ideas? I didn't get anywhere.
To err is human to really mess up you need a computer
Algebra is a topic that comes later in a child's life because it is a hard concept to grasp. Then you try to tie in the mechanics of a computer that I've seen adults struggle to comprehend. No wonder you are feeling a little under water right now. A computer program ties a process with values that are unknown until supplied. Basically, algebra coded in a computer. This is a tough sale for any newbie. A=2 AB=10 What is B? You have to explain AB is shorthand for A*B, he has to understand multiplication and division, he has to understand substitution, he has to understand the wonder of being able to figure out the value of B without ever being directly told what it is and the processes he followed to find out what B is without ever being directly told what it was. Then, that you could do the same thing with computers. You start too young you may turn him off to math for good.