:: Turning gold to chrome

May 27, 2009

Try as I might to avoid any front-end code (though WPF or Windows Forms are less horrible by far than traditional web interfaces), I just know it will catch up with me. This snippet is something I really could have used last year when I was working with a WPF application.

#region $PROPNAME$ Property

public $PROPTYPE$ $PROPNAME$
{
    get { return ($PROPTYPE$) GetValue($PROPNAME$Property); }
    set { SetValue($PROPNAME$Property,value); }
}

public static readonly DependencyProperty $PROPNAME$Property = DependencyProperty.Register("$PROPNAME$", typeof($PROPTYPE$), typeof($DECLARING_TYPE$), new PropertyMetadata($DEF_VALUE$, On$PROPNAME$Changed));

private static void On$PROPNAME$Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
    $DECLARING_TYPE$ $DECLARING_TYPE_var$ = d as $DECLARING_TYPE$;
    $END$
}

#endregion

[via Roy Osherove]

 

On a side-note, while trying to work out how to best format the snippet to look halfway good on a blog, I found this very useful site that does just that. With just a small adjustment to get wrapping to work in all browsers, it is good to go and simple to use.

May 25, 2009

According to what might or might not have been a rumour circulating back in February, Last.fm handed over listening data to the RIAA. (Now, I assume that we can all imagine why the RIAA would be interested in obtaining data concerning albums that have yet to be published.)

I didn’t think much of it at the time. Last.fm of course denied the whole thing and as always with these kinds of accusations it was kind of hard to know who was telling the truth. Yesterday, I received a link from a friend to a new article which now claims to know a bit more about what actually happened.

I suggest you read the two original articles if you haven’t already and make up your own mind.

I’ve been using Last.fm since 2005 and I’ve always rather liked the service. But if the article has the truth of it, I don’t know if I feel comfortable staying. Not that I have anything to hide, but hey, who wants a company who is giving out personal data to others? It’s the principle of the thing..

Two alternatives were mentioned in the comment threads, JamWee which is still on beta with invites scheduled to be send out sometime in June and Libre.fm which is still in alpha but can import your entire Last.fm history and promises to focus on privacy.

I’ve signed up for JamWee and will give it a try as soon as they launch. Libre.fm also looks interesting, so I’ll probably give that a try as well. Not that I’ve decided to abandon Last.fm (yet) but maybe it’s time to have a look around what other options there are out there.

I’ll let you know what I think of both JamWee and Libre.fm as soon as I’ve gotten around to testing them!

May 15, 2009

An animation that attempts to illustrate the concepts presented in chapter one of the book “Imagining the Tenth Dimension” by Rob Bryanton. Fascinating, if brain-twisting.

 

I wonder if I dare to try and read the book. I am tempted but my brain might just overheat and explode.

May 6, 2009

The USA is one of two only countries not to ratify the Convention on the Rights of the Child, which among other commitments to protecting persons under the age of 18, forbids life sentences without parole. The other country is Somalia.

 

The numbers

  • 2,225: Inmates serving life without parole for crimes committed as minors
  • 42: States that allow life without parole for minors
  • 14: States that have no minimum age for life sentences
  • 73: Documented cases of minors serving life without parole for crimes committed as 13-, 14-year-olds
  • 44: States that passed laws between 1992 and 1997 making it easier try minors as adults

According to a Human Rights Watch publication from 2008,

..the United States is alone in the world in applying this harsh sentence to juveniles, that an estimated 59 percent of youth who receive the sentence had no prior adjudications or convictions, and that there are currently nearly 2,500 offenders who are serving life without parole for crimes committed while they were a juvenile. Additionally, data reveal that there are stark racial disparities in the imposition of the sentence, with black youth serving life without parole at a per capita rate that is 10 times the rate of white youth.

Of course, then there is Guantanamo:

The detainees were brought to Guantanamo between the ages of 15 and 17, and have now been in detention there for more than six years. [hrw]

Each of these five individuals has been held in US custody for over six years, but has been denied basic juvenile justice protections or special consideration because of their potential status as former child soldiers. [hrw]

 

Makes you think.

 

[Articles: Colorlines, Spiegel, Human Rights Watch 1 2 3, msnbc, cnn]

May 3, 2009

For someone who appreciates design consisting of clean lines and a rather limited number of colours, living with two cats can provide quite a challenge. Not that the cats themselves are an issue, on the contrary they are most aesthetically pleasing – but the typical cat furniture is considerably less so.

Looking at the cat products displayed in your average pet store (be it bowls, scratching posts or beds) one would be excused to think that cat owners in general have the taste of a colour-blind four-year-old on ecstacy.

Paw prints seem to dominate this season (and have, all seasons past), but as if that was not bad enough we also have to cope with a colour scheme that would put the average circus clown to shame.

Let me show you what exactly we are talking about here..



Hang on – I just threw up a little in my mouth.

There.

Where was I?

Right – the hideousness.

So what is the solution? Actually there are a couple of brands out there who specialize in stylish and sometimes even gorgeous cat products. The only tiny little hook is (as usual) the pricetag.
Rondo Stand
starting at $778

Rondo Wall
starting at $557

Cat Clouds

$120


$285

I mean seriously – yes, it’s pretty and yes, my cats would love it, but I’m not going to pay more for a cat bed than my monthly expenses for groceries. Nor am I going to buy a set of bowls for the equivilant of a three months ticket for public transportation in Stockholm.

Of course, with a bit of creative thinking there is a lot you can do on your own. I’m in the process of moving to another apartment which gives me the perfect opportunity for a fresh start. One of the things I have planned is to create some hanging cat lounges under the ceiling.


Cost? $14.

Along with some white chains and a nice cushion it should do the trick. Simple, cheap, and I’m quite sure the cats will love it.

On the other hand, maybe I’m just thinking about this the wrong way. Obviously I should just forget all about being a programmer and concentrate instead on producing and selling designer cat products. Apart from the obvious advantage like the company five-finger-discount, I will be able to charge all desparate cat owners ridiculous amounts of money and then be able to afford the above listed items.


For those of you who don’t want to wait for my exclusive line of items and want to start shopping right now, here a list of links to design websites you might be interested in.

Shops
http://www.mycatsheaven.com
http://www.pet-interiors.de
http://www.vurv.ca
http://www.hepperhome.com
http://www.moderncatdesigns.com
http://www.trendypet.com

Blogs
http://www.coolpetproducts.com
http://www.moderncat.net