Saturday, December 29, 2007

Aerofoil 1.4.1 - Minor Graphical/Source Update

I should have held off release of the Aerofoil 1.4 a little longer - I couldn't help but tweak it for the following:

- Blue Hibernate option in system tray menu (was red - I didn't like it because it was too "in your face").
- Removed one of the system tray menu "separator" lines because the menu was getting too big.
- Made "About" window slightly transparent (looks more professional).
- Smaller executable (1.5K less at 29.5K, 30K on disk) by improving the Visual Studio solution and removing some method redirection in code.

Download and source code

Okay I'm now officially off the Aerofoil sidetrack and back on the Gesture Magic beaten path again...!

Tuesday, December 18, 2007

Aerofoil 1.4 Available

Aerofoil 1.4 is now available to download!

- Disables Aero Glass when your Windows Vista notebook is on battery
- Optionally disables Windows Sidebar when on battery
- Optionally changes Windows Power Plan when on battery
- Allows manual enabling/disabling of Aero Glass.

New Features for 1.4:

- Hibernate option added for quick access.
- User guide included (just a simple text with FAQ).
- Updated "About" text

Fixes for 1.4:

- Issue with Vista ignoring Aerofoil's (automatic) re-enable Aero Glass requests should be fixed.
- Tray icon tooltip is not so eager to appear.
- Tiny memory leak fixed (only occurred on exiting Aerofoil).

LINKS UPDATED FOR Aerofoil 1.4.3

Note the downloads include a readme.txt file which describes how to configure Aerofoil should you want to (it does also work out of the box :) )

Now available to download:
Aerofoil 1.4.3

Or you may prefer to learn how it works:
C# source code for 1.4.3

Please drop a comment if you find this useful, want to provide feedback, tell me how it added 2 hours to your notebook battery life...

Tuesday, November 27, 2007

Aerofoil 1.4 beta 2 released

Aerofoil the Vista Laptop Batter Saver (yes this is a googlebot search plug ;) ) now provides the following functionality and features:

  • Enable/Disable Vista's Aero Glass on AC/battery

  • Automatically switch Vista Power Plans on AC/battery to High performance/Power saver (fixed for languages other than English too)

  • Automatically enable/disable Windows Sidebar on AC/Battery

  • Vista hibernate/sleep would occasionally cause Aero Glass not to restart. Aerofoil will now attempt to restart Glass a number of times before giving up (usually this is successful in restarting). Note this is a Vista issue - not Aerofoil's (it just tries to work around it :) )

  • Still just a 40KB executable.

The "Auto Power Plan" option is now set on by default (off in beta 1), but "Auto Sidebar" is not since I do not use Windows Sidebar and don't want it starting when I plug my notebook into the AC :)

Final 1.4 version available here

Download here
GPL source code

Wednesday, November 21, 2007

Local Telephone Number for your Royal Mail Sorting Office

Prescot Royal Mail Post Sorting Office - 0151 4266169 (note, it's now 2012 and I don't think this number is valid anymore, or if it is, nobody appears to pick up)

Why did I just give you that local postal office number? My father and me are fed up of spending a small fortune on peak time phone calls to a unanswered 0845 number for the post office to find whether they have one of our missing parcels.

If you want to find more local post sorting office numbers visit - this is where you'll find the above number and more (search for "What Service? Distribution" and "Whereabouts: {your wanted location}").

If this link goes down or has the numbers removed Google with combinations of words such as the local telephone code (e.g. "0151"), office region name (e.g. "Prescot"), the first line of the address (useful with the local telephone code in a search for finding full contact page details), "collect parcel", "royal mail", "postal depot", and "sorting office". Good luck!

If you find this useful please drop a comment below so we know we're not the only people annoyed with the Royal Mail's privatisation cut backs.

Monday, November 19, 2007

Aerofoil 1.4 beta Released

As mentioned in my last blog entry I'd be adding a new feature to Aerofoil to allow automatic profile switching between Vista's "High performance" and "Power saver" power plans when you run on AC or battery respectively.

This feature was added in 1.4 beta available as an optional switch in the right click context menu - "Auto Power Plan". You must have the two aforementioned power plans for it to work - these come with the English version of Vista as standard. (Sorry no Internationalisation yet so they must be the English names - please modify the source code if you want to improve or fix this).

Whilst I've not heard of any damage occurring from switching power plans more frequently, as usual use Aerofoil at your own risk - note the program's beta status, which means it may have bugs or small memory leaks.

Final 1.4 version available here

Download Aerofoil 1.4 beta with auto power profile - possibly some small bugs (source code).

or you may prefer...

Download Aerofoil 1.3 with no auto power profile option - very stable (source code).

Saturday, November 17, 2007

Aerofoil Recommended and in Top 20!

Aerofoil 1.3 has been recommended by the editor at PC Mag and is rated on Notebook Review as one of the top 20 useful utilities to save battery on Vista!

Aerofoil was intended to be a final version at 1.3 but I'm considering adding in Vista power profile management so it can change your power profile automatically on the fly too (again something I believe Microsoft should have provided instead of a "Balanced Profile"). As usual Aerofoil will seek to be the smallest least intrusive app to do this.

Final 1.4 version available here

Grab Aerofoil 1.3 here - if you need more info or source code have a look at the original article

Wednesday, November 07, 2007

How to open a Seat/VW/Audi key fob to change the battery

Not strictly tech, but trying to keep technology simple I thought it would be useful for those people with a Seat, Audi or VW to see how to change their car key fob battery. This will save you the expense of going to your dealership to change the battery when it runs flat (or like mine just refuses to unlock the doors - but lock still works)!

I have tried to cover all the risks involved so by reading this you know exactly what to be careful of and what you're letting yourself in for. This is no different to opening any other small electronic device - if you've done that before you'll be fine. Also, I've heard some VW dealers say that changing the key fob battery yourself may disable the immobiliser feature or reset your key. This is nonsense, my key still works fine and there is no electrical contact between the key part and the fob part - well at least in mine (newer keys or cars that detect key battery level may do).

Disclaimer - I take no responsibility for these instructions, you follow them at your own risk.

Following the order of the image photos (click the image to see it full size).

1) & 2) Flick the key out, wedge a thin screw driver into the key/fob divide crack at the key recess edge i.e. the edge of the nail thin line going all the way across the width (parallel to the buttons) - not the hole or groove inside the recess. With the screwdriver wedged into the edge (it should be perpendicular to the key fob) slightly twist or press the screwdriver to force the small crack open to separate the key part from the fob part. Try both the top - button side - and back side of the keyfob. This requires a fair amount of force to get the small key part lip over large fob's lip (see 2) - be careful.

3) & 4) The non-button side of the fob part has a simple clip on lid, this can be opened from the non metal ringed end first using your nail. Note that you should not open this like a hinged lid - it is not hinged and could break a small piece of plastic (shaped like a small "u") at the metal end - see in the top right of photo 4. Note be careful to not touch the small IC (chip) when you have the key open - doing this runs the chance of blowing it with a static discharge from your hand (although 9/10 times you should be okay if you accidentally touch it).

The replacement battery is usually a cheap CR2032.

If you want to see a video of opening these keys - by hand without a screwdriver (somebody has done this a lot - I couldn't do it without a screwdriver) have a look at the "switchblade" link on this VW page

Sunday, October 14, 2007

Aerofoil 1.3 - Aero Disabler / Laptop Battery Saver (Final Version)

In response to the positive feedback I received I've put together a final version of Aerofoil - I won't be adding any more new features simply because the majority of people wanted me to keep it a simple one purpose utility. To briefly recap what this program does - it disables Vista Aero Glass when your Microsoft Vista laptop is running on battery. Ordinarily Vista would do this for you but only when using the "Power Saver" scheme but not in any other power schemes. You can also enable/disable Glass manually from the notify icon.

UPDATE: Smaller faster 1.4.5 version available here

This version

  • Has a bumped version number - 1.3 better reflects code maturity over 0.1.3

  • Uses a fixed tool window (so it no longer shows in shows in Alt-tab)

  • Simplifies the code (just a tiny bit more code reuse - I don't think it can get any better!)

  • Includes fully commented source code

Remember you need Vista Premium or better to use this (Vista Basic for obvious reasons won't work).

Download Aerofoil 1.3 here
GPL source code here

Thursday, September 06, 2007

Gesture Magic - the new name for Smoke Gestures

After 2 years of development (okay I've been lazy and haven't worked most of it) Gesture Magic (the new name for Smoke Gestures) is nearing completion and reaching the alpha development stage.

What is Gesture Magic?

Computer games such as EA's Black and White use an innovative system to "cast spells" - you draw a symbol using the mouse and it will execute spell.
Gesture Magic is one step further - it allows you to paint your own smoke/paint trail on your desktop, and using your pre-defined gesture actions, it can execute or run a specified action.

Why would you want to draw a symbol (a gesture) using the mouse to do something rather than the conventional way of just opening a program via double click etcetera?

Gesture Magic only aims to supplement your existing way of working - typically if it is quicker to click an explorer icon instead of drawing a symbol like an "e" you should do this. However, once you adapt to using gestures you may find it quicker and more fun, in addition, the final version will allow you to chain actions, and pre-record them, allowing elaborate procedures to simply be a wave of the mouse.

Have a look at the preview video of Gesture Magic (2.5MB AVI) to get a feel of what this software can do for you!

Gesture Magic will be available this Christmas season.... hopefully!

Sunday, August 12, 2007

Vista Weirdness - Directory exists via an installer, but not in Explorer

This took me a while to figure out - today I went to install Jetspeed Portal Server and it needed access to a specific file, so I browsed to C:/Program Files. See the contents in the first screenshot.

I remember uninstalling Alien Arena 2007 but the directory was still there. Grrr, okay it didn't clean up when I uninstalled it... so I browse to C:/Program Files.... and guess what the directory does not exist - it's not there (see second screenshot).

What the hell? Is this some out of date index used by the installer to list directory contents or some weird Vista registry thing?

No. It is a feature called "VirtualStore". Simply put, older versions of Windows stored user accessible data inside Program Files, which is quite naughty since this should be a secure location and non user accessible (i.e. administrator only). What Vista does is redirect this sort of request invisibly to a user accessible area a "VirtualStore", and the program installs here, typically this is at C:\Users\< your user>\AppData\Local\VirtualStore\Program Files. The same goes for the system registry. When you uninstall or delete the program from explorer or by uninstaller it may not necessarily uninstall it from this location - hence the problem of the Alien Arena 2007 directory.

For more details see this useful article

Saturday, August 11, 2007

Aerofoil 0.1.2 Update

I've made a notification bubble change to Aerofoil based on an idea from one user (sorry I haven't your name or original email anymore - email me again and I'll add it). Aerofoil now shows a notification bubble when Aero decides to change it's state or the power status changes. In addition, it sports a new modern looking icon and the code has been improved to cater with error states better and to ensure the correct menu options are always shown (something else may have changed Aero's state without an event being fired - such as hibernate/resume).

Final 1.4 version available here

You can download the update here or C# source code here

Monday, July 23, 2007


On my HP notebook I've just had the misfortune of using the built in HP QuickPlay update to update it to revision 3.3, this is software written by a company called Cyberlink who don't provide support unless you are a member.

When you "update" to version 3.3 via the application (not via HP's site or HP update) it will DOWNGRADE, let me just stress that again,


the software so you can no longer view media files, use your built in HP web cam etcetera.

Rolling back via System Restore is futile (the app doesn't restore - nothing works at all now) and even reinstalling 3.0 or 3.2 still leaves you with just DVDPlay (the DVD playing part of Quickplay).

Frankly I am very pissed off at just wasting 5 hours in vain trying to restore the web cam functionality in Quickplay but 3.3 does something to prevent you restoring it.

If anyone knows how to fix this drop me a comment, personally I am no longer using Cyberlink's products and I'll be advising friends the same.

Saturday, June 30, 2007

What's making my hard disk thrash in Windows Vista?

Wondered what is causing your Vista machine's hard disk to thrash at seemingly random times in Vista? Well on a bare clean Vista install here is what is what I believe is causing the usage, and when - use this guide to help diagnose which you have:

ProcessOccurs When?
Superfetch/ReadyboostReadyboost device inserted, first run, when Vista analyses that you use particular programs/data regularly.
Indexing service/Windows Search
Assumed after every new file write/delete - reindexing for greater index performance occurs randomly (well, when the index needs cleaning up).
Windows DefenderPeriodically in the background, automated scheduled scans.
System RestoreWhen a new driver or piece of software is installed.

If you have Vista on a laptop and use Readyboost (via built in card reader or similar which I do), I'd recommend leaving Superfetch/Readyboost enabled, and System Restore for obvious reasons. I've disabled Windows Search via the services (because of heavy disk/battery usage) and Windows Defender as I'll enable and use this manually when I need it (I don't need it bugging me every 3 days/running whilst I work).

Friday, June 08, 2007

Aerofoil Irony - Vista Laptop Battery Saver

I just came across Vista Laptop Battery Saver by Clint Rutkas which was also created on exactly the same day I uploaded the first revision of Aerofoil. Functionally it is identical but actually has commented, properly written source -i.e. not done in an hour - (no source licence specified), a slightly uglier About box, but much nicer system tray (notifyicon) icon. He's also got a much more popular blog I'm hoping to get some traffic from ;)

Tuesday, May 29, 2007

Aerofoil 0.1.1 update

I've made a small update to aerofoil so you can now disable Aero Glass on demand via the tray icon rather than just relying on automated on AC/on battery switching.

Final 1.4 version available here

Get the update here
Source available here

Friday, May 25, 2007

Blindy following OO design paradigms

My personal belief is that design paradigms are there to assist with good software design, but there are times when they should be left out in the cold. I should state this is my personal view, against the herd (can't think for themselves) mentality - but hear me out I have very good reason:

- Interface all your BOs (business objects)
Now this is just silly - I have a large three tier system, with some 30-40 BO classes alone. The specification doesn't say these will be swapped out - so why interface them? Another senior developer of the group got into a heated argument with me that you just should, because it was "good practise" and we "may" need to swap it out in future but couldn't give me any reason why or when (and against design for now agile methodology), why we couldn't interface at a later date or accept how during dev we modify the implementation extensively and need to also do extra work changing the interfaces. I understand that interfaces are useful for unit tests but there ways around this and it is trade off between testing convenience and readability. As an aside, interfaces actually add slightly to the running performance overhead!

- Singletons are always good, especially for your constants.
The singleton pattern is actually classed as an anti-pattern. From a pure OO perspective this can completely break the concept, e.g. keeping all constants in the a single class, from your DB strings, to your hash keys in BO, to error message keys in the UI. The constants should be in separate base classes, for each package's classes to extend from. Admittedly this is not always possible, but it's not an excuse to plonk everything in a central singleton - which can get very unwieldy.

- Always use object to relational database mapping libraries (e.g. Java's hibernate/toplink)
The traditional approach of executing raw sql is sometimes better. There is a lot to be gained by using the relational mapping libraries - which I won't go into - however they are not always the best tools for the job. For example, you have limited memory, your application executes ~10 or less statements or you need code visibility as to what is actually happening whilst debugging without looking in log files. Executing raw sql can often be more efficient because you can specify sql exact to your requirements (no blanket selects) and can use less memory - one result set.

- Three tier hierarchies are better/are the future
If you're programming on a limited device (such as a hand held pc) you shouldn't be using a three tier system, you don't need the system to scale to hundreds of users at once - it only has one. Simple is nearly always better in this situation, two tiers will do, forms and a backend with some limited business logic. If you have central server to synchronise with defer and offload as much logic as you can there - obviously not form validation or similar, I'm talking middle tier content that doesn't need to be shown or used in real time on the limited device.

There are many other examples, but remember that designs patterns and paradigms are there to help you, to prevent common design and coding pitfalls and deficiencies in programming languages. They don't dictate how you must design, try and use common sense and know when not to use them! :)

Sunday, May 13, 2007

Vista, Visual C# Express Edition, UnauthorizedAccessException and SecurityException just to use PerformanceCounter - the Solution!

So like me you've just 4 hours researching System.Security just to allow you to use a PerformanceCounter in Visual Studio Express Edition without getting SecurityException and UnauthorizedAccessException.

You've looked at the project security tab and seen "ClickOnce" settings and added what you thought was the relevant setting "PerformanceCounterPermission" for the Intranet realm, but it didn't work.

You've added permissions declaratively (using assembly attribute) and imperatively (by using the permissions object directly) trying to get the code to prompt a UAC box on access in Vista, basically the stuff this article talks about.

You've even considered a hack to add the user to the relevant groups.

None of them worked or were ideal.

Save yourself some time - here's the quick solution (important bit is the requested permission in the manifest xml) - note some of the lines are wrapped below use common sense :)

- If you've only installed Visual C# Express (or other express version) install the .Net SDK (this is for .Net 2.0 - you may want 3.0). You need this for the tools that are missing from the Express install that you can find in the full Visual Studio (i.e. we need mt.exe - manifest tool)

- Modify the manifest associated with your Express project (in the built-in editor to ensure saved as UTF-8 encoding) to something resembling this:

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<requestedExecutionLevel level="requireAdministrator" />
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom"
SameSite="site" />

- Add under "Post-build event command line" in the project build events tab (note -manifest points to the modified application's manifest mentioned above - so you may need to change its location):

"$(DevEnvDir)..\..\SDK\v2.0\bin\mt.exe" -manifest "$(ProjectDir)Properties\app.manifest"

This procedure alters the application manifest to ensure that the code is built requiring administrator permission to run. The command line argument updates the modified manifest into the application post build replacing the default app manifest already included.

Now under Vista your built project will have a small shield on the icon meaning it prompts for administrator rights on startup - hoorah!

Sunday, May 06, 2007

Free laptop utility to disable Aero's Glass when on battery

"Hot" on the powersave/cooling subject of my last post yesterday evening I threw together a small tray icon application Aerofoil to disable Aero's Glass interface when on battery power. Hopefully this should cut heat and increase battery length a bit!

I'm hoping Microsoft add this functionality into the standard power manangement features of Vista at some point and this isn't needed anymore, but if they don't and the utility proves popular, I may add some other powersave functionality not currently available - although I don't know what yet, maybe options to disable sound, slow down gpu clockspeeds via atitool profile or similar!

GPL'd source code will be available shortly - I've not got time at the moment to bung in the relevant licence comments, readme and package up nicely. This should be in the next day or two.

Updated version

Get Aerofoil here!
Source code

If you find this useful and want the new features please post a comment or suggestions!

Monday, March 26, 2007

10 Things to do to Cool your Overheating Laptop

Well I finally got my Toshiba P100-429 notebook refunded and purchased one of these - brilliant decision. The only downside is the dv9000 series gets VERY hot underneath, I've investigated my model and found it was due to the hard disk (a Western Digital), the graphics chip (no heatsink or anything on it) and the RAM hosted slightly below it. The design also means that if you use it on your lap, you block the vents meant to cool these components.

UPDATES I updated this page after my notebook went into repair in July due to a known heat nvidia/amd combo design fault with HP notebooks.

Here's a top 10 list of things to help cool that mega hot HP notebook (and may be applicable for other notebooks).

1. If you have Windows Vista use ReadyBoost. I purchased a £5 1GB DaneElec "High Speed" SD card and have it permanently in the SD card slot just for ReadyBoost. This reduces swap file usage on the hard disk, thus reduces heat it would generate from using it.

2. If you have a Geforce GO GPU inside and Windows Vista, get hold of the latest Nvidia drivers to use the "Powermizer" functionality to slow the graphics processor down when it isn't in use.

3. Power save options. In Vista you have the (advanced) option to power down your hard disk. Set this to 1 minute - whilst you're browsing and not doing much the hard disk can power down. Some people may say this increases hard disk wear. Personally I think that the greater risk comes from melting the hard disk with the excessive heat it can generate.

4. Depending on your OS you may want to install some utilities to help regulate the CPU and CPU efficency. For the AMD Turion X2 I use the dual core optimizer patch, for other OS and AMD processors you could also use the PowerNow utility. See this page for more info on AMD processors. Similar software should also be available for Intel processors.

5. This one is a bit risky but if you're a bit of a techy and confident with replacing user serviceable parts, open up the RAM bay (on my model I also had to open the battery bay to release a lid catch for the RAM bay). Take out the RAM sticks carefully - ensuring you don't blow them with static - and remove the HP stickers. These additional stickers should be easy to remove and just state on them something like "Only replace with part.....".

UPDATE 1:The RAM warranty stickers also went, although I was very careful not to touch the electronics.

UPDATE 2: Between the wifi card and mainboard is usually a strip of insulating tape so the two sets of electronics don't touch - despite the fact they are being separated by a screw mounts (i.e. about 5mm height). The same goes for between the RAM and mainboard. I've removed these as well.

6. If you've done step 5 you may notice something I found rather stupid about the notebook design - the underneath lids' vents have a type of mesh/gauze across them on the inside. I suspect this may act like insulation and can probably be removed, to help airflow through the vents. The gauze may be there to prevent foreign bodies getting into the vents and case. So while this tip may give you big cooling gain, it is also carries risk of the aforementioned and invalidating your warranty.

UPDATE: The gauze simply peels off, and given the CPU fan area doesn't have one I don't think I'll be needing it (and I don't want my notebook to die again).

7. This is an A grade fudge of a tip - if you must use you laptop on your lap, don't cover the vents for long. I find the heat mostly is under the touchpad, where the vents are, but the CPU(?) fan is at the rear left. This fan is also responsible for air flow through the case - so I balance the notebook on my left leg with the left side drive bay vents clear and the rear left fan vent clear, and occasionally move the notebook around so the RAM/GPU vents get air. YMMV.

8. If you use the laptop on a desk, in the case of HP laptops prop the back of it up an inch or so with a thin book to help the airflow.

9. Purchase a laptop/notebook (I use these words interchangeably!) cooler. These are cheap devices that sit between your desk/lap and notebook, and contain air channels and vents and usually have fans that are powered from your notebook USB port. From personal experience the Coolermaster Notepal perfectly complements 17inch DV9xxx HP notebooks for colour and size.

10. If you're not using the notebook - turn it off/make it sleep! This will save wear and tear.

Monday, January 22, 2007

Toshiba laptop hinge lid cracks

Just before Christmas, late November time, I decided to buy a new Toshiba P100-429 laptop, and with a free Vista upgrade, why the hell not?

By late December I started noticing stress fractures in the metallic bronze case around the hinges. I complained to Toshiba and they admitted it was a manufacturing fault (afterall I'd only had it a month) and they agreed to repair it under warranty. The UK based service centre for the repairs is Testlink, and they sent a courier next day to collect. I was informed that the part was on order expected to come in within two weeks.

Well here I am nearly a month later, Testlink still have the laptop and blame Toshiba Germany for not supplying the new improved lid part. Testlink have now had the laptop in their possession longer than I have had it in mine.

What is worse is that I could have bought a laptop after the 30th of January WITH Vista included, which I had actually considered because I really wanted Vista.

Now I have a laptop that is not in my possession and in repair with no end in sight (oh yes, did I mention neither Testlink or Toshiba will give me an estimated time to fix)? Express Upgrade to Vista has been ordered separately at a small cost - £17 - (incidentally my friend has found that Modus Link the company dealing with Vista upgrade for Microsoft refuse to answer emails and their upgrade site consistently fails). Toshiba say they'll return me the laptop for a refund, but will they pay for my courier to the retailer (mail order), refund me for the Vista upgrade I no longer need, or pay for my wasted time and phonecalls/emails?

I still get a lot of hits on this page - if you want to find out what I did have a look at my next post :)