Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Possible Duplicate:
What should I teach my 14-16 year old computing students?

I might be teaching some highschoolers some programming. This isn't an official class. It would be good for the them to leave being better able to think algorithmically and with the ability to use a tool that will actually be useful for them.

"Requirements"

  • useful libraries (mainly just standard stream I/O, file I/O, and graphics)
  • a good editor
  • open source
  • works on Windows
  • newbie-friendly
  • preferably well-done static typing, but sacrifice this one first

Is there a better choice here than Python?

Another Edit

Uh . . . this is just a clarification, not technically necessary for answering the question. savalia mentioned "your class"; I'm not actually a high school teacher/future high school teacher. I'm a high school student who is maybe going to be doing this.

(Unfortunately running this class has maybe hit a snag . . .)

share|improve this question
4  
Please teach these poor kids something useful - "Not Obscure" should have been on your list... In Highschool they tried to teach us Java/C++... - finally someone sat down and showed me weakly typed, perl, then some php, late in the game at the age of 20 grasping C++ was a reasonable task. There's great power in Python's interactive interpreter for new programmers. PS you can't do anything fun with most statically typed languages out of the box - they do not come "Batteries Included" – Ben DeMott Dec 13 '11 at 2:43
2  
Given their ability to communicate totally in smilies - I would have thought APL – Martin Beckett Dec 13 '11 at 5:39
2  
Plain old Pascal? Simple and made for teaching. I managed to get my students program some interesting stuff with it. Or what about Logo? – Giorgio Dec 13 '11 at 6:52
1  
What's wrong with the usual high school programming languages (C, C++, Pascal), that you're trying to avoid? – Brian Knoblauch Dec 13 '11 at 13:00
2  
@compman, whoops, wrong link, try this stackoverflow.com/questions/591196/… – zzzzBov Dec 14 '11 at 1:42
show 8 more comments

marked as duplicate by Mark Trapp Dec 15 '11 at 13:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

12 Answers

Ruby

Alternative to Python would be Ruby, that has a nice and sort of forgivable syntax. There are some nice sites and free material for learning Ruby such as Learn to Program, which is written for complete beginners in a class room setting.

Much like Python Ruby has a package manager if students want to get started with third party libs as well as Ruby on Rails if they want to make a dynamic homepage. There is also an interactive command line interface for them to mess around with (which is also available at the try ruby site).

share|improve this answer
1  
Forgivable syntax has questionable value. I've not used Ruby, so I don't know how lenient it is - but if they end up learning that the compiler/interpreter can figure out what you mean, languages with stricter syntax or semantics are going to be more difficult to understand later on. – Izkata Dec 15 '11 at 1:59
-1 Ruby would be one of the last languages I'd suggest for HS students. They're much better off sticking to one of the usual suspects like Java or Visual C#/Basic. – mmmshuddup Dec 15 '11 at 7:46

Sounds like "groovy" except for the statically typed part!

The nearest language to your spec would seem to be "C#" which ticks most of the boxes except for the "JVM" part.

I don't think you will find any "modern" language that does not support some sort of "null" variable. It just too useful a language construct as it enables you to sensibly test for invalid or uninitialized variables.

share|improve this answer
1  
When I said "It can run on the JVM, on the CLR, on neither, whatever.", I didn't mean that it had to run on all three. I'll just take that part out. – compman Dec 13 '11 at 4:09
2  
Then I think "C#" fits the bill closer than any other option. It is statically typed but has lots of the "goodies" normally found in dynamic languages. The IDE is best of breed, and, the "Express Edition" is free and good enough for anything short of a full commercial realease. – James Anderson Dec 13 '11 at 4:21
Having "null" variables in certain cases is fine. Having them be the default is horrible. Haskell, for example, deals with nulls using Maybe, which is a much better solution than most other languages. – Tikhon Jelvis Dec 13 '11 at 21:51
Also, looking at the edited question, does Groovy offer any advantage over Python? – Tikhon Jelvis Dec 13 '11 at 21:52
1  
@JamesAnderson: About your last paragraph: if you design your language to be completely free of nulls and to make sure that all variables/constants/whatever are initialized before use, there will be nothing to test there. It just can't happen. – compman Dec 14 '11 at 1:17
show 3 more comments

Haskell hits most of the items on your list. Though it does not have mutable types. It is often accused of being "Hard" but in truth its mostly just different from everything else, which if the students are highschoolers who have never programmed before should not be a problem.

share|improve this answer
It would be good for them to be able to leave the teaching sessions able to use a tool that will give them more power using computers. How well do you think Haskell would do that today? – compman Dec 13 '11 at 4:19
Depends on what exactly you mean by "useful". I personally like using Haskell for system scripts (the sorts of things Bash is usually used for). I've also used it to do some fun image stuff--silly filters, mostly :)--using DevIL; I don't know how Windows-friendly that particularly library is though. – Tikhon Jelvis Dec 13 '11 at 5:16
I am a big fan of Haskell, but I am not sure I would teach it as a first language. – Giorgio Dec 13 '11 at 6:53
@Giorgio: I actually think it would have been easier to learn as a first language than after having learned an imperative one. Also, Haskell is a very elegant, consistent and well-designed language. I tried teaching Java once and noticed there's no way to start without explaining a ton of stuff: mutable variables, classes, objects, static methods... all just for the simplest of programs. Haskell is much simpler to introduce, which makes it a very nice option. – Tikhon Jelvis Dec 13 '11 at 8:37
1  
Actually haskell is pretty powerful. I think that after a few sessions they will be starting to do something really powerful. – Zachary K Dec 14 '11 at 9:57
show 1 more comment

Sounds like you are describing Standard ML. For a more user friendly variants you should look at: A Standard ML to Javascript compiler, upper right corner is a link you can run it in a web browser. http://www.smlserver.org/smltojs/ Alice ML http://www.ps.uni-saarland.de/alice/

share|improve this answer
Alice ML may be good. – compman Dec 13 '11 at 4:27

I would like to suggest you Linqpad.net with C#/F#. These are languages used in real world, have excellent library support, Linqpad simplifies the introduction(start with "C# statements"), runs on windows, statically typed with good enough type inference.

share|improve this answer
That's a neat tool. I'd definitely say C# is a great place for students to start. Plus they can get Visual C# Express for free. Friendly syntax and a pretty good IDE to boot. +1 – mmmshuddup Dec 15 '11 at 7:44

You want to teach them to think like a programmer and to provide them with a generically useful tool?

Python ticks both those boxes and all the others except statically typed which is not really relevant to the basic challenge i.e. finding something that they can learn easily and with which then can get rapid results.

share|improve this answer

Since your requirements changed you should try this one: http://www.squeakland.org/

It is a Smalltalk visual programming environment designed for children. I tried this on the OLPC laptop and can attest to how easy it was to make something cool happen with it. Perfect for first time programmers. The programming interface will become burdensome beyond simple examples, but I believe you can code directly in Smalltalk too.

share|improve this answer

I asked a similar question some time ago - What would you suggest as a high school first language?. Perhaps, you could take a peek; it has IMHO some suggestions which might suit your needs.

share|improve this answer

Why not AppJet (original one is dead, but since it is possible to deploy it as a jar and is sort-of kept alive by Hans Schroeder at https://github.com/dvbportal/appjet).

It is very friendly, you can get a result in 5 minutes. Plus Javascript is usable, and dispelling the myth that it is "just a web scripting language" is also a plus.

share|improve this answer

Pretty much any language could be used if they are in high school as they should already have a fair math background when it comes to basic algebra and sequential reasoning. Case and point, the University Interscholastic League in Texas uses Java for their Computer Science competition exams which is a change from a couple of years ago when they used to use C++.

As such, I would pick something that you are comfortable enough with to teach that would also be useful for students that go on to pursue computer science in college. A quick survey of degree courses usually shows Java as being one of the most commonly used languages.

share|improve this answer

I'll probably get lambasted for this suggestion, but have you considered Alice?

It was developed by Carnegie Mellon University as a visual programming language explicitly for the purpose of teaching programming.

It's not what I would consider a "practical" language, but it is extremely useful for teaching the basics of programming.

share|improve this answer

You might want to take a look at,

"Python Programming in OpenGL: A Graphical Approach to Programming"

download link http://www.math.uiuc.edu/~gfrancis/illimath/StanBlank/PyOpenGL.pdf

the author : Stan Blank, Ph.D. Wayne City High School Wayne City , Illinois 62895

publication date: April 8,2008

wrote it specifically for his high school students, at the very least you could use it to get an idea for possible topic structure for your class.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.