RSSAmplifier

Blog

samgeo.codes

Sam Eisenhandler's personal blog containing ramblings about a variety of software-related topics.

samgeo.codesRSS feed ↗13 posts

Latest posts

Resource management and generators in Python

I was pairing with a colleague on some asynchronous streaming abstractions 1 implemented in Python. I realized that there are some pretty significant footguns with predictable cleanup in async generators. In fact, the same footguns are present in normal generators, but don't cause quite as many issues as in async generators. Crucially, we can observe unexpected cleanup behavior when we don't fully…

Return Statement

Long story short, my batch at the Recurse Center at the beginning of this year constituted the best 3 months of my life. For the first 20-some years of my life, there was always a logical next step, something to work toward. There were activities that I enjoyed, but ultimately my day to day was structured around reaching the next milestone. My time at RC has helped me embrace the day-to-day and…

Understanding the costs of our abstractions

Since the beginning of February, there has been a big conversation about client-side JavaScript in the web development community. There has been a salvo of blog posts discussing the performance implications of single page applications: Alex Russell's The Market for Lemons Eric Bailey's Modern Health, frameworks, performance, and harm Laurie Voss' The case for frameworks These posts and the…

Day 1

Day 1! A great place to start. I previously wrote a post discussing some basic templates for getting started with Advent of Code in Python and JavaScript. I think that's a solid place to start, but I like to use something a little bit different for Python. In particular, fileinput reads input files line-by-line which can occasionally make it awkward to parse certain inputs. You know what? Let's…

Day 2

Alright, day 2. Problem statement Rock Paper Scissors! We are given a "strategy guide" that looks like: A Y B X C Z and we need to follow the provided scheme. We save the example as input/02/example.txt and our input as input/02/input.txt . Python time! We create our solution in 2022/py/day02/sol.py and add a blank 2022/py/day02/__init__.py . Software engineering best practices be damned, let's…

Weeks 2 and 3 at RC

It has been a great 3 weeks at RC, so far. Not especially proud that I stopped writing for ~2 weeks, but it has been quite a whirlwind. The most concrete thing that I've been working on is a project I'm calling Brainlove which is basically just random exploration of Brainfuck tooling. It's been really cool to see how mature the compile-to-wasm ecosystem has become. I still don't think that it…

Day 4 at RC

What a week! RC has been a huge mental (and emotional) shift for me. I still feel anxious about making rapid progress; I hope as I settle on a more concrete direction that I'll be able to manage some of those feelings a little bit better. I feel like I'm shifting more toward a relaxed "let's just write some code" mindset. That feels good. Self Reflection I think back to some of the early…

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…

Day 2 at RC

Day 2 of RC was really interesting. The biggest event of the day was a pairing workshop. But I also attended a couple of group events: a discussion of WebGL, the start of a reading group for Nand2Tetris. And then in the evening I attended a couple of non-programming talks. I also finally finished Protohackers day 6 in Rust which felt really good. Pairing Workshop I'm really interested in pair…

First day at the Recurse Center

Today was my first day at the Recurse Center (RC). I had so much fun hearing about what awaits me over the next ~12 weeks and meeting a bunch of new people, all of whom seem to be just about as excited as I am! A lot of the discussions I had with folks revolved around what everyone was planning to work on during the coming weeks. I've been curious about a handful of programming topics recently so…

Getting Started With Advent of Code

NOTE: This is my second post discussing Advent of Code. Check out the first post to learn more about why I love AoC. Advent of Code is only a day away! I can't wait to get started. If you're thinking about trying Advent of Code but you're not sure where to start, I hope I can share some tips. First and foremost, make sure you've signed up at adventofcode.com . Each day, a new puzzle will become…

Why I love Advent of Code

NOTE: This will be the first post in a short series of maybe 2 or 3 posts discussing Advent of Code. Advent of Code is one of my favorite "events" each year. In case you haven't heard of it, Advent of Code (AoC) is an Advent calendar that consists of 25 programming puzzles of varying levels of difficulty. Each puzzle consists of two parts: the first part is released at 12 AM EST each day and the…

Musings on Python Type Hints

"Gradual Typing" has become incredibly popular over the last 8 years or so. The most notable examples of this phenomena exist in the JavaScript space. Since JavaScript is the lingua franca of the web there have been several efforts to leverage the benefits of static type systems to enable easier programming-in-the-large for JavaScript. Gradual type systems such as TypeScript and Flow have found…