Eagleson's Law
Posted on July 15, 2025 in Programming
Eagleson's Law
Any code you have written that you have not looked at in 6 months or more might as well been written by someone else.
Code's Rebellion Against Sanity: Eagleson's Law
Imagine opening a stale Python script from the previous year. Deciphering hieroglyphs written by an inebriated alien is similar to that. You nestled those loops, but why? What is x_y_z? You are now an archeologist rather than a developer.
An instance of your previous "genius":
def wtf_func(a, b): # Why did I have to do this?
return [x * b if x!= b for x in a] # *cries*
Eagleson's Law encourages us to record as if we were describing it to a squirrel or a toddler. Make use of comments, distinct variable names, and perhaps a README with the words, "I apologize to the future me."
So, write code like you're writing a love letter to your forgetful future self, accept the ridiculousness, and giggle at the mayhem. Because that squirrel isn't helping.