7
atheist
2d

Ya know when you're working on a personal project, and you add a feature thinking it's a really good idea, then you don't touch the code for 6 months and it's still a good idea but you've got no idea what's broken and no idea what you need to do next?

Comments
  • 5
    Yes, the very app that I‘m writing this comment in :)
  • 2
    this is generally when I typically rewrite everything

    ... I actually don't have issues fixing old bugs so I either rewrite the whole thing in my brain and then get annoyed I figured out better ways to do parts, or I rewrite it and don't get annoyed at those parts, so
  • 2
    @jestdotty my thing is already voodoo, rewriting would be a pain. It's a little python package with one function. That function is a debug function. It prints the expression it's called with as well as the value. Or it can be used as a decorator to a function then prints every time it's called with its arguments and return values. Or a context manager to modify any inner calls. It does stack inspection and AST parsing using undocumented but public parts of the Python api. It's magic and I don't want to rewrite from scratch.
  • 2
    @atheist yeah spaghet time
  • 2
    @jestdotty it's actually not that bad, the biggest problem is the tests, I changed the spacing in the output and had to spend half an hour changing whitespace in tests. But because it's so much voodoo I have a lot of tests to make sure it's actually working.
  • 3
    Yeah even more annoying is if you had to stop because something came up so it's only half implemented
  • 2
    @atheist your code described sounds like when I'm doing hacky code golf so I would've assumed there was no tests because if i do hacky code golf I don't make tests nor documentation because there would be no point because the code is not intended to be robust or to live long or to be maintained or any of that lol
  • 2
    @jestdotty I'm really stupid so either I test it or it doesn't work or exist.
Add Comment