Wednesday, February 27, 2008

Time

For as long as I can remember now, time has only ever got faster. I never feel like I can do more than I used to - I'm always thinking how there just isn't as much time as there used to be.

Thursday, February 21, 2008

Powermate in C#

Well about four months ago I bought a Griffin Powermate. It's pretty much as good as they say except I think it could have been a little more solid. It looks a lot heavier in the pictures.

Now the only real gripe I had with the Powermate was the drivers. I battled for, I kid you not, days. I installed, connected, uninstalled, disconnected, reinstalled, reconnected this darn powermate so many times, that even by chance I should have got it to work.

The retailer I bought it from, SimplyMac.co.za in Johannesburg, wanted nothing to do with me. They simply denied me warranty on the item and told me to search Griffins site for help - Which I had already done by then! All I'm saying is that I will never buy from them again. Griffin was more helpfull,.. well nothing they suggested actually helped, but it didn't stop them from trying. I believe that if I carried on emailing their support team they probably would have got me to ship it over to get repaired.

I don't know how many people out there have battled with Powermates, but mine just seemed to move the cursor horizontally across the screen. The Powermate registers itself as a mouse-type device and thus without drivers will just cause the cursor to move slowly across the screen. With drivers and software you are meant to be able to assign more helpful actions to the Powermate; like changing the volume or scrolling your current document up and down. So since my Powermate made the mouse move without drivers, I reckon the problem must reside in the drivers. Surely if there was a fault in the Powermate itself then the device wouldn't register on the computer at all. Well whatever the problem is, shipping it over to the States is gonna cost be money. So some DIY was sounding good.

Yesterday I started snooping around C#, and hey,.. Presto! In half a day I managed to hack together a small app which:
1) Detects all the mouse HID's installed.
2) Links in to the data sent from the Powermate, and ..
3) Adjust the system volume or pump a page scroll.

Now I really did hack it together, I'm not even going to try take credit for the source. Having a good knowledge of Java and some C++ I managed to interpret the C# syntax without too much trouble but,... I'm not a C# guy so keep that in mind if you looking through the code.

Here's the source with binaries included: http://b22222.com/pmate.zip
Note: I coded this using MS Visual C# Express which I think uses dotNet 3.5

Directions for use:
Run PMate.exe (duh).
By default the Powermate then controls your volume.
If you press the Powermate it alternates to controlling page scroll.

The three thing's I'm not satisfied with yet in this solution are:
1) The program has a bit of delay while reading from the Powermate - Not ideal.
2) The Powermate still pumps regular mouse events. So pressing the Pmate still invokes context menus :/
3) I don't know how to properly hide the form, so it infact just minimised without a taskbar button. This allows you to still ALT-tab to the app.

At the end of the day though I'm quite happy with the solution. It gives me a bit of a geeky thrill turning the Powermate and knowing that I somehow got it to change my volume.

Lego stop animation of Mario level 1

Monday, February 18, 2008

South Africa, creatively backward.

So this post will sound a lot like a rant. It's kindof a rant, but it's meant to be more of a self directed challenge. Why does South Africa always seem to be 3 years behind? Now I understand there will be industries that SA is ahead in and others where it is behind, but in general I tend to hear of SA trying to catch up in stead of leading the way.

The industry that I'm passionate about is web design and marketing. When I browse the web it is very evident that technology has greatly accelerated and is allowing all sorts of new opportunities to deliver content over the line. With the ever growing awareness of web standards, it's actually relatively easy now to create a standards based web design that looks and functions effectively; Whereas in the old days they mostly either looked good, or worked good, but rarely both.

So what about South Africa. Well who knows, maybe it's not South Africa, maybe it's just Durban,.. perhaps just my employer; But as it appears to me, around here, the general interest in new technologies and the benefits thereof doesn't seem a high priority among long standing business's. I find it frustrating to just sit back and do what the guys before me always did, just because 'that's how they did it and it seems to work just fine.'

So what do I want? I guess I'd like to see some South Africans take the podium when it comes to declaring the new web standard, or delivering a first in a certain technology. These two things pertain to my industry, but this would be great for any business or social advancement. I feel like all the talent got left in America, Germany, Sweden, and a dozen other European countries. What happen's in South Africa? What does the world see? Corruption, crime and broken down politics. Lets see some radically different people. Lets leave the past in the past. Learn from it of course, but lets progress. The last thing I think we are losing are dreams and creativity. I find a lot of people these days are actually plain boring.

Lets develop some ideas and dreams. Lets turn these dreams into industry, social and business advancements that help our communities and our country advance.