menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Node.js

A Spectrum community for Node.js ✨🐢🚀✨

Channels
Team

How do you all get better at using Node?

June 25, 2018 at 1:13am

How do you all get better at using Node?

June 25, 2018 at 1:13am
I'm a pretty new developer, having taught myself full-stack JS over the past year and recently started my first job (in Rails). I'm curious how you all actually get better at using Node though.
The obvious answer is to build things, but I find when I build full-stack apps that I just spin up an Express app or recycle the same back-end code. I've tried building small games, like tic-tac-toe, but I get very overwhelmed when I turn to the docs with a question.
How do you actually wrap your head around Node, understand it's features/capabilities, and practice those?
P.S., anyone receive any more information about that Node mentorship program?

June 25, 2018 at 1:42am
I feel like streaming is a key benefit that node does well. So I recommend https://github.com/workshopper/stream-adventure and then implement some proxying with https://github.com/request/request/blob/master/README.md#streaming
like-fill
3
I think you’re probably making a mistake that I (and many people) make when first starting out, which is conflating language and framework.
Rails is a good example since you mentioned you just started using it. I started using Rails about twelve years ago, and it was the first time I’d ever used a framework. Prior to that most of my programming was in PHP without a framework. I was so green that I’m not even sure if I understood that Ruby was a language unto itself and not just part of Rails. Learning Ruby and Rails at the same time meant I had absolutely no idea where the lines were between them. It wasn’t all bad—I was able to create things almost immediately—but it did mean that I got better at both more slowly than if I’d spent time on one at a time.
So to frame this for your situation, if you’re a pretty new programmer and building a full-stack web application in Node.js you’re actually learning four things at once: web development, a framework (Express), a language (JavaScript), and an implementation of JavaScript (Node.js). That’s no way to live. 😂
It sounds like you may have figured this out, but if you’re _just_ trying to learn Node.js, then cut out web development and the framework. The more you learn about JavaScript, the easier you’ll find Node.js. Although admittedly it can be difficult to get really good at JavaScript in isolation. Perhaps try some JavaScript koans?
If you already feel pretty comfortable with JavaScript and are just looking to get into Node.js, then I think the best way to learn is by building command-line tools. Working with JavaScript in the shell will require you to get comfortable with the Node.js APIs that don’t exist in browser JavaScript (reading/writing files, executing shell commands, etc). When you get stuck and can’t figure something out, start reading the code of other Node.js packages. See how other people do similar things, understand it, and emulate it.
Regarding the Node.js docs, it’s important that you understand that the reason you get overwhelmed and confused by the docs is because they are _terrible_. It has nothing to do with you, you are just fine. If I was being ungenerous I would say that the docs are poor because the people who wrote them hadn’t communicated with other human beings in awhile, but if I was being more realistic and/or generous, I would say that the more deeply you understand something, often the worse you are at explaining that thing simply and in a way less experienced people will be able to understand. Which presents an excellent opportunity for you!
You and I complaining about the docs achieves absolutely nothing, but they’re open-source, so you could actually do something about that if you feel so-inclined. And improving documentation is an exceptional way to learn things. The act of explaining something really forces you to understand it. And because you’re new to Node.js you’re at an extreme advantage when it comes to explaining things in a way other beginners might understand. Even if you don’t totally understand it, when you open a PR to improve the documentation, you’ll get feedback which will improve your understanding. Virtually no open-source maintainer is going to reject improvements to their documentation.
I hope that helps!
like-fill
6
The Node/Web ecosystem is so large there's not a single path to learn. There's a ton to learn any any area of programming. see https://codeburst.io/the-2018-web-developer-roadmap-826b1b806e8d
Implement, then go back and understand. npm makes building stuff easy. As you build something in node, and use npm modules you can implement apps without understanding everything. e.g. implement redis, add socket.io, or add some middleware to express. But once you implement it, go back and figure out how it works. Implement some express middleware, then go back and learn how middleware works, then write your own. Similar to something like webpack. You don't have to fully understand it to use it. get it running, then go back and understand it by adding a plugin or two. Learning the details later gives you context to help you understand it better.
Because web dev is so wide, I don't find a single document/training/class as useful as targeted google searching. When i have a problem or feature I want to implement, I generally google it and read relevant blog posts about it.
When you are learning, publish your incomplete code to github. The web community is great about helping but it's hard because a lot of problems are context specific. Making your code available on github, or simplified examples and posting a question on stackoverflow or communities like spectrum is also a good way to get help with some confusion say on a tic-tac-toe exercise where the docs are unclear.
like-fill
3

June 25, 2018 at 10:13pm
Two comprehensive answers above! I'd add that it is easy to build something, but to build it well is a different story.
Implementing testing on projects really helped me for two reasons:
1) because you start thinking about your implementations edge cases and
2) That forces you to think more deeply about how your implementations are structured - making you a better architect.
like-fill
4

June 30, 2018 at 1:25am
"you’re actually learning four things at once" <- this
Well, I keep a node repl handy at all times actually... REPL's are this amazing tool I never stopped using once I discovered them. My first was probably the browser console? But yeah, Node is JS, getting good at one helps the other.
About the docs... I must be used to reading terrible documentation. A few tips:
- Use Dash for Mac, or Zeal for Linux to download offline docs and keep them handy. Dash is free but annoys you.
- Abuse search (cmd+f, ctrl+f) to find what you want in the docs, read a little bit, check out what the API is, the arguments, and try some more stuff.
- Reading open source project's source code is an AMAZING way to learn. Plus it gets you used to reading code what is even better.
- Have a debugger handy? Make your editor an awesome place to work?
- Most important: don't give up.
like-fill
4

March 21, 2021 at 9:11pm
Hi everyone! May I join to your conversation? You know, I can't be alone anymore, so I hope that someone will leave here the best dating platform
Edited