Dan Cooper

 

Because it took me between 10 and 15 minutes to find this information out, I’m going to post here to remind myself.

The code is 0060.

I went through the codes on this pdf: [download.microsoft.com]

 

I just coded a little application and very often I was having to check to see if the object was null before attempting to access one of its properties.  If it was null, I would use an arbitrary default value.  This ultimately was to prevent the dreaded NullReferenceException.

string output;
if (myObj == null) {
    output = "Unknown";
}
else {
    output = myObj.Name;
}

This bit of code was repeated over and over again making my method very long. Bad. And it looked very messy so I made a little helper method:

public static TReturn GetValueOrDefault<TReturn>(object obj, TReturn defaultValue, Func<TReturn> expression) {
    return obj == null ? defaultValue : expression();
}

This also uses the lovely TReturn so you it can handle any type.

Using this helper method is very simple:

return GetValueOrDefault(myObj, "Unknown", () => myObj.Name);
 

I used My First Tweet to look up my first tweet! It now seems rather stupid that I would tweet, “signing up to twitter” having just signed up to twitter. Forever a joke.

signing up to twitter :D
@soniiic
Dan Cooper
 

Every so often I get this bit of text that says “K2.HTML.Lockup.Updated” below the apps in the app store.  Anyone know what it means?

Sometimes it says "K2.HTML.Lockup.Updated" and sometimes it says "K2.HTML.Lockup.Upd..."

I tweeted about it and didn’t get any tweets back but I got a lot of hits on this website when that phrase came up in my twitter feed. Looks like many other people are getting it to.

iOS App store parsing error :) K2.HTML.LOCKUP.UPDATED http://t.co/NSUW5TU4
@soniiic
Dan Cooper

I’m guessing it’s a parsing error and it’s what Apple use to display that particular app’s last updated date.

 

This is the most incredible thing on the internet today is a visual demonstration of the GLOW wrapper for WebGL.  It renders all sorts of animated animals in real time using lots of vector pyramids flowing through a sphere.

It looks great and runs so quickly.  When you visit the site remember you can click the animation to morph between 9 or so animals and move your mouse to change your view of the sphere.

Displayed using lots of little vector pyramids in 3D in real time

On the GLOW website there is the animation in WebGL and the tutorial showing what techniques were used to make it.

© 2011 athe.la blog Suffusion theme by Sayontan Sinha