OSSU blog #6 - PLB

👉
This is post #6 in a series I'm writing as I go through the OSSU curriculum. Read post #1 for the full background on why I'm doing this

Programming Languages, Part B

Programming Languages Part A, Part B, and Part C are really one whole course broken up into three pieces, so it was both useful and satisfying that I was able to keep up the momentum from Part A. I finished this course exactly on time:

The course was a lot of fun, but I have to be honest and say that programming in Racket was not nearly as fun as programming in SML. Some possible reasons:

  • The amount of parentheses can get kind of ridiculous. Relevant xkcd: https://xkcd.com/297/
  • Maybe I'm spoiled by how nice SML's syntax (and especially case expressions) are
  • Racket isn't novel to me like SML was (the How to Code courses use something very similar to Racket)
  • This course had me doing more complicated things than I was doing in Part A with SML
  • I enjoyed the static typing in SML more than the dynamic typing we used in Racket. Things just felt more neat, tidy, and orderly in a static type system.

Whatever the reason(s) were: I was less happy programming with Racket in this course than SML in Part A, but I still enjoyed myself.

Just like in previous courses, I had a number of "a ha" moments where things that were confusing before suddenly clicked. I love when that happens. I feel like my understanding of computer science and programming has improved dramatically in just the four courses I've taken so far, even though none of them are particularly deep. Among the "a ha" moments in this course were:

  • how promises work
  • how streams work
  • memoization (function caching)
  • (related to the above) even in a functional paradigm, mutation is sometimes genuinely useful, or even necessary

The final homework in this course has you writing a very basic interpreter for a "language" created solely for the purpose of this homework, aptly called "Made Up Programming Language", or MUPL. In the past I would sometimes read posts and articles about someone writing an interpreter for some language and it would feel so far above my capabilities and knowledge that I wouldn't even know where to start. To be honest, I wasn't even sure what an "interpreter" was. Obviously writing this incredibly basic interpreter for an incredibly basic language is nothing to brag about, but I no longer feel like "interpreters" is a topic reserved for higher life forms. I genuinely had a blast with this homework assignment.

Next up:

Programming Languages, Part C is the last course in this series. It uses Ruby and aims to teach Object Oriented Programming with a dynamic type system and contrast it with Functional Programming. At this point I am very much on the functional programming train, so we'll see if Dan Grossman (the instructor for these courses) can convince me that OOP is just as awesome. OOP is what I learned when I first started programming, so the novelty probably won't be there like it was with FP, but I am excited nonetheless.

I intend to keep this pace going through Part C as well. Hopefully you'll see another blog post from me in mid to late July!