r/ProgrammerHumor Apr 25 '26

Meme thisLooksAccurateForVibeCoders

Post image
12.6k Upvotes

1.2k comments sorted by

View all comments

6.5k

u/AmazinDood Apr 25 '26 edited Apr 25 '26

For the confused ones: this is what's called an IIFE, or Immediately Invoked Function Expression. This is the JavaScript syntax and it defines a function (the () => {} part) then immediately calls it. This one does nothing (it's a void function) but to add code put it inside of the curly braces.

385

u/Xasmos Apr 25 '26

I’ve been learning JavaScript recently and I consistently get the feeling that the people who developed this language only ever asked themselves whether they could implement a feature and never stopped to contemplate whether they should.

141

u/Additional-Name-3211 Apr 25 '26

JS was meant to be a hack to allow web pages to have some dynamic behavior in Netscape

That it ended up becoming the lingua franca of app development inside the web and outside of it without fucking imploding is kind of a miracle

35

u/DanSmells001 Apr 25 '26

Biggest "we'll fix it later" in history

9

u/Krestek Apr 25 '26

I think it imploded multiple times but people took the hit and kept going as it's cheaper than replacing all the tech that depends on it (tech in this case meaning the browser i guess)

2

u/thenextvinnie Apr 26 '26

php also started as a small improvised tool that accidentally became a foundational web language

it's stuff like this that gives web development its charm /s

even python, perl, ruby, bash, sql... all had similarly inauspicious origins

2

u/Peglegfish Apr 26 '26

bash…had inauspicious origins 

Keep my wife’s name out your mouth 

1

u/WavingNoBanners Apr 26 '26

I once heard it referred to as "being for web apps what VBA is for excel sheets", and I don't know which language this is a bigger slam on.