
Ask HN: How to avoid getting sucked in too deep by Node.js? - hermannbjorgvin
Every time I start a new project the easiest way seems to be a node.js backend, and then by default of course I use Javascript on the frontend.<p>How do I avoid falling into this trap and never learning anything new?
======
claytongulick
Pick a different type of project. If you keeping doing projects where node and
js are the best solutions, it will feel unnatural to use something else.

Try embedded systems, or real time audio processing or something interesting
like that.

~~~
hermannbjorgvin
I've tried a bit of C, and recently I started playing around with Rust, so yes
definitely want to do something like real time audio processing with that.

------
ajeet_dhaliwal
Is this a problem? If you are trying to launch a prototype or even a first
version of a product and you want to be as productive as possible use what you
know. I love Node.js (and React for front end) and don’t see how I would
benefit from switching to other frameworks I’ve used in the past. It’s not
like it’s hard to learn something else, as long as you understand the
fundamentals of server/web/client it’s the same stuff done slightly
differently.

~~~
hermannbjorgvin
That's true, it just seems like there might be downsides to only working in
one language. Even though the upsides of Node and React are great.

~~~
wvenable
It's good to know other platforms and languages so you can adequately answer,
for example, whether or not those upsides of Node and React are worth the
downsides. If you have nothing to compare to then what do you base your
opinions on?

But, that being said, there are downsides to trying to _work_ in more than one
language/platform. The main one is that you only have so much brain capacity.
You simply can't be an _expert_ in every platform out there all at the same
time. So if you have a language/platform that you know really well and is
suited to task you're doing then you really aren't doing it wrong.

------
megaman22
Get outside the JavaScript bubble ASAP. Learn some other languages, preferably
ones that are statically typed, and/or at least have sane ecosystems with a
robust standard library.

Do something as a hobby project that's way outside your normal groove. Play
with some 3D graphics with OpenGl or DirectX or Vulkan, or try building a
native app.

------
blunte
This question can be applied to any familiar tools. Usually we're in a hurry
to get something done, so we grab the tools in easy reach which we are most
familiar with.

The counter to this (for me) is the "grass is always greener" desire for _the
perfect tool_ for the job. Maybe it's a personality thing, but that causes
some of us to be broad generalists instead of specialists.

Do you ever find Javascript or Node work tedious? Do you (like me) find
screenfulls of NPM blah blah a turn-off? If so, I'll bet you can find some
alternatives that promise great increases in one of the following: speed of
getting things built, elegance of your code, ease of long-forgotten return and
maintenance, mental strength building, etc. etc.

Try Clojurescript. You'll still have familiar reach to your JS stuff, but your
brain will expand greatly. Or check out Elm. Or go "old school" and see what
Elixir/Phoenix can do for you with Erlang OTP as your back-end. Different
world, but one full of interesting cool "freebies".

Now, if you want $$$$, don't change a thing. JS will probably never die. If
you aren't bored off your ass or annoyed until you want to scream every time
you see ({ and }), then stay with what you know. You'll be a deep expert who
can walk into the right situation and burn a trail to success (and income).

Remember, there are COBOL programmers out there earning HUGE contracting rates
still. Someday future generations will say the same thing about Javascript
programmers.

------
bdcravens
Is it really a trap? What's the value of being different on the backend?
Node.js is a rich ecosystem, and it's not like you're digging a career hole
(at least not at this point in the lifecycle). Once you really settle in,
that's when you can put your energy where it belongs: solving business
problems, not learning a new set of tools.

I say all this not as a Node fanboy; I've spent most of my career in
ColdFusion and Ruby. I get the same doubts when I start something in Ruby
(which is certainly further along in the lifecycle than Node). I'll jump off
into something new and sexy, get a little stuck in the learning, and realize
I'm doing my customer/employer a disservice. I'll go back to Ruby, and find
that I end up with a more elegant, well thought out solution based on my
experience in that space.

For instance: I recently had a hairy problem that I was convinced a fancy
microservice to manage concurrency etc would be necessary to solve. I then
found out that using my existing application, and using the connection_pool
gem already in Sidekiq, gave me a better solution in a fraction of the time
than I was planning on building.

------
spion
Try TypeScript or ReasonML or ScalaJS. They all compile to JS and have dead-
easy FFI so you can still use the ecosystem stuff you're used to, but you
learn something new. In the case of ReasonML and Scala you get to use them
later with different backend ecosystems too.

TS will give you a nice balance between learning new stuff (types) and
sticking to what you know (most JS patterns are supported), whereas ReasonML
and ScalaJS would be a bit more adventurous.

Also try playing with dotnet languages (F# maybe?) via EdgeJS:
[https://github.com/tjanczuk/edge](https://github.com/tjanczuk/edge) (but I
don't know if thats production-stable)

------
stocktech
Figure out what's more important, learning something new or building a
project.

I think there's a point where you're experienced enough for it not to be a
trap. Concepts, patterns, and structures repeat and once you've started to
accumulate enough experience, learning a new language or framework is just
implementing things you've seen elsewhere. Then it becomes a choice of
productivity and what does the project benefit from most.

If you're not there in your career yet, focus on learning something new. I
promise it'll be a level up one way or another. For your project, it might
delay it a little, but it'll help your resume and round you out as a
developer.

------
nurettin
Even after several years, I would not presume to know everything I can do with
a platform. You learn something new every day. Also, a skill one language and
frameworks can translate to experience in other languages and frameworks. The
discipline I got from being a Delphi developer taught me how to handle UI
messages, threads and IPC, which are the exact skills I used in order to write
a native Java application for Android from scratch. So no, nothing is lost.
Just be world-class in your chosen platform and you are an expert in many
others automatically.

------
alexashka
If Javascript satisfies you as a developer, you have nothing to worry about.
I'd look into Typescript because that's the future of the Javascript
ecosystem, other than that, just enjoy the ride :)

------
lossolo
It's only a tool. Look at lumberjack, does he ask how to avoid using chainsaw
? He uses chainsaw when it's convenient for him and he feels it's a right tool
for the job and he uses axe or other tools when he thinks that other tools are
better. Learn about other tools and maybe one of them will be a better fit in
future. If something works for you then it's great, don't just jump on
bandwagon saying that node.js is evil, it's a tool. I use different tools and
languages and I also use node.js where it fits.

------
jcolella
I always say pick the best language for the type of problem that you are
trying to solve. If your problem is heavy IO, than I recommend NodeJS, as
that's the forte. Instead if the problem is a CPU-bound issue, then NodeJS is
not appropriate. Within the NodeJS ecosystem, you can use Typescript, as well
as use webpack to have an optimized build. There is always something to learn.

------
hc91
In your spare time [if you still have the energy and disposition] try to build
small projects using other languages that are in demand on the job market such
as Java, Scala, Kotlin, Go, Python etc. If anything at least you will gain a
better perspective about what are the alternatives and what are be the
strengths and limitations of Node.JS.

------
hermannbjorgvin
I want to thank everyone for a great response to my first post here. This is a
really interesting community for sure!

------
jknoepfler
write your backend in Go. Minimal fuss, no ceremony, easy syntax, far fewer
foot-guns than Node.

I'm not suggesting one language is superior, but Go is fun and interesting, in
addition to being a hot market commodity (also I think it will overtake Node
in the times to come, but that's a pretty silly claim)

------
tmwed
i think you’re fine. if you’re worried about not learning anything new, than i
would suggest learning an entirely new stack. otherwise, i would suggest you
try to create a product and see how easy that is. odds are, you will learn a
lot from that.

------
vortico
>How do I avoid wanting to learn a new framework and actually finish my
project?

------
eikenberry
The main trap to avoid is intermingling of the client code with the server
code. This almost always leads to very tightly coupling of server/client code
with all the pain that brings.

------
antoniuschan99
Your entire backend doesn't need to be all Node

~~~
tkxxx7
This is a good point. It’s often easier to get started with a new language by
writing small parts of an app in it, than by starting an entire project with
it.

------
nicodjimenez
Learn Golang.

