Hacker News new | ask | show | jobs
by ricardobeat 4200 days ago
My 2c: stay away from any complex framework until you have a really good understanding of the language itself. Learn the DOM APIs with all it's drawbacks and bugs, DOM events, standalone browser APIs like Canvas, Audio, etc. Write simple node apps with express and modules whose sources you can read. Start using lightweight libraries like underscore / Backbone - you'll come to understand many of the issues that plague evented architectures and DOM manipulation; then you can approach Angular / React / Ember and actually understand how each one is solving those problems.
6 comments

That sounds like the most boring possible way to learn webdev. Unless they're already a programmer, those things just aren't entertaining for most people. Making sure a beginner stays entertained is probably the most important goal, because people who get bored will give up before realizing their full potential.

So if anyone's reading this and feeling bad that they don't feel like doing that, just dive in and do something fun. The longer you spend learning, the more likely you are to pick up all of those important details anyway.

I'd say there are ways to combine both approaches - develop userscripts. While you can do tricks to use other libraries, simpler userscript development is easiest with just vanilla JS. It's how I got into JS myself - I first fixed up an userscript I was using that no longer worked, and then I used that userscript as a base to start building a more complex thing. Eventually I ended up completely rewriting the thing from scratch (and I did the same for the original userscript I fixed that started it all). I've been actually thinking of giving it another rewrite one of these days, this time opting to build the thing with Browserify...
It's still [one of] the best way to acquire solid knowledge of a language (and then its frameworks). I agree that this might not be the funniest nor the quickest way, though.

But it's not that bad when you have someone behind you, helping you when really needed, and showing you what you can achieve afterwards.

Jumping into JQuery, copy/pasting snippets from google and such won't (well, not often anyway) bring novices very far. Plus, they'll have a hard time learning other frameworks if needed (new job, etc.).

That was just a suggestion for the technical path. Motivation is a different exercise, I agree that the best way to learn is to try and build something you find fun/interesting.
I teach web development and find this statement to be most true. If you cant hold people's attention they wont learn a thing.
Yep. The grandparent is good advice. This, though, is effective advice.
There should be a project euler for web devs. What better way to learn js than to do 1-day (1-hour?) projects with a clear and specific focus on one concept or one browser API?

Example of first week complexity: make a choose-your-own-adventure player from a list of {id="sec01", text:"..", links:[{'Continue':'sec02'}, ]}s.

Second week: Wrap the chrome speech API[1] to produce a "game editor" for the above format.

Third week: make a youtube playlist editor that plays a list of time intervals from youtube videos: [{'tStart':0, 'tStop':451.3, 'url':'utube/URL'}, {..}, {..}, ... ]

It's just "toys," but they're immediately useful. In general I think ''file://localhost'' development of .js is a good place to start because of the immediate feedback---it either works or it doesn't.

@nielmalhotra One thing you can tell ur friend is that everyone is a beginner with the most of the modern APIs. So by reading the docs and trying things out he's already a "research level" web dev ;)

[1] http://www.google.com/intl/en/chrome/demos/speech.html

There are some good learning resources that take the guided approach:

- http://codecombat.com

- http://www.codecademy.com/en/tracks/javascript

- http://nodeschool.io

(I haven't used any of them, but these are the ones that I've heard about)

I just went through a few of the nodeschool.io courses. They're a good starting point, but don't stand alone in my mind. You'll end up supplementing the lesson "hints" with info online, but that's also a good way to familiarize yourself with various packages.

I just wrapped up the one for Hapi.js which was slightly out of date in NPM (the source on Github does seem up-to-date).

Great advice! And I think it applies usually for every language; learn the language itself first, then start digging into frameworks when you have a good understanding.
Definitely good advice.

I'd like to add also that a simpler approach is often the best choice for experts as well. The big complex frameworks simply are not the right tool for many (perhaps even most) projects.

I've never done that because I always used a framework. Sorry, but learning the DOM is just not something I want to do and I'll never do it even though I'm a professional developer. That's why there are people who write this code for me.
Absolutely agree with you, @ricardobeat. Stay away from frameworks and simply go over a Node tutorial and build simple web apps with Express.