Day 2 at RC
This morning, I stopped by Café Fanelli for a delicious cappuccino! I spotted the place from far-ish away as I was walking down Broadway towards RC. I had a wonderful chat with the barista, by which I mean fun and meaningful.
My day at RC started with a friendly and exciting (although brief) conversation with Ashley. Then I helped out Lydia with virtualenv, discussing conventions and good practices for making your Python project portable. Lydia is doing a web scraping project.
I signed up for the pair programming workshop at 11am and didn’t regret it one bit. It was so much fun. We would tackle a problem from exercism but not just that: Once your program works (tests pass), you want to refactor it, right? Well, ref*cktor. Make it unreadable, convoluted, obfuscated. Haha.
So, Alan and I went for the Hamming distance challenge, ending up with:
def distance(string_1, string_2):
if len(string_1) - len(string_2):
raise ValueError("Strings should be the same length!")
return sum([(lambda a, b: 1 if a - b > 0 else 0)(a, b) for a, b
in zip(bytes(string_1, encoding='utf-8'),
bytes(string_2, encoding='utf-8'))])
All this mess just to count the number of differences between two strings. What was less fun today is that the ‘p’ key of my keyboard stopped working properly. I don’t get it, because I haven’t eaten any sesame bagel since I left Montréal! I thought the problem might come from a sesame seed stuck under the ‘p’ key…
Rory said he would bring a can of compressed air tomorrow. Thank you! I tried using a wireless keyboard that was sitting around but there were two issues:
- it works with a USB dongle (which I eventually found and taped securely on the back of the keyboard);
- the batteries in it were dead and leaking (I did some clean-up and left the dead batteries in a dedicated box).
Funnily, this wireless keyboard belonged to Dan (there was a sticker with his name on it). So I met Dan, who’d noticed I had a Stan sticker on my laptop! Peter and Yuri quickly joined our conversation, and we decided to start a reading group: Our goal is to go through the first two chapters of Statistical Rethinking by the end of the week!