Joe Santos
Software engineer
Software engineer

From the beginning of the history, developers have aimed to write the best code they could and make it the most performant they could to reach the “end”.

Programming, like most other craft, is a means to an end, while there is art and craftsmanship in the process, it is almost always tied up to some sort of physical or other constrainsomeid

We no longer have the old times physical constraints but shouldn’t we still pursuit the same objectives? We do have better tools so that shouldn’t be much of a challenge. Or should we just aim to reach the “end” by whatever means? Even if these means will signify a worst overall user experience?

I see every single day developers stating things like “if we have the resources why shouldn’t we use them?”. So, why shouldn’t we? For starters, the more resources you use, the less you have for other applications. If you have 32gb of memory, well, good for you! But maybe if the applications you use were more performant you wouldn’t need tho spend a “zillion” of dollars for that much memory. What about battery usage? What about having machines stable for years to come instead of changing every 2-3 years? What about being able to run a calculator without second degree burns on the legs?


The pain

Here is the breakdown of my applications memory usage while using the developer hat:

If I would add this all up (although I know that is not exactly the way memory management works) it would add to 9gb so not even with a modern computer (which usually comes with 8gb) I would be comfortable and safe to use this stack.
Photoshop and Illustrator are heavy duty software and are expected to take around that much (or even more). Adobe developers could modularize it a bit since I don’t need that much bloat but then maybe that wouldn’t save that much.
Chrome although I think it should do a better job with inactive tabs and save some memory and out of focus data, I bet that Google developers take a close look at memory management and are doing the best they can. They’re also making a good job on V8.
Visual Studio Code, although it is just a text editor on steroids, it is the main application for me as a developer so I’m kind of happy with that. I know it could save some more but we’ll get there.
Slack kind of pisses me! If you compare it with Limechat, it uses at least 7x more and for me, it doesn’t add that much. I’ve eventually found out Slack gateways to IRC and I’m using those in Limechat instead of the main Slack application.

So, why is Slack taking so much in comparison with Limechat and why could Visual Studio Code be better?
Both Slack and Code use Electron which is essentially a Chrome in a window plus Node.js where Limechat uses native technology. At this point, neither Slack nor Code could be considered MVP and as such shouldn’t the companies be stabilising the applications? It seems Microsoft guys are taking that into account (still with Electron though) but Slack keeps adding more stuff instead of making a simple chat application (it isn’t much more than that) that won’t make your computer fans spin off. Still not convinced that Electron is an issue? There, one more article about it.

A funny gif

And don’t get me started about website performance where it is pretty common to encounter a website that almost explodes your computer because it is fancy to have an intro or because it is cool to recreate the browsers scroll.

Would it be that hard to make applications like Slack use way less of your computer without much of an overhead? I don’t think so.


Where do I think we could improve as developers?

I’ll be bashed and boiled after these two statements but…
It is pretty easy to make any Node.js application break your computer.
Javascript isn’t that great!

Funny gif

I’ve built some small applications and tools with Node.js, don’t misunderstand me, I think Node.js is pretty cool but for not more than simple tooling. For the rest, have you ever tried Golang for example? Safe of common syntax errors, compiled, uses 1/10th of the hardware… It can take a bit longer for a developer to build something since you’ll need to set pointers and structs (interfaces in Go) and whatnot but on the long run you’ll need less testing, you’ll be provided with great tooling, it will be more stable, you’ll get rid of annoying errors and your application will be better thought.

Static / strong typing isn’t a demon it is actually quite pleasant to work with. Even the Javascript community is moving in that direction with Typescript and Flow but they just try to beautify the flaws of the turd. A simple compiled Go application has around 6mb, is a single binary file and doesn’t need anything else installed in the system besides common general dependencies like MySQL for example. There are a ton of articles spread on the web comparing Go’s speed, size and server usage so I won’t go in more detail.

Have you ever left the Slack application open through days to find that is memory leaking? I know I did. Same with Atom (when I tried it).

How would you then have HTML on the window for faster prototyping or simply because you don’t like Qt and C like technologies on the front end?

I do understand the question and why it is important. As a front end developer I still want to rely on good old HTML and CSS. Have you checked Mozilla Rust’s Servo? Ok, it is not the best option yet because it needs to grow but… soon! What about a webkit window for the layout while the rest is done on the “main” language? There are a lot of ways to create that webkit window and to connect data to it. It doesn’t need to be Electron or Node.js based.


I understand that technology evolves and to have some things we need to have its cons but where along the way did the developer stop to care about hardware usage? Are we following Apple’s ideas and just bloating the system making our users to buy a new computer? I do understand that in MVP state it is better to build as fast as one is able but after having the idea proven couldn’t we as developers adopt better technologies? Or maybe there isn’t even that much overhead from using it from the start.

In the end, you’ll be providing yourself and your users with better experience, less cost (which maybe will become your profit if nothing else).

Another funny gif

Well… I guess this is just my opinion!


I am eager to discuss this topic further. Ping me at @iamajoe_