Friday, 4 December 2009

Hooking into the windows message loop

Ive just been trying to figure out a way to hook into the windows message loop of a WinForm.

protected override void WndProc(ref Message m)
Trace.WriteLine(m.Msg.ToString() + “: “ + m.ToString());

base.WndProc(ref m);

In an attempt to fix a form that hangs when you lock the computer. Haven't fixed the form yet but the message loop helps.

Update: In the end it was controls being created on a background thread which lead to the hang.

Sunday, 8 November 2009

Predictably Irrational

Haven't posted for ages. I have been reading a book "Predictably Irrational" by Dan Ariely about behavioral economics. Fascinating stuff in it, like how first impressions count on our later choices. A good read so far, I recommend it if you have the time.

Sunday, 16 August 2009

Improvments to Paint .Net 3.5 startup speed

It starts up much faster now, well done to Rick Brewster and anyone else who worked on this version.

If they could speed it up even faster it would be just fantastic.

Friday, 14 August 2009

Anybody else noticed

how stack overflows ratings system is busted?

I've kind of lost interest in it now. My stack does not overfloweth anymore.

Saturday, 27 June 2009


I was just having a shower and thinking of how Melbourne is growing and I think I came up with a new word. Huburb to describe a major hub suburb.  The ones where all the trains and trams meet and there are cinemas and shopping centres. 

I was thinking of Camberwell and Box Hill when it came to me. The “huburbs” that have failed to materialize from Steve Brack’s Melbourne 2030.

So that’s my new word. I’ll think I’ll send the word to Justin Madden the current planning minister for Victoria.

Tuesday, 26 May 2009

Silverlight Rule 1

Discovered a Silverlight issue today in Visual Studio 2008.

When you add a user defined control to a control the parsing can stuff up. If the 1st control has event handlers that are not defined or parse incorrectly then you get into a state that is hard to recover from. I ended up with many AG_E_UNKNOWN_ERROR and AG_E_BAD_TYPE errors.

This leads to Silverlight rule no 1.

"Don't put event handlers into your Xaml."

Until the parser gets better, either VS2010, Silverlight 3 or a patch this seems to be the way.

Saturday, 23 May 2009

USB Flash memory

Been having horrible trouble with a 16GB USB Flash stick today. Couldn’t copy a 9GB file to it.  Never found an answer.  In the end I destroyed it by using convert.exe /FS:NTFS. rats


I fixed my flash disk. In the end I booted from a windows XP DVD into a recovery mode. Then I used the FixMBR command. Oh boy.

Tuesday, 31 March 2009

First post with Windows Live Writer

I ran into windows Live Writer today.  The story goes at work we have merged with another company, usually we use Skype but the new company won’t use Skype so the two groups are using MSN for the time being.  Installing MSN Messenger also has a few extra tick boxes and one of them i windows Live Writer.  Its a simple enough WYSIWIG editor.

A Test Table  

With a few tricks like tables.

Technorati Tags:

And maps

Map picture


And video

In general it seems an improvement over the standard blogger editor.

We shall see

Wednesday, 18 March 2009

Android on a Eee PC

Heaps of people must have seen this recent development, putting Google's Android onto an Asus Eee PC.

A few guys have already done it successfully to their own Eee

and most importantly its going into production with Asus. Is this the beginning of a new era in desktop OS's? Is it the thin end of the wedge? Who knows. Linux is now getting supported by a major player, but I wonder if Googles corporate instincts can match with Linux's Open Source ethos. Only time will tell, still I'm tempted to try android now.

Tuesday, 17 March 2009

Back from holidays

I haven't blogged for a while, I've just got back from holidays.

I have been reading HR Ekbias Artificial Dreams.

Its been a thought provoking book. Pointing out the problems with old Boolean AI, and also the lower end approaches like subsumption architecture and neural nets. A very good survey of AI over the years, as good as Daniel Creviers AI from '93.

Edit 2010.

You know I should add one of the things I got out of this book was the concept of a free ride. For any data structure, pattern matching method or AI technique to be successful out of specific boundaries it is clearly going to need a structure that will give it a "free ride" so it can generalize.

Monday, 5 January 2009

Linux ad comp

I found this link today about a competition to create a Linux ad to counter the "I'm a Mac. I'm a PC" ads.

The most interesting thing i read was in the comments. A lot of people were out bagging Linux as too hard to use. One person even said the Mac was the best desktop experience these days. I find it sad that Apple can take a base like BSD and create a better experience for users in a few years (about 8 I'd guess), when Linux has been banging away at it for 20.

I reckon this stems from a cultural problem at Linux headquarters. Some of this has been pointed out indirectly by Miguel De Icaza before. A pity as I want Open Source to work and I'd love to have a really good Open Source alternative to windows.

Wouldn't it be nice if there was only one or two flavours of linux instead of 85 or so.

This distribution chart shows it well.