samgeo.codes

Day 3 at RC

Day 3 was really packed. Here's a quick summary before I jump in:

  • I started my day by writing down my reflections on day 2 (yesterday's post).
  • Pairing session on a 2048 implementation in python.
  • Heard from a bunch of folks about their plans/advice at RC.
  • Paired on a LeetCode problem in JavaScript.
  • Responded to a creative coding prompt in p5js as part of a group.
  • Paired some more on a neat Pokémon image downloader in async rust.
  • Had a coffee chat with an RC alum to talk about some of our experience in the programming language sphere.
  • Had a really interesting discussion about reusing some open source C++ code to create an LSP implementation in Rust by bridging the gap with cxx.
  • Dove into some of the cxx documentation.
  • Watched the first half of Jon Gjengset's The What and How of Futures and async/await in Rust video.

The rest of this post will be some of my thoughts during day 3.

Reflecting in the morning

I think I like this routine of beginning each day by reflecting on the previous day. So I'm doing it again today!

I haven't done a great job of writing down these kinds of reflections professionally. I don't really know why that is. Maybe it's because I'm not all that comfortable being vulnerable at my place of work? Regardless, I'd like to care a lot less about others' perception of me and my work and focus more on creating things that I'm proud of or excited about. So far writing down some of my thoughts has really helped clarify how I'm feeling.

2048

This morning pairing session was great. The dialogue felt pretty good and there was a nice exchange of thoughts back and forth while producing a good amount of code. We made a solid amount of progress in a little over an hour and had a mostly functional version of 2048 playable in the terminal. We planned another pairing session around wiring up a simple AI to see how well it might perform.

I'd love to work on a more in-depth writeup about this at some point in the future.

LeetCode

I really gravitate toward LeetCode-style problems. In some sense, I find it really satisfying to come up with an efficient solution to a problem. But on the other hand, I don't know that spending time on LeetCode is "working at the edge of my abilities" (one of the self directives at RC). I've spent a lot of time working on competitive coding prompts like Advent of Code, Codeforces and LeetCode. I'm not the best that I could be -- I certainly don't crank out LC hards -- but it's comfortable for me.

I'll probably try to fight the temptation to spend a lot of time on this style of programming throughout the rest of my batch.

Creative Coding

I had a lot of fun navigating on a creative coding prompt. We built an interactive scene where an emoji person was trying to decide on which outfit to wear. It was a great reminder that programming doesn't have to be serious. I think these sessions will be especially good as a foil for solving really complex technical challenges. I've historically leaned on playing trumpet for this kind of release. But when I really want to focus on growing as a programmer for a few months, creative coding sessions with a group of folks seems pretty great.

I mentioned in an earlier post that I struggle with some of the improvisational skills that are sometimes called upon for activities like this. The group setting felt pretty nice and it was a lot of fun to think about ways to structure the scene we built.

Rust

Rust seems to be everywhere. There are a bunch of folks in my batch that seem really interested in learning Rust which is really exciting.

For a low-level language, Rust has a really compelling feedback loop. Top-notch developer tooling (at least compared with clangd), built-in testing functionality and a package management ecosystem that makes it easy to focus on the problem you want to solve instead of how to repackage an open source library as a Bazel library instead of using CMake (I'm not salty at all...).

And the community is fantastic. There are so many resources for learning and most of them are fairly up-to-date. I think C++ is simply too large of a language for most resources to be broadly applicable. Recently, I have enjoyed Klaus Iglberger's CppCon talks on YouTube; and I'm curious about his recently published book C++ Software Design. But it gets really frustrating to see recommendations for pasting over decades-old language design mistakes by adding yet another keyword or annotation to your method declaration. Rust corrects a lot of these mistakes and incorporates better mechanisms for encoding invariants in programs. In many ways, Rust is now one of the most accessible languages with explicit memory management: you get best-practices by default instead of opting into them with a keyword.

I'm sure I'll write a lot more about Rust in the coming weeks so I'll leave it at that, for now.

Closing Thoughts

I've been spending a lot of time in group activities this week. I think I'm developing a stronger sense for how I want to spend my time during the rest of my batch. I definitely want to continue with these daily reflections. Thanks again for reading!