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
-
donuts238485y@RiderExMachina to me it sounds similar.... Typical of code left over by monkeys that I have to maintain....
-
Root825085ySigh. Bad test is bad test:
Two of my fixtures (factories) were creating users; the api found the second one.
The user lookup is still very slow, though. I'll write (working!) tests for that at some point and replace it. -
@Root oh no! Building it across a few years can make things break because of stale packages, check your packages (if you're running on node.js ofc)
P.S: I developed my own Login system (I just found this rant sorry if I'm not even relating to the right stuff) so maybe I can help you
Related Rants
I extracted a tangled action to its own api, and wrote a test for it.
The test failed.
I added debugging, more debugging, all the debugging. It still fails. But I can at least see why it fails!
It turns out the api finds and updates the wrong user. It finds and updates the wrong user EVEN WHEN THERE ARE NO OTHER USERS.
WHAT THE SALAMI.
Also, the user lookup it uses is extremely roundabout and takes several seconds with ~2 million users. Normally I'd fix the lookup, but it has been in production for several years, and I'm terrified it will break something if I fix it.
Blargherhagrid.
random
blargh
tdd
salami
hagrid