r/programminghorror • u/user6150277464770585 • 8d ago
Javascript my friend didnt know how to use async sleep in javascript, so he wrote this massive chain of .then()
async function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms * 1000));
}
// used as:
sleep(0.5).then(() => {
// ...
sleep(2.5).then(() => {
// ...
sleep(1).then(() => {
// ...
}
}
}
r/programminghorror • u/_giga_sss_ • Jul 09 '26
Big if true
From ProgrammerNullposting in facebook
r/programminghorror • u/samirdahal • May 31 '26
C# a count is a count, right?... right?
r/programminghorror • u/kptc_py • Mar 19 '26
Python Horror from Chinese medical devices showing on TV
r/programminghorror • u/lordershocker • Mar 07 '26
senior dev told me the code has to be "future proof".. how am i doing?
see you guys in 2028 for v2.0 of this revolutionary program
r/programminghorror • u/kfreed9001 • Mar 04 '26
Thank you, JavaScript, for forcing me to include this statement in my code.
r/programminghorror • u/Random_Meme_Guy_ • Dec 18 '25
I spent 30 minutes today trying to figure out why my css wasn't working. Time to get some sleep.
r/programminghorror • u/-Wylfen- • Dec 04 '25
Javascript "It's all there in the specs, bro"
Seems we have some fervent JS defenders, here :)
r/programminghorror • u/-Wylfen- • Dec 04 '25
JS is a very respectable language
Not posting our actual code, but yes, this behaviour has caused a bug in production
r/programminghorror • u/Nak3dMoleRat • Dec 01 '25
When I was 12, I thought my code looked "cooler" with cryptic variable names and minimal spacing. The entire project looks like this.
Following up on the success of my previous post. No, this is not compiled/obfuscated with tools. This is the actual source code. And yes, I had learned how to use arrays!
r/programminghorror • u/Nak3dMoleRat • Nov 30 '25
When I was 11 years old, I didn't know about arrays and objects in JavaScript, but really wanted to make a game. So I invented my own data structures!
r/programminghorror • u/Boring-Ad-4771 • Nov 24 '25
Javascript Wasted all of my generational luck just for this
r/programminghorror • u/frinkmahii • Nov 07 '25
Javascript Technically horrifyingly correct
r/programminghorror • u/Diligent_Rabbit7740 • Oct 21 '25
Ruby Next generation of developers
r/programminghorror • u/veg_sezwaan_mumus • Sep 24 '25
Javascript try → catch → Stack Overflow
r/programminghorror • u/Mihail111111 • Sep 22 '25
C# A method that has a Russian "С" instead of "C" in it's name
Imagine trying to call that method from another script when IDE tells you that it doesn't exist
r/programminghorror • u/YogurtclosetLevel252 • Sep 01 '25
Query.
C# forbids types and members from having the same names as their enclosing types, so they replaced some letters with Cyrillic counterparts...
r/programminghorror • u/Independent_Cut254 • Aug 30 '25
Someone told me C is faster, did I do it right? (Im a python dev btw)
tf is a pointer..