Installing OpenSceneGraph on Ubuntu

If you use the Synaptic Package Manager in Ubuntu 9.04 to install OpenSceneGraph, by default it will install version 2.4.x. However if you want to install OpenSceneGraph 2.8.1 then you need to do the following in a terminal:

  1. Modify the file /etc/apt/sources.list (make sure you run it via sudo something like: sudo gedit /etc/apt/sources.list)
  2. Add the following two lines in the end and save the file:
    1. deb ./
    2. deb-src ./ 
  3. Run in the terminal: sudo apt-get update
  4. And finally run: sudo apt-get install openscenegraph

Major Network Attack

Wow! Looks like a lot of bots suddenly woke up – major attack in progress.


Grrr … b**tards!

Image detection – how, what, where – any insights?

I don’t have much experience with image detection in a video, and wanted to understand what options are possible – all I know it is not as simple as “CSI” makes it out to be – yet. Smile

Here is the scenario:

Say I have a remote controlled aircraft (a mini helicopter) which among other things has a camera fitted which is filming over a certain area. I use a training set and somehow “train” the camera to look for certain objects and recognise data points of that object and learn it to recognize that object (for example a human in Pink). Now once this is trained, if the helicopter is over another area and recording I want it to be able to recognise these pre-trained images in that video feed and do something if something is found (e.g. a human in pink).

The closest “CSI” analogy I can think of is – the facial recognition which they show to be iterating through hundreds of photos comparing data points (which of course as we all know this is mostly fiction – but that is a discussion point for another day).

So the question:

What does it take to compare objects in video feeds? I am not really interested in knowing how to “train” and find a pink human – but rather how to reliably and possibly quickly (within reason of course) compare and see if two are the same of the pattern. This should also reduce the false positives – e.g. a pink table might look like a human in pink with the environmental factors (shadows, sunlight, rain, angle of camera, etc.). I have read a little online but don’t have any experience in the subject.

Has anyone done this (or something similar) in the past or have any pointers for me? Smile

Creating an Event Source via a Reg File

If you ever tried to write to the event log, without an event source for that application created you will get an exception saying something along the lines of that you do not have permissions to create the event source.

If an event source does not exist, it is automatically created. The creation of the event source is a privileged operation and requires elevated privileges (a.k.a admin privileges) which of course might not always be possible if running a web application.

The easiest way to create this event source is via a reg file. An example is below (credit goes to my colleague Dominic to provide me the original sample).

Note: you need all the lines below including the “Windows Registry Editor Version 5.00”.

Windows Registry Editor Version 5.00








Upgrading Enterprise Edition to Ultimate (Vista or Win7)

If you are ever in a situation where you want to upgrade say from Vista Enterprise edition to Win 7 Ultimate edition – by default you cannot do this. When you insert your Win7 disc you won’t find the upgrade option available and the only way you see forward is to do a complete fresh install (after backing up your data of course). However, that is very time consuming and of course generally a lot of pain.

So here is a tip to get you to upgrade without doing a complete fresh install where you “fool” the installer in thinking you have a different version to allow you to upgrade.

You need to do the following steps, before inserting the Windows DVD

  1. Go to, Start, Run: and type: regedit.exe
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
  3. Change the key: ProductName from "Windows 7  Enterprise” to “Windows 7 Business” or to “Windows 7 Ultimate”
  4. Change the key: EditionID from "Enterprise" to “Business” or to “Ultimate”
  5. Do not restart!
  6. Now insert Windows DVD and start upgrading (the option Upgrade will not be graded out anymore)

Of course you will need the appropriate licences and still need to activate, etc.

RAID Blues

On my machine running all the VM’s at home – one disk has failed. I have not replaced it, instead marked it as OK and am rebuilding the volume now. Second time this has happened – if it happens once more then maybe it is time to actually replace the physical disc.

*Sigh* I hate disc failures.


foldl' better than foldl

In Haskell the foldl' function defined in the module Data.List is better than foldl because that does not use a thunk. A thunked expression requires an internal stack. As an expression can grow infinitely large, the runtime imposes a limit on the size of this stack. As the simple example below shows that given a large enough input the stack will overflow.

Prelude> foldr (+) 0 [1..100]
Prelude> foldl (+) 0 [1..100]
Prelude> foldl (+) 0 [1..1000]
Prelude> foldl (+) 0 [1..10000]
Prelude> foldl (+) 0 [1..100000]
Prelude> foldl (+) 0 [1..1000000]
*** Exception: stack overflow

On the other hand, foldl' while similar to foldl does not build up on thunks and in real world programs is probably more useful.

Prelude> :module +Data.List
Prelude Data.List> foldl' (+) 0 [1..1000000]
Prelude Data.List> foldl' (+) 0 [1..1000000]
Prelude Data.List> foldl' (+) 0 [1..10000000]

Vista Tip – launching apps as admin

This is probably not new, but I was not aware of it until recently. To launch an application as an administrator you press CTRL + SHIFT + ENTER when using the Search box – instead of just Enter. Pretty cool if you are a keyb guy/gal.

MIT’s Wearable 6th Sense

MIT’s Media Lab has a prototype of a wearable 6th sense – pretty damn cool – initially seems to get you thinking “what is the point?”; but sit it out and it will all make sense! Of course the whole “6th sense” is glamorizing it a bit, it is more JIT info.

I wonder what happens if your phone is not in a 3G/HSDPA coverage and what the battery drain on the phone is with the data connection always on and how big is your phone bill (most people don’t have unlimited data options on their mobile).

That Cern think explained

I guess since we are all alive, it will be good to understand what that Cern thing really is (pdf). Smile

Problems causing Win 7 to shutdown slowly

I am having issues with Win 7 – keeps hanging (will post that another time); but I like the irony of things causing this (see screen show below).


BTW, if you can get to the Performance Information and Tools via Control Panel => All Control Panel Items =>Performance Information and Tools => Advanced Tools.

Code is King! Role of a Software Architect

I was looking for something else and stumbled upon this post from Joe where he lists the qualities that makes up a “good architect” (despite the feelings that have been expressed to me in the past). I have to agree with him and am quite pleased to see that a “typical” Avanade architect would fit the bill. Smile

  • Inspire and empower people to do their best work.
  • Oversight, but not dictatorship.
  • Taste is a hard thing to measure, but is invaluable.
  • Write code and get your hands dirty.
  • The power of the dyad: know your weaknesses.
  • It's for the customer, not you.
  • Admit when you're wrong, fall on your sword, and then fix it.

EC2 for Windows now available

Amazon’s EC2 is now available for Windows – squeaking in just before PDC was to kick off. This is quite exciting as it allows you to scale out and try something at a very low cost on Windows.

If you want to manage your EC2 environment, you can use the Firefox add-in called Elasticfox; there is also a C# library which wraps EC2’s web service API making them easier to consume from .NET.

Amazon is also going to release more features (fairly soon) across the board – load balancing, auto scaling, monitoring, etc.

It will be interesting to see the competitor offerings from Microsoft – should get public details at PDC.

Does the world end today?

As the Large Hadron Collider is switched on today, the Guardian has a story saying that there are many people calling the CERN to find out if the world ends today? Apparently is completely safe and will not be doing anything that has not happened '100,000 times over' in nature since the earth has existed.

If you see another post here after today, I guess the mini-black holes did not suck in everything! Big Smile


You might have heard of Photosynth – it was announced last year; but if you ever wondered what the big deal was about Photosynth (or have not heard of it), then check out this video. Also this is open to all now for free.

Live Mesh – Tech Preview

You might have heard of the new "Cloud" service from Microsoft called Live Mesh. You can get more details on the team's blog and a few videos.

While I have the Mesh bits installed for a few weeks I only recently started using it and was very handy when I wanted to get to some information on one of the Wiki's running at home.

I have some of the machines on my home network connected on the mesh now (see screen shot below) – they all are running Vista. It is quite useful and much easier to use than trying to RDP into various machines (assuming you can fwd the ports for various machines on the router). Another cool feature is I don't need to have any bits installed to access them (say from a corporate environment). You only need a browser to login to the mesh and get to the machines (I only tried this is IE 7 btw).

I have used a little bit of this so far and do find it quite useful; there are various elements of this that I have not really used yet (such as the sync. features).

I wonder if there will be an interesting convergence between this and WHS at some point in the future?

image image

Windows 7

Wow! What a week – so much talk of the next version of Windows code-named "7". Of course the multi-touch (see video below) is what everyone is talking about. Now, this is cool because it is the evolution of the Surface which is scaled down to a screen.

If you have not seen a Surface – it is quite big and works with five infrared cameras which picks up the gestures and then knows what to do with it (more on Surface at another time).

But in addition to multi-touch we also know there is no new kernel for Windows 7, instead Microsoft is refining the existing kernel. So if you were betting on WinMin (which BTW is only 25 mb!) being there then forget it. Windows 7, will ship around three years after Vista shipped – in other words we should see it sometime next year.

Of course you have got to have screen shots – there has been a lot of speculation if they are genuine or fake, but they sure do look cool. Check out the top left and right corners of the screen shot above and the way the task bar is layed out – nice! I can't wait to get the first drop of this and see how it pans out! Given this is build on top of Vista hopefully we won't have too many issues with drivers making early adoption of this more painless compared to Vista.

Windows 7 first demo shown at D6:

The Printer Spy – tiny tracking dots on your printout!

This is scary! It seems like your printer is spying on you using tiny tracking dots which are automatically printed whenever you take a print out. Of course these dots are unique and can be tracked to your individual printer and are not visible to the naked eye (otherwise you won't have noticed them, innit?)

The US govt. has convinced most of the printer manufacturers to add this to every page. EFF highlighted the issue first and had issued a press release. Since then they have released a decoding guide that you can use to figure out how to find this. They also released a list of printers which either have or don't have the dots; and also point the fact that just a "No" does not mean there is no forensic watermarking present, it just means there could be some other kind of marking. Make sure you are consulting this list whenever you next buy your printer.