Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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 -
@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.
-
@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.
-
Yeah even more annoying is if you had to stop because something came up so it's only half implemented
-
@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
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?
rant