Wednesday, August 11, 2010

Kick Ass

Kick Ass: Clever combination of Watchmen and The Professional. Excellent, ironic portrayal of vigilante fascism. Love the controversy and critical response sections on wikipedia. E.g.
Roger Ebert gave the film one out of four stars. He called the film "morally reprehensible", appalled by the violent scenes in which an 11-year-old girl murders dozens of gang members and is then almost beaten to death by an adult man. "When kids in the age range of this movie's home video audience are shooting one another every day in America, that kind of stops being funny."
Does it Robert? Does it really? 'Cause, you know, I was laughing quite a bit through those scenes.

Friday, August 6, 2010

Genetic Algorithms

There is something a little bit creepy about writing genetic algorithms. I'm not quite sure what it is...


// Run selected breeding program
while (stopWatch.Elapsed < _parameters.SimulationExecutionTime)
{
population = Selection(population).ToList();

var children = Breed(population);

Mutate(children);

population.AddRange(children);
}

Wednesday, August 4, 2010

Subversion

I have decided to hide subversive quotes in the software I am working on.

If you find them all, you unlock "The Revolution Complete" achievement.

Food Inc.

One of the best documentaries about the food industry I've seen. A US bias, but most of it applies to Australia (feed lots, GM soy, production houses for broilers, etc.). The annoying organic farmers and family farmers don't dominate.

This doco beats, by a long margin, anything Michael Moore could ever do. Really interesting.

Tuesday, July 27, 2010

iPad

5 reasons not to buy an iPad:
  1. No rich text editing with Safari (no google docs, no blogger, etc.) Huh? Why not? Pathetic.
  2. Apple doesn't allow other music players (I want WinAmp.)
  3. Web-browsing is slow. Don't expect the speeds/convenience of a desktop/laptop
  4. No find text in web-page
  5. Can't delete default apps (who's going to use iPod, iTunes, etc.?)
5 reasons to buy an iPad:
  1. Say goodbye to RSI
  2. There are some great games that use the new UI really well (e.g. Osmos, Labyrinth 2, Train Controller 2). Even old games are great (Civ Rev, Wesnoth)
  3. Reading with GoodReader, iBooks or Kindle is very good. I think I'm transitioning away from physical books.
  4. The device syncs perfectly with your gmail, calendar and contacts.
  5. There are some excellent apps (DropBox, IM+, GoodReader, Table of Elements, Desktop Connect, AirVideo etc.)
I realise that people go on about not having Flash, no camera, no USB, no multi-tasking etc. but none of those things bother me. I'm not even sure I'll bother jailbreaking the iPad. I just don't care.

As it is, I can play games, read, surf the web, instant message, and send email all really well. That's excellent.

As a word, the iPad is "very good." It really is a totally new type of computer. Fix those issues above (all could be done in a single update) and I could do pretty much all I want on it.

Friday, July 2, 2010

Car smash bike

A friend of mine was hit by a car this morning while bike riding. When I talked to them, they didn’t sound like someone who’d been in a traffic accident, they sounded like a victim of a physical assault. Putting contemporary cultural and legal idealisms aside, that’s what someone is doing when they smash you with 1.5-2 tonnes, GBH. The offender often takes on the role of the assailant too; anger, blame, fear of being caught/punished, etc. We might be cultured to believe that this is an accident, but reality always seems to push that aside while it is happening.

I’ve never hit anyone while driving a car, but I know what it’s like to be hit.

First is the terror. The terror are the moments of evaluation; will this kill me, wheel-chair me, brake my bones, or bruise and wound me. It’s not always obvious what the outcome will be once you realise you’re going to be hit. One time I imagined my death, other times I’ve known that this is just going to hurt... a lot... for weeks.

Second is the fall and the roll. Thankfully, this is fairly automatic. You’re still terrified at this point.

Third is the ground. The sweet ground. Not moving. Awaiting. You’re going to be okay. The terror has gone.

Fourth is the pain. When it comes - and it will come - it’s always worse than you first imagine it will be. I don’t know why.

Fifth is the fear. Not wanting to ride on roads again. Avoiding any situation that requires a car driver to act rationally. The worst thing about this state is that it eventually goes away.

(Some people skip steps two and three when they fall unconscious. But they know the terror. Some people skip all of these steps.)

I hope my friend gets better soon. It’s a horrible experience.

Thursday, July 1, 2010

ToolTips and ShowDuration

This took me a while to figure out, so I thought I'd mention it for others searching. If you want to set a global ToolTip show duration in WPF, you can do it for each type of control as a style in the XAML file. E.g.


<Window.Resources>
<Style TargetType="Label">
<Setter Property="ToolTipService.ShowDuration" Value="120000" />
</Style>
</Window.Resources>


This means that for the Window, all the Label ToolTips will remain for two minutes.

If you want good looking ToolTips, go here.