Don’t Just Buy More Hardware

June 12, 2012

Hand me your credit card, you idiot. No, when things start running slowly don’t just blame the hardware. Yes, hardware can affect performance, but if you just did a release, and at the same time you started to see a spike in system resources without a spike in load, the problem is in your software. “But hardware is cheap! We can just buy more hardware!” or the more contemporary, “Cloud instances are cheap! We can just spin up more instances!” You twit.

Let’s go back to the basic fundamentals of business: For a business to succeed, it needs to make more money that it spends. The difference between how much you spend and how much you make is called “profit”. Businesses want to maximize profit. When your idiot little brain decided that a 3 deep nested loop that results in hundreds of SQL queries being issues per HTTP request was a good thing, and then you decided the solution was to spend more money to keep it running, you ate into profits. Why? Because you’re too lazy to learn how to use a RDBMS properly. There’s a manual, read it. There are ways to avoid making hundreds of SQL queries — you wouldn’t believe how many ways! It’s almost like database manufacturers wanted to make sure you didn’t *have* to make hundreds of queries to build up the data set you were trying to get.

Any old fool can write software that works. It’s a deterministic system — give it the proper inputs and it will give you the proper outputs — every time. However, it takes skill to write software that uses the hardware efficiently. Bear in mind that if you decide to stop designing your software so that it’s maintainable and extensible, you’re being a different type of idiot; but if you disregard any and all performance consequences and brutally molest system resources, you’re not just an idiot, but you’re also costing the business money. The good news is that now with cloud deployed applications we can directly correlate how much more money your bone-headed implementation is costing us. Personally, I think we should take it directly out of you paycheck, ’cause after all, “Hardware is cheap”.

Settings

I would like to point out that if we work together today, or have in the past, my opinions may or may not have been influenced by working with you. Most likely they have been, but I have to say that to avoid offending people. You're so vain. I bet you think this site is about you.