< More Posts

CPSC 110: Week 2

Published 21 February 2021 at Yours, Kewbish. 1019 words. Subscribe via RSS.


Somehow through the whirlwind couple months it’s been, I’ve neglected to touch CPSC 110 at all. I’ve been mostly focused with fixing Matter up and adding all the quality-of-life features I’d want in order to designate it a main information source. But that’s besides the point: I’ve decided I want to finish as much of CPSC 110 as I can before spring break, or at least during it. At the latest, I’d like to sort everything out by summer, and see if I can finagle myself a spot in the summer session (fingers crossed).

I’ve made myself a proper CPSC 110 repo and even bothered to figure out how to convert GUI DrRacket files into ones Vim can handle, so hopefully I’ll be more motivated to solve the problem sets properly. Before I dove into this week’s material, I had to rewatch most of week 1 to relearn the function recipes again, but I’ve made more notes this time round (and referred to the ones on my blog - I told y’all it would come in handy). Going into the data definitions section wasn’t actually much of a challenge once I went through and watched the videos again.

The design recipes, as Kiczales mentions, are becoming ingrained into my memory now. It’s very intuitive how they all slot together, and though sometimes it feels extremely repetitive to keep making examples and stubs, I can see why it helps when debugging more complex parts on top of the recipe. This week, I’d gotten ahead of myself and briefly tried to do things with structs, but that really wasn’t the point of this week yet (I’m told it’s part of week 3.). It’s rather surprising to see how each recipe and definition builds on the others, though sometimes I’m left wondering if all these conventions are really all that useful.

If you’re uninterested in wrangling with data definition recipes, this might not be very fascinating, but I think keeping this as a record of what I’ve been doing with Racket will be helpful for later revision.


Week 2 deals with designing data, and how to create data definitions that work with the function definition recipe.


I actually managed to work my way through the lab and problem set while trying to learn the material at the same time (not very fun, do not recommend because you’ll be very confused at the conventions that the example solution assumes), so I developed my own way of doing things the first time. It was interesting to contrast how I took shortcuts the first way round: not putting down enough check-expects or ignoring the stub parts of recipes. Again, sometimes it really does feel like a chore to have to repeat the steps over and over again, but maybe that’s part of how you learn things1.

Spending a month and a bit away from Racket, then suddenly returning was a bit disorienting at first - I had to familiarize myself with the syntax again, and the various builtins. The way I write Racket has been tinted a lot by the procedural way of doing things that’s been prescribed by the course, so it was an experience to go from writing essentially whatever fit without much proper testing (Matter), to having to make testing an integral part of the programs.

I’d forgotten how much fun listening to 2x lectures was - I suppose it’s just part of the natural recursion2. I’ve been trying to make CPSC a priority in my free time (of which I have very little - oh, the woes of senior year), so hopefully I’ll be back next week with either more notes or a proper post. I have ideas for both, but we’ll see.

  1. No matter how many times Kiczales repeats the fact that whatever semicolons is a comment and whatever semicolons is for a stub or purpose, I cannot remember. ↩︎

  2. I don’t think I’ve gotten far enough in for Kiczales to have made the joke yet, but I’m still somehow aware of this. ↩︎

- Yours, Kewbish

< More Posts