^


[rant] #javascript #python
June 28, 2024, 10:07 p.m.

You Have A Favorite Language. But Should You Use It?

Shouldn't JavaScript stick to things like simple page utility? And Python?... only data science. Next...

As you're growin your dev journey...

You start learning multiple languages. Some you can do well, others okay and others... kill it! A lot of times, especially for self-taught developers, the first language you are exposed to is typically JavaScript or Python. And even though you delve into other languages and even become proficient in those languages, you always tend to excel in the one you learned first. The language you started solving problems with and came up with different approaches with. The place you feel most comfortable.

This isn't a bad thing.

In fact, as the saying goes, you should be a "Jack Of All Trades, Master Of One." But if I am okay at carpentry, able handle basic house needs for plumbing but I am a master at drywall and painting, I don't use the same tools... right?? I mean there is some overlap, you know for-loops, assigning variables, figuring out patterns but the same code written in JavaScript vs Golang will be significantly different when it counts on the processing of data between client-server and server-server.

I am not an expert, just making an observation.

Iterating fast in JavaScript and feeling "more comfortable" with it because you use it on your frontend and when you started learning, does not make it the best or even a good choice for the backend. Now V8 is a very well made piece of technology. Exceptional devs have optimized it death. Consider an average Go developer. He can write the same API that your Express app has, no node_modules, no connecting libraries. Just a compiled binary dropped on an Alpine server, ready to kill it. Which one is faster, you think? Depends on the API??? Maybe. But I would be willing to bet, in most cases, the Go server will nearly be set-it and forget-it a lot longer than the Express one.

I am guilty of this too.

My first language wasn't JavaScript, it was Python. To this day my first instinct is to say, "Well, I can scaffold this in Django really fast and have custom login/logout/auth handled today!" And maybe that's fine for prototyping or just trying out an idea real fast but long-term, maybe not. Same issue when handling most of my problems, my brain jumps straight to building it with Python instead of other things. But I am trying to do better. In fact, using JavaScript on my most recent project has been an enjoyable experience, although, I think I like the Django ORM a little better than Prisma so far.

This isn't to call-out devs, but...

It is more of an encouragement to jump out and try other languages for different things. There seems to be a large amount of devs whose opinion is that their language they are most comfortable with is always the "be-all-end-all" solution and it really makes me think that either they refuse to try other languages or have lived in that language so much for so long that they have tunnel vision and can't see the benefits of using other languages out of the "ecosystem of convenience" they are used to.

At the end of the day.

Just get your products built, running and ready-to-go. But don't forget to be open minded to solutions you normally wouldn't be simply due to convenience or lack of understanding from knowledge-gaps. In fact, I was given the option to change from Django to Express very recently and it is great! And takes me out of the box that I am personally in for my "go-to" choices in technology. I hope the best for anyone who reads this.

Thanks,

-jdev