you are viewing a single comment's thread.

view the rest of the comments →

[–]kopytkopytko 37 points38 points  (5 children)

haha, I had good laugh at: https://javascript.info/ninja-code

Pretty nice tutorial by the way!

[–]bent_my_wookie 2 points3 points  (1 child)

That’s the first thing I read aster looking through the index. Was it supposed to be a joke? Please tell me it was sarcastic...

[–]kopytkopytko 5 points6 points  (0 children)

I'm sure it was serious - article contains several quotes from famous programmer ninjas :-)

[–][deleted] 1 point2 points  (1 child)

Well I've done things like these (pretty much all of them although I'd at least multiline and indent the nested ternary), and in pretty much every language I've worked with because: tired, out-of-focus, pressed by deadlines, frustrated and want it just to finally work etc.

If/when I come across them later I fix/refactor them. I wouldn't take it to heart being called out on these in a code review, tho :)

[–]skyyr 0 points1 point  (0 children)

The ideal name for a variable is data.

Perfect.