Live data from Hacker News

JavaScript for Impatient Programmers

exploringjs.com

71–80 of 104 posts

Re: JavaScript for Impatient Programmers

#71
post #55

My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it. Don't know how to setup node.js? Google should lead you to `npm init` or a starter. Getting some weird syntax error? Google it. Once you learn the basics, want to do X? Google it and determine a) how to do X, or b) if X can't be done / is bad practice. Just by diving head-first into whatever you're tr…

> "My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it." In my experience, this is a terrible advice. However, many of my students follow this advice over my protests and only a handful of them actually learn anything at the end of a long masters program.

I agree. But over the years I've come to understand there are two kinds of learners;

a) "I learn what I need to accomplish this task". This is observed as question/answer and only the simplest version of the answer is needed. So something like "how do I create a variable x and assign 10 into it. All he's looking for is x = 10

b) The second kind wants to understand the nuance of what's happening, so they can apply that nuance to future code. They are looking for an answer, but the are interested in the working that leads to the answer. So in the above example they want x = 10 var x = 10 let x = 10 options{x:10}

and so on. They digest when to use one and when to use another, and they delight in using the correct form in the correct place.

In my experience (a) programmers will get through tasks quickly, but with shallow understanding. They will eventually have all the tools, but lack the ability to see the big picture. They struggle to read other people's code.

On the other hand (b) programmers learn much more slowly, they take a lot of time to accomplish tasks because they are being distracted by their curiosity. But after that investment they easily outstrip their peers in productivity, and more importantly can do things that an (a) type programmer can never do.

What I've come to accept though is that giving a (b) answer to an (a) questioner just leaves them confused. They asked about assignment, and a discussion of scope just leaves them befuddled (since they don't know what scope is anyway). Which can be frustrating to the answerer who is a type (b).

Type (a) should not be doing a Masters program in the first place, so I feel your pain in that regard. Google is great when you're out in the world, but it's a terrible way to "big picture" learn.

Re: JavaScript for Impatient Programmers

#73
For people who have taken the time to read it, or taken enough time to evaluate it: is there really anything in this book that would appeal to "impatient programmers"? From what I've looked at, it seems to be a fairly typical programming book, and I fear the title might be deceptive.

Re: JavaScript for Impatient Programmers

#74

My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it. Don't know how to setup node.js? Google should lead you to `npm init` or a starter. Getting some weird syntax error? Google it. Once you learn the basics, want to do X? Google it and determine a) how to do X, or b) if X can't be done / is bad practice. Just by diving head-first into whatever you're tr…

Googling how to install nodejs you'll end up with a bunch of nonsense from how to manually set it up to how to do it using some OS specific thing that won't work right when you need to upgrade and everything in between when the best practice is installing 'n' which is a node version manager and does everything for you.

if you hadn't experienced the pain of differing versions of node, you will not understand why having a node version manager is useful.

So nothing will replace the experience of pain when learning.

Re: JavaScript for Impatient Programmers

#75
What I like about JS is I can write nearly everything with const.

Functions are const, data is const, and I rarely use classes. It removes a lot of overhead, avoids this questions, and makes everything consistent and so makes spotting similarities and differences easier.

I can do

    const myFunc = () => 2;
    const res = myFunc();
It helps with the mindset of treating functions as data that can be acted upon similar to how data can be.

Re: JavaScript for Impatient Programmers

#76

My "real" advice for impatient programmers: just start programming, and every time you encounter a problem google it. Don't know how to setup node.js? Google should lead you to `npm init` or a starter. Getting some weird syntax error? Google it. Once you learn the basics, want to do X? Google it and determine a) how to do X, or b) if X can't be done / is bad practice. Just by diving head-first into whatever you're tr…

I'd also add my own 2 cents: if you're Googling stuff related to syntax then make MDN your first stop; or you might consider one of MDN's many entry points to learning JS. Also check out prominent Discords/Slacks/etc because it's nice to have human help when you're blocked, and sometimes you need opinions rather than facts.

Re: JavaScript for Impatient Programmers

#77

What I like about JS is I can write nearly everything with const. Functions are const, data is const, and I rarely use classes. It removes a lot of overhead, avoids this questions, and makes everything consistent and so makes spotting similarities and differences easier. I can do const myFunc = () => 2; const res = myFunc(); It helps with the mindset of treating functions as data that can be acted upon similar to how…

Yes, but it’s with the caveat that (like C++) const does not mean that the whole value is constant. It doesn’t even really mean any part of the value is constant necessarily, just that the symbol cannot be reassigned.

I don’t know that it eliminates that many questions, but it does eliminate one question, which is whether that variable will be reassigned. Arguably that doesn’t tell you very much.

Re: JavaScript for Impatient Programmers

#78

Earlier quoted context omitted.

You cannot just google your way through it. There are times when you don't even know what to google. I remember as an early beginner being stuck with something that had to do with closures. I had no idea what was going on and didn't know what to google and when I asked questions on stackoverflow and reddit please started saying things about decorators and whatnot!!! It is only when I sat down and went through some ki…

I’m the complete opposite; I’ve yet to encounter a problem I couldn’t Google or bug someone in IRC about (and that’s the key). Sometimes you have to engage with someone else to solve a problem, but there are hundreds of people willing to do just that at literally any given time of day.

Yes, as a last resort, googling simply the error or part of error gets one on the way to solution. Very rarely I had to face a search term which doesn't point or advance me towards solution.

For context, I use javascript & basic html css to make simple apps for my own use. apps.bydav.in

Re: JavaScript for Impatient Programmers

#79

I will say I’ve read this book all the way through one and a half times, at which point I decided it wasn’t a good book. I’m an experienced programmer new to JavaScript, so the target market for this book. It is terrible for reading from start to end, and has lot of details and obsolete language features I just didn’t care about. I looked around a bit and found the perfect book for me: Modern JavaScript for the Impat…

Thanks for Your extensive review on Amazon `This is an exceptionally good book. If you know how to program in some other language, and want to pick up JavaScript, then this is your book. It did an excellent job of explaining everything in a logical order, telling a good story. Read through the 300 or so pages from start to finish and you'll be set to move on the JS web framework of your choice. (The recently updated JavaScript: the Definitive Guide seems the other alternative, but it is 665 pages to wade through.)

I especially liked how the author came up with 5 golden rules to follow right up front, such as "avoid automatic type conversion". JavaScript has so many crufty historical flaws, and by following these rules, he doesn't have to explain all the weird historical stuff. That cut out a lot of laborious explanation of things you shouldn't do anyway.

The examples were very well chosen. They focused on the important stuff, yet still explained the key gotcha's inherent in the language. Every paragraph seemed to have an important point.

It is a shame this is only the 85th most popular JavaScript book (as of now). It deserves to be better known. It is a classic, and perhaps the best computer book I've read since "The Go Programming Language".

Highly recommended.`. Will add this to my read-list after I complete WatchAndCode

Re: JavaScript for Impatient Programmers

#80
post #48

I really don't understand why people hate JS so much. I myself a primarily a JS dev, and now a TS dev. TS made the experience so much so much better. JS is like pretty much a programming language for average software engineer like me. Sure, JS build system is a pain. I am the go to build system guy for almost every company I've been with, I worked with Grunt, Gulp, Webpack 1,2,3,4 and etc and yes I hate it, but other…

I believe the JS criticism is more about the culture and ecosystem than the language itself. In short: Most if not all JS devs are more interested in playing with specific tools and APIs rather than dealing with and/or implementing programming patterns and principles. In the last decade "small modules" skyrocketed the popularity of NPM and a lot of people pushed the idea of "don't reinvent the wheel just 'npm install…

What is a meta framework? This is the first time I heard this term.
Post reply on HN