Monthly Archives: December 2017

Course Review: CPSC 311

Definition of Programming Languages

I prefer the word ‘thunk’ to expression closures.

Text: Programming Languages: Application and Interpretation by Shriram Krishnamurthi

Prof: Dr. Steve Wolfman

Wolfman was slightly less flipped in CPSC311, especially as the term progressed. His lectures were pretty entertaining and included a lot of live modification of the interpreter. Instead of sticking to textbook examples of dynamic scope and laziness, we often worked on languages in assignments and midterms where exotic adaptations and variants of these concepts were incorporated into a language in mind-bending ways.


I expected this to be an easy course. It ended up taking a lot of time. A lot of the programming languages concepts were completely new to me and combined with Wolfman’s avant-garde presentation of the material, I spent a great deal of time preparing for midterms and understanding the readings. The project we selected was in Elixir, and it was also very time-consuming as we had to learn distributed systems concepts in a new language with little guidance. That said, I feel the project was kind of a ‘choose-your-on-adventure’. You could do very well in the project with far less work if you chose wisely initially. Overall, the average was quite hight (around 77%) even though the midterm averages were quite low.

Key Concepts


Deferred evaluation



Functional programming

SKI combinator


 Hard Concepts

Dynamic scope: Really messes with your brain, helps to write out the context.

Continuations: Odd concept. Helps to think of what function the continuation is bound to and apply it.

SKI combinator: Takes practice to get used to ‘algebraic’ manipulations of functions.


Learnt a lot. Enjoyed the project. Challenging course.

Course Review: CPSC 313

Computer Hardware and Operating Systems

“Virtual memory is one of the greatest ideas in the history of computer science.”

Text: Computer Systems: A Programmer’s Perspective by Randal Bryant, David O’Hallaron 3rd Edition

Prof: Dr. Donald Acton

Dr. Acton is a nice person and a passionate lecturer. His assignments are interesting and he adds a historical angle to the material. Unfortunately, certain administrative mishaps greatly hindered the delivery of the course. If the readings and online quizzes for each week were clearly outlined, assignments were screened by TA’s for errors and more TA’s staffed with monitoring piazza the course would have been a lot more enjoyable.


After returning from a systems heavy co-op, I found the material much less intimidating then CPSC 213. The assignments were lengthy but very doable and had a high average. The quizzes were more challenging, but if you practiced the exercises from the book and practice quizzes you should be fine. Readings are really important to get the most out of this course, especially as the slides are not amenable to self-study.

Key Concepts



Virtual Memory


File Systems


 Hard Concepts

Calculating cache miss rate for C code: Need to clearly visualize the cache and how the data structure fits into it.

Assembly implementation: Need to remember how the stack and registers can be used to pass parameters and store stack pointers and return addresses.


Somewhat interesting course. I found it a lot more detailed and less mind-blowing then CPSC213.

Course Review: MATH 302

Introduction to Probability

“Donald claims that he won the popular vote if you subtract the 3 million illegal voters. Assuming that 3 million people did vote illegally, compute the probability that Donald is correct.”

Text: Introduction to Probability by David F. Anderson, Timo Seppalainen, and Benedek Valko

Prof:  Dr. Martin Lohmann

Dr. Lohmann’s lectures largely consisted of (usually) interesting examples. Some students found his accent and his handwriting a bit challenging to follow. This, combined with the fact that he defers posting of lecture notes, made the course harder than necessary for such students. I did not have any difficulty understanding what was being said, and the few times I found his handwriting became hard to read, he clarified immediately. Also, if you ask a stupid question, expect some deft sarcasm in response!


While I find probability counter-intuitive, the assignments were all quite doable. Occasionally, harder questions marked with a star were provided. The first midterm was quite tricky, however, we were given a practice midterm beforehand that was conceptually quite similar to the actual exam. The second midterm and final were both significantly easier and we also were given similar practice material.

Key Concepts



Discrete vs Continuous Probability Distributions

Mean, Variance and Covariance

Joint Distribution

Convergence in Probability/Distribution

Conditional Probability

Moment-generating functions

 Hard Concepts

Counting: I always make incorrect assumptions w/regard to counting. I think the key to easier problems is to identify whether you are using replacement/no replacement and order/no order. For harder problems, it is often necessary to construct a bijection of sorts or use a symmetry argument.


Good to get some practice with counting and probability. About as much theory as you would expect from such a class.

Course Review: CPSC 320

Intermediate Algorithm Design and Analysis

“In this course, we mostly just do a high-level analysis of algorithms which are heavily used in the real-world. Today, we do the opposite. We actually implement an algorithm that is utterly useless.”

Text: Algorithm Design by Jon Kleinberg and Eva Tardos

Prof:  Dr. Steve Wolfman

Wolfman is really entertaining. He is also a big believer in ‘flipped classroom’ approach, so the lectures are mostly problem-solving. I like the practice, but others may not like the lack of highly structured lectures and the necessity to do readings ahead of the class. He thinks deeply about his students’ education, so few pedagogical decisions are arbitrary though they may appear so.


The assignments were initially easy but became increasingly lengthy and time-consuming. A background with mathematical proofs might help. I found the level of rigor required for the proofs lower than in CPSC 221, but the concepts were definitely more complex. The midterms were closely linked to the assignments and tested generic problem-solving skills rather than accumulated knowledge (though you probably need to know your definitions and the high-level idea of important algorithms). The tutorial and pre-reading quizzes were hit and miss, but they were more for familiarizing yourself with the topic than an actual assessment.The final was a bit longer than I expected, but all the questions were definitely doable if I had ~20 more minutes.

Key Concepts


Divide and Conquer

Greedy Algorithms

Dynamic Programming

 Hard Concepts

NP-Completeness: Some reductions are very sophisticated, but they rarely expect us to come up with complex reductions.

Counterexamples: Sometimes it can take a lot of time to come up with a counterexample. Sometimes it’s better to list some constraints your counter-example must satisfy before diving into a brute-force search.


Enjoyable, useful sequel to CPSC221.

Course Review: MATH 320

Real Variables I

“You don’t really need a metric. All you need is the open sets.”

Text: Principles of Mathematical Analysis by Walter Rudin (3rd Edition)

Prof:  Dr Joshua Zahl

Dr Zahl was a structured, clear professor. He also provided useful insights into the ideas behind various proofs. I don’t think he has taught this course many times before, so he is probably still in the process of fine-tuning his delivery. Also, his surname literally means ‘number’ in German!


While the readings are pretty dense, the homework was quite doable by honours mathematics standards. I found the first midterm surprisingly easy. The second midterm was significantly harder, and I had not fully understood the concept of compact sets, so I did not do well at all. The class also got wrecked so there was a lot of scaling. The final was very reasonable.

Key Concepts

Properties of Real Numbers

Metric Spaces

Open Sets


Continuous Functions

The Derivative

 Hard Concepts

Compact Sets: This concept has a deceptively Byzantine definition but is actually really fundamental to the course. Reading the history of the concept from Wikipedia and understanding many examples/counter-examples of sets that are or are not compact gave me a better intuition.

Sequences: Not a hard concept to understand, however an invaluable tool in certain seemingly intractable problems. Many times, it’s helpful to construct a sequence of points or even intervals and then use properties of such sequences in that space to prove the theorem.


Tough though doable class, if you have any background in mathematical proofs. One of the key learnings I took out this class, was the importance of spending time understanding complex definitions.