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
-
Root826025yLet's compare undeclared variables!
Then set them for the next check!
Within the wrong scope so hoisting doesn't work and they disappear immediately!
And perform an api call when they differ!
And then repeat it every 250ms!
Fucking inept idiots. -
@Root oof, so somebody didn't put time into testing? Unpleasant, indeed.
Hoisting and object referencing are really fu(n/c)ky things, I'd say they're enemies in any supporting language if used exceedingly. -
Root826025y@olback Some homemade regex monstrosity that "works well enough" and so hasn't been touched in years. The devs here just work their way around its quirks. It looks for a specific comment, and when present, squishes all the JS in that file. so if the "minifier" breaks things too much, you can just turn it off.
Why isn't there a real minifier with context-aware rewriting? Easy: laziness. 😓 -
Root826025y@vintprox They tested it and made sure it worked; they just never looked at the network tab or server log.
As soon as I added code to modify the form pre- and post- api response, I noticed something /fu(n|c)ky/.
And I agree. I don't like languages doing things I don't explicitly tell them to. I don't care if it saves keystrokes; it costs headaches. Especially when someone else just "makes it work," gets credit for their haste, and I'm left to clean up their mess.
It's the Peter principle in action! -
I'm not a java script dev in any way shape or form. Now for some reason I am in charge of figuring out why the performance in this app is so bad.
-
@projektaquarius if its anything like the be apps I work its function calls that stack a hand full of promise functions wrapped in new promises
-
@vorticalbox according to Google dev tools, it's a lot of queryselectorall calls in our plugin registration code.
Stupid javascript.
Stupid hoisting-oblivious "frontend devs."
Stupid browser-specific javascript behavior.
Stupid thrown-together javascript minifier that literally only strips out whitespace and comments.
Stupid poorly-written javascript spamming my api.
Time to rewrite it. Grumble grumble. Soo not how I wanted to spend my morning-turn-afternoon.
Leading to the last but not least:
Stupid me forgetting javascript's quirks.
rant
inept frontend devs
javascript
api spam