28
toriyuno
11d

Code review my industrial strength Javascript.

Comments
  • 10
    I like the loop counter. This is pretty much what you learn in german schools
  • 7
  • 13
    @toriyuno Yes I'm serious. I just wrote the final exam in college (Gymnasium, I don't know if its comparable to college) last week in IT and thats literally how they call their variables. In the exam. And they are totally serious about it. I had to convince my teacher for over half a year to just use "i" instead of something like "pacManSpielObjektImSpielfeldArrayIdx". I'm so happy to be done with school.
    I've got 2 more exams to go this week and then I'm finally done with this piece of crap
  • 3
    @b3b3 that's hilarious XD
  • 2
    the c# experience in js
  • 4
    @erandria omg, how could you tell? I have the most experience in C#, and still pretty new to javascript.
  • 3
    @toriyuno decades of experience.
    btw, a+ troll code...
  • 4
  • 2
    Burn it.

    Cleaning with plasma....
  • 5
    @IntrusionCM you've inspired me to write a end-all be-all javascript framework with this style. I will name it, Plasma 🔥
  • 5
    You joke but this is very close to some production code I've seen.
  • 6
    @SHA-16384 this may or may not have been based off my deeply ingrained Win32 kernel programming experience. Just missing the return value error handling, reading magic constants from a localized resource table, and of course,
    the hungarian notation >_>
  • 2
    The only thing missing is the loop iterating to 200 while still keeping the old variable name.
  • 1
    @b3b3 ich fühle mit dir :D

    If you decide to study 'Informatik' then you can finally call your variables the way you want (but they should still have a meaning though.)
  • 3
    @b3b3 But then they use idx in the variable name, as if saving those 2 chars here is the real thing.
  • 2
    @xxmicloxx that’s perfect 😂
  • 2
    :2 HELLO_W... - declare as object property or move to prototype
    :2 HELLO_W... Uppercase, is it constant?
    :3 this.getHell... better to be in prototype than object property
    :15, 16 there are constants in javascript
    :18, 26 declare vars as let instead, then they are visible only inside that for statement (block scope)
  • 3
    @norman70688 I guess I’ve never used a prototype. Makes sense, no need to instantiate an object. Time to learn about that.

    I completely got let and var mixed up. Oops 😆

    A+ code review
  • 0
    @toriyuno haha plasma
    npm names that make no sense, god I hate that shit...
  • 3
    @erandria plasma v3.2, cause why not start at v3.2
Your Job Suck?
Get a Better Job
Add Comment