44
knerd
131d

There is this code I am updating, not written by me, So I found this in the front end logic.

Comments
  • 33
    Well you know what they say, gotta check it twice to make sure of it
  • 2
    Honestly I've seen so much terrible front end code, i wonder how these people get there jobs...
  • 3
    But what if
    this.language.id
    is null?

    Especially when it was not null a picosecond ago?

    xD
  • 2
    @TylerDDevRant replace all while loops that "pause" code execution until some asynchronous code finishes to massive if statements that keep checking the same thing over and over 🤣

    if (isDone ||
    isDone ||
    isDone ||
    // ...
    isDone) {
    //Do stuff
    }
  • 2
    MY EYES ARE BURNING
  • 2
    Taking extra precautions
  • 2
    I WISH I COULD UNSEE IT
  • 3
    Solarized Light ♥️
  • 2
    Luckily for this programmer v8 and other decent javascript interpreters will ignore the second condition because it is the same.
  • 1
    @TylerDDevRant haha I wonder, I showed it to the guy who gave me the task, yet to connect with whoever wrote it.
  • 2
    @waliurjs especially for the photophobic us
  • 2
    You can never be too cautious
Your Job Suck?
Get a Better Job
Add Comment