News for hackers. Stuff that matters.
Re:Moon by undebuggable on Tuesday December 17, 2024 @02:39PM (#42444502)
Funnily, this JavaScript would not pass through most modern job interviews.
Re:Moon by floxy on Tuesday December 17, 2024 @06:20PM (#42446522)
For those of us not in the know, why not?
Re:Moon by undebuggable on Tuesday December 17, 2024 @07:56PM (#42447141)
Inconsistent style. Once global functions (that's so 2000), once prototypes (that's so 2010). No lazy loading, no modularization, no state management. Mixing variable declarations with initializations, one "var" declaration in the code. He probably haven't heard about TypeScript, transpilation, and doesn't understand static typing. Fells like a show off. That guy is an absolute no-no.
Re:Moon by ghxst on Wednesday December 18, 2024 @01:50AM (#42448601)
Was going to ignore this comment until the last 2 sentences. I rarely come across sites / articles that do this good of a job at explaining something I think calling it a "show off" and saying the author is an "absolute no-no" is a bit rude and I don't agree with it either. If anything I appreciate the code as it is, it's very readable at least to me.
Re:Moon by undebuggable on Wednesday December 18, 2024 @02:53AM (#42448793)
My comment was /s of course. JavaScript from 2000-2010 era can do wonders especially if you leverage modern APIs and enormous performance of modern browsers, instead of silting it up with transpilation, frameworks, and layers of modules. Unfortunately simplicity is signalling a beginner and amateur in enterprise working environment.
Re:Moon by ghxst on Wednesday December 18, 2024 @03:08AM (#42448853)
Dang my bad, I feel silly for not catching the sarcasm in hindsight. Apologies.