Substitutability of Resources

After the PhpStorm post on WP Tavern this week I’ve decided to give it another try. Over the past 4 years I’ve tried to switch to PhpStorm 8-10 times with no luck and I’m still trying to be objective and give it another try when I have the chance. Despite of its apparent benefits in several areas that could spare a few keystrokes in my shell (where I spend lots of time anyway) I find it non-intuitive and it bothers me way too much.

The main reason is that it’s not Open Source and IDEs are like a micro version of an operating system, so it takes way too much time to get used to it (and it hurts when you’re used to a process and you find no logical reason for the substitution in the new tool, even despite the features introduced there).

However, when I ran the new PhpStorm for the first time, I got the following dump from my process manager:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME COMMAND
12611 nofearinc 20 0 5623m 808m 13m S 359.5 10.3 5:27.43 java

I know that it’s freakingly huge and it could cook dinner etc, but after that tweet a few weeks ago:

I’ve shared my “benchmark” results on Twitter.

Naturally, dedicated PhpStorm fans came to me with some remarks and stuff, which is fine, I switch to “zealot mode” occasionally when it comes to Open Source or remote working etc.

However, Kim joined the convo with another comment that seems pretty typical in the industry and I’d like to outline specifically:

Both tweets above focus on the same aspect – how heavy an IDE is and how we should strive for lighter editors, or IDEs. It makes sense in general since we’re tired of all the tools around us that keep leaching resources out of our devices (I’m particularly freaked out with Android’s VM memory manager on some ROMs) and we’re trying to keep our devices optimized, running fast tools and everything.

One of my favorite comments about my IDE of choice so far – Eclipse – is that it loads for like 5 minutes or more. Yeah, that sounds about right when you have a bunch of large linked projects to be loaded at the time. How many times a week I do close my IDE? Zero to one. I’m not used to closing all my windows and tools since I keep a virtual desktop here with a browser running several open tabs from my local setup + Eclipse loaded, few gedits with notes and a chat or two to read again and catch up on ideas and concepts. Even if I’m taking a break or done for the day, I might need to quickly switch and check something (or get a call and have everything open there in a nanosecond) and it doesn’t bother me since the virtual desktop isn’t active at all times.

If you take a minute and compare your current notebook/desktop or whatever you use with the one you had two, three or four years ago, you’ll probably notice the following:

  1. Your device is approximately two times more powerful (ignoring Moore’s law for a bit)
  2. You complain about the lack of speed and free memory/CPU all the time

If that wasn’t the case, the companies building new hardware would have bankrupted a while ago. Hardware gets better, and software gets fancier and heavier. Also, hardware gets much cheaper.  Few years ago an average notebook was twice the price of a decent desktop computer, rewind a few more years and the price of a computer was comparable to a cheap car. Not to mention the cost of a few MBs of HDD space twenty years ago.

Nowadays various enterprise companies are willing to pay more for hardware as it’s more cost-effective than hiring the best engineers out there squeezing another 20% performance out of the product, refactoring and fine-tuning queries for weeks (or months). General purpose smartphones come with quad-core CPUs, so why bother?

I’m certainly not a fan of code monkeys trying to build serious products and everything related to that (including non-tech users building sites and blaming the technology later), but the reality is pretty vocal about the current situation. PHP’s core doesn’t follow various conventions, but it’s probably the most widespread language out there. WordPress sites are generally heavier than the ones built in plain PHP, yet again WordPress is the largest CMS out there running > 20% of the websites online. Hybrid mobile apps are slower running in a headless browser, but you can use the same code and build the same web app for iPhone, Android, BlackBerry and more without having to learn 2 languages and 3 SDKs (and building three different apps too!)

It’s not necessarily bad (if it was, I was going to work as an assembly language developer for Arduino, spending weeks to make a LED blink (figuratively speaking). And I would still vote for fast, effective, tested and secure solutions when it comes to the national security, software for airplanes or automobile’s embedded computers (and break engines). But in general businesses assess the tradeoffs of a given case or approach, evaluating the amount of time and resources and the costs, compared to the end product. Slower code or heavier apps take precedence most of the times. Why? Because people are fine upgrading their tech gadgets all the time, handling the heavier apps being built in a shorter time frame and saving you more time.

Especially when it comes to your own job and spending as much as needed to get the best thing available. Or, as Rarst concluded during the IDE performance Twitter discussion:

One thought on “Substitutability of Resources

Your thoughts?