Thursday, April 27, 2017

How important is the first programming language really?

We really need people who have never faced a room full of  students in their lives to teach us how to teach computer science.

Said no CS teacher ever.

What brought that on you may well ask. Long story. First Mark Guzdial posts about changes at Stanford (Stanford CS department updates introductory courses: Java is Gone) highlighting an experimental version of their first programming course to use JavaScript. Then it hits Reddit (Stanford is moving from using Java to JavaScript for their introductory CS course) where hundreds of comments follow. Yes, hundreds. Most appear to be from people who have never taught a class themselves but have strong opinions of what a first language should be. And the occasional journalist kicks in with something like Universities finally realize that Java is a bad introductory programming language

How ever would we poor ignorant teachers get along without these experts? Fortunately for my sanity Mike Zamansky who actually is a teacher jumps in with some useful thought. A new first language? What's the follow up plan?

I believe that a first programming course is very important. The language used, while important, is not the biggest consideration. Rather is is the concepts covered (see Mike’s post) and how well the instructor does in preparing students for what comes next. The new course at Stanford is going to be taught by Eric Roberts who is one of the al time outstanding CS educators. I’d sign up for that course because of the instructor even if it was in COBOL.

Teacher is important. Curriculum is important. Projects and assignments that help learning are important. Language some where down the line.

I figure I’ve learned a new programming language about once every three years for the last 45. While I joke that I can still write a good FORTRAN program in any language the truth of the matter is that learning new languages changes how I code and how I think about problems. The first language got me hooked. But that was not the end all and be all. The first course is just the first course. There is a lot more to come and it would be a mistake to try to cram a four year undergraduate curriculum into a one semester (or even full year) high school course. And yet that is what some "experts" seem to be trying to do.


Garth said...

The teacher and who you are teaching it too are by far the two biggest factors. In the 90s I took Java from a guy who could not teach a duck how to float. I still hate Java. If I am teaching 5th graders I am not going for Python. If I am teaching seniors I am not going for Scratch. But both can be done at those levels if done correctly.

The first college programming course is often treated as a rite of passage. Something to thin out the crowd and eliminate the weak. The trouble is with the shortage of programming in high schools many of those college first timers are starting from zero. Prep them correctly with a good instructor and a good course not designed to kill the weak and there will be some excellent students interested in taking that second semester CS class.

Doug said...

OK, I'll comment even if you disparage COBOL.

The choice for a first language is always something that people wrestle with. Personally, for me, it was Fortran which I enjoyed actually for 3 years (2 in secondary school and then 1 in university) before different courses took me in different areas. I did find that, after immersion in Fortran and then WATFIV, that it took some thinking to really get a new language.

I wonder if the real question is "What should be your second language?" or "Should you even have a programming language at all in your first course?"

I recognize the popularity of Scratch but we're still too soon to see the effects of years of it before moving on will have on the problem solving mindset. I like the path that TouchDevelop offers.

I do agree that decisions need to be made by the teacher but there's the bigger picture to keep in focus.

I think it would be an incredible research opportunity to be undertaken.

Alfred Thompson said...

Interestingly enough I respect COBOL more now than when I first learned it. I think part of my problem with COBOL originally is that my professor didn't like it and that attitude was contagious. That experience influenced me to believe that instructors should teach languages they like well enough to not turn their students off to it.

Dave Newton said...

It may be far down the list, but language choice *does* matter, at least for an intro course geared to CS majors.

Most importantly the language needs to support a wide variety of constructs and methodologies--some languages don't.

High-ceremony languages are a poor choice because there's too much cognitive overhead and they obscure what's being taught. Languages without first-class functions are a poor choice; they eliminate a class of problem-solving techniques and functionally-oriented constructs.

All that said: m=ost of the reddit commenters you're dismissing out-of-hand went through at least some CS education; pretending their input doesn't matter isn't productive.

Alfred Thompson said...

Their input is generally interesting to some extent but with out evidence and practice to support it not particularly useful. Having gone through a programming course doesn't make one an expert in how to teach one. Pretending otherwise is not productive either.

xota said...

It may help to think of a language designed for teaching, see Brian Harvey's You can learn to program in any language. But it’s not just an accident that the authors of SICP chose Scheme as their teaching language. The big ideas in the book — the ones that alumni in the real world tell us they’re using in their work — express themselves best in Scheme. Indeed, saying it that way puts the matter backward. Gerry Sussman (with Guy Steele) invented Scheme before he turned (with Hal Abelson) to expressing the ideas behind Scheme in a course. SICP is Scheme, in tutorial form..

Bri said...

As Garth indicated, the audience also matters. I think one of the problems we have is that we're trying to design the "One Course that Rules Them All," with a single programming language. There is something to be said (as Dave indicates) that if the audience is future software developers you want certain things in a first programming language. We want to provide the basic foundation for future coursework and learning. If, however, the audience is just students you want to expose to the concept of programming, so hopefully they remember something and can use it in their chosen career someday to making something a little easier, then I'm looking for a completely different type of language - one that's intuitive and a lower overhead and no barriers for installation.

I keep wondering when we will figure out that, just as most other STEM subjects do, that first course can really be a general overview of the subject and then let those that want to major in computing get a second course that becomes the foundation for their remaining academic learning.