Awkward Moments in JavaScript

Written by gregsabo | Published 2017/09/29
Tech Story Tags: javascript | coding | programming | software-development | awkwardmoment

TLDRvia the TL;DR App

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

So many exceptions. So much remorse.

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

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

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

These closures are totally cramping my style.

6. When you needed to write CoffeeScript

This definitely tasted better in 2010.

7. When you had no idea what prototypes were

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

What…WHY IS THIS HERE

9. When you were figuring out how to use Promises

So majestic and expressive.

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

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

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

But I wrote two unit tests!

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

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

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


Published by HackerNoon on 2017/09/29