Stephen Reed writes: Hey Texai, let's program [Texai] I don't know how to program, can you teach me by yourself? Sure, first thing is that a program consists of statements that each does something [Texai] I assume by program you mean a sequence of instructions that a computer can interpret and execute, and that by statement you mean a line of code written as part of a computer program Right. One type of instruction is the assignment statement. [Texai] OK, how is it interpreted? It has two parts, one part identifies a variable that receives a copy of, or a reference to, an evaluated expression described by the other part of the instruction [Texai] I assume by variable you mean a symbol (like x or y) that is used in mathematical or logical expressions to represent a variable quantity. What's an evaluated expression? And under what circumstances does the situation in which the variable receives a copy of the evaluated expression occur, as contrasted with the situation in which the variable receives a reference to the evaluated expression? Wow, if that turns out to be an actual transcript sent back through a time machine (I mean, if it works like you think), that's amazingly impressive. Every part of it, from knowing to ask you to teach it to do something, to connecting 'program' used as a verb to 'program' used as a noun, to knowing all about sequences of instructions, what computers are and how they work, what a "line of code" even means, and so on. I assume these things were taught to it through previous teaching sessions, and I'm really eager to see that in action. Of particular interest to me here is the conceptual leap from equality in a mathematical expression (which I guess the system already knows about) to the very different idea of assignment in a normal programming language. The origin of "a variable as a named thing that can hold a value" was an interesting concept to communicate to undergraduate business majors back in the day when I taught introductory programming... you could just see them "get it" after trying analogies with mailboxes and diagrams of computer memory and whatnot. It had never occurred to some of them to put a number in a box for later use before but I clearly remember the instant of concept formation occurring in their fresh young minds :) Now the "aha" moment behind learning the concept of recursion is even more interesting...
------------------------------------------- agi Archives: http://www.listbox.com/member/archive/303/=now RSS Feed: http://www.listbox.com/member/archive/rss/303/ Modify Your Subscription: http://www.listbox.com/member/?member_id=8660244&id_secret=101455710-f059c4 Powered by Listbox: http://www.listbox.com