Who's More Foolish?

Posted on August 25, 2021

the past me who writes shitty code? or the current me who thinks they no longer

so i recently set up a hydra jobset that builds all my haskell libraries


so i recently set up a hydra jobset that will build all my haskell libraries when i write them, and so i took it upon myself to rewrite the generator for this site in order to have something test it.

the goal will eventually be to write some nixos configs that’ll automate pulling in the source for this blog seperate from the program that builds it, and bring up the entire serve.

the point

is one of the best animated movies of all time, and also (as i have learnt when telling people they should watch the point) a documentary about professional tennis player maria sharipova?

anyway the point to all of this is that i recently had to look over code that i wrote when i started this blog. code that was written from when i was a crappy haskell newbie and definitely not the totally real and not kidding myself good programmer and competant computer scientist that i am now.

crappy code

when i say “rewrite” what i actually mean is “wrap”, because the large effort (outside of the hydra project infastructure) was just adding things that the old program didnt have, such as command line arguments and the what-not to seperate it from the data source.

i would like to rewrite it when i find time and motivation to (sadly i have a job again, and thus have neither the time nor energy to spend a lot of it on creative pursuits)

the reason i have not is because its honestly just a complete pile of shoddy code from someone who in hindsight did not know what they were doing. most if it is copied from random tutorials i found on the internet, and there is a massive amount of repeated code because to the untrained eye, monad and applicative combinators look like high-school me’s emoticon dictionary.

the twist

you thought this post was going to be self-abusive misery porn didnt you? that would be on par for this blog but in another entry in the long running series:

tA’s gf proves she’s the smartest

reading through this code and feeling crappy about how crappy it was hit home to something she says a lot, that the only reason i can feel that way is because i have gotten smarter than i was when i wrote this.

i know enough that i can cringe at everything i now realise was a crappy way to do things, i know enough to have a much better working solution to building this project than the crappily hacked together bash script + nix code i used previously

and you know, maybe its my partners influence rubbing off on me, but the more i think about it, the prouder i am of that crappy code that past me wrote because when i think about it:

  • they figured out some non-trivial monad stuff despite 100% not knowing what a monad is
  • they figured out how to build it with nix which really, good job no matter how crappy
  • this program has, almost completely unchanged since first write, worked without fail for over one hundred blog posts


so there you go ${partnerOf tA}, you win and youve made me feel good about myself (im being shitposty here you always make me feel good about myself).

reread your old code, improve it, but be mindful and thankful of the lineage of that code, of how its essential lessons led to your ability to talk shit about it

and most of all, remember to watch the point.