Better late than never… Teaching Languages.

I apologize for not posting in quite a while, I’ve been extremely busy with robotics for the past couple months. I was quite surprised to see that I had 9 pageviews today since I haven’t even checked this blog since probably mid September.

I have a handful of project ideas I’ve been trying to find the time to work on, and hopefully I will be able to blog about a few of them soon. I’ve been thinking a lot about a pure JavaScript implementation of C as both a cool compiler project, and potentially a very useful teaching tool. Speaking of teaching, I’ve also been trying to design a programming curriculum for the second semester of robotics. I’ve been tossing around several ideas about which languages I would like to introduce, and which directions I would like to take the class.

As far as language choices go, the students are learning RobotC in the first semester which is mostly similar to C, but programming for this year’s game doesn’t expose them to very much of C. So what should I try to teach in the second semester? The languages that I  have in mind are C, Haskell, Python, and Racket, possibly JavaScript. Let’s take a look at what each has to offer in both pros and cons.


Pros: C is a pretty standard first language in some sense, many modern languages take C’s syntax as a starting point. Students already have some familiarity with C from using RobotC.

Cons: Pointers seem to be notoriously difficult to learn. C is very low level, and not the easiest language to teach in a Windows environment. I think C will require a high cost of effort in teaching and learning for low returns in what the students will be able to program at the end of the semester.


Pros: I love Haskell, it’s probably my favorite programming language. Pure functional language, makes reasoning about programs easier. Good environment to teach recursion.

Cons: Can be very theoretical in places. I don’t think I know how to motivate concepts such as monads or typeclasses.


Pros: Pretty clean indentation based syntax. Batteries included, there’s a library for almost anything I think I would teach over the course of the semester. When treated as an imperative language, it is pretty similar to C semantically, building on stuff the students already know.

Cons: Still have to motivate and teach about objects, and the OOP paradigm, although this might not be such a bad thing. Might be too high level, and abstract away too many details, but this might not be so important if the goal is to teach programming.


Pros: SImilar to Python, very batteries included. Extremely minimal syntax. Multi-paradigm, allowing introductions to functional and OOP paradigms. Tons of educational materials available.

Cons: Minimal syntax, too many parens could be confusing. Functional programming might be weird coming from an imperative background.


Pros:  Looks a lot like C. Sort of functional core language. Good for web stuff. Many interactive tutorials available online.

Cons: Prototype based object system. Weird scoping things.

My current line of thinking is to teach C alongside another language comparing and contrasting as we go. Right now I’m leaning towards Python or Racket as the second language, but haven’t made a decision. I think I’ll end up letting the students decide by giving a few examples of programs in each language and having them vote on which they would rather learn. I’d like to teach Racket because I have some ideas for cool projects that I’d like to implement in Racket, so teaching Racket at the same time would be nice, but Python is a great language too, so no decision quite yet.

As I put together a more concrete set of lecture notes, exercises, and projects I will be posting those and hopefully get back to posting more often. If anyone has opinions or ideas about this programming class for the new year please let me know, I’d love to hear others’ experience or thoughts on the situation.


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