Learning New Programming Languages

There aren’t many theories about how to effectively teach new computer scientists how to program. Dan’s done some analysis of this problem but was unable to come up with the perfect programming language for teaching the breadth he expected. What he did come up with was a pretty good list of languages that covered a broad range of paradigms and styles. Maybe what really needs to happen in the first year of CS is for students to learn a few languages, all of different philosophies, to get a better idea of why things are done a certain way.

I think the current school of thought for teaching CS is that it’s better to give the students a quick and dirty tool set (imperative languages) that they can build on later. Kind of like how our first spoken language is stored in one part of the brain (we’ll call it part X so I don’t have to look it up) while all the languages we learn after that are put in area Y but built on the language stored in part X. People that learn multiple languages from birth store all of that in part X so there’s more to build on for part Y. Think of it as kind of like having languages in X being in the CPU registers while Y languages are on the hard drive.

Scott Hanselman has done an awesome article about the similarities in teaching young children spoken language and teaching new CS students programming languages.

    None Found
  • Python teaches indenting of code. That is good. I can't recall how many times you look at someone's code and just want to cry because of the indentation.
  • @Mike: from Dan's post: "We looked at languages such as Haskell, Lisp, ML, and OCaml before I decided that I thought functional languages were just ugly."

    And Bennett's response: "I have to say that what I have picked up so far I find to be extremely elegant and much cleaner that similar code in an imperative language. Althought, if you write imperative style code in a functional language, you end up with a nasty mess."

    Speaking on aesthetics, there are arguments for both sides but when it comes down to it, the coding style is just not used in industry.
  • Teach them Emacs Lisp! You would get the best sort of IDE possible, would be able to run arbitrary blocks of code on-the-fly, and they'd have plenty of games to play with/extend.
  • Romeo KUAKOYO
    I am really happy for that; all that can I ask you is to keep on doing so you know?
    May you go always forward.

    Yours faithfully,
  • Bennett
    I haven't look into it much, but my guess is just what you said. I think scheme allowed for problem solving without worrying about a lot of other programming goofiness. Python is similar in that respect as it is a good problem solving tool, but it has the ability to solve all kinds of other problems that would benefit students later on because of its flexibility.
  • That is an interesting switch. I don't know much about scheme or even python for that matter but I suspect it's partially because python can support a broader range of programming paradigms. Also, I was watching a Yahoo video of a Douglas Crockford (of Yahoo) tech talk about javascript. He said when Netscape was originally designing javascript that they wanted to make it look more like a functional syntax but it was vetoed because it was "too weird." Python does a good job of making it sane no matter what way you look at it.

    Maybe you can comment more on why you think they made the switch, knowing a hell of a lot more about PL than me?
  • Interesting topic. I just came across hackey the other day, which is a application built on ruby for teaching programming to younger kids. It also brought up some good points about the state of programming from a young persons perspective. MIT recently started moving from scheme to python for freshman classes which was an interested turn around.
blog comments powered by Disqus