Don’t Build Private Clouds

Subbu Allamaraju says “Don’t Build Private Clouds“.  I agree with his rational.

need-for-private-cloud

There are very few enterprises in the planet right now that need to own, operate and automate data centers. Unless you’ve at least 200,000 servers in multiple locations, or you’re in specific technology industries like communications, networking, media delivery, power, etc, you shouldn’t be in the data center and private cloud business. If you’re below this threshold, you should be spending most of your time and effort in getting out of the data center and not on automating and improving your on-premise data center footprint.

His main three points are:

  1. Private cloud makes you procrastinate doings the right things.
  2. Private cloud cost models are misleading.
  3. Don’t underestimate on-premise data center influence on your organization’s culture.

 

Chrome Extension : var_masterpiece – turn PHP var_dump() into a thing of beauty

var_masterpiece

Var Masterpiece is a Google Chrome add-on, which formats PHP var_dump() output into something much more beautiful and useful.  You can customize the type colors and a few other things in the extension options, once installed.

Never judge a programmer by their commit history

In a comment to another post, Andrey sent in a link to this blog post, titled “Never judge a programmer by their commit history”.  It’s very similar to something that I wanted to write for quite some time now.

It’s been a very long time since I judged any programmer based on their commit history and I believe if you think you can judge a programmer’s ability by reading his/her code YOU ARE WRONG.

As technical folk, we are often fast to judge an implementation purely on its technical merits, forgetting, that there are other factors often at play.  Mehdi Khalili, the author of the post, goes over just some of them, including:

  • Abiding by bad coding standards
  • Bad leader and project manager
  • Junior devs
  • Business reality
  • Brain fart
  • Personal issues
  • Synergy or lack thereof
  • Physical issues (which is similar to the Personal issues above)
  • Imposters! (which is funny and, something I didn’t think about)

I’ve seen (and done) almost all of these.  Business reality and junior devs are the two I’ve come across the most.

SmartDraw – The Smartest Way to Draw Anything

It’s not often that I need to draw a diagram or a flowchart these days.  My time is mostly consumed by more technically challenging tasks.  And whenever I do have to produce some form of a chart, I usually fallback on to the Graphviz dot, which allows me to do something in literally seconds.

basic-flowchart

However, I’m pretty sure the day will (or, rather, return) when I’d need a tool to produce eye-pleasing diagrams and flowcharts.  For that day, and for that day only, I’m leaving the link to SmartDraw here.  It’s a commercial offering, but at $15/month for their cloud-hosted web-based application, it’s seems to be quite a bargain.

devices-cloud-buy

Quick way to create a PHP stdClass

Simon Holywell shows how to quickly create the stdClass in PHP and populate it with properties and values, by casting an array to an object:

$x = (object) [
    'a' => 'test',
    'b' => 'test2',
    'c' => 'test3'
];
var_dump($x);

/*
object(stdClass)#1 (3) {
  ["a"]=>
  string(4) "test"
  ["b"]=>
  string(5) "test2"
  ["c"]=>
  string(5) "test3"
}
*/

A couple of things to keep in mind here are:

  1. In PHP, an associative array key have multiple same keys.  If you cast such an associative array to object, the latest key will silently overwrite the value of the previous ones.
  2. The order of properties in the object will not necessarily match the order of keys in the associative array.

Very handy!