A eulogy to pre LLM micro debugging
I first fell in love with coding in 4th grade robotics club. And I remember exactly the first algorithm I ever wrote. We were competing in NXT sumo wrestling and the algorithm did the following: 1) spin around in place until your ultrasonic sensor detects something 2) stop spinning 3) move forward until your light sensor sees the black edge of the sumo mat 4) back up the length of the radius of the sumo mat 5) back to step 1
Writing this algorithm was my first experience in what I call “programmer state of mind”. This state of mind is serene. It’s a flow state when the rest of the world doesn’t exist, and it’s just me and my variables and functions. Throughout high school and early in college, I would spend many hours in this glorious focused world. Programming had a way of sucking me in. I know I should be doing homework, but this program is all I can think about and it is futile to resist its pull.
One of the glorious regions of the programmer state of mind is micro debugging. Picture this, I have just written a script. My script works, but fails slightly in a very odd, unintuitive way. I enter debugging. I walk through my code line by line, add print statement after print statement. I read over every character I’ve defined. I spend 10 minutes or maybe 30 minutes digging through when suddenly, I see it. The fog of the script lifts and all is right in my focused world. And solving it requires changing 5 characters on one line.
I miss this. Today, in many cases, this same issue would be resolved as follows: “Hey ChatGPT, why is my code being weird?