Tag Archives: ubc computer science

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.

Difficulty

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

Scoping

Deferred evaluation

Recursion

Continuations

Functional programming

SKI combinator

Interpreters

 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.

Conclusion

Learnt a lot. Enjoyed the project. Challenging course.

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.

Difficulty

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

Reductions

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.

Conclusion

Enjoyable, useful sequel to CPSC221.