← Back to homepage

Day 3: Hello, Wizard 🧙

Today

Personal Site

Good news: I got my personal site deployed last night before bed. Bad news: I also went down a rabbithole of writing bad CSS and had a hard time falling asleep after. You live and you learn! You can find it at https://shardul.baral.ca. I’ll continue to post these checkins there.

Couches

Started the day off meeting other remote folks. Was great to hear some practical tips about how to make the most of RC as a remote. Basically it came down to

  • ask for help if you need it
  • pair often

In other words, be engaged! Don’t work alone. I’m going to be corny now:

If you want to go fast, go alone. If you want to go far (“become a dramatically better programmer”), go together!

More experiments in CPU caching

After my conversations yesterday, I thought maybe the next best step would be to allocate a fixed size array and accept a cmdline parameter which specifies how many bytes at a time we should “stride” through the array. My hypothesis was that reading 1 byte at a time should be pretty fast, since after you read one byte, the next CACHE_LINE_SIZE - 1 bytes would already be in the CPU cache.

Interestingly though, reading 1 byte at a time was the slowest (~131ms p50). Reading 128 bytes at a time was the fastest (~3 ms p50). Here is a chart showing how the runtime changed as we increased stride length:

Runtime vs Stride Length

Once again, stumped! [REDACTED RCer] has given me some pointers about what to do next, so I’m going to try that tomorrow.

SICP Meetup

I joined some wizards working through the SICP book. I’m not sure yet if this is something I actually “want” to do vs feel like I “should” do. I did enjoy the things we discussed and got nerdsniped about whether there is a proof for the existence of a tail-recursive procedures for all recursive procedures. I’m going to join the group of wizards starting from chapter one but also give myself permission to quit if I start to feel like working through the book is becoming a drag.

ARENA

Some folks wanted to get a jumpstart on the chapter 0 material of ARENA. We jumped on a call and mostly spent time going through 100 exercises in numpy. This gave me a flashback to my data science days – I can’t say that I enjoy the numpy documentation. Some of these felt like more numpy code golf more than anything. In any case, I got through sixteen of the exercises before ending my day. I might just jump straight to the PyTorch exercises tomorrow since I have less experience with that and others seem to think that it will be more useful than numpy code golf.

Fin

Yesterday I aimed to get my site deployed (done), learn more about ARENA (sortof done), and continue with my bytecode interpreter (didn’t touch it). I think I was a bit ambitious with my goals for the day since I didn’t take into account the number of calls I had so in the end I am satisfied.

Tomorrrow

  • Lots of calls, might end up not going to some in order to get more focus time. But I should probably go to the publication accountabilibuddies call if I’m trying to be more consistent about writing.
  • Continue experiments with CPU caching in between calls
  • Start PyTorch ARENA material if I have time