From: mfb AT mbunix DOT mitre DOT org (Michael F Brenner) Newsgroups: comp.os.msdos.djgpp Subject: Re: Teaching a child to program in C Date: 9 Sep 1998 13:19:22 GMT Organization: none Lines: 66 Message-ID: <6t5v8q$7a5@top.mitre.org> References: <000e01bddb65$42044d80$dc4d08c3 AT arthur> NNTP-Posting-Host: mbunix.mitre.org To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Mike Brenner > The best programming language for a child (or other beginner) > is SQL. Tell the child that they can make each of the monsters, > events, weapons, treasures, magic spells, and walls in their > favorite computer game into database tables, and you will > write a program to animate that database into a game. James Arthur > That's analogous to getting the child to design > lego bricks and then their dad makes a model with them. I do not see it this way. I see the database table as a simple model built with simple bricks (the database tables). The child is making something with the bricks. Dad is doing the complex part (by animating those tables). It is easy to fill in the tables. The child will notice that it is more complex to animate the tables than to fill them in. That is where a motivation to program (or do other forms of math and science and engineering) will come from. James > SQL? Can you do anything in SQuirreL except program databases? No. But you cannot do anything with C except program databases either. The only difference is that in C the database tables are precompiled into the program in a certain way, while in SQL they are external to the program. Two different viewpoints on the data. Either way they are databases. James > It's one of the most powerful, and hence complex, languages available No. The more powerful languages become the more simple they should become. If an automatic table browser is included with the SQL program, to insert, delete, and update records with automatically generated mouse screens as is provided with Oracle, Knoweldgeman, and many other DBMSs, then the only SQL command the child will have to learn is the SELECT statement. James > I can't get the version that's built into (is?) Access > to do anything at all. And that's me with eight years > of programming knowledge of BASIC, C, C++ and ASM. Yes. My version of Access does not have SQL capability (it is an old version). I was not aware that the current Microsoft Access met the ISO standard for SQL. I think this is missing features in the product, not lack of experience on your part. So, let me correct my mistake. When I said use the SQL language, I meant use one of the dozens of common programs that provide the ISO SQL commands like CREATE, DROP, INSERT, DELETE, UPDATE, and SELECT commands, along with an automatic screen generator that permits you to browse through the tables by clicking on them without any programming. This sounds like I am contradicting the original poster's request on how to teach programming. However, it is my opinion that the SELECT command is the first command that any programmer should learn. The SELECT command motivates some of the best patterns of object oriented programming without the incumbent problems (that is, without hanging pointers, memory leaks, bugs, off-by-1 errors, and missed timing schedules). It apparently may have another benefit, James, in advocating a diversity of vendors.