All posts by Ramon

The Programmer’s Guide to Choosing a Drink

Photo Credit: www.89thandbroke.com

To celebrate the commencement of Oktoberfest  festivities in Munich this weekend (and because it’s always fun to think about alcohol), we’re bringing you a handy-dandy guide to see how your programming languages match up to your favorite drinks. It’s important to be prepared –  If all the programming languages were to suddenly turn into drinks, we should know what sort of world we’d be getting (besides a very drunk one)!

C – Tequila.  It gets the job done quickly, but using it isn’t usually that great of an experience.  Everybody uses it at some point, but not too many stick with it unless there’s no other choice, or they need it to do its thing fast.  And if you don’t use it exactly right, chances are things are going to go horribly wrong.

Ruby – Scotch.  You can use it for years, and still discover strange new undertones you hadn’t noticed before.  And then you add a dash of water and discover everything is changed.  But it’s easy to ruin the magic if you don’t know what you’re doing.

Python – Irish Whiskey.  When first starting, you have two main options – Bushmills or Jameson?  Python 2 or 3?  But once you choose one and go with it, it’s remarkably smooth.  There’s not a huge amount of subtlety, but it’s pretty easy to get into and use.

Java – Vodka.  It’s everywhere.  It can be used in pretty much any situation, and most people are willing to use it when it’s the most convenient thing on hand.  But excluding a group of really dedicated fans, it’s not generally people’s first choice.  It just doesn’t have the same elegance as some of the alternatives.  But it can be mixed with other things pretty easily, for those who can’t stand using it straight.

Continue reading The Programmer’s Guide to Choosing a Drink

Static Initialization in the BlackBerry JVM

The Problem

I was investigating some odd behavior on the BlackBerry recently to try to diagnose a problem. Along the way, I discovered a bug in BlackBerry’s JVM, as a result of which static initialization can occur multiple times – and even static final variables can change.

Consider the following code:

public class App extends Application
{
	public static void main(String[] args)
	{
		System.out.println(BaseClass.class.getName());
		System.out.println(Subclass.class.getName());
	}
}

public class BaseClass
{
	static
	{
		System.out.println("Static initialization called");
	}
}

public class Subclass extends BaseClass
{

}

Continue reading Static Initialization in the BlackBerry JVM

Economy of the Cloud

Ed Felten at Freedom to Tinker recently posted an article about the economics of cloud computing (partially in response to last week’s New York Times op-ed about the cloud). While I agree with Felten’s main contention – namely, that the cost of resource management is a driving force in the movement towards the cloud – I would argue that there are also much more important factors at play.

Within the last few years, startups and small companies have seen a growing focus on web- or phone-based applications, from which customers expect much higher uptime, performance, and reliability. Even beyond the cost factor, there’s no real reason for a small company to grow their own servers* when alternatives exist with much better guarantees of all three of those expectations. This is particularly true near the start of an application life cycle, when the amount of data required to run effectively is often disproportionate to the size of the actual user base – if a small company were to run their own servers, they would have to endure remarkably low resource utilization. But even with established applications, it makes much more sense from a practical standpoint not to waste CPU cycles during low traffic times of the day or year. So ultimately I see the movement to the cloud as being spawned mostly from four separate factors:

  • The desire for greater reliability
  • The fact that most companies would prefer to focus on their primary objective (e.g. developing software) rather than working on supportive infrastructure Continue reading Economy of the Cloud