News for hackers. Stuff that matters.
Re:Show HN: I taught my little brother JS, and he made this ... by finaliteration on Wednesday January 09, 2019 @07:48PM (#18870561)
My only complaint is the global scope pollution with the top-level variables and lack of ‘var’ for those. But other than that, I agree.
Re:Show HN: I taught my little brother JS, and he made this ... by etatoby on Wednesday January 09, 2019 @10:22PM (#18871251)
That's a complaint about the JS language itself, that variables are global unless otherwise specified.
Re:Show HN: I taught my little brother JS, and he made this ... by finaliteration on Wednesday January 09, 2019 @11:38PM (#18871562)
I do agree it’s a complaint about the language. However, I think it does ultimately fall on the developer to know how to work with the language including the bad/ugly/awful parts. I also think not polluting the global scope is a pretty foundational thing to know or be aware of. It’s really easy to shoot yourself in the foot or have naming collisions/overwrites happen if you aren’t careful.

Another example would be memory allocation/freeing in a non-GC language. Sure, it’s a pain that I have to deal with it, but it’s still on me to make sure my application works in the language I’ve chosen and doesn’t leak memory all over the place.

Re:Show HN: I taught my little brother JS, and he made this ... by klyrs on Thursday January 10, 2019 @01:22AM (#18871937)
> However, I think it does ultimately fall on the developer to know...

This person has been programming for a week. I think we can let this slide

Re:Show HN: I taught my little brother JS, and he made this ... by test1235 on Thursday January 10, 2019 @09:20AM (#18873972)
Well, no - not if everyone's raving on about how great the code is. Code quality is objective, not dependant on experience.

I don't get to write crap code at my work if I'm inexperienced, I have to learn to write good code.

Re:Show HN: I taught my little brother JS, and he made this ... by nicoburns on Thursday January 10, 2019 @05:41AM (#18872884)
Feedback is pretty useful for new programmers though. It's how they learn!
Re:Show HN: I taught my little brother JS, and he made this ... by finaliteration on Thursday January 10, 2019 @12:01PM (#18875478)
I’m not at all saying they should be an expert after a week. But learning those things is part of being a software developer/programmer and I don’t think, “Well the language sucks” is a valid argument.
Re:Show HN: I taught my little brother JS, and he made this ... by ngcc_hk on Thursday January 10, 2019 @05:32AM (#18872850)
Great comment. Great comment.