Login
Theme: Light Dark

How do I become better at JavaScript?

Tagged:

Home - Quora Link

Dunno. I hate Javascript. I have to be able to work effectively with it, but aside from that, I put no more time and effort into getting to know Javascript at a deeper level.

There’s this book people who like Javascript put out, Javascript: The Good Parts, by Douglas Crockford, that attempts to squeeze out the decent parts of the language and teach you those, so you’re not stuck in the weeds all the time, but I’ve never read it.

I tend to solve problems in Javascript the same way I’d solve those problems in Ruby. Go copy something that’s already working. If I don’t have anything like that then try to do it without introducing any dependencies. If I can’t do that then it’s a matter for team discussion, once a direction is obtained then usually it’s smooth sailing from there.

If you really want to get better at Javascript then you need to go build things with it. I once built a weather applet in Javascript. It wasn’t pretty, but I understood the language a little better when I was done. I still hate working with it and I don’t think much will change that.

In my personal projects I’ve shifted to using Hyperloop, which allows for isomorphic Ruby on client and server. Javascript pain has reached the point where I’m willing to introduce and deal with the pain of a translation layer over actually working in Javascript. I still deal with it at work, but leaning on the team makes it way easier to stomach.

The one thing I do remember when I was dealing with a lot of JS was to work incrementally and use the console a lot. I’ll set intermediate values to variables defined on window and inspect them in the console. If you can’t understand something, make it simpler first. These are the sorts of things that can’t be shown in a Quora answer, but I could if I were sitting down with you solving issues with you.