Tuesday, February 23, 2010

Orion in Late Winter

Orion is in descent now so I took a few shots before he bails completely. I took this with my EOS 400D using the standard kit 18-55 mm lens fully zoomed out with a roughly 2 min exposure time. Even with some Gimp editing the light pollution is evident, damn sodium street lights. The Orion Nebula comes through as slightly purple in the full size image which is nice.

I should probably take a shot without my house and tree in the frame but I like the composition.

Wednesday, February 3, 2010

Is Steve Jobs Slowing Down?

The iPad seems like such a crappy lazy device it struck me that, as Steve involves himself with every detail of every device, it follows that each new device is a reflection of his energy and involvement. By that measure poor Steve is slowing down or losing his touch.

Its an unpopular viewpoint to express on sites like Digg and Reddit, but given that he sat out the 2nd half of the iPad unveiling event its no secret that he's not 100%.

Get well soon Steve!

C#: Padding an Integer with Leading Zeroes

I find this method useful sometimes when displaying time of day, receipt codes or other numerical data. It takes an integer and a width and returns a zero-padded string representation of the integer. It's a simple method yeah but I've seem implementations on the web where people assemble a string using a while loop with a StringBuilder, and sometimes just using the + operator, disgusting.

Example: To get "00053" from the integer 53, call PadIntToStr(53, 5)

public static string PadIntToStr(int i, int maxWidth)
            bool ltz = i < 0;
            int diffLen = maxWidth - i.ToString().Length;
            string pole = string.Empty;

            if (diffLen <= 0)
                return i.ToString();

            if (ltz)
                i = Math.Abs(i);
                pole = "-";

            return string.Format("{0}{1}{2}", pole, new string('0', diffLen), i);


Tuesday, February 2, 2010

Dubai's World Island Sinking?

The Dubai World Island archipelago is sinking, according to NASA. Needless to say there are many financial institutions and economy commentators that deny this, possibly fearing a further massive devaluing of their island property assets.

I've cropped the NASA photo and overlaid it against a photo from the end of 2007. It's obvious that a lot of erosion is taking place there. Notice that the two island clusters off the west of North and South America have disappeared and island chain that makes up Alaska and the northern coast of Canada has merged into one long island. All this in less than 3 years!
Enjoy it while is lasts guys.