What computer language should we teach? (203)

1 Name: #!usr/bin/anon 2005-03-04 19:10 ID:Heaven

"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

154 Name: #!/usr/bin/anonymous : 2007-01-03 19:54 ID:Heaven

>>152

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.

155 Name: #!/usr/bin/anonymous : 2007-01-10 14:05 ID:rVlsiDky

>>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.

156 Name: #!/usr/bin/anonymous : 2007-02-09 16:53 ID:YmoQJt4J

*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.

157 Name: Ninereeds : 2007-02-10 15:51 ID:B/MBOc/e

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..

158 Name: #!/usr/bin/anonymous : 2007-02-10 23:49 ID:Heaven

>>157
you were in the wrong class

159 Name: Guille : 2007-02-12 17:24 ID:TxmSjKO5

>>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:

  1. How to think like a Computer Scientist, by Allen B. Downey

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 ^^.

160 Name: dmpk2k!hinhT6kz2E : 2007-02-12 23:26 ID:Heaven

What's wrong with Pascal?

161 Name: #!/usr/bin/anonymous : 2007-02-14 11:32 ID:cLuk2Zml

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.

162 Name: Guille : 2007-02-14 15:10 ID:QhltSwKO

>>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.

163 Name: #!/usr/bin/anonymous : 2007-02-14 17:38 ID:ohRrNI7C

>>161

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.

164 Name: dmpk2k!hinhT6kz2E : 2007-02-15 08:50 ID:Heaven

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.

165 Name: #!/usr/bin/anonymous : 2007-02-17 20:42 ID:skD0HzkC

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.

166 Name: #!/usr/bin/anonymous : 2007-02-17 21:58 ID:Heaven

warota.

RPG maker is Ruby right? can we call it a toy language now?

167 Name: #!/usr/bin/anonymous : 2007-02-19 10:28 ID:Heaven

>>163
teach them to think and solve problems and they'll teach themselves to rtfm

168 Name: #!/usr/bin/anonymous : 2007-02-19 20:01 ID:ohRrNI7C

>>167

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?

169 Name: #!/usr/bin/anonymous : 2007-02-20 02:59 ID:UWddQ0GP

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.

170 Name: #!/usr/bin/anonymous : 2007-02-20 11:16 ID:Heaven

>>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.

171 Name: #!/usr/bin/anonymous : 2007-02-20 16:09 ID:NKICU/cl

>>170

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?

172 Name: #!/usr/bin/anonymous : 2007-02-21 08:15 ID:Heaven

>>171
who said anything about books on algorithm design?

173 Name: #!/usr/bin/anonymous : 2007-02-21 17:48 ID:Heaven

>>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"

174 Name: #!/usr/bin/anonymous : 2007-02-22 01:06 ID:ohRrNI7C

>>172,173

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.

175 Name: #!/usr/bin/anonymous : 2007-02-22 02:49 ID:uNXq+en0

python is the bob ross of programming languages

176 Name: #!/usr/bin/anonymous : 2007-02-22 17:40 ID:Heaven

It, uh, it has happy binary trees?

177 Name: #!/usr/bin/anonymous : 2007-02-25 08:09 ID:Heaven

>>176
do not traverse happy binary trees!

178 Name: #!/usr/bin/anonymous : 2007-03-25 17:15 ID:aFnI1Zek

by far the best option in my opinion is python, as it is almost as easy as a pseudo-code.

179 Name: #!/usr/bin/anonymous : 2007-03-26 06:18 ID:3K5sjPV9

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?

180 Name: #!/usr/bin/anonymous : 2007-03-27 04:54 ID:aFnI1Zek

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 ;)

181 Name: #!/usr/bin/anonymous : 2007-03-27 04:58 ID:aFnI1Zek

'become jaded and satisfy their comfort-seeking weakling needs later in their careers'

that was a nice try...

whatever!

182 Name: #!/usr/bin/anonymous : 2007-03-27 05:06 ID:aFnI1Zek

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.

183 Name: #!/usr/bin/anonymous : 2007-03-27 05:11 ID:aFnI1Zek

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?

184 Name: #!/usr/bin/anonymous : 2007-03-28 10:01 ID:3K5sjPV9

Quit yer mumblin' and provide me with counterarguments.

185 Name: #!/usr/bin/anonymous : 2007-03-28 13:41 ID:uNXq+en0

>>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."

186 Name: #!/usr/bin/anonymous : 2007-04-01 12:07 ID:Heaven

>>185
signed

187 Name: mugenjohncel : 2007-04-18 11:23 ID:0Vw+nc8h

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.

188 Name: #!/usr/bin/anonymous : 2007-04-19 13:13 ID:Jro/ltic

>>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.

189 Name: #!/usr/bin/anonymous : 2007-04-19 13:18 ID:Heaven

Oh, to make this clear, though, I completely agreed with your first paragraph.

190 Name: #!/usr/bin/anonymous : 2008-01-09 09:30 ID:1cqwadIE

You should learn penuscode first

191 Name: #!/usr/bin/anonymous : 2008-01-09 19:54 ID:+y1JbdG8

i think python would be best. make them program something they will use.

192 Name: #!/usr/bin/anonymous : 2008-01-09 20:26 ID:Heaven

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).

193 Name: #!/usr/bin/anonymous : 2008-01-10 08:02 ID:Heaven

I miss the good ol' days of hacking at Nibbles with QBasic. In DOS.

194 Name: #!/usr/bin/anonymous : 2008-01-10 12:57 ID:Heaven

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.

195 Name: dmpk2k!hinhT6kz2E : 2008-01-11 04:58 ID:Heaven

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.

196 Name: dmpk2k!hinhT6kz2E : 2008-01-11 05:00 ID:Heaven

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.

197 Name: #!/usr/bin/anonymous : 2008-01-12 12:17 ID:Heaven

>>195

> 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.)

198 Name: sage : 2008-02-09 14:19 ID:Heaven

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.

199 Name: #!/usr/bin/anonymous : 2008-04-20 15:47 ID:lpI69LZv

>>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.

200 Name: #!/usr/bin/anonymous : 2008-04-20 22:45 ID:Heaven

>>199

The post you are replying to is three years old.

201 Name: #!/usr/bin/anonymous : 2008-04-21 07:32 ID:lpI69LZv

Wow. What a slow forum.

202 Name: #!/usr/bin/anonymous : 2008-04-21 22:06 ID:lds9Gn8A

hes was probobly high.

203 Name: #!/usr/bin/anonymous : 2008-04-21 22:43 ID:Heaven

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.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: