The first language debate

As a student at the University of Waterloo during its transition from Java to Scheme as a first language to teach, the debate about “what programming language should one learn first?” has been all too familiar to me. This article got me thinking about it again.

In summary, the article states that Scheme is a simple language to learn because it expresses programs using the functional programming paradigm. The syntax has less operators and represents the programs as mathematical functions (lambda calculus) instead forcing you to learn different ways of doing the same thing. While other languages, such as C and Java, have the benefit of practicality, letting you explore and aspire to make the computer do stuff.

With Waterloo’s transition, the most common complaint I get about Scheme is that no-one uses it. And it’s true; I haven’t seen Scheme’s use outside of school. And seeing that some Waterloo students do co-op after their first four months of school, Scheme can seem pretty meaningless when job descriptions ask for Visual Basic, C++, etc. But with my first language being a Java-like language, C#, when I was in Computer Engineering, I do have some bias over my opinion (thanks to Mr. Gates’ donation to the Engineering faculty).

To be honest, I don’t truly know what functional programming and lambda calculus is, but I think the topic is important enough to cram in with my Geography courses (check out CS 442). I barely remember functional programming because I used it about two times while learning Python, such as iterating through a data structure functionally (which is pretty elegant). From my view, Scheme’s syntax is minimalistic and unlike any language I’ve worked with. Scheme deals with more recursion, while avoiding object oriented programming – something I struggled with.

It’s pretty random that I’m in CS right now; I actually avoided programming jobs for my first co-op because I didn’t understand what an object really was. (It’s a box? A recipe? Huh?). Later, I learned programming by playing around with the debugger in Visual Studio – going through the program step by step. The debugger got me over the learning bump others struggled with. I was lucky to figure out the debugger on my own, and I wish educators considered using the debugger when teaching any language.

But if C# wasn’t as practical as it was, I might not be in CS because what really got me into programming was volunteering to write a program to format and merge Excel spreadsheets during my first co-op. Practicality is what got me going into CS, and still motivates me.

Even though I don’t fully understand the pros of Scheme, I will agree with the author of the article: go for the middle ground, Python. It’s used by the University of Toronto. Python’s syntax is minimalistic, it’s easy to setup, and it can be object oriented or functional. Something as mathematical as Scheme would probably detract students like me. People learn better if they apply their knowledge outside of class. After all, school isn’t everything.

(By the way, for the Waterloo-ers, the Math Faculty curriculum for CS isn’t that bad, you get to learn C or Python later on. I’d think that the transition from Scheme to C must be brutal though.)

PS: If you know of any other good developer related RSS feeds other than InfoWorld, a link would be nice =)

Explore posts in the same categories: Student Life

Tags: , , , ,

You can comment below, or link to this permanent URL from your own site.

5 Comments on “The first language debate”

  1. Pooya Says:

    Prior to learning Scheme, I had a little knowledge of C++ but that didn’t really taught me how to program. That’s because, at least in my case, I wasn’t able to immediately translate my thoughts into C++ code and run them. Anything you wanted to do, say, a simple game, would require creating a bunch of header files, along with .C files, in addition a Makefile.

    Making an abstraction in Scheme, on the other hand, is as easy as creating a simple list, or a closure whereas in C++, you should think of a lot of things before you can actually use your abstractions.

    This fast-prototyping feature is shared by many dynamic languages and Python is one of them, so I think it’s a good choice as the first language even though I would personally choose Scheme. Maybe this is biased, I don’t know; but what I do know is that Scheme introduced me to parts of Computer Science, which I don’t think I would ever have discovered had I stayed in the world of Ritchie-style languages.

    All the best.

  2. Steven Chung Says:

    Hi Pooya, thanks for commenting. You’re our first commentator =).

    I agree that C++ can be mundane at times with header, .C, and Makefiles. I’ve been doing most of my work in C++ recently, and compiling can still feel like a chore. I would never recommend C++ as a first language.

    Seems like you learned a lot through Scheme, I will try it if I feel that CS 442 isn’t enough.

    Thanks again.

  3. Ben Mahler Says:

    C++ has a lot of issues for beginner programmers:
    -Complex file structuring and compilation (Header/Source files, makefiles, linking)
    -Pointers (best to keep beginner programmers away from these at first until they understand how memory works)
    -Non-safeness (by this I mean things like silently ignoring a re-declared variables, silently going over the bounds of an array, etc)
    -Complicated OO model (virtual/non-virtual, object slicing, multiple inheritance, friend classes/methods)
    -Often unclear compilation error messages

  4. Pooya Says:

    @Ben Mahler:
    In short, there’s a lot of forbidden areas in C++ for beginners and that’s very disappointing. They’d better focus on principles of programming using a language with very compact rules [1] and learn C++, or other “bottom-up” languages for that matter, once they have grasped basic ideas of programming. What’s more, C++ newbies can’t write useful code as their programs can never be generic because mastering STL is really complicated (I had a C++ exam and my solution to the STL problem was nowhere near complete; our professor posted the solution right after the exam and I was like, wow!)

    Anyway, people at Steven’s university have been smart enough to provide their students with noble materials. I hope other institutions will care too. I’m not saying they should all teach Scheme or any particular language, the point is to keep the fun in Computer Science and never forget that CS students are there to become problem solvers. To that end, they should be taught to think clearly and test their thoughts regularly. Nothing but agility can help that.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: