
Ask HN: Should I learn Node.js or Python? - brightball
I&#x27;m in the process of developing specs for a system that will be using Go and PostgreSQL its functionality.<p>There is a part of the system that will ideally utilized AWS Lambda and another part that will require some logic within PostgreSQL functions&#x2F;procedures.<p>Lambda AND PostgreSQL functions support both Python and Javascript. In an effort to minimize the long term support burden for anybody else who picks this up at the company, I&#x27;d like to use the same language for both parts.<p>What should I use and why?
======
bnchrch
Having worked with all of the above besides Lambda I think I can offer some
points to help with your decision. It would be nice to know what kind of work
was being done with Lambda but oh well.

Using Python will give you better readability, more battle tested libraries, a
more robust set of tools for data/number processing and (this is the kicker) a
much easier time interoping with Postgres, specifically it's stored functions
and procedures.

Using Node will give you a better paradigm for evented I/0 tasks, be quicker
with basic I/O tasks, more experience with javascript (don't underestimate
this), a larger pool of people who will likely understand this as this is
typically the first if not the second language web developers learn, but as a
downside node comes with a rapidly changing eco system so what you write could
become out of date very fast and the asynchronous nature of it all can make
the logic much harder to follow.

Both are quite popular and enjoy some amazing communities behind them, so
you'll be fine in whatever you choose.

~~~
tefla
I would just caution you that, node/JS has a much greater learning curve when
starting out. However once you have gained knowledge of the different
libraries (i'm thinking Promises, Async, lodash) and asynchronous patterns,
you can write very powerful code in very few lines of code.

Python on the other hand; you will be able to get up and running, and
implement large portions of the functionality that you require in your script,
very quickly. The downside comes when you need to worry about optimisation.
Without a lot of experience, it can be hard to find out how to go about making
Python code fast.

At the end of the day, both are great languages, and have great communities.

~~~
brightball
Thank you. Since performance isn't going to be a huge concern with the spots
that this code is used but learning curve is, I've settled on Python.
Additionally, since the more intensive side of this will be in a database the
math and analytics libraries add some real value.

We're using Go for the rest of the microservices and can always revisit the
Lambda code if performance becomes a real concern. It's going to be so small
that rewriting shouldn't be much of a concern.

