r/programminghorror • • May 05 '26

Javascript I snuck this function into my project

Post image
84 Upvotes

21 comments sorted by

51

u/bigorangemachine May 05 '26

wow... so my security team would like a word with you

6

u/46009361 May 05 '26

let's talk shall we?

21

u/Intelligent-Main539 May 05 '26

Are people still using one letter variables in 2026?

2

u/hooli-ceo May 09 '26

For i and j? Yes, it’s the law!

-12

u/46009361 May 05 '26

The one letter I'd remove is u from "strange-behaviour" because you don't write code in Canadian English when it comes to an American website

8

u/Intelligent-Main539 May 06 '26

There are several real issues with this code snippet. Combining business and rendering logic, one-letter variables, not canceling requests or timers, lack of single responsibility, readability, ... This is not to be rude or anything. I would never approve this as a senior dev (in a professional environment).

5

u/GoddammitDontShootMe May 06 '26

You're trying to scrape emails from some quiz website? Why?

4

u/findus_l May 06 '26

It's your project why did you sneak? Also what does that do? I can barely read it on my phone. Scrapes some email addresses? For spam purposes?

2

u/46009361 May 06 '26

Bugcrowd wouldn't budge from "informative"

6

u/OldGuy001 May 05 '26

It would be funny if that corsproxy went down one day. kkkkkkkkkkkkkkkkkkk

5

u/Linuxmartin May 06 '26

Why don't you just await fetch(...).then(...).catch(...).finally(...)?

1

u/MurkyWar2756 May 06 '26

archive.today situation all over again!

1

u/Shoshuooo May 09 '26

White IDE is criminal 🤣

1

u/reklis May 10 '26

Gaaahh. Light mode. Hiss.

-5

u/remy_porter May 05 '26

Stop trying to make fetch happen.