"Young people occasionally ask me whether language X is something they'll need to make computer games, or what they should learn if they want to become programmers. And what language should we teach in school?"
Thought I'd post this here. Full article by a current programmer for Funcom (Anarchy Online): http://enno.homeunix.net/index.php?itemid=224
Well, Java does implement a lot of the drawbacks of high-level languages!
In addition to those of low-level language, and some it made up itself.
>>147
Saying that Common Lisp and Scheme can do all that Haskell can do is like saying that PL/I can do everything Lisp can do.
*summons the dead
I like the notion of introducing the concepts of programming first, using languages such as Smalltalk (Squeak), Python, Ruby, Perl, Scheme or what have you. Leave out the complicated low-level stuff at first to get them a general feeling of what it is like to write and think in code. Then you can introduce a 2nd language such as C or C++ to teach them about efficiency and real-world applications, as suggested already, but with a twist: combine both languages.
My idea is this: if you taught them one language, finished it and then started with another, the students might forget about the first ("Hey, we're not using language 1 anymore, time for some garbage-collection of my brain to make space for the new one haha pun."). Like Waha said, learning another language when you only know one is hard, since you don't have the fundamental concepts abstracted and safely stored away in your brain. Since both high-level (1st) und low-level (2nd) languages are useful in the real world, why not complement each other?
Ruby, Python, Perl, Scheme (guile) and other languages have C APIs to hook code into the interpreter. The students could, e.g., learn to optimize certain programs in C while retaining the maintainability or whatever of their high-level programs or how to use external libraries to make the task at hand easier. They don't need to to this all the time, just often enough to understand why knowing the right tool for the job is important.
I know this sounds somewhat abstract, but hey, I'm not a teacher.
if you dont mind a suggestion, it wasnt too long ago i was student myself n i remember the biggest fault when they started to teach was nothing but theory. even if we did code alot, me n most of the ppl in the class started to feel like "whats the point?, sure i can make my puter write hello world 5000times but what use is that to me?". so i was thinking maybe it'd be better to start with a lang that makes it easier to understand the uses, what i'm talking about is webbased langs like php. php is abit lax with variable declarations n such but it is alot like c++ and if your students already have learned html it would be alot easier for them to see the uses of programming.
last point also, dont even try to have them learn oop right off the bat it'd confuse them alot i imagine..
>>157
you were in the wrong class
>>158
Yes, he was. OOP from the beginning? Was your teacher mad?
As for what lang, I'd definitely say Python. It's, as 157 (or Ninereeds, bah) said, a "lang that makes it easier to understand the uses" (it's actually pretty much like php, but even easier to read and code).
My first language was Pascal. I mean, come on! Why would someone teach a language wich has no use? When I moved to C... T_T it got really hard. But, as I see it, Python is even easier to code than Pascal, it has several times its power, is opensource, is multiplataform, is non obligatory oop (not like Java, wich would just be ridicolus to teach to newbies) and can incorporate C. When your students become strong on Python, then you can give them C, C++, a little Java, and PHP, ASP, CGI or what ever application lang you desire. They'll use Python until they die, tho ^^.
There's a couple of great textbooks i'd recommend if you decide to use pithon:
http://www.amazon.com/How-Think-Like-Computer-Scientist/dp/0971677506
That also can be found for online reading at its website,
http://www.ibiblio.org/obp/thinkCS/python/english/
2. Python Programming for the Absolute Beginner, by Michael Dawson
http://www.amazon.com/Python-Programming-Absolute-Beginner-Michael/dp/1592000738
I don't know if there is a online reading site for it, but it's a fantastic adquisition. It might be the fest python book ever, because it's fun to read and all ^^.
What's wrong with Pascal?
Start with teaching them that a programmer's job is to solve problems. Teach em logic and how to think. Then let them code, I'll recommend python for the coding part.
>>160
Sorry if I was a bit harsh with Pascal, but... well, it's hard to apply it on real life. You might find yourself using Object Pascal with Delphi, Kylix (wich is Delphy, after all) or Lazarus, but... well, why would you want to use something like that if you can construct it with a simpler, multiplataform (that is, also in Mac OS) language?
That's why I rather to use Python.
>>161
You certanely are right.
That kind of reasoning only makes sense to someone who can already program and has forgotten that they once did not know how. If you do not know what tools you have or how they work, you can never learn how to solve problems with them.
FIRST you learn to use the tools, THEN you learn how to apply them.
I've never used Delphi, but everyone I know who used it loved it.
Apparently Free Pascal incorporated most of Delphi's features, and it's cross-platform. The binary it produces are quite efficient too.
Getting a job with Pascal, particularly outside of maintenance, is another thing though, which is a bit sad.
I'm a big noob in programming, and actually it's the first time I visit /Programming/ here on 4ch, but what I can say is that playing a little with RPGMaker before knowing anything about programming made it incredibly easier. RPGM is way simpler, there's no comparison, but it introduces you to the computer way of thinking (like with variables).
Plus, you can make games.
warota.
RPG maker is Ruby right? can we call it a toy language now?
>>163
teach them to think and solve problems and they'll teach themselves to rtfm
You're still thinking as someone who already knows how to program. You can't teach someone to "think and solve problems" with just words.
Do you think you can teach a man to paint without him ever touching a brush? Do you think you can teach an architect how to design and build a house without him ever trying to draw one? Do you think you can teach a car mechanic how to repair any car without ever letting him touch a car first?
C, perl and/or shell scripting
Once the student decides on their track, get more specific:
Higher level - C++, Java, OOP, etc.
Web Db - MSSQL, MySQL, Oracle
Web - Perl, PHP, Python (iffy, it's falling out of use), ASP.net, put coldfusion on hold for now. Rails might be on the curriculum in 5 years if it's still alive. Java's a valued skill and javascript is a plus even for the backend programmer to know.
Low level - ASM, C, etc. natch.
Games? Java, OOP, Graphics, graphics with C, ASM, etc. It's a whole subset of programming IMO.
>>168
I'm thinking as someone who taught themselves qbasic at lunchtimes out of an old c64 basic manual and the builtin help because they wanted to learn, not because someone held their hand and made them do exercises.
Nobody made you, but you did by yourself.
How much would you have learned if you hadn't had a basic manual and the builtin help, but instead a book on algorithm design?
>>171
who said anything about books on algorithm design?
>>168
Bah. You can't give him a brush and expect him to paint right away, right? You have to tell him how to move the hand. There's a reason the theory is called "The basics"
I'm replying to the people who say stuff like
> Start with teaching them that a programmer's job is to solve problems. Teach em logic and how to think. Then let them code, I'll recommend python for the coding part.
and
> teach them to think and solve problems and they'll teach themselves to rtfm
here.
python is the bob ross of programming languages
It, uh, it has happy binary trees?
>>176
do not traverse happy binary trees!
by far the best option in my opinion is python, as it is almost as easy as a pseudo-code.
On the contrary, easy is what you want to avoid when teaching people. They have time to become jaded and satisfy their comfort-seeking weakling needs later in their careers (if any).
Therefore assembly is the best language to teach to newbies. Teaching implies guidance, which combined with something supposedly scary like pointers or complete lack of typing besides "byte, word, longword, quadword" will produce a kind of confidence that Java programmers can only dream of. Once "bare to the C library" assembly has been used to study the basic concepts of computer programming, higher-level languages may be taught with the promise of the compiler catching type-safety errors and not having to do function calls and register spills by hand.
Contrast the end product of a survivor of such a course with the sort who's ever been taught "heavy gloves so you don't hurt yourself" languages like Java and (as some in this thread propose) Python. Which one would you rather hire? The old-school guy who's got confidence out the arse, or the scaredy-cat Java grinder who has nightmares about the big bad NullPointerException and who doesn't understand why the garbage collector won't catch his file descriptor leak?
I guess that is why Logo is used to teach kids in elementary school and kindergarten.
As far as your perfect candidate question, I think that I would hire this guy http://norvig.com/21-days.html
Now, he is 'the old school survivor' maybe because there was no Python back then, but with his extensive experience, he is still recommending Python. Just like me ;)
'become jaded and satisfy their comfort-seeking weakling needs later in their careers'
that was a nice try...
whatever!
Hey, I couldn't find pointers, garbage collections, and descriptors leaks in logo http://el.media.mit.edu/Logo-foundation/logo/programming.html
Shell I call them and tell them to change their curriculum. Their kids just wont have any confidence without those things, and won't be able to produce anything good in future.
Hey! Why isn't gravity being thought with Einsteins relativity stuff as well Newton/Leibniz's calculus, but only starts with more trivial examples, like some apple falling on someone's head. All those educators, what were they thinking?
Quit yer mumblin' and provide me with counterarguments.
>>179
Unfortunately, teaching isn't just about imparting knowledge. You also have to maintain the interest of your students. Assembly programming is tedious and unrewarding- new programmers won't care that it's an excellent way to learn the fundamentals and practice basic algorithm design, they want to do something other then screw around in text mode. This is why Logo is considered great for teaching; its easy-as-pie graphic functions make learning the concepts somewhat more exciting for kids.
Try running your assembly super-programming course, but don't be too surprised when 90% of it drops after the first two weeks and re-enrolls in "Making 3D Games in Visual Basic.NET 101."
>>185
signed
Python will be the most obvious answer since it is almost as easy as a pseudo-code. After they learned Python by heart, learning other languages will come naturally.
>>185
I think 90% of people just can't program. The basic concepts come easily to some and are extremely difficult for others to wrap their minds around. I don't claim this to be fact, but it's my experience, and from what I've read, I'm not the only one with that experience.
So, there's something to be said for an interesting and engaging class, true, but there's also something to be said for one that weeds out the people who just aren't cut out to be programmers.
Oh, to make this clear, though, I completely agreed with your first paragraph.
You should learn penuscode first
i think python would be best. make them program something they will use.
Everyone thinks something would be best. I think emacs lisp or LOGO are a good thing to learn first. I also think old micro-basic would be good except it's impossible to get at anymore (unless you use an emulator).
I miss the good ol' days of hacking at Nibbles with QBasic. In DOS.
Qbasic was all right, but wasn't quite as immediate as LOGO or lisp (or even other basics). As a result, I think ipython http://ipython.scipy.org/ would probably be a better choice than Qbasic simply because it's more interactive.
QuickBasic had an immediate mode. The online help was fantastic (F1 any keyword and a up pop cross-linked discussions and examples), and you could stop/resume a program anywhere without changing the source (including on errors), and a host of other goodies.
Not exactly Genera- or Smalltalk-quality, mind, but something most languages implementations nowadays are nowhere near doing. A pity.
I forgot to add you could stop the program and change the source too before resuming. At least in interpreted mode anyway.
QuickBasic's problem is it's long in the tooth and mostly irrelevant.
> The online help was fantastic
Very yes. Very, very yes.
I may have grown to hating Basic dialects with a passion, but I must owe my entire passion of programming to that help.
Although Python does have a help() function in its interpreter, and the REPL encourages experimenting more than QBasic's Immediate pane, it still has much to improve before it's immediately accessible to the newest aspiring hacker.
(Especially Nibbles. Python needs a Nibbles -- with code that's stupidly simple to understand.)
By the way, Pascal was meant to be compact and have a small compiler. Its BNF grammar is about half a page long. It used to be the favorite for compiler design courses. A subset, PL0, has a compiler with source you can read through pretty easily. The author, Wirth, did not intend that you use Pascal for commercial projects. He designed Modula-2 and Oberon for that.
>>45 just as use of variables shouldn't need to be taught in mathematics at a university
...just...just stop. Right now. That wasn't funny.
I'll bet you don't even have a clue what the difference is between variables that express arbitrariness and those that express generality. Arbitrary variables and general variables. And if you want to step into the realm of formal logic, you'll need to further divide up your variables with adjectives like "free" and "bound."
Varibles shouldn't be taught...that's a good one. Perhaps you'll say next that methods of proof don't need to be taught either? Let's just leave mathematical induction to intuition, shall we? Good luck proving complicated proofs that way.
The post you are replying to is three years old.
Wow. What a slow forum.
hes was probobly high.
Oh no, this is perfectly ordinary on this kind of messageboard. It's good if discussion is kept in one thread, or when that thread grows to 1000 posts, in a group of similarly named threads.