How I Got Here (2/n)
Last week I wrote about the first half of my first year at university. I think I ended off right before the beginning of winter break. I guess this week will be a continuation of where I left off.
I spent winter break of 2015 at my friend Caroline’s place. More specifically, she was kind enough to invite me to spend the break in her basement. For reasons I won’t get into in this newsletter, it’s been a very long time since she and I last spoke. I remember one of our mutual friends came over who took CPSC 110 in the previous term. Knowing that I’d take 110 in a few weeks, and intrigued by what I had seen on his screen earlier in the term, I asked him to show me a simple program. He hooked up his notebook to a TV in the basement, and began to code. To this day, I still remember the program he showed me:
;; String -> String ;; given str, add "s" to it unless it already ends in "s" (check-expect (pluralize "") "") (check-expect (pluralize "apples") "apples") (check-expect (pluralize "apple") "apples") ; (define (pluralize str) str) ; stub (define (pluralize str) (if (string=? str "") str (if (string=? "s" (substring str (sub1 (string-length str)))) str (string-append str "s"))))
I think this was the very first time I saw the Design Recipe in action. To this day, I’m surprised at how much of an impact it has had on my academic life so far.
The rest of my first winter break was spent catching up with friends from high school who I haven’t spoken to since graduation. Even then I saw how much they’d grown over the past few years. Although I occasionally stay in touch with a sizeable number of my friends from high school, I’ve drifted apart from some of them. I guess this is expected in life. I also spent part of my winter break teaching myself integral calculus in preparation for MATH 101 (Calc II). I can’t believe how much of a keener I was back then.
I still remember my very first computer science class. It was a day in January and I saw my professor walk in for the first time. Something that I vividly remember to this day is the orange scarf he had around his neck. Bill was a shorter man, but he had an enormous presence in the lecture hall. He showed us a BSL program that would compute the number of bus passes we could get for a given price (the days of $1.75 concession fares are long gone). I once again found myself enamoured by 110 and this idea of programming. I was never one of those students in high school who was particularly interested in how the internet worked or how I could build my own website (I was too busy being a band geek). Little did I know that this would be the first lecture of a course that would pretty drastically alter the next 4 to 5 years of my life.
Looking back at the pluralize
function, here’s how I would write it now:
def pluralize(s: String): String = s match { case "" => s case str => if (str.last == 's') str else str + "s" }
Scala might be my favourite language to use right now, but the lessons I’ve learned from 110 still apply.
Jumping a little ways into the future, I’d like to talk a bit about Bill. William Aiello was my very first professor in computer science at UBC. After I became a TA for 110, I managed to work with him for a few terms. In the short time that I knew him, his warmth touched me deeply. In my third and fourth year at UBC, he would never hesitate to stop in the hallways whenever we bumped into each other and strike up a quick conversation. He’d often ask how my day was going or how school was going so far. I remember one particular conversation where we talked about his physics undergrad at Stanford and how he “knew quantum.”
Bill passed away last October after a long illness. I owe a great debt to him, being the person who taught me how not only to program, but also to slow down and appreciate things in life.
Thank you, Bill.