Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

[P]
What language should a kid learn first?

By porkchop_d_clown in Technology
Sun Oct 08, 2000 at 02:32:40 PM EST
Tags: Software (all tags)
Software

Okay, So I just discovered that my wife's cousin's son (what does that make him, anyway?) attends a school that has a total attendance of 10 kids, in all grades combined! I didn't think such schools existed anymore, but apparently they do.


We were at a big family picnic where he was talking about screwing around with the school's computer and how he'd like to get a CD-RW and so-on, and how he'd like to learn how to program.

So, now I'm putting together a CARE package for him. But what language should he learn first? I'm leaning towards Java simply because it's grammar and syntax are easy to understand and because he can get it for free. But is that the best choice?

Sponsors

Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure

Login

Poll
What's the best first language?
o BASIC 10%
o C 14%
o C++ 3%
o Java 10%
o Pascal 19%
o Assembler 10%
o HTML 6%
o English 23%

Votes: 201
Results | Other Polls

Related Links
o Also by porkchop_d_clown


Display: Sort:
What language should a kid learn first? | 89 comments (73 topical, 16 editorial, 0 hidden)
Pascal or C... (2.66 / 9) (#1)
by Nick Ives on Sat Oct 07, 2000 at 09:19:02 AM EST

...but definatly not Java. Java has a fairly strict OOP mindset about it, and whilst thats not a bad thing in a language, I dont think its the best environment to start programming in. If you start on Pascal you have the advantage that you can move to Delphi for OOP, once he's learnt the basics. Yea, you get that with C moving onto C++, but, well, I think theres some cruelty law against exposing small children to C++.

--
Nick
nives@jives.demon.co.uk

Re: Pascal or C... (3.00 / 2) (#2)
by porkchop_d_clown on Sat Oct 07, 2000 at 09:26:00 AM EST

But given that he's going to be operating with out a net (I live 2 hours away, so I can hardly tutor him), is a modern C IDE really the way to go? As for Pascal - I agree it's a great learning language; but does there still exist a good learning-Pascal environment? I haven't seen one since using Borland in MS-DOS.



People who think "clown" is an insult have never met any.
[ Parent ]
Re: Pascal or C... (3.50 / 2) (#23)
by atrodo on Sat Oct 07, 2000 at 12:25:53 PM EST

Accually, there is. Free Pascal Compiler (FPC) is an excellent compiler. It follows Borland's Pascal syntax plus every pascal standard there is in use, and you get get Rhide for it. If you didn't know, Rhide is the IDE that has an amazing resmeblence to Borland's later IDEs (think Turbo Vision). Rhide was orgianally made for DJGPP (GCC for DOS that includes Borland compatablity), but they moved it to so it worked with FPC. As a pascal writer (almost all my projects are in Pascal, and i love it.), i would suggest using FPC with Rhide, and if he ever has the inkling to move to C, just get DJGPP and the enviroment won't change, just the syntax. <A HREF="http://www.freepascal.org/">http://www.freepascal.org/

-Jon Gentle(atrodo@geocities.com)

[ Parent ]
Re: Pascal or C... (3.00 / 2) (#28)
by rtscts on Sat Oct 07, 2000 at 01:07:44 PM EST

Virtual Pascal (www.vpascal.com) has recently been released as freeware. It's IDE looks pretty much like old Borland Pascal, but it compiles Win32 and OS/2 native binaries. There is also limited support for Linux and DOS32.

It also incorporates some OOP styles and structures from Delphi so moving from procedural to OO programming can be done without switching compilers.


...
don't worry. i know exactly what i'm d@#^(!#NO CARRIER
[ Parent ]
Re: Pascal or C... (3.25 / 4) (#13)
by deekayen on Sat Oct 07, 2000 at 10:11:44 AM EST

I would definately have to disagree with Pascal. I started out with Pascal in high school and I'll admit that it's pretty easy to learn, but outside of there, I have not used it nor do I think I will ever again. In fact, I think it only confused me when I started trying to learn C++. If you think those are the only two good starters, I'd much rather jump over and support C.

[ Parent ]
Re: Pascal or C... (3.50 / 2) (#32)
by aphrael on Sat Oct 07, 2000 at 01:40:51 PM EST

The problem is that Pascal->C++ is a difficult transition. Pascal->Object Pascal->C++ would be easier, or Pascal->C->C++; otherwise you're trying to jump *two* generations in one step, which is ... ambitious. :)

[ Parent ]
Python is a very good choice. (3.86 / 15) (#4)
by psicE on Sat Oct 07, 2000 at 09:39:39 AM EST

There's no language in the world that's easier or has cleaner syntax than Python, and (in addition to being as powerful as C/C++) you can create modules in C/C++ when you really need speed and interface them to Python.

http://www.python.org, find out about it. It's actually the only language I'm fluent in right now, having forgot most of my C++ knowledge.

Re: Python is a very good choice. (2.66 / 6) (#8)
by porkchop_d_clown on Sat Oct 07, 2000 at 09:51:30 AM EST

To be honest, I had put Python in the yet-another-scripting-language category; I've never bothered to learn it.

Looking at the web site, it seems interesting. In particular, the interpeter mode brings back that ol' immediate feedback that the 1980's BASIC PC's were so good at. Are there any good "Learn Python While You Sleep" kinds of books?



People who think "clown" is an insult have never met any.
[ Parent ]
Re: Python is a very good choice. (3.80 / 5) (#10)
by psicE on Sat Oct 07, 2000 at 09:56:19 AM EST

The book I used is called The Quick Python Book, but there's also Sams and O'Reilly books that will probably be just as easy.

I do have to say, I wrote a webserver in Python in about 20 lines:

from socket import *
from string import split

lh = ('',80)
s = socket(AF_INET, SOCK_STREAM)
s.bind(lh)
s.listen(1)
while 1:
conn, addr = s.accept()
data = conn.recv(1024)
t1, t2, t3 = data.split(" ", 2)
if t2 == "/": t2 = "/index.html"
elif t2[-1] == "/":
test = "Directory Listing"
else:
try:
fl = open(t2, 'r')
test = fl.read()
fl.close()
except:
test = "HTTP/1.0 404"
conn.send(test)
conn.close()

That's the whole thing. It doesn't do directory listings, but it'll redirect / to /index.html and show any other file it has read privileges to on the system.

[ Parent ]
Re: Python is a very good choice. (2.66 / 3) (#11)
by psicE on Sat Oct 07, 2000 at 09:57:40 AM EST

That's not right! It messed up somehow, in the tabs.

If you want a copy, I can post it somewhere.

[ Parent ]
Re: Python is a very good choice. (3.25 / 4) (#44)
by fluffy grue on Sat Oct 07, 2000 at 03:35:45 PM EST

HTML doesn't grok tabs unless it's inside a <PRE>, and even then rusty's scripts might accidentally strip that out.

That said, you just demonstrated the one reason why I hate Python - it's anally whitespace-dependent, which means that if something gets munged, there's absolutely NO way to recover the spacing, much less compile/execute. Newline-dependent is one thing (I tolerate that in the case of scripting languages, since it keeps interpreted and interactive behavior consistent), but whitespace-dependency is just horrible and has no legitimate purpose other than forcing people into a certain formatting style (and there's better ways to get people to format - like point out that formatted code is more maintainable).
--
"Is not a quine" is not a quine.
I have a master's degree in science!

[ Hug Your Trikuare ]
[ Parent ]

Re: Python is a very good choice. (1.00 / 2) (#54)
by psicE on Sat Oct 07, 2000 at 07:03:03 PM EST

I suppose you just LOVE when you forget a ; or { when you're coding in C?

[ Parent ]
Re: Python is a very good choice. (3.75 / 4) (#58)
by fluffy grue on Sat Oct 07, 2000 at 07:39:50 PM EST

Um, for starters, if I were to forget a semicolon, the compiler would catch it, because the semicolon is part of the formal syntax of the language. Correcting for a missing semicolon is trivial. The problem with Python is that the formal syntax of the language is very whitespace-dependent, which makes correcting for more major problems impossible - for example, just by looking at the code above, it'd be almost impossible to determine the control structure, because the control structure is irrevocably intertwined with the formatting. There is no gain in having the formatting part of the formal syntax of a language.
--
"Is not a quine" is not a quine.
I have a master's degree in science!

[ Hug Your Trikuare ]
[ Parent ]

Re: Python is a very good choice. (1.66 / 3) (#63)
by psicE on Sat Oct 07, 2000 at 08:58:35 PM EST

#include <iostream>

int main(void) {cout << "Hello World"; return 1;}

OR

print "Hello World"

Which one's easier? Even to the extent of knowing what it does without having ever experienced the language before?

Anyway, the Python interpreter corrects whitespace errors just like the C compiler, and assuming you transfer Python source correctly the whitespace will never get messed up. Theoretically, every language is whitespace dependent:

English: purpleboxes != purple boxes
C: intmain(void) != int main(void)
Python: print"hello" != print "hello"

So if you're worried about whitespace being messed up, go program a language which replaces all whitespace with -'s or something. See if you can get anyone to write a webserver in it.

[ Parent ]
Re: Python is a very good choice. (2.00 / 3) (#66)
by fluffy grue on Sun Oct 08, 2000 at 01:06:27 AM EST

I'm not saying that C/C++ would be a good first choice language. I'm saying why I hate Python. There's a difference. :P

That said, I was brought up on BASIC. I think that BASIC is much better than Python, because it's completely unstructured - it's about learning how to write imperative code, rather than learning about the structure of advanced programming. Python takes this middle ground where it's an advanced language which treats the programmer like an infant.
--
"Is not a quine" is not a quine.
I have a master's degree in science!

[ Hug Your Trikuare ]
[ Parent ]

Re: Python is a very good choice. (3.00 / 3) (#59)
by Syn.Terra on Sat Oct 07, 2000 at 07:43:45 PM EST

Okay, I'll try not to sink into a language war TOO bad here, but let's compare the pros and cons here.

Compare the number of times that spaces or tabs get "munged", to the amount of times that you have to read somebody elses code. I mean even look at it. Think back to the question: we're talking about a kid's FIRST LANGUAGE here. I'm willing to bet that infusing a proper sense of style which directly displays program structure and code logic (yes, making up buzzphrases, sue me) as part of the language is a much more important skill, and can stand the chance of having whitespace accidentally removed by the horrible whitespace-eating goblins.

I mean, how much C/C++/Java/etc. code do you have from the first set of programs you wrote? I still have the very first 400 line Python program I wrote, and I can still read it and make modifications without screwing things up, even years later. This, I believe, is only because the nature of the language forces a common format which is hard to mess up (though can be deliberately messed up).

I think the majority of people who say "whitespace dependency is bad" come from a heavy bracket-and-semicolon upbringing, and easily forget how scary that sort of code looks like when faced with it for the first time.

-----------------------------------------------
Music: Good, Free, Legal. Pick two.
Comment posted under the FAIC Public Licence
[ Parent ]

Re: Python is a very good choice. (1.00 / 2) (#65)
by fluffy grue on Sun Oct 08, 2000 at 01:05:25 AM EST

I was just saying why Python is a crappy language for day-to-day work. Personally, I think something completely unstructured like BASIC is better for teaching the basics of programming to a kid anyway.
--
"Is not a quine" is not a quine.
I have a master's degree in science!

[ Hug Your Trikuare ]
[ Parent ]

Re: Python is a very good choice. (3.00 / 2) (#70)
by pw201 on Sun Oct 08, 2000 at 08:27:03 AM EST

Looking at the web site, it seems interesting. In particular, the interpeter mode brings back that ol' immediate feedback that the 1980's BASIC PC's were so good at. Are there any good "Learn Python While You Sleep" kinds of books?

O'Reilly's Learning Python is pretty good. I've heard less good things about the longer Programming Python though I've not read it myself.

As I said earlier up the thread, I help out on a computer camp where we teach Python as a first programming language to 12 to 15 year olds. We have produced some resources (worksheets, and a Python package) to help us do this which we're about to open source. We've not got around to putting them on the web yet (though they should be on the livewires.org.uk site real soon now), but in the meantime, if you'd like to see them, drop me an email. (There are also some older versions of our stuff kicking around on various websites but that won't get you the revisions we did for the camp this summer).

[ Parent ]

Re: Python is a very good choice. (3.60 / 5) (#12)
by zakalwe on Sat Oct 07, 2000 at 10:03:11 AM EST

I'll second this. Python is probably the best first language to learn. It has beautiful syntax, useful concepts and a powerful standard library. It's also very easy to learn, and is used frequently in teaching languages.

After python, then maybe go on to a staticly typed language like Java or C/C++. Definitely Python would be my first choice for actually teaching programming though.

I found it a bit odd that it wasn't an option for the poll, since this is the first language that comes to mind when I think about teaching a first language.

[ Parent ]

Re: Python is a very good choice. (3.66 / 3) (#55)
by IoaPetraka on Sat Oct 07, 2000 at 07:19:52 PM EST

I'll second that vote for Python! The wonderful thing about this language is the clarity. Learning the different datatypes is very menmonic. As a first language it would do very good. Most learning python books teach decent programming style along the way. Since Python is also very OO it will make the intellectual transition to C++ or Java much easier, expecially Java.

Not only is there the ease of learning and the fact that you are learning positive things, but Python can take you WELL into your programming career as a very powerful scripting language. I started out in the scripting world with Perl. For many tasks I stick with Perl because it was my first love. I find that I'm doing more and more with Python though, expecially when I need to make a quick little GUI for somebody at work. I can write the software on my Linux machine, take the script to his macintosh and compile it into a mac application. Viola, a ported GUI.

It remains to see how well Python will do in the WWW realm, but it is already becomming a decent contender. This is very important. If the kid is going to be learning a language, by the time he gets to be in his mid-teens web programming, or some derivative of it, is going to be a very essential skill-set.

After learning Python, moving to either Java or C++ would probably be the best solution. As said before, the OO concepts would already be down, so the big leaps would be data types, memory management, new syntax. Ect. I found that it is much more difficult to go from an strictly structural language to OO, than the reverse.

.:.
Ioa Aqualine Petra'ka
[ Parent ]

QBASIC (1.85 / 7) (#5)
by jmcneill on Sat Oct 07, 2000 at 09:41:10 AM EST

You can never go wrong with QBASIC. I was learned QBASIC in high school before C++, and it taught me how to think as a programmer. By the end of the first semester, I was writing deadly Star Wars games :-) That's one of the reasons I enjoyed programming so much; I was creating things that I enjoyed in a short time period. Sure, QBASIC isn't the nicest language around, but it taught me the basics of programming and the transition to C++ (and later C) was a breeze.

``Of course it runs NetBSD.''
Re: QBASIC (2.00 / 1) (#7)
by porkchop_d_clown on Sat Oct 07, 2000 at 09:46:27 AM EST

Is QBASIC even available anymore?



People who think "clown" is an insult have never met any.
[ Parent ]
Re: QBASIC (2.00 / 1) (#61)
by jmcneill on Sat Oct 07, 2000 at 08:47:47 PM EST

There was a copy of it on my Windows 95 OSR2 CD.. I don't rememember if it comes with 98SE or not (but would be suprised if it didn't).
``Of course it runs NetBSD.''
[ Parent ]
Re: QBASIC (2.66 / 3) (#9)
by psicE on Sat Oct 07, 2000 at 09:51:31 AM EST

Here's the question, though: Was a transition inevitable? The good thing about Python is that you can program almost anything (I haven't yet found out how to do console gfx) without using C. Someone could theoretically stay forever programming in Python, distributing all their programs as 'frozen' binaries, and there wouldn't be a difference at all in functionality, just in ease of programming.

Python also has built-in object orientation, which makes for a better transition to C++ or Java. (Unlike Java, OO is not required, so it's probably a better transition to C++.

[ Parent ]
Re: QBASIC (1.50 / 2) (#62)
by jmcneill on Sat Oct 07, 2000 at 08:51:10 PM EST

Of course it was inevitable, but QBASIC is a learning language. One should know how to program before they start programming, or else they end up writing junk software. My C++ class in college is full of people that have never programmed before; I look at their code and it makes me sick. I learned QBASIC 3 years ago, and C++ 2 years ago, and my code never looked like that.
``Of course it runs NetBSD.''
[ Parent ]
Re: QBASIC (2.50 / 2) (#69)
by pw201 on Sun Oct 08, 2000 at 08:16:11 AM EST

On LiveWires (which is what I think the Americans would call a computer camp) we used to teach the beginners using QBASIC but have moved to Python over the last couple of years.

From that experience, I think Python is an easier language for absolute beginners to learn than QBASIC. We've had the quicker ones writing games in an OO style using a module some of our team put together to wrap the Tkinter module. You can't do that with QB.

I'm learning Java myself at the moment and it looks nice, but I'd suggest that a statically typed language is harder for beginners to get their heads around than a dynamically typed one like Python.



[ Parent ]

The usual progression (1.75 / 8) (#6)
by SwampGas on Sat Oct 07, 2000 at 09:45:52 AM EST

ASIC -> QBASIC -> BASIC -> PASCAL -> C -> C++ And of course once you get near C you can break off into tangents like Java. I still think PHP should be made into an actual compiled language, tho.

PHP rocks :) (1.00 / 3) (#14)
by deekayen on Sat Oct 07, 2000 at 10:13:55 AM EST

nc.

[ Parent ]
Give him a range of options (2.87 / 8) (#15)
by nuntius on Sat Oct 07, 2000 at 10:32:35 AM EST

I'd start with a visual language like Logo. Being able to see the behavior of looping structures and such really clarifies what is going on.

Possibly move to Basic, but more likely to either C/C++ or Java. Languages like Pascal may be clean, but they're somewhat limited--this annoyed me as I couldn't figure out why my programs couldn't implement certain "basic" features which I now know were due to language limitations (like user I/O).

C is probably the best for learning how your computer works, but graphic interfaces are a problem. (Check out Borland's free command-line tools if you're looking for a Win9x compiler.) However, playing with real pointers gives a solid feel for how the computer actually works.

Java would also be a good step. It has a very powerful, standardized GUI system and generally advocates good programming practices. (choice of naming like .getText(), easy implementation of OOP, ...) However, I've seen many programmers who grew up on Java who don't really understand how the computer is handling their instructions--this is useful stuff to know.

The best thing to do is probably to send him a package (CD set) with a bunch of different languages, some sample programs in each language, and let him decide for himself what is best. He'll see a program which catches his eye, read the source code, and be coding basic stuff in ___ before you know it.

Java and Assembly languages. (2.37 / 8) (#18)
by www.sorehands.com on Sat Oct 07, 2000 at 10:58:52 AM EST

My first language was Basic Plus on a PDP 11/34. But, I would say Java,, becuase it does teach object orientation and does not have the memory problems as C/C++.

But, they should learn some assembly language so that they understand what is going on inside the computer.



------------------------------------------------------------------------------
http://www.barbieslapp.com
Mattel, SLAPP terrorists intent on destroying free speech.
-----------------------------------------------------------

Since this is for educational purposes... (4.28 / 7) (#20)
by itsbruce on Sat Oct 07, 2000 at 11:26:37 AM EST

It should be a language that enforces at least some good practice - a language that wants variables and functions declared before use etc. Once good habits are learned, it's easy to put them into practice in languages that don't enforce them. I would put that above issues of practicality (i.e. does the language have much application in the real world). After all, it's not the only language he's going to learn.

If it's a language with a clear structure and syntax, that will also help him in learning other languages. (You could compare this with human languages: Latin has no practical application for 99% of people but it is a big help in learning other languages).

That rules out BASIC and most script languages, since they are languages to which you have to bring good programming habits (yes, they'll punish you for bad practice but that isn't the same thing as teaching good practice.)

I think either Java or Pascal would be good choices for learning, even though they are not languages I ever use now. They both satisfy the conditions I specified above. The fact that they are both significantly different from many of the languages commonly in use is not a disadvantage at all - moving from (e.g) Pascal to C would in itself be an educational experience.

I wouldn't recommend C as a first language - unless I knew the boy well and felt his particular strengths suited it. Many would find C very opaque and discouraging as a first language.

For the record, BASIC was the first language I ever learned and I thought it was a dumb language even when it was the only one I knew.

--

It is impolite to tell a man who is carrying you on his shoulders that his head smells.
Re: Since this is for educational purposes... (4.50 / 2) (#52)
by pb on Sat Oct 07, 2000 at 06:12:28 PM EST

I would generally have to agree with you. I started with BASIC, and couldn't do structured programming with it until the advent of Turbo BASIC and QBASIC, which added real subroutines and looping constructs. It's possible to learn structured BASIC, but I don't think it's really worth it.

Pascal, on the other hand, looks a lot like C except that it's more verbose and has stronger type-checking. And it was designed to be a teaching language in the first place. In Turbo Pascal, there was also a pretty decent object system, sets, generic array-manipulation routines, some graphics support, and a pretty good library of function calls. And usually you can work around its limitations, (disable range checking to use dynamic arrays, and whatnot) but once they really start to get in your way, it's time to learn C.

I wouldn't recommend C++ or Java as a first language for anyone, unless they want to spend a lot of time learning how they should use everything--there is a lot of powerful functionality in both of those languages, but the key problem is knowing what to use when. I've taken courses in C++ that taught how to use the object system without ever mentioning the STL, and I've seen people use the wrong datatype for the job in Java enough times as well.

I'm still learning Java myself, so maybe I'll eventually find out why I'd want to use an iterator over a for loop, or why a well-designed object system is better than passing the data around through a bunch of well-designed functions. I see the values that encapsulation and polymorphism can have, but I think inheritance is over-rated, and confusing (especially in C++).

I wouldn't recommend a functional programming language as a first language either, but I'd definitely recommend it at some point, if you explain recursion, pointers, and lists sufficiently first. It's often a useful way of breaking a problem down into manageable chunks.
---
"See what the drooling, ravening, flesh-eating hordes^W^W^W^WKuro5hin.org readers have to say."
-- pwhysall
[ Parent ]
Re: Since this is for educational purposes... (4.00 / 1) (#74)
by mikpos on Sun Oct 08, 2000 at 05:12:11 PM EST

You bring up a good point about Borland's Pascal having a good run-time library. BASIC was my first language, and pretty well absolutely everything I ever programmed involved pretty colours in some way. I liked gradients and sprites and whatnot. Unfortunately, in order to get anything worthwhile out of it, I had to learn quite a bit about VGA. I had to know how to get in and out of the graphics modes I wanted (always either 0x12 or 0x13); I had to learn to how to manage palettes.

Personally, I think you could teach the kid brainfuck and he'd like it as long as there were decent libraries available for it (which, by the way, there aren't). Java is okay in this regard; it's libraries are mostly toolkit-oriented, but there are some OK drawing primitives in there too. Pascal I think is great. Allegro, a C library, would be perfect, if you wanted to teach him C.

Anyway, you have to keep in mind that it's the projects that are going to motivate him, not languages. It could be the best langauge in the world, but you're never going to hear him get excited about a quicksort implementation, or a new container class.

[ Parent ]

Re: Since this is for educational purposes... (3.50 / 2) (#75)
by pb on Sun Oct 08, 2000 at 05:42:10 PM EST

Ugh; I think I'd want to program in the minimal C version of brainfuck, and write a parser to generate all the ">>>[<<|>" lookin' stuff. I liked Allegro, and ported a few of my old Pascal graphics stuff to there, but ultimately, I ended up implementing a small BGI layer on top of SVGALib for porting stuff to Linux. (what, no floodfill? :)

Unfortunately, I'm a geek; I *did* get excited about quicksort implementation, and binary trees with reference counts... However, I saw a program which showed the graphical progression of different sorting algorithms by representing the data as colored slices, (from "Oh! Pascal!", I'm sure I still have the code) and that was much cooler to watch. :)
---
"See what the drooling, ravening, flesh-eating hordes^W^W^W^WKuro5hin.org readers have to say."
-- pwhysall
[ Parent ]
no subject (2.71 / 7) (#24)
by Holloway on Sat Oct 07, 2000 at 12:29:33 PM EST

How old is the lad?

Kids less than ~8 usually like Logo or a BASIC language to get the idea of if/ifelse/then/arrays (really because of the 'F5' key to see your code run instantly in QBasic is wonderful). Then Java, C++ - and he can take it himself from there (considering your involvement is a care package).


== Human's wear pants, if they don't wear pants they stand out in a crowd. But if a monkey didn't wear pants it would be anonymous

Re: no subject (3.00 / 2) (#72)
by mondo_t on Sun Oct 08, 2000 at 11:59:30 AM EST

Yes Logo is a very find language I learned that when i was around 8, and its what got me into loving computers in the beginning. I still have a book of my favorite things i made in Logo.

[ Parent ]
Scheme! (3.27 / 11) (#25)
by dieman on Sat Oct 07, 2000 at 12:32:54 PM EST

It's great for teaching recursion, and makes the programmer think before they spew code. In java and other likes you can just spew and get it to work, in scheme, you have to think, and then spew out code that will be so incomprehensible you wont want to think about it two years later.

but it makes you feel like you accomplished something after you finish the *simplest* of code :)
(define (nil) (` quote))

(define (subsets s)
  (if (null? s)
      (list '())
      (let ((rest (subsets (cdr s))))
	(append rest (map (lambda x 
			    (cons (car s) x))
			    rest)))))
(subsets (list 1 2))
;Value 147: (() (2 ()) (1 ()) (1 (2 ())))

---
blah
Re: Scheme! (none / 0) (#81)
by tzanger on Mon Oct 09, 2000 at 12:21:15 PM EST

but it makes you feel like you accomplished something after you finish the *simplest* of code :)

(you have (got ((to) be) kidding!))
(I have (never (seen (so)) many) (brackets) (before in (my life!)))

Is that what scheme really looks like?!



[ Parent ]
Re: Scheme! (none / 0) (#83)
by barooo on Mon Oct 09, 2000 at 12:50:28 PM EST

Is that what scheme really looks like?! Yes. While taking an intro programming course back in '95, someone made a Doom level (as a joke on our class) called "knee deep in parenthesis".
--
[G. W. Bush makes] one long for the flashy showmanship of Calvin Coolidge, the easy eloquence of Dwight D. Eisenhower, the simple honesty of Richard Nixon.
P. M. Carpenter
[ Parent ]
First Language (3.92 / 13) (#26)
by Suanrw on Sat Oct 07, 2000 at 12:56:57 PM EST

I believe that Pascal is an excellent first language. It is a self consistent language that allows learning the basic essential programming disciplines and skills in a generic environment. In Pascal, you do not need to, in fact it is difficult to be distracted by the details of the underlaying hardware and operating system. The essential features of and differences between data types is readily appearant. The characteristics of different control structures is clear. This can lead to the development of solid skills for dealing with data oriented and procedure oriented problems.

With the essential skills in place, the student has a firm foundation from which to decend into the details of specific hardware and operating environments. Without those skills, the complexity of specific hardware features, the idiosynratic behavior of specific operating systems, the alternate view points, objectives, and implementation details of libraries will distract the student from learning how to program in general.

As a second choice, I would pick Python. Again, this is a language and programming environment that insulates the programmer from messy hardware and quirky operating systems. However, the flexibility of Python with respect to data types eliminates the requirement to learn some detailed skills relating to the differences between, for instance, numeric data types. I recall (with mixed feelings) a Fortran compiler on a Honeywell machine which flagged all equality comparisons between floating point values and variables, but I have never forgotten that floating point values are approximations, so that values which display as equal may not be so internally!

Re: First Language (4.00 / 2) (#37)
by DeadBaby on Sat Oct 07, 2000 at 02:26:52 PM EST

I learned Pascal first as well. I'm not sure why, I guess it was the only complier I could find at the time but it is a good language to start off with. You can even apply what you learn directly to Delphi. (which beats VB in every aspect of RAD)

"Our planet is a lonely speck in the great enveloping cosmic dark. In our obscurity -- in all this vastness -- there is no hint that help will come from elsewhere to save us from ourselves. It is up to us." - Carl Sagan
[ Parent ]
Java ? Why Java ? (4.15 / 13) (#27)
by ejf on Sat Oct 07, 2000 at 01:07:36 PM EST

The title says it all. The grammar and syntax of Java are ... uhmm ... suboptimal in terms of understandability. Sure, you can do clean code, and yes, transitioning from C++ is easy, but I would not want to learn this as my first language. For one, it's largely object oriented. Most people have more difficulties grasping OO than they have grasping procedural approaches to programming. I would not use Java. It's a Buzzword here as far as I am concerned, and does not really serve a kid well. If he wants to learn Java, let him, but teach him programming first :)

Basic is fairly easy to understand, but just asks for Spaghetti Code. It was my first language, and I was able to pick it up rather fast at the age of 8. In retrospect, Pascal would have been better (that's what I learned next), as it is more structured and illustrates some concepts in the code itself fairly well. It is for sure better than C (just take arrays ... What is easier to understand the first time : int[20] starting at 0 going to 19 or array of integer [1..20] ?).

If your relative is really young, maybe you should start with Logo. I am told it is really easy to learn. I never spent a day using it, maybe I should have.

There are other languages which are pretty nice : Python is one. Much code looks like pseudo-code often employed in CS classes in High School, the syntax is fairly easy, and it _requires_ you to indent properly. This is one of the lessons I learned the hard way. Perl, if used right, lends itself to teaching some basic structures as well. Sure, you can get ugly with it, but you have some fairly powerful and easy to use libraries with it that allow the person learning to do some fairly sophisticated programs with some fairly easy code. Maybe it should be the second language after Pascal/Python or something like that.

Also, let him explore some things on his own. It's truely rewarding to understand something completely on your own. :)


--- men are reasoning, not reasonable animals.
what about perl? (1.60 / 5) (#31)
by omegadave on Sat Oct 07, 2000 at 01:20:30 PM EST

what about perl? i started using it simply because it looked fun. i've been told that it's really messy and doesn't teach good concepts, but having only used perl, i don't know how it compares to others.

Zach Hartley

Re: what about perl? (3.00 / 3) (#35)
by Suanrw on Sat Oct 07, 2000 at 02:02:45 PM EST

Perl, and basic allow sloppy programming, which indirectly teach bad programming habits.

Bad programming habits lead to badly written programs.

Most significant programs will be in the maintenance phase of their life cycle during most of their existence. So write well the first time, and save wear and tear on yourself and others later on.

[ Parent ]

Re: what about perl? (3.00 / 1) (#73)
by Sigma 7 on Sun Oct 08, 2000 at 02:02:39 PM EST

Perl, and basic allow sloppy programming, which indirectly teach bad programming habits. Bad programming habits lead to badly written programs.
That may be true, but the same can be said to all languages that are not newline or whitespace dependant, such as C. If the programmer follows general guidelines of one statement per line, and splits the program into several sections (i.e. functions in C, line number patterns in BASIC), bad programming habits won't be learned.

A formal education (other than high-school level) in almost any language would be preferred. This would teach the kid about both the programming language, and general formatting guidelines in the programming industry.

[ Parent ]

More important than language is ... (3.40 / 5) (#34)
by Suanrw on Sat Oct 07, 2000 at 01:54:22 PM EST

More important than the specific language choice is the process of learning how to effectively think about problems with an attitude that lead to solutions.

  1. A problem, perhaps any problem, should first be tackled by examining its scope. What needs to be examined in order to determine all aspects of the problem? In Operating Manual for Spaceship Earth, Buckminster Fuller talks about determining the scope of a problem. He starts by considering the entire universe, and eliminating from consideration those parts which are not relevant. Some of these are trivially obvious, but others, as we get closer to the problem, need thoughtful consideration. We need to look at the big picture first, so we don't miss any critical details later.
  2. We need to look at the shape of the problem. Formal methodologies tend to teach one to look at a problem in terms of their paradigm. But, I believe we need to first examine the problem, and pick a methodology which fits it, rather than redefining the problem in terms of our pet methodology. Specific methodologies seem to lead to solutions for some types of problems more naturally than others. Thus we develop an implementation independent design.
  3. We can now develop an implemention strategy for our design. At this point we try to pick the best tool(s) from our (hopefully) extensive repertoire of programming tools.
  4. Finally, we implement a solution using the tools available to us, including the programming languages with which we are skilled.

Developing this repertoire of tools includes selecting and learning to use a first language. But this language is but a small part of the art and science of programming.

Re: More important than language is ... (3.66 / 3) (#40)
by zakalwe on Sat Oct 07, 2000 at 02:55:14 PM EST

I agree that language is only a very small part of the whole process of programming. Identifying requirements, and design are highly important skills. But for the purposes of teaching programming, I'd ignore them completely. Teaching just a language only might seem a bit like expecting people to string sentences together given just a collection of words - but even so, you have to start somewhere, and while learning a lot of theory before even touching real programming is sometimes seen as the right way, I think its the wrong order.

The most important thing in teaching anyone anything is to get them interested in the topic. In programming, the most fun aspect is the actual coding. The time to introduce ideas about design strategy are after you've got them hooked on programming, and they want to learn how to do it better.

Of course, that said, it's probably a good idea to give them a language that teaches good habits from the outset. I've already mentioned Python in another post, but there are other languages as well. Pascal/Modula 2 have a long reputation for use in teaching, and Java isn't a bad idea. At the risk of provoking language wars, though, I'd advise against Basic or Perl as some have suggested. They're fine languages for some things, but I think they're a bad idea for a first language. Basic was my first language, but it did teach a lot of bad habits that were slow to break.

[ Parent ]

Re: More important than language is ... (5.00 / 1) (#84)
by Quark on Mon Oct 09, 2000 at 01:18:48 PM EST

The first two lines of every GWBASIC program I've ever written.
10 ON ERROR GOTO 1000
1000 RESUME NEXT

How's that for troubleshooting? Or for sloppy programming, for that matter...


So much bandwidth, so little time...
[ Parent ]
Java (3.20 / 5) (#39)
by dredge on Sat Oct 07, 2000 at 02:50:42 PM EST

The nice thing about BASIC is that you can go straight from learning about what a statement is into writing code.

Java has a sensible syntax, and it won't send you in the wrong direction like BASIC can - but it's confusing for a novice programmer. Having to begin by saying "just ignore all this public static void main ()" business isn't great.

Something like a simple Java environment like BlueJ is (IMHO) the way to go. You can hide all of the idiosyncrasies of the language until you're ready to deal with them.



The language is not the most importent thing. (3.00 / 4) (#43)
by Nyarlathotep on Sat Oct 07, 2000 at 03:23:50 PM EST

The most importent thing for a kid is to see stuff happen. I know that Basic with Sprites beat ALL other langauge when I was a kid simply because the sprites made it easy to write games.

I would say you want something like a Perl for simple video games, i.e. it can be as obtuse and weird as you want, but it better make it really easy to write simple video games.

Campus Crusade for Cthulhu -- it found me!
Scheme (3.00 / 4) (#46)
by gashalot on Sat Oct 07, 2000 at 04:11:28 PM EST

To second the post earlier up this thread on using Scheme, I'd recommend that he learn that first. It's a functional language, so it's fairly simple and consistent across the board as far as syntax is concerned. While it isn't heavily used today, I think that CMU and MIT use it to teach programming, and Georgia Tech is making a full transition this fall.

It also has a fairly nifty IDE that's available for free and can be huge amounts of help to new programmers. It's called DrScheme and you can get it here:
http://www.cs.rice.edu/CS/PLT/packages/drscheme/

-R

Re: Scheme (1.00 / 1) (#68)
by one61803 on Sun Oct 08, 2000 at 01:56:53 AM EST

So does Caltech and Berkeley.

[ Parent ]
Re: Scheme (5.00 / 1) (#82)
by barooo on Mon Oct 09, 2000 at 12:44:03 PM EST

The University of Illinois used to use Scheme in it's introductory programming course for CS majors as well. I took it back in 1995 (with one of the worst professors I've ever experienced). However, they switched to Java as their "teaching language" back in 1997 I believe. Now they use Java for the first two courses, then switch to C++ for Data Structures. I have mixed feelings about this; when I was taking scheme I bitched about "when am I ever going to use this?" like everyone else, but with 20/20 hindsight I think it was a great experience and probably got me thinking theoretically much more than somethine like Java or C++ would have. As other evidence for this being a bad choice (although, correlation !-> causality), the CS majors I know that are in the "new curriculum" seem like dumbasses for the most part.
--
[G. W. Bush makes] one long for the flashy showmanship of Calvin Coolidge, the easy eloquence of Dwight D. Eisenhower, the simple honesty of Richard Nixon.
P. M. Carpenter
[ Parent ]
Re: Scheme (none / 0) (#86)
by RGRistroph on Mon Oct 09, 2000 at 03:50:19 PM EST

I highly recommend this book as an introduction to programming:

http://www.springer-ny.com/detail.tpl?ISBN=0387946810
Programming in Scheme
by Mark Watson
ISBN: 0-387-94681-0, published 1996

The page above lists it for nearly $50, but the three copies I have purchased (gifts for smart young people) all cost between $20 and $30. I bought them at SoftPro, a bookstore in Burlington MA.

If the person is a little more advanced, just go directly for Abelson and Sussmans' book which is used for the freshman class at MIT. Full text is online here (not the latex source, unfortunately)

http://sicp.arsdigita.org/text/sicp

Or you can pick it up at various technical bookstores and online.

Another first programming language which is often over looked, and probably not as good as scheme, is elisp. The Free Software Foundation book "Programming in Emacs Lisp: An Introduction" is ok, and available from the M-x info command inside emacs.



[ Parent ]
HTML... sort of. (2.66 / 9) (#47)
by RadiantMatrix on Sat Oct 07, 2000 at 05:18:24 PM EST

I'll be the first to cry that HTML isn't a real programming language: but it is a good introduction into machine-readable language. Why?

HTML is both human- and machine-readable, so someone who has no experience with programming at all can "get their hands dirty" on something extremely simple, and something that can be learned quickly.

Also, when one becomes proficient with HTML, it often leads to questions like "hey, how would I do something like K5?" That, then, provides a way to begin learning other languages like Perl and SQL.
--
I'm not going out with a "meh". I plan to live, dammit. [ZorbaTHut]

Basic -> Pascal -> C/C++ (2.60 / 10) (#49)
by skim123 on Sat Oct 07, 2000 at 05:33:48 PM EST

I would argue BASIC is the best language to learn first since one can write something as simple as:

For i = 1 to 10
  Print "Hello"
Next i

and be off to the races. No need to have int main() or #include<whatever>.

My programming life began at age 10 with GW-BASIC (came with DOS)... ah, line numbers. Anywho, stayed with BASIC until mid-highschool where I learned Pascal (a great language in itself, and definitely the next step, IMHO). Once in college, of course, I moved to C/C++. I think this set of steps is good, although I wish I had moved into Pascal sooner...

Money is in some respects like fire; it is a very excellent servant but a terrible master.
PT Barnum


Re: Basic -> Pascal -> C/C++ (none / 0) (#87)
by psicE on Tue Oct 10, 2000 at 05:27:27 PM EST

"""
I would argue Python is the best language to learn first since one can write something as simple as:
for i in range(10)
print "Hello"

and be off to the races. No need to have int main() or #include<whatever> or next i.
"""

Well?

[ Parent ]
Dear lord ANYTHING but BASIC (2.66 / 6) (#50)
by el_guapo on Sat Oct 07, 2000 at 05:39:54 PM EST

I learned BASIC first and it made it MUCH more difficult to learn C and such. Just my $.02
mas cerveza, por favor mirrors, manifestos, etc.
Re: Dear lord ANYTHING but BASIC (3.00 / 3) (#51)
by Delirium on Sat Oct 07, 2000 at 06:08:11 PM EST

I don't think BASIC is that bad, provided you're learning a reasonably modern version. Modern BASICs don't have line numbers, and programming in them can be done entirely without the use of evil GOTO statements.

Plus, I learned programming first on GW-BASIC, complete with lots of GOTOs and line numbers, and I think it helped, rather than hindered, my later programming.

[ Parent ]

Little kids: LOGO, then ToonTalk, then Java. (2.60 / 5) (#53)
by Speare on Sat Oct 07, 2000 at 07:03:01 PM EST

LOGO with turtle graphics shows visible cause and effect, as well as building the understanding of variables, subroutines, iteration and recursion.

ToonTalk is a "visual Prolog" where various processes and argument structures are wrapped into different plug-together graphic elements. Prolog and ToonTalk are strong on inference and symbolic pattern-matching, unlike most of the procedural stuff that 99% of languages focus upon.

After that, go Java. Wrapping procedures into objects will be natural from that point on.

BASIC was fine if you were a kid in the 70s. Visual Basic is not much different, and I'd rather see kids learning the concepts that are weak in most hobbyist programmers today.

As an employer, It's easy to find code monkeys that know Perl or Java. It's damned difficult to find fresh CS graduates who know what inference is.


[ e d @ h a l l e y . c c ]
Python (2.75 / 8) (#56)
by hardburn on Sat Oct 07, 2000 at 07:25:12 PM EST

I put down Java in the poll, but I think that should actualy go second.

Years ago, I would have said BASIC, but now I think Python is better for the job BASIC set out to do (teach basic programing skills). Its very simple, but also very powerful. Also has decent OO.

Java should definatly be second, though. Or maybe ASM. C should be next. Be sure to get ASM in there somewhere, even if you never use it, its important to know.


----
while($story = K5::Story->new()) { $story->vote(-1) if($story->section() == $POLITICS); }


Haskell (1.40 / 5) (#57)
by recursive on Sat Oct 07, 2000 at 07:31:11 PM EST

Haskell!

Faculty:


    fac 0 = 1
    fac n = n * (fac (n - 1))

Polymorphic binary tree declaration and polymorphic height function:


    data Tree a                 = Leaf a
                                     | Node (Tree a) (Tree a)

    height (Leaf a )                    = 0
    height (Node left right)        = 1 + max (height left) (height right)    

You think this language comparison is pointless? Me too.


-- My other car is a cdr.


Assembly... (2.71 / 7) (#64)
by sergent on Sat Oct 07, 2000 at 09:32:12 PM EST

Assembly on a relatively simple 8-bit or 16-bit microcontroller would be my choice.

Why? You can get your head around the entire thing without too much work. I think it makes a good starting point for understanding other things.

The microcontroller aspect is also neat because you can do interesting projects.

Re: Assembly... No way... (2.33 / 3) (#67)
by C0vardeAn0nim0 on Sun Oct 08, 2000 at 01:13:55 AM EST

Assembly requires a great knowlege of the hardware you're working with (I/O, memorry space, etc.), it's BIOS, system calls, etc.

Teaching this to a 8/9 year old kid as a first language doesn't seem to be very productive to me. When I learned Z80 Assembly I was 16 with 8 years of experience with Basic, DBase, Pascal and C, and I only started with this couse I bought a book with a complete description of my computers (brasilian clone of the japanese model MSX) BIOS, and i took me much more time to master assembly than it took to Pascal or C.

http://www.comofazer.net
[ Parent ]
It depends on the age of the student (2.50 / 4) (#71)
by MightyE on Sun Oct 08, 2000 at 11:11:51 AM EST

The way I see it, elementary kids are perfectly capable of learning to program (true, their math skills may be lacking, but there are certainly programmers in the workforce similarly equipped). The thing is that they may not be capable of following too many language rules. That being the case, I'd suggest Basic (please, we're talking about elementary kids here, don't lynch me). Basic (maybe QBasic, the old MS-DOS programming language) has easy to read and learn code, unlike Java/C/C++/Perl/many_others, no really crazy syntaxes like [:abovelist:], and is a language coming from rudimentary days. Visual Basic might be a bit too much for elementary kids, what with all the crazy properties and placing buttons, etc, but a good teacher should be able to teach them that.

If we're talking about high school students, then a more advanced language may be in order. Perhaps C or C++, maybe Java (yech, don't like that myself), maybe some *nix shell scripting languages (for younger high school kids). College Freshmen can learn these languages, so there's not really any reason that older high school kids shouldn't be able to learn them too. Plus, especially in the case of C++, students who've had any experience in C++ when they hit their freshman programming course, tend to do waaaaay better than students who've had no C++ experience, even those who've had experience with other languages. The thing with that is that they start more advanced than their peers, and they generally tend to stay more advanced, because it commands a certain level of respect to be more advanced than your peers, and so you are motivated to maintain that advancement, which will also perpetuate into their jobs later in life.
here's my sig
this is a FAQ : ) (3.00 / 2) (#76)
by MSG on Sun Oct 08, 2000 at 06:05:53 PM EST

I'm really surprised that no one (that I've heard of) has gathered all of the good arguments on this one into a single FAQ document. Anyway, I'll toss in my two cents. Since I'm referring to students in general, I'll try to be PC about it.

I think the idea of a "best first language" is too limiting. If you buy into statistics, children who learn to speak more than one language early on have a much easier time learning later. I infer that it gives children the ability to "think different". They can remember ideas better than words, and that kind of comprehension is encouraged when you have more than one way of expressing an idea.

That holds true for programming as well. If you learn any one language to start with, and work with it for a while, your ability to transition to another programming language will be impared. I think it's best to ease into a couple different programming languages to begin with, and make selections later.

HTML is a useful introduction to programming. That's not to say that it's a programming language, but that there are lots of documents about formatting HTML for style and readability that will be useful later. It also serves to teach structure for those who will not move on to Python.

Having learned HTML, a student should expand what (s)he knows with JavaScript and Java for the object oriented style of thinking.

On the prodeedural side, I don't have a clear recomendation. I've read the arguments against BASIC, and I almost believe them. It didn't hurt me, but I didn't use it very long, and had the balance of Java at the same time. Perhaps it's safe when tempered thusly. I'd stay away from C, because debugging buffer overflows is NOT how you should begin. (That's not to say that you should stay away forever, C is my language of choice). Other good choices for proceedural languages may be Perl or Python. If (s)he is talented, you might through LISP/Scheme in for flavor.

Start by doing simple "hello world" or blackjack type programs in each language before moving more into the specifics of any. Once (s)he has completed a simple program in a couple different languages, (s)he can compare exactly how each language functions. This gives students that ability to "think different". Having a background in several tools, they can think about a program from either the object or proceedural stance, and find solutions more easily.

Karel++ (2.00 / 1) (#77)
by MrProgrammer on Sun Oct 08, 2000 at 10:09:07 PM EST

At my high school, they use a language called Karel++ to teach the basics of programming. Basically, think of it as LOGO on steroids. It uses a C++/Java-like syntax. The students write programs to move a little robot character around a board with various obstacles. The robot has various goals, depending on the exercise.

Although the kids sometimes tire of it, Karel++ really teaches good logic skills and object-orientation.

There is about a quarter-year devoted to Karel++, then the students begin learning C++. Seems to work pretty well.
'Round the firewall, Out the modem, Past the server, Through the router, Down the wire, NOTHING BUT NET.
Re: Karel++ (none / 0) (#78)
by MrProgrammer on Sun Oct 08, 2000 at 10:15:22 PM EST

Sorry to reply to my post, but I forgot one thing: where to find it. Karel++ can be downloaded from a lot of places, but here is one place I found. In addition to the language itself, this website also has the first couple of chapters from the related book.

'Round the firewall, Out the modem, Past the server, Through the router, Down the wire, NOTHING BUT NET.
[ Parent ]
It really doesn't matter which lanuage! (1.00 / 3) (#79)
by smt451 on Mon Oct 09, 2000 at 10:03:06 AM EST

I am about 15 myself. I have been reading some of the older posts and many people say 'it all depends on how old the kid is." Of course, you can't (or it would be very hard to) teach a 7 year old kid assembly or C++. I started with HTML. Even though it isn't really a language, it was very practicle, and easy to learn. Shortly after I started getting my feet wet in Javascript, although never really explored it. I wanted to move on to a compiled lanuage, or at least a powerful lanuage like perl. So I explored. Got a few books, looked around on the internet and wrote hello programs (and other simply, short programs)in basic, java, c, c++, and perl. I picked C++ to learn, because I see it as the most practicle. I must admit that it has been an uphill battle, although I learned almost all of it on my own. Then I took a programing course in C++ and it reinforced my knowledge, as well as taught me something about OOP. Since then I have learned a little assembly. I really havn't programmed too much in assembly, but when you learn a lower level lanuage, everything in the older lanuage makes sense. i.e. (C++)why an int (2bytes) has 64k possible values, while a char(1byte) has only 256 possible values. So, concluding, I believe it really doesn't matter too much about what lanuage is used, although if you are using a lanuage, it is helpful (especially with young children) to see the practical application. Also another note: with out algorithms, all the syntax in the world can't make you a good programmer. I have learned the C++ syntax, and algorithms have benn a problem for me. Anyone know any good CS books?

It really doesn't matter which lanuage! (3.00 / 1) (#80)
by smt451 on Mon Oct 09, 2000 at 10:04:49 AM EST

I am about 15 myself. I have been reading some of the older posts and many people say 'it all depends on how old the kid is." Of course, you can't (or it would be very hard to) teach a 7 year old kid assembly or C++.

I started with HTML. Even though it isn't really a language, it was very practicle, and easy to learn. Shortly after I started getting my feet wet in Javascript, although never really explored it.

I wanted to move on to a compiled lanuage, or at least a powerful lanuage like perl. So I explored. Got a few books, looked around on the internet and wrote hello programs (and other simply, short programs)in basic, java, c, c++, and perl.

I picked C++ to learn, because I see it as the most practicle. I must admit that it has been an uphill battle, although I learned almost all of it on my own. Then I took a programing course in C++ and it reinforced my knowledge, as well as taught me something about OOP.

Since then I have learned a little assembly. I really havn't programmed too much in assembly, but when you learn a lower level lanuage, everything in the older lanuage makes sense. i.e. (C++)why an int (2bytes) has 64k possible values, while a char(1byte) has only 256 possible values.

So, concluding, I believe it really doesn't matter too much about what lanuage is used, although if you are using a lanuage, it is helpful (especially with young children) to see the practical application.

Also another note: with out algorithms, all the syntax in the world can't make you a good programmer. I have learned the C++ syntax, and algorithms have benn a problem for me.

Anyone know any good CS books?

Logical progression by age of child (4.25 / 4) (#85)
by Caranguejeira on Mon Oct 09, 2000 at 01:36:42 PM EST

womb/pre-birth: Donald Knuth's MIX language. In the child's earliest development period, it is only natural to expose the child to a language for theoretical application. Provide a groundwork at an early age.

birth - 3 years: Intel x86 Assembly Language. Since the child is practicing rudimentary skills, it would follow naturally that the child should program on a rudimentary level. The child can learn to optimize simple tasks.

4 - 8 years: Fortran. This follows the natural progression from the low level language, into a higher level. This mirrors the child's progression from the most basic skills. Alternatively, COBOL may be introduced. Since COBOL works with only two data types, numbers and strings, this should make things easier for the young fellow, as he likely only understands numbers and words at this point anyway.

9 - 12 years: Algol. At this age it is expedient to kick off the most important phase of the child's development by introducing him to BNF, Backus-Naar Form. This introduction of formal grammar will prepare the child to receive such high level languages as C.

13 - 16 years: C. The child feels proficient with basic grammars and is thrilled at the complexities that a high-level language provides. Practically the only remnant of his childish past is the pointer arithmetic.

17 - 21 years: Perl. The high-level nature of this language provides a feeling of maturity to the child with its variable interpolation features, but at the same time brings the child back to his roots with regular expressions and associative arrays.

22 - 25 years: Python. The child has come of age. He accomplishes the same things that he did in Perl, but somehow feels superior. His peers tell him he is learning OOP.

26 - 30 years: Java. The child learns that programming with Objects is the Only True Way, and also has the opportunity to scoff at C++. He is using a very complex, high-level language. He learns 1001 ways to crash a browser.

31+ years: Visual Basic .NET. The child has matured to perfeciton. He is using the most abstract language on the planet while contributing code to a nebulous entity. He can bring some of the world's most advanced hardware to its knees in moments.

My own experiences.. (4.00 / 1) (#88)
by Belgand on Tue Oct 10, 2000 at 07:07:47 PM EST

Ok, this was the path I personally followed (mainly due to schools of various sorts) and why I think each step was a good or bad one in teaching me to code properly: BASIC- a rather good introductory language. It may not be structured, but it does provide the basics of what programming is like. Furthermore it gets the kid to figure a lot out on thier own just messing around with stuff as well as finding out if they really enjoy programming before they move on to something more complicated. BASIC can also be very easily self-taught as compared to later languages where it's often easier to have at least one person to turn to when things aren't working out right to ask for help. Pascal- Bad ideal. Pascal was more or less a waste of time step between working with a modern, useful language and working with BASIC. Avoid it like the plague. It tends to do nothing but make people bitter about programming especially after coming from the relatively easy pastures of BASIC. C++- could have been better. While I agree that the next logical step is C, I wouldn't suggest using an object oriented language until later on. Let them discover how to program with a functional language first then allow them the chance to work with objects and discover if they like them or hate them. Someone doing object orientation when they hate it isn't really learning much more than how much they dislike OOP. Java- Weak, buzzwordy language that does near about the same thing as C++ with the benefit of being cross-platform. I suggest skipping it entirely and instead sticking with C and then C++ for an OO language. Let them know about Java and suggest they try it if they're fully up on C++ and want to branch out. C also brings up *nix and opens the door to learning more about shell scripting and other scripting languages such as Perl. Then again these are just my experiences and biases against OOPs... take them as you will.

Childhood teaching language - Lingo? (4.00 / 1) (#89)
by factorer on Thu Oct 12, 2000 at 06:01:26 PM EST

Although this may seem somewhat obscene, and I'm biased by my own experience, I'd say that Macromedia Director (>7) makes for a very nice (although proprietary and expensive (no, I'm not getting paid for this)) initial learning environment for OO programming. Since the system is sprite based, and simple animation can be achieved without scripting, it makes for a very smooth learning curve from making something happen to making complex things happen flexibly.

The initial lack of scripting gives an essential taste of power with little effort. The beginner can make things happen visually with simple tweens and then learn how to make them happen in code. When they begin to script behavior instead of lay it out in score, they can learn how nice it is when things are coded and flexible as opposed to when they're not. When they start to use parent and behavior scripts instead of global movie scripts, they will learn what object scope is and what a powerful tool it can be. When they start trying to read the documentation, they will learn how to figure things out for themselves and read between the lines.

Since it's sprite based, it makes it very simple to associate behavior objects with screen sprites, and thus to develop the idea of self-contained sets of behavior. The leap to objects that have no screen representation can be delayed until the idea of self-contained sets of behavior has solidified, and thus can be made without such a mental jerk.

The major danger is the same as with BASIC: it's not a general purpose language. It has significant warping potential. The limitations of the environment might stick with them for a long time, and the language is full of pitfalls that can retard development (no real inheritance, no strong typing, far too easy to use globals all over the place, assorted other horrors). With any luck, though, the student will come to recognize the problems that these cause.

The environment will tell the student when to leave: eventually they'll realize the whole thing has become a crock to them, but they will be conceptually equipped to move on to the greener pastures of real OO languages. So, after they run screaming from Director and Lingo after a couple years, hopefully never to return, let them pick a general purpose OO language or so in which to continue their development.


this too shall pass

What language should a kid learn first? | 89 comments (73 topical, 16 editorial, 0 hidden)
Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!