r/programming • u/jamus • Feb 22 '09
I'm in the process of develping a highschool level Introduction to Programming course. What language would you teach, and why?
28
Upvotes
r/programming • u/jamus • Feb 22 '09
21
u/jamus Feb 22 '09 edited Feb 22 '09
As the title says, I'm in the curriculum development process for a high school level introduction to programming course and am trying to pick a suitable language. The requirements for consideration are as follows:
The target audience for this course is high school sophomores, juniors, and seniors with the only requirement that they have passed a freshmen-level algebra course. The goal is to eventually offer an additional, second-year of programming course in Java (The current AP exam is administered in Java); however, the language I pick for this first class does not need to be syntactically similar, just sound enough to teach good principles and practices.
Thank you for your input!
11
u/stungeye Feb 22 '09
Ruby via Hackety Hack
or
Scheme using How To Design Programs
16
u/[deleted] Feb 22 '09
PLT Scheme specifically targets middle and high school programs and meets all your requirements. It also has many great texts available. Search the archives...
7
u/mrsanchez Feb 22 '09
Factor or Forth. Syntax is for the weak.
6
u/nagoo Feb 23 '09
whatever you do, don't do VB. I was fed that in hs and later served as a TA for an intro class that used VB. students become more concerned with GUI components rather than programming as a means of problem solving. also, much of the literature i saw was poor and geared towards teaching VB syntax rather than programming (i recall an entire chapter on using VB's number formatting). my vote is python or java for many of the aforementioned reasons.
5
u/NovaProspekt Feb 23 '09
68k assembly
9
u/w00ty Feb 23 '09
C
4
u/bprater Feb 23 '09 edited Feb 23 '09
I've spent tons of time thinking about this questions. You have to put yourself in the kid's shoes and not your own.
Ask yourself this: if you wanted to get kids interested in auto mechanics, would you take them to a museum to stare at a Model T or would you take them to a place that lets them get in a mini-Nascar and race it around the track?
The goal should not be to teach the kids anything. It should be to get them inspired to want to spend their own private time learning more themselves. Teaching is borrrring.
Some interesting options you might look at:
Good luck, I think every kid in this country should be exposed to programming at some point. It's my passion and I'm glad I found it when I was young.
6
u/pointer2void Feb 22 '09
what: HTML + JavaScript
why: your pupils see immediate results without the need for an ide and a GUI library.
3
u/[deleted] Feb 23 '09
May I recommend Ruby and Shoes? It'll get them creating little GUI apps quickly, and in a language that will expose them to important OO concepts and patterns without making them choke on syntax.
3
u/aplusbi Feb 23 '09
Malbolge.
5
u/raarky Feb 23 '09
processing.org
4
u/[deleted] Feb 23 '09 edited Feb 23 '09
LOLCODE? :-) HAI
5
u/ehird Feb 22 '09
Scheme.
5
u/CyberPrime Feb 23 '09
Python, no doubt. It's a great basis, it's widely used and it is a very well documented, easy to use language. It also allows for expansion into most other languages.
2
u/nicolas42 Feb 22 '09
teach forth. it'll make kids imagine datastructures
2
u/karlhungus Feb 23 '09 edited Feb 23 '09
I was taught basic then c, then smalltalk. I'd probably say Ruby now a days; it's also got that hipster Why's Poignant guide, may appeal?
4
u/[deleted] Feb 22 '09
Java.
To be a dick.
8
u/aristus Feb 22 '09 edited Feb 22 '09
Python. It's a "real" language that's got a lot of diverse support in academia, research, corporations, and hobbyists. It's fairly modern design, runs everywhere, and is not that scary for a civilian to puzzle out because the control flow is very intuitive. Most of the time you are debugging logic problems, not stupid paperwork problems like pointers, arg signatures, etc.
I taught my father (60+) and 12 high-schoolers basic Python in a couple weeks.
3
u/sanity Feb 23 '09 edited Feb 23 '09
<insert completely obscure pet language here> ;-)
Even though I don't program in Python (I use Java, and I like Scala and Haskell), I'd probably recommend it. It is essentially everything I wish Basic had been back when I was learning to program.
Not so sure about Ruby, its nowhere near as widely used as Python outside the context of building web applications.
3
u/[deleted] Feb 23 '09
Start with C and fail everyone who doesn't get pointers after two weeks. You're doing them a favor :)
7
u/Fosnez Feb 22 '09
Assembly, because I hate children.
But seriously, start with basic c++. Most other languages are built off it in some way - if you know C syntax, you have an idea about how other languages work.
5
u/sintaks Feb 23 '09
I'd go with Ruby.
Ruby's emphasis on the "Principle of Least Surprise" makes it a good choice for those learning to program. When learning something new, our brains are not just taking in new information - they are also going through a prediction/affirmation cycle. The more a prediction ends with a positive result, the more we begin to grasp those concepts.
Ruby is one of the most natural OO languages I've worked with. So, assuming you're planning on teaching OO, that is the choice that makes the most sense to me.
The syntax is also easy on the brain. No worrying about semicolons and curly braces.
Small example: http://pastie.textmate.org/private/iernzob9ymsrqfdgzb6sq
4
u/the3rdsam Feb 22 '09
I am putting my vote in for python. High school students can have short attention spans (better then elementary school but worse then nearly everyone else) and python allows you to get programs running fast. That means that they will see results to their programs sooner and you risk losing interest if they start having to fight too much with things like pointers.
Personally I would use python as a tool to gain interest into computer science and if the student wanted to pursue it more seriously then point them down the road of c/c++/java (anyone of those three, take your pick).
2
u/toastluvr Feb 23 '09
What about Turing followed by Turbo Pascal?
classics
2
u/shitcovereddick Feb 23 '09
COBOL, because I hate people.
2
u/coditza Feb 23 '09
If you want to confuse the hell out of them, teach them C. If you want to start them on the fanboy path, teach them phyton, ruby, haskel etc If you want to prepare them for their exam, teach them Java. If you want them to become the next code monkeys, teach them php. If you want to get programmers out of them, teach them programming.
2
u/case-o-nuts Feb 23 '09 edited Feb 23 '09
Python or Ruby. They're popular, simple, and fairly clean.
Overall, the language isn't too important, but the basic principles are. Once you get a good grip on the basic concepts, you can move between languages relatively easily. I'd pick one that satisfies the following properties:
Edit: Fix sloppy terminology.
2
u/hayzeus Feb 22 '09
LOLCode -- it's teh l@nguage of teh future
1
u/[deleted] Feb 22 '09
Anything but Java, I'm fucking sick of people trying to teach me Java.
1
u/koorogi Feb 22 '09
Depends on what you want to cover in the class, I suppose. If you just want to cover logic, control statements, and maybe some simple algorithms, I'd say python. It's simple yet powerful.
If you want to touch data structures - linked lists, stacks, queues, trees - anything like that, or want them to understand anything about what's really going on under the hood, I'd say introduce them to a language with pointers. But very carefully, of course.
1
u/Tweakers Feb 23 '09
Tcl/Tk meets your requirements. It is fast to learn, easy to read and has been around for a long time. It is used extensively in the "real" world of work and play. Tcl makes learning C easier for those with the interest in delving deeper whilst providing the tools for those who only wish to build gui-level user interface stuffs. Your students could build their first GUI app by the end of the first week of class.
If you are one of the "OOP or it's garbage" crowd, there are options available for the OOP disposed.
1
u/ithkuil Feb 23 '09
http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2007/CourseHome/index.htm
1
u/baryluk Feb 22 '09
Python.
I'm fanboy of D, mayby JavaScript have some future (i don't like it), Java have big market share, but Python is just so simple to learn in 15 minutes...
1
u/noamsml Feb 22 '09
I use Python for that very task. There are some issues with it (IMO, variable declarations might actually be easier to teach than a language without declarations) but it goes over well and nobody is puzzling about pointers.
As for GUI, there's tkinter.
1
u/[deleted] Feb 23 '09
Ruby. It's got everything.
1
u/jsnx Feb 23 '09 edited Feb 23 '09
Ruby is a good language for this task. It is not as fast or widely used as Python; but it is more polished.
1
u/gnrfan Feb 23 '09
Go with Python. It meats perfectly your 4 requisites. I've been teaching some programming to kids recently and it's fairly important that they can quickly start solving meaningful problems and being able to take advantages of lists, dictionaries, functions and classes with the simplest posible sintax is a great thing.
Then, for the second year, before teaching Java teach them some details about the hardware and portrait scenarios where the amount of memory is constrained so they can grasp why programming at a lower level, closer to the hardware makes sense. Also talk about C, talk about pointers, show some code and let them know that with some languages the memory manage is not automatic as they have had it with Python and they will have it with Java. Also teach them about different architectures so they know the CPU in an iPhone is not the same in their Windows PC and was not the same in older Macs or Sun workstations. Then talking about the multiplaform advantages of both Python and Java can make any sense.
If you do all of that, that doesn't have to be that difficult I guess they have a good chance of finding the choice of languages useful.
Finally, show them how Java is a well stablished language in the current programming markeplace and is very similar to C# that is the main choice of programming in the Microsoft world. Also show them Python is becoming more and more popular and mainstream, it's fairly popular in Linux and is being successfully used for web development with stuff like Django.
That's what and why I'd go with Python first and Java later but the way you bridge them, by teaching about hardware and lower level details is also very important.
If you find where to fit it, have them do a bit of web programming in Django once they know enough Python. It could be taken by them as a reward for the time and effort they have invested, go build some tiny social networking site or stuff like that.
Good luck, it's nice to be able to teach new generations of programmers as we'd have love to be teached and in ways are relevant nowadays.
1
u/joesmoe10 Feb 23 '09
Ada maybe?
There are a number of posts on comp.lang.ada covering similar question if you're interested.
1
u/gnrfan Feb 23 '09
Well, here is some actual experience on using Python to teach highschoolers:
http://www.elkner.net/jeff/pyYHS/year02/pyYHS2.html
-1
u/petermichaux Feb 23 '09
Teach them a language that has staying power.
C because it is close-to-the-metal programming. It has been around for decades and will continue to be around for decades.
Scheme because it is about elegant abstraction and thought process. It has been around for decades and will continue to be around for decades. HTDP book.
Not Perl because it is a confusing ball of ASCII vomit and all sorts of concepts no one needs to program a computer.
Not Ruby because it is just a temporary language and a minor improvement on Perl.
Not Basic because apparently learning those habits make it difficult to teach any other language. Google "Dijkstra Basic".
Not Java because it would be great to create less no-it-alls running around exposing the benefits of threads and locking.
-1
u/steerpike404 Feb 22 '09
I realise it's horribly unfashionable but I personally would recommend PHP. It's quick to learn, easy to see your errors and the barrier to writing something -> seeing it fully implemented is incredibly low.
One of the biggest issues for people first learning programming is seeing how the 'Hello world' stuff they are writing in notepad actually translates into something they can visit in a web browser on a live server and interact with - PHP makes that process incredibly easy and accessible.
I think most beginner courses fail to take students through the entire process which leaves them disconnected and unable to fully string together all the concepts they are supposed to be learning. Starting them with PHP will give them a practical tool, a widely used language and a quick and easy way of getting something they can actually play with in their own time in the easiest and quickest way.
0
u/[deleted] Feb 22 '09
Keep tradition alive. Go with BASIC.
-1
u/[deleted] Feb 23 '09
Pro tip: perl, because once someone understands how perl works, he could understand ANY language. Perl was the first language I've learned and I must say that it is definitely worth it. Plus seeing how perl starts getting back the popularity with Moose, Catalyst and the promise of Perl6 Christmas, I'd say it's more than worth it.
0
u/danijel3 Feb 22 '09
Did you take a look at http://www.alice.org/ ?
0
u/BuffaloBuffalo Feb 23 '09 edited Feb 23 '09
AwkAwkAwk!
Because it's easy to learn and the feedback is very good.
0
u/salgat Feb 23 '09 edited Feb 23 '09
Assembly on a basic architecture. That's what I learned in High School. People forget that Assembly is as simple as it gets. Most of the time you are simply telling the processor to load, add, subtract, increment, jump and so on. The problem with learning High Level languages first is that you have absolutely no idea what is going, and have no idea why you are doing half the things you do, even when someone explains it to you. Telling me why a pointer exists and me knowing beforehand that index registers are used for referencing makes all the difference. I realize you want something on a windows platform, but to me assembly made all the difference, and still does. Hell, getting kids to display messages on a simple character LCD is way cooler and more fulfilling than having a window pop up on a screen.
0
u/natch Feb 25 '09 edited Feb 25 '09
I'm going to offer a different suggestion.
Objective-C because you'll be giving them a near-invincible argument to their parents that they should get an iPhone, and that will give them a lot of enthusiasm.
If they can't get an iPhone, no worries; the skills translate to the Mac, or they can just work on Mac software to begin with. And the iPhone simulator can get you pretty far. The tools and docs are free with a free developer login (although running code on an actual device does cost the annual $99 fee, that isn't required to get the tools and docs and to use the simulator).
Plus, they'll learn OOP in a nice Smalltalk-ish way, and can learn the essentials of C to boot, a language that absolutely requires true learning (it doesn't forgive guesswork) and acts as a stepping stone to, if not a foundation of, many other languages. To learn a language like C well, you have to be really excited and engaged in the lessons, and the iPhone platform will give them that level of excitement. Finally as a bonus the platform provides an outlet for some HTML / CSS / JavaScript knowledge, so you can touch on those too.
And this way maybe you can get the school to upgrade its old PPC Macs to newer Intel Macs. Or, better still, maybe you can get Apple to kick some hardware your way.
-2
u/hexayurt Feb 22 '09
Python, specifically for CGI scripting. They can see they can create "the web" and write little scripts to do useful things. Use one of the ORMs to push things in and out of SQL databases, or use the built in pickles etc.
-1
u/[deleted] Feb 23 '09
Visual Studio C# Express Edition.
It's pretty awesome, and free as in beer.
Building GUI forms is easy, just like the VB6 days.
-1
u/kking254 Feb 23 '09
Java. The only reason why is that it will prepare them for future instruction that will most likely be in Java. Isn't that what "intro" classes are for?
-1
u/kking254 Feb 23 '09
Java. The only reason why is that it will prepare them for future instruction that will most likely be in Java. Isn't that what "intro" classes are for?
-2
u/noony Feb 23 '09
Java.
-5
u/docid Feb 22 '09
well, if ya wanna piss off everybody who ever uses something they code ya could choose visual basic
0
u/[deleted] Feb 23 '09
[deleted] — view deleted comment
0
u/[deleted] Feb 23 '09
[deleted] — view deleted comment