Go vs Node
I’m not a programmer. Never tried to pass myself off as one — which made for a really, really awkward interview once… but that’s another story.
Anyway, I’ve been creating “APIs” in Perl for a while using Perl CGI on NGINX. It’s not a REST API whatsoever, but I enjoy scripting in Perl and (1) got the job done, (2) was fast, and (3) no learning curve.
As I’m moving towards furnishing data with information from an API, it became apparent that I should probably make a real REST API. So then the question became… Node.js or Go? (Or for that matter something else)…
So, I looked hard at Node.js since it’s been around for a long time and also is used by many people and projects that I know. I also looked hard at Go and was really impressed with the speed and ability to compile the source to an executable. Go, like Node.js, is also used by many projects and people that I know.
Since I didn’t know either language/platform, I figured the learning curve would be the same.
What I didn’t like about Go was the ridiculous size of the executable. For example, a simple Hello World app with 5 lines compiled to a horrendous 2MB. Granted in today’s world, 2MB is nothing of interest, but still seems ridiculous to me.
So with that, I actually started thinking that maybe C was the way to go; especially since the most common software I use is written in C…
But then that’s where the whole “not a programmer” thing comes back to… To do the types of tasks I need done in C, I’d have to spend a considerable amount of time learning how to be a programmer; whereas with something like Go, I can grab a package and just “use” it (which explains the trade-off with the compilation size).
Anyway… I don’t think there’s a wrong answer here. I’ve started with Go and will update things on Github as life progresses…