Comments on: Cargo-culting in JavaScript https://j11y.io/javascript/cargo-culting-in-javascript/ Sun, 22 Mar 2015 15:39:22 +0000 hourly 1 https://wordpress.org/?v=5.0.13 By: Phil T https://j11y.io/javascript/cargo-culting-in-javascript/#comment-2643 Tue, 30 Jul 2013 23:42:42 +0000 https://j11y.io/?p=2275#comment-2643 Hi fellow programmers,

This problem has become so popular recently with the need for classes in javascript, programmers end up trying
simulate them using javascript’s prototype system.

Real programmers use classes which now includes Javascript programmers.
———————————————————————–

This means writing and maintaining hacky code which if we want to learn from our past mistakes in programming is best left to the compiler. We dont want to return to hand-coding assembly-like languages, compilers will now generate better code; optimized even. And give us compile-time checking etc.

Let me tell you there’s a free compiler called classyscript at http://classyscript.com.
The language is a super set of javascript allowing classes and inheritance but compiling to standard javascript which will run in the browser.

Thanks,
Phil T

]]>
By: Herbert Peters https://j11y.io/javascript/cargo-culting-in-javascript/#comment-2642 Fri, 31 May 2013 14:59:37 +0000 https://j11y.io/?p=2275#comment-2642 Teaching people to use better data structures and assertions (for non minified JS libraries) would solve many issues you raised and would focus people to the cause (the data), instead of the effect (the code).

I’ve seen so many times code that could have made easy readable, less bug prone, if the data structures would have been defined better.

]]>
By: Jack Rugile https://j11y.io/javascript/cargo-culting-in-javascript/#comment-2641 Fri, 24 May 2013 23:36:41 +0000 https://j11y.io/?p=2275#comment-2641 It was an excellent read, James. I am definitely guilty of picking up habits due to widespread occurrence, and not out of true reasoning.

The problem seems to be a confusion around popular practice vs. best practice. I think the problem for many beginners (me), is that front end development, although incredibly accessible, can still be very confusing. We are desperate for answers and understanding, so much so that we look at seemingly experienced developers’ code and treat it as a best practice, without diving into the subject further and coming to our own conclusion.

I think this article (on your site) should be an author’s note over on Nettuts+.

]]>