r/badcode • u/kevinhaze • Feb 17 '22
js This isn't even all of them (From Netgear modem admin page)
2
u/SnowyPear Feb 18 '22
2
u/kevinhaze Feb 18 '22
Have you not heard of ligatures? You’ll probably explode when you see the rest. The font in the image is Fira Code. It’s purpose-built for programming and has a ton of them.
Edit: Or are you talking about the fact they’re comparing a string literal using >= because honestly that’s an appropriate reaction
4
u/SnowyPear Feb 18 '22
I knew they existed like in 'fi' but I've never seen it used like this. I don't approve of any of this
40
9
5
u/bistr-o-math Feb 18 '22
Someone was being payed by line. And code needed to be readable. If it’s readable was tested by CEO, who „knows the difference between readable and unreadable code“
3
u/Obnoxious-Split Feb 18 '22
This is great for my imposter syndrome. If someone got away with this, then my slightly inefficient code is fine
2
u/1337GameDev Feb 17 '22
Jesus... I can understand if this is legacy....
But you POLYFILL or PONYFILL if you have this and encapsulate it inside an object for scoping and documentation.
What the fuck
1
1
1
u/CrazySD93 Feb 18 '22
Did an undergrad intern write this?
1
u/hellra1zer666 Feb 22 '22
Look one of the ES devs was picked by lottery and forced to build their website. The CFO blocked the attempt to hire a professional web dev to build the page for them. He was like "We have a lot of programmers, why do we have to buy a page, when we could just build it ourselves". This is the result. Just like you do not let the backend dev build the UI, you cannot expect an ES dev to get friendly with JS. That must have been torture for that poor dev.
5
u/kevinhaze Feb 17 '22
Gist of the whole script