Software Development

How to introduce high school students to programming

A reader is seeking advice about how to teach programming to high school students. Justin James presents two approaches to teaching programming and explains why he prefers one approach over the other.

 

A TechRepublic member recently sent me the following email:

I'm planning to offer an Introduction to Programming course as part of my IT curriculum at the high school where I teach. I don't know much about programming so where do you recommend I start?

What kind of language should I introduce my students to? Java?

Here is the slightly edited version of my reply:

These are great questions that really get to the heart of a lot of things that have been discussed in the Programming and Development blog over the last few years. You are really asking two questions: (1) How do you get up to speed on programming to the point where you can competently teach a class? and (2) What kind of material is the best to teach? I think that both questions are much more closely related than you may suspect.

Two possible approaches

There are two possible approaches to this scenario. The first is the simple, industry standard answer: You learn enough about programming to put together some simple applications on your own with a language such as Java, C#, or VB.NET, and then teach the same thing to your students. This has the benefit of being a "safe" approach, in that it is no different from what anyone else is doing right now.

The second option is to forego the idea that you can teach enough real-world programming skills in the short time allotted (a portion of a school year, most likely) and instead teach programming fundamentals. Let's look at these options in a little more detail.

Approach #1 The goal is to walk the students through learning some simple software development projects, starting with the "Hello World" variety and maybe moving up to a simple application that interacts with a database by the end of the course.

For yourself, you would probably want to do some basic reading on programming, and then progress with learning a particular language inside and out, so that you can adequately answer your students' questions. You may want to take a course at a community college or an institution such as DeVry University, ITT Technical Institute, Anthem Institute, etc. in order to facilitate this learning process. From there, you will have the necessary knowledge to walk students through building simple applications.

For this kind of course, Java, C#, or VB.NET are all up to the task, and there are free and low-cost development tools available to educational institutions so that neither the school nor the students would be under a terrible financial burden. A great alternative to those languages is Pascal, which was explicitly designed for its value as a teaching tool and is a perfectly fine language in its own right.

Approach #2 The alternative is to put together a course that does not try to be a real-world programming course, but teaches the fundamentals that every good developer should know. There are a number of different "educational" programming systems out there, which include EdScheme, Logo, Alice, Small Basic, and Squeak/eToys. I am familiar with EdScheme, having gone through the basic book (The Little Schemer) in it when I was in high school. The EdScheme education course that I went through combined that book and software to let me write programs.

For a course like this, you should go through the material on your own and then dip your toes into some actual development.

The pros and cons of both approaches

Approach #1

The big advantage is that your students might see some initial results, such as an on-the-screen application that looks like something is really happening. This might boost their self-esteem a bit and give them the willingness to go deeper with their studies. Another advantage is that there are plenty of resources out there for teaching like this and learning these kinds of systems.

One problem is that you will be doing a major disservice to your students. For one thing, it would take someone years of learning to be able to know enough to knowledgably answer a student's questions in this type of course. I suspect that, if you learn this on your own and then try to teach it, your greenness will show. Unless high school students are a far less cruel and judgmental crowd than I remember, all it takes is for you to make one or two rookie mistakes, and your credibility with them will be shot.

The other big problem is that teaching a course like this before the students have been through a program that taught them the fundamentals (such as the EdScheme program) is like trying to teach algebra to kids in kindergarten. Without the right base layer of knowledge, the students can manipulate the tools to produce the needed results, but they do not actually know what they are doing.

Approach #2 With a program oriented to the fundamentals, you have a number of great advantages. For one thing, you will be dealing with a small subset of the things that real-world programmers encounter. As a result, fewer problems will come up, and so your lack of programming experience will not be a major liability. More importantly, you will be doing the students a favor: Those who go on to learn more about programming will receive a solid background in development. Also, I bet that you will find learning (and teaching) programming to be much less frustrating and much more rewarding with this approach.

The biggest problem with this approach is the main issue when teaching fundamental anything to high school students: They start saying things like, "This isn't what actual programmers use, so why are we learning it?" or "This doesn't apply to the real world." While the mature viewpoint is to say, "Yes, but you need to crawl before you can run," many people in the high school age group simply do not see it that way. In addition, the support for these educational programs is not as widespread, due in large part to a lack of major corporate backing.

The approach I prefer

If it is not obvious, I favor the second approach. Why? Because I went through something like it when I was in high school. First, we learned BASIC over one year; the next year we were taught COBOL; in the third year, the first half was EdScheme, and the second half was Pascal; finally, there was C or C++ (I didn't take that course, so I don't know for sure) in the fourth year.

In the first two years, there was a major "weed out" effect -- probably 75% of the students dropped the class, failed it, or did not take the second year. It was brutal (by the way, you see about the same numbers in college). What generally happened is that a few students with the raw talent bulled through it and "helped" (that's a euphemism for "let them copy the work") the other students along. But in that third year, when we worked through EdScheme, something magical happened. To this day, I point to that half-year course and say, "that's when I actually learned how to program." Everything before that, in BASIC and COBOL, was merely writing code. It was like the difference between trying to learn Spanish by watching Dora the Explorer and visiting a Spanish-speaking country for a year, or the difference between learning how to cook by making Hamburger Helper and having Julia Childs personally teach you.

I cannot say enough good things about the EdScheme program, and I definitely recommend it. If your students want to know why they are being taught something that isn't real-world programming, let them know that one of the biggest problems in the software industry right now is the fact the fewer and fewer programmers understand these fundamentals. You can ask any of the readers here at TechRepublic, and they will tell you the same thing. As someone who has been an interviewer, I promise you that the people who know the fundamentals are obvious and that they are much more desirable to employers.

Helping to teach the next generation of developers is something that I am very passionate about, as are many of the TechRepublic members. I would be glad to provide any assistance that I can in your endeavors, including coming to speak to your students if you are within a few hours' drive of Columbia, SC. If you are outside that area, perhaps one of the TechRepublic members would be interested in speaking to your students. In addition, I can check the local .NET developers groups in your area to see if anyone would be able to talk to the students.

I hope this helps!

Related resources from TechRepublic and ZDNet

J.Ja

Disclosure of Justin's industry affiliations: Justin James has a working arrangement with Microsoft to write an article for MSDN Magazine. He also has a contract with Spiceworks to write product buying guides.

---------------------------------------------------------------------------------------

Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!

About

Justin James is the Lead Architect for Conigent.

154 comments
klearning
klearning

justin is absolutely right, building the fundamentals is very much essential and then one should jump into the problem solving fundamentals like learning about EDScheme and Data Structures which will help building a strong foundation in computer science and ultimately analysing and building the real world software solutions.

shryko
shryko

in my high school, I did programming in grade 11 & 12 (of 12)... I skipped the pascal in grade 10 due to a conflict... we were doing C in grade 11, and C++ in grade 12. The curriculum was mostly the same year-to-year, but it got a bit faster, and a bit trickier each year. And we basically had to build a mini-database system as our mid-term project, and we had to do a game for our final project(using a pre-made graphical setup as the basis to have our title screen/offscreen buffering/menus done, since few of us were ready to get down to the toolbox level)... mind you, the teacher had worked for IBM as a programmer back when C++ came out, and had over a decade of experience, so, I wouldn't recommend that your first run through be nearly as full... start with Pascal, and the concepts behind programming.

lodestone
lodestone

How do you introduce old duffers to programming? I've spent nearly my entire career on the fringes of IS. I learned the old BASIC language in Jr. High but haven't picked up anything else since. Recently, I installed MS's free VB programming suite and started thru the tutorials. PAINFULLY tedious! Anything out there that gets the learner to some useful learning without the electron microscope disection? --Allen

michaelangemiel
michaelangemiel

Hi Sir, Am Michael, am doing I.T in Kenya. I would like to know if it is possible for someone to study other programming like Oracle, XHTML, SQL...after studied VB .Net at school! Thanks so much for your answer! I steel looking forward for the answer!

Adan_Ova
Adan_Ova

Python. It is great. Looks just like pseudocode. It is object oriented. Supports multiple inheritance. There are lots of resources out there.

techrepublic
techrepublic

I taught programming at Royal High School for a while about 10 years ago. There were two courses; Basic and AP Pascal. The approach I took for the first course was structured problem solving. For the first six weeks I did not present any keywords or syntax, and in fact the kids didn't get a chance to program at all. This had a tendency to upset some parents. If I were to do it again, today. I would teach JavaScript and HTML, rather than Basic. But still front load the course with structured problem solving skills, including flowcharting and other graphic representations.

hineses@hotmail.com
hineses@hotmail.com

After skimming the comments, I surprised no one mentioned Python. Python is a great language for a beginner. It's interpreted so it's possible for the student to get immediate feedback and lends it's self well to experimentation. Python not only allows the student learn fundamental concepts such as data types, flow control, etc., but it also supports object oriented programming. With the modules available, students can achieve quick success, accomplishing fairly sophisticated tasks without having to get into the nitty-gritty of operating systems and network protocols. I chose it as the language to teach my two daughters whom my wife and I home-schooled. And by the way, did I mention that it's free!

mattohare
mattohare

I agree that it should not be a full programming course. If this truely is a survey class, It's a good idea to keep it high level. That said, I think it's a smart idea to have a "Hello World" exercise at the start. I know that will get and hold a lot of attentions. Then, I think another application where students can see how changes in a database affect the output of an application. I don't believe they have to write the whole thing. Just do enough to have an interest. A best case might be where they write a UI to a database server that's already running. They can see their entries on a screen in front.

Duke E Love
Duke E Love

Screw pedagogy we need to prepare them for a holy war.

andres.narva
andres.narva

Boring. Teach them DHTML, PHP, and/or ActionScript. Quicker results, more motivation. Then go into the hard core stuff. Otherwise, you're scaring most away.

JGH59
JGH59

I would teach the fundamentals using Python as it is free and has all the basics (pardon the pun). Once you master the base language there are thousands of apps written to do real world stuff just by linking up libraries.

branty1970
branty1970

I teach programming to high school students in the UK a part of the A' Level Computing course. We get around 2 hours a week to teach - not much I'm sure you'll agree - and we have to prepare students to sit a practical programming test in less than 9 months (about 7 months when you take off holidays). I teach some basics with things like Logo and some control using models and graphical design tools. The whole idea is to get pupils thinking about how the computer needs them to represent the problem and how this is very different from the way they think now. Nearly all my students are totally green when it comes to programming and they think that by the end of their first lesson they'll be writing multiplayer 3D games. It's a real shock to their system to realise just how involved programming can be. This first phase takes a few weeks and then we start writing some simple programs in VB.net. Pupils are expected to do lots of extra learning outside of the classroom but this doesn't often happen. So to get them interested and wanting to do more we start writing simple games like pong and space invaders. They see some real progress and 'want' to get their program finished so that they can impress their mates. I've found that many pupils will progress significantly in the first 9 months and are able to sit the practical exam if this approach is followed. However, I'm always on the look out for new ways of doing things and I'll certainly check out some of the ideas mentioned elsewhere in this thread. Branty1970.

rlievsay
rlievsay

Most high school students have cell phones that can run programs. One way is to help them write a program application for their phone. You can teach them all about writing code in basic or c# or even asp but unless there is project that they can work towards like a web page or an application on their cell phones to get them excited about programming.

Kinetixx
Kinetixx

For most programming/scripting languages the concepts are all the same. For the most part, all that changes is the syntax in which it is written. I agree with Justin that the key is getting a good feel for fundamentals. Most importantly, an intro class should be as engaging as possible so the kids at least see or appreciate what this profession is about. For some kids, a class in programming will just give them a basic understanding of how it works, what is involved. They will be exposed to the concepts of planning, communication, how to deal with errors and so on, which are important for any other profession they choose. For others, a light bulb will turn on and they will be hooked. Years ago I taught a middle school class about programming using the LOGO programming language. (I taught several others in Algebra, productivity applications and databases.) It was simple for me to learn; though I was a programmer I didn't know LOGO. And I was honest with the kids when I first started teaching it: we were learning it together and we'd be exploring it together. I correctly predicted some of them might discover how to solve a problem before me, or find a different solution. It was their opportunity to share and be the teacher. They liked that. It built their self-esteem. Never lie to kids. They know when you do. Once their respect is lost, it is tough, sometimes impossible, to regain. The early lessons revolved around learning to move the "turtle" - a triangle that moved around the screen with simple commands - which was wonderful because for very little work the kids got some great graphical feedback. I could also tie the early lessons to geometry facts they already knew: making squares and circles by moving forward and backward by degrees. I could give them a graphic to create based on a picture - their re-creation of it forced them to make a plan, test it, modify it, and planning is an essential programming tool. I then moved on to creating small routines/reusable modules. I introduced things like algorithms, pseudo-code, variables (reminding them of their Algebra), loops and how to write readable code, and the importance of comments. I could relate all these concepts to things they had experienced in real life. (Choosing from a restaurant menu, giving directions to their home, what to do if the usual road wasn't available, etc.). I made sure they understood the concepts, and, as much as possible, made it relatable, even fun. (In the real world, office mates go out for pizza; my school let me bring it in at the end of certain projects. Food is always the way to a teenager's heart.) Then we created games like tic-tac-toe. I would have the kids trade programs and see if they could read each other's code and predict what would happen; grades were dependent on how well your classmate could predict results, even errors (though not for the errors themselves). They had to be able to read/understand what their fellow programmer was attempting to do, and code thus had to be readable. I also put them into small groups and assigned them different parts of a program to help them understand that in business you often get only one piece of a puzzle. The kids also learned that some seemingly complex things are in reality created by very simple processes. You'll find blogs and sites that help you and the students see how other folks solve problems with LOGO. Seeing the resources available on the web - differentiating between good and bad, helping with your own contribution, being sure to give credit where it is due -those are also good concepts to learn. If I were moving on to another programming language, I might consider JavaScript, it being a derivative of C. Add in some HTML and CSS and they will be learning that the same fundamentals apply and they'll have a creative result. Most of my students did not go on to become full time programmers, but many kept in touch and let me know that they used what they learned and it helped in college and beyond. For what more can a teacher ask?

Realvdude
Realvdude

There is allot of "career" input here, but what do other teachers do? I agree that fundamentals are important and that the students efforts need to do something along the way. We all take our shots at "Hello World", but it is a basic example of "learn and reward" concept. I think that the high school level, the primary goal should to be to allow the student to determine if programming is something that they want to persue; particularly at the freshman and sophmore grades. FYI - I had a quick look at EdScheme which seems to be dated itself, frozen is 1998-99. Based on it's cost, it may also not be an option for this teacher. Kudos to Jason for mentioning other options too.

burkhardt38
burkhardt38

I'm kind of old school, but I think we should understand the difference between programming and "coding". It doesn't matter what language you choose...it's still "coding". Programming has three elements...define, design and develop. The first two are essential to creating "good" code. The third is the development of the "code". Would you want a contractor to build your house without a blueprint resulting from knowing the kind of house that should be built. The problem is, high school students are so obsessed with Wii, Playstation 3 and X-Box, they may not be able to tolerate the kind of thinking that goes into "programming". To them, keyboards are the new design tool.

jeffpotter
jeffpotter

I would probably take a different path than what has been suggested so far. Here are a couple alternate environments that would provide a rich and responsive experience that could keep them engaged, challenged and having fun. http://info.scratch.mit.edu/About_Scratch http://processing.org/about/ Also, I think introducing an Agile approach right at the start would be beneficial.

gypkap
gypkap

Computer programming isn't something you can just read out of a book and start programming. Before trying to teach programming, the teacher should take at least two classes about programming through a local college, that include the ideas of computer language (probably a simple, but useful procedural language), and how to design a program using that language. The teacher might be able to design a class plan, and teach simple stuff at that point. The teacher should be continuing to learn more about languages and object oriented programming, because he/she needs to keep ahead of his students.

Duke E Love
Duke E Love

It is an excellent choice. http://www.cs.mtsu.edu/~untch/karel/ It is used by Stanford in its intro to Programming Methodology. http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111 Stanford has a version of Eclipse made be be used with Karol. http://see.stanford.edu/materials/icspmcs106a/stanford_eclipse32_windows.zip Actually the into courses at Stanford Engineering Everywhere is a great place to start. Get a world class education for free. http://see.stanford.edu/see/courses.aspx Gotta love the Internets.

Madsmaddad
Madsmaddad

OK, I'm one of these Old duffers (63) and was made redundant about a year ago. In my leisure time I thought that I might refresh my programming skills, and my son recommended C++, as that is what he uses. I have programmed in a number of languages over the years, up to and including 'c' and Forth. But nothing more than some HTML for the last 20 years. The problem that I found was that I needed something to do with it. You can't just learn programming. There needs to be a challenge of something that you want to accomplish. That's why C++ fell by the wayside. But recently I wanted to measure the speed of my Internet link from my linux box, and I thought that I might be able to use scripts to run the broadband test online. The Guys in my local LUG (Linux User Group) soon disabused me of that idea, but gave me ideas of how I could do it. So I learned, and by the way learned how to set up a cron table. Makes me a happy bunny. Bring on the next problem!

apotheon
apotheon

I have a few ideas you could look into. Pick one based on your preferences and learning style. There are scads of options, but most of them suck; I'm trying to pick some that will actually get you on a path to doing good work when programming, and teaching you some important concepts that are lacking from many approaches to learning programming. --- 1. Structure and Interpretation of Computer Programs This Abelson, Sussman, and Sussman text (written by the same people who created Scheme in the first place) is often abbreviated as SICP. It's available for free online, or you can buy it as a published hardcopy book. It's very challenging, but as long as you have the basics of algebraic math firmly in your head somewhere and are willing to look up stuff you don't understand, it'll give you a very firm and thorough grounding in concepts of computer science in general and programming in particular. I'm working my way through it right now, and I find it useful to check my work on the exercises with Ken Dyck's Index of Solutions (for some stupid reason the TR censoring software is obscuring the guy's last name). You should double-check his answers too, by the way, when possible -- and do your level best to understand the problem well enough to be able to determine whether his answers are right. I've found one of his answers to actually be incorrect, though to be fair nobody else seems to know the answer either (including me). I find the Ypsilon Scheme implementation works quite well for working through SICP, though I'm not all the way through it yet -- so it's always possible a version mismatch will raise a bug at some point. --- 2. Computer Science Logo Style UC Berkeley professor Brian Harvey, along with his students, developed a highly capable Logo implementation called UCBLogo. He also has a trilogy of books known, collectively, by the title Computer Science Logo Style (I'll call it CSLS for short). The books assume you are using that implementation of Logo, and they provide a somewhat gentler introduction to many of the same concepts as SICP. CSLS doesn't assume as much up-front knowledge of mathematics as SICP, though the ability to reason through algebraic math is kind of important. It's pretty important to programming in general, actually, so hopefully you can do things like simplify equations and construct functions if you want to learn to program (though learning to program can help you cement this knowledge if it's a little shaky). Like SICP, you can get at the books for free online, as well as find out about (and get) the UCBLogo interpreter itself, from Brian Harvey's Website at UC Berkeley. --- 3. Everyday Scripting With Ruby For a much, much gentler approach that doesn't really deal with computer science concepts in particular at all, but does give a surprisingly good introductory grounding in test-driven development and object oriented programming for people who are technically inclined but may not have done anything that could really reasonably be called "programming" in a meaningful sense, this Brian Marick book is excellent. It even gives a glancing introduction to source code version control systems, which are absolutely necessary to sustained software development and something that basically everyone who uses a computer for more than Facebook and the like should learn to use well. (It works specifically with Subversion when it touches on version control topics; don't let the "cool kids" tell you Subversion sucks just because they prefer something like Git.) This is the only option that isn't entirely free because there's no freely distributable online version of the book, though the programming language it uses (Ruby) is free. --- No matter what you do, there will be trade-offs for the approach you take. Just make sure you don't select something that trades away too many good things in exchange for not bloody much. For a grounding in computer science concepts, you obviously need something more like CSLS or (even better) SICP; for something a bit gentler, lean more toward CSLS or ESWR; for something more "real-world" choose ESWR. --- 4. The Camelid Trilogy Another series of books that is good is the O'Reilly Camelid series, starting with the Llama Book, Learning Perl. Following that is the Alpaca Book, Intermediate Perl (basically an updated edition of Learning Perl Objects, References, and Modules, a really excellent book that teaches some essential concepts of programming). Beyond that, you can branch out in any of a number of directions -- and you should know enough by then to be able to pick your direction -- but the Camel Book, Programming Perl, is pretty much the canonical choice. These Perl books kind of live in the area between the three suggestions above (SICP, CSLS, and ESWR). They aren't available for free, but of course Perl is free. --- I like all four of those languages (Logo, Perl, Ruby, and Scheme), both for their suitability to programming in general and for learning to program in the first place, but there are other languages well suited to learning to program outside of a university setting as well. Among them are Python and Smalltalk (particularly the Squeak implementation of Smalltalk). There are beginning programmer instructional books for both, and they tend to come highly recommended (especially the Squeak books), though I can't vouch for them personally. If someone recommends them (or any other book), make sure you find out why -- and if nobody offers anything better than "because they make it easy", you might want to try looking elsewhere, since easy isn't worth much without some other value as well. You definitely want some combination of learning best practices for software development, programming fundamentals, and computer science concepts, if you ever want to be any good at programming. Java's only benefit as an instructional language, as far as I can tell, is its ubiquity and the tremendous mass of books on the subject (most of them mediocre at best, though there are a few gems). If you want something as onerous as Java to use for learning to program, you might as well go with C and learn about memory management from pretty much the ground up while you're at it. Note that if you start out learning a .NET language, you're going to spend more time initially learning how to use an IDE than learning to program, per se. I definitely recommend learning a more portable language (all the books in numbers 1 through 4 that I recommended above are for languages whose implementations are available on many platforms) when first getting started. If you really want to learn to program, choose something other than BASIC or PHP; both are very limited languages that are prone to teaching bad habits to beginning programmers. While JavaScript is theoretically a great first language, the fact it's nearly impossible to get any kind of instructional support for it outside of a browser, and kind of a pain in the butt to get good instructional support for it even if you are developing solely for deployment through browsers, makes it a poor choice for learning to program, in my opinion. The key to getting real value from advice people give is, of course, to do two things: 1. Demand good reasons for people's recommendations. 2. Think for yourself. If you can't do #1, you'll probably end up following bad advice. If you can't do #2, you'll probably end up being a crappy programmer, anyway. Good luck!

Tony Hopkinson
Tony Hopkinson

to do with the way you think. Presumably you downloaded Visual Studio Express with VB as the language choice.... Think about it this way. How much of your job could be done competently by loading one of the off the shelf HR software applications? Fill in a few boxes, click on a button, print it out and give it to payroll. New Employee sorted right... Can't say from here, but may be you've now got a feel for it. Think of something to program, have a go. See how much of what you've skipped you should n't have. Nothing wrong with it as a learning method, if teh exercises seem that tedious and irrelevant you won't learn anything from them without a context. If you get the programming bug, (somewhat unlikely since you've passed up the opportunity many times), the fundamentals will interest you. NB making a button turn red is not a programming fundamental. Why you might write a function to change any button to any colour, then call it from a button click event handler as opposed to just setting that button there, is... And that fundmaneantl will be far from obvious, if present at all in your tutorial.

Tony Hopkinson
Tony Hopkinson

and SQL is very different to VB. You can do a loop in SQL, but it's not prefered for instance. You really need to lerarn another language, even if it's the relatively simple switch to C# in .net. Then you'll see the common programming concepts and the strengths and weaknesses of the implementations that are language.

apotheon
apotheon

Why is it that Python is the only language that has gotten so much attention in this thread from people making absurd claims of perfection about it, recommending it without giving any kind of nod to how it might compare to other languages, and so on? By the way, I've written a lot of pseudocode over the years, and none of it looked like Python.

apotheon
apotheon

Python has been mentioned several times in comments.

apotheon
apotheon

Usually, my favorite language is the one I'm currently learning.

NickNielsen
NickNielsen

Brackets at 10 paces? Hollerith forbid! X-( :^0

apotheon
apotheon

Teach them JavaScript, maybe. Branch out into ActionScript later if they specifically show interest in that direction. Don't necessarily tie JavaScript to HTML, though (i.e., don't make it "DHTML"), don't start with ActionScript, and avoid the hell out of PHP. Please. For the love of gob and all that's wholly. . . . or use Scheme or Logo. There's nothing "hard core" about either language, in terms of the ease of learning.

Tony Hopkinson
Tony Hopkinson

for me as a first choice teaching language, would be using significant whitespace to indicate a block. Personally I think it can make the code less readable, and if there was one thing I would have right at the top of my list of things to teach, writing readable code would be right up there.

apotheon
apotheon

Ruby is at least as good as Python as a starting language, especially when you add in stuff like the Shoes toolkit for simple GUI development. Ruby also provides some opportunity for more advanced technique learning than Python, because of its facility for multiline first-class anonymous functions, its "block" iterators that serve as effectively automatic callbacks, and its macro support. There are plenty of options. Just picking your favorite language probably isn't the best way to select the "right" language. Python would be fine, though. Don't think I'm arguing it's inappropriate for education. I just think the very "this language is best" approach where one picks a language one likes isn't really ideal.

Justin James
Justin James

Thanks, great experiences! I love the idea of having the grade dependent on others being able to understand the code. :) J.Ja

Madsmaddad
Madsmaddad

The three stages of programming are Design, Code, and TEST! Instructor defines the task. Perhaps elements of Project Management too.

jeffpotter
jeffpotter

Karel is great! In my 'Introduction to Programming' course, it was the first year they were forgoing Pascal and starting newbies straight off with C. We used Karel as our 'on ramp'. Super-great.

Sterling chip Camden
Sterling chip Camden

It's hard for me to give advice based on my experience, because I learned in all the wrong ways -- and spent years unlearning. But I think it's a good idea to learn one language thoroughly before you advance to the next one. But do advance to the next one, and the next one, and the next one.

Justin James
Justin James

I've seen maybe 200 lines of Python code over my lifetime, that I can recall. Looked like Ruby or Perl, with significant whitespace. I'm looking forwards to learning it (well, if you call reading a book about it "learning Python"), I find that each time I learn a language like this, it gives me new ideas and approaches to problems. I agree that the Python fans do seem to use a lot of hyberbole when talking about it (Ruby fans do the same, I've noticed), but I do look forwards to learning more about it myself. There must be something there, given the level of passion for it! J.Ja

dhohls
dhohls

Actually, requiring the use of "whitespace" to indicate a block (be it a tab or two or three spaces) is the very thing that makes Python readable... unlike the morass of {} in other languages. It also enforces a discipline on students that will serve them well if/when they need to learn other languages. In just about all respects Python is an ideal "first language".

apotheon
apotheon

I quite like Python, the thing that would kill it for me as a first choice teaching language, would be using significant whitespace to indicate a block. Like . . . Pascal?

apotheon
apotheon

If you have the luxury of doing so, spend at least two years (preferably three) focusing on your first programming language -- then start branching out when you feel the urge, because learning more languages always helps one to learn more about programming well (even if only by learning what one should not do). I certainly didn't mean to suggest, for instance, that one should never learn BASIC, PHP, JavaScript, or Java -- just that they are not ideal choices as a first, instructional language.

mattohare
mattohare

Mind, my coffee is from Cafe Insomnia when I have a choice, The Streat otherwise. French red. And an ale called after the ship 'Galway Hooker'. LOL One thing that gets me is how many of these develop in Rails and really don't have a good cop on to the Ruby language. (I have to admit to this myself and fill a bit of guilt when I think of how you learnt the language properly.) I'm always very careful to say that I'm developing in Rails since that's the bulk of the tool. Now if I could get the pluraliser to handle Gaeilge....

apotheon
apotheon

There's a very vocal subset of the Ruby community that uses TextMate as the Editor of Choice. Guess what OSes use TextMate. There are three of them: MacOS X, MacOS X, and MacOS X. The Ruby fanboys to whom you refer, who you say act like Apple fanboys, probably are Apple fanboys who have just managed to stumble across Ruby.

Justin James
Justin James

Someone at my developer's group meeting made a (somewhat true) crack about Ruby developers. He mentioned that they are always claiming to be awesome and that they use Ruby. I asked him if they use Ruby because they are awesome, or if Ruby is what makes them awesome. We had a good laugh. It's partially true. There's a small (yet vocal) segment of the Ruby developer base who seem intent on turning it into the Apple of languages... all the hip, cool, well dressed, spiky haired developers who make 6 figures and blow it all at Starbucks and on high quality, inexpensive red wine from Australia and who haven't had a simple hamburger but eat sushi all day long developers from Portland and Seattle use Ruby, while the rest of us slobs use Java or .NET. I'm exagerating, of course, but that's how it feels sometimes. :) J.Ja

apotheon
apotheon

I don't see a handful of Ruby fans showing up here and claiming that Ruby is the only choice, though. In fact, I'm here -- and I didn't say anything like what these Python fans are saying, even though in my considered opinion Ruby is a (marginally) better choice of educational language than Python, for most purposes. I'm not saying the Python community at large is like this, mind you. There are some strong, common cultural threads in the Python community, but this kind of unsupported "Python is bestx0rz!" stuff doesn't come up much in my experience. I'm kind of mystified by the frequency of that type of response here, in fact.

apotheon
apotheon

Click the "Print/View all posts" link, next to the "Subscribe" or "Unsubscribe" link under the currently viewed post. That'll show you the text of all posts in the discussion at once. Then, you can use your browser's text search feature to find all instances of the word "Python" on the page.

apotheon
apotheon

I don't think so. The "discipline" inculcated by Python's significant whitespace is that of forgetting to use closing delimiters, and relying on implicit block closing rather than explicit block closing (which harms clarity). You have to actually parse and interpret code by eye to figure out how much of an unfinished block of code you've written far more often and carefully with Python, for instance -- which interferes with the ability to swap state out of active memory in your head. I tend to like explicit structural elements, rather than implicit structural elements, for the clarity.

Tony Hopkinson
Tony Hopkinson

How do you show significant whitespace, from insignificant, that added for readability. At least with braces, Begin End or any other syntactical bracketting, what you thought you meant is explicit. You ever seen anyone scratchimng their head because they mixed tabs and multiple spaces for indenting. I would agree that you could burn in a good habit early starting with python (use one or the other) but you could say the same about always bracketing statement blocks even if they are one liners. Not doing multiple statements on one line, and other aids to comprehensibility.

Tony Hopkinson
Tony Hopkinson

I was expecting a recomendation for VB6 after that. :D

apotheon
apotheon

Any language with which you use make to build your projects "uses" significant whitespace, because of make's asinine required tabs nonsense. Sorry, the joke was far too esoteric and obscure. I need to come up with a better delivery for that.

Tony Hopkinson
Tony Hopkinson

to bracket a block, not indenting. Unless uou are counting at least one space between keywords I'm failing to see your point.