Awkward Moments in JavaScript by@gregsabo

Awkward Moments in JavaScript

June 23rd 2022 4,127 reads
Read on Terminal Reader
react to story with heart
react to story with light
react to story with boat
react to story with money
image
Greg Sabo HackerNoon profile picture

Greg Sabo

What do you mean the app is slow? It works fine on my 2017 MacBook Pro.

3. When you let your users down because you forgot to check for undefined

image
So many exceptions. So much remorse.

4. When your Node.js code was a giant pyramid of callbacks

image
You call this code asynchronous? It’s more like a-stink-ronous.

5. When you didn’t know what the value of “this” is

image
These closures are totally cramping my style.

6. When you needed to write CoffeeScript

image
This definitely tasted better in 2010.

7. When you had no idea what prototypes were

image
I’m just going to pretend that this is a normal class and carry on with my day, thanks.

8. When you found a global variable that someone snuck into the code

image
What…WHY IS THIS HERE

9. When you were figuring out how to use Promises

image
So majestic and expressive.

10. When you couldn’t decide which npm module to install

image
I’m pretty sure gzip will take care of this, right?

11. When “NaN” was showing up in the DOM and you couldn’t figure out why

image
I tried to make this button purple and I somehow managed to divide by zero in the process.

12. When you skipped writing integration tests

image
But I wrote two unit tests!

13. When another new framework came out and everyone was excited but you

image
Uh, this means we’re doing another rewrite, doesn’t it?

For more engineering posts like this one, Follow me on Medium!

react to story with heart
react to story with light
react to story with boat
react to story with money
L O A D I N G
. . . comments & more!