Preventative Battery Maintenance

Over the last few days, I’ve been putting my aging battery in my ASUS M51SN (now some 2.5+ years old) through some torture of plugin / plugout for watching vids/podcasts that incidentally almost drain the battery whilst I clean the house.  I also use it briefly on the way to work or in my lunch hour (10-30 min stints)

After coming out of hibernation this evening at home, after having a day of sporadic use that started with a couple of 10 min runs in the morning followed by a 10 min run in the afternoon, the battery Icon had a cross advising me that my battery was at 10% and that I should consider replacing my battery.

I came across the following forum

Windows 7 and the battery error “consider replacing your battery”

and whilst it is easy to see a lot of people complaining that there is something wrong with Windows, I can pretty much tell based on the change in behaviour & my previous experience with laptop batteries is that this could be the last legs of the laptop battery.

Nevertheless, the forum did teach me a windows command powercfg -energy to get the used maH and a whole lot of other useful diagnostics about where the battery power is going.  Something I used to rely on third party tools to tell me.  One trick others seemed to try which I hope will work for me is a full discharge and recharge.  Repeating this cycle a few times seems to improve the level that the battery charges up to.  I’ll update this blog with news if that works

Building Java Applications with Windows Azure

Looking for a place to host my own home grown apps, I came across an interesting presentation about using Windows Azure cloud to run Tomcat and a JVM in the Microsoft cloud solution. See Building Java Applications with Windows Azure

The presentation basically says Azure can run any native code, which means java.exe and tomcat.  Native programs that runs off a batch file with no specific registry key or lowlevel system dependencies or installers are more likely to run in Azure.

Azure has worker roles and web roles.  Web roles are used for hosted apps with .net/php and IIS and not used here, however the worker role is used to run native code.  It can be bound to a network port (ie port 80)

The Microsoft support comes in with an Eclipse plugin to access your resources in the cloud from within Eclipse.  There is a jar that wraps up the RESTful interface to Azure that your app would normally use to access the clouds resources with Java helper classes and provides some other .NET helper classes.

It also comes with some helper stuff to setup Tomcat – ‘Tomcat Solution Accelerator’ – to configure Tomcat to make it very light in terms of OS dependencies.  It also has monitoring of Tomcat to let Azure know to restart the app if it fails and also help indicate to MS there is a problem with the particular server that instance in their cloud is perhaps not working as it should.

I do like that you get to choose the versions of Tomcat and Java you want, and there doesn’t seem to be much of a reason you couldn’t apply this to other languages and appserver environments.  (Grails/Jetty? – and hopefully Glassfish, but that may need a bit more config work to pack it up and install on the cloud).  That last point sounds a bit negative, you could probably get a service on a VM linux host that means you dont have to fudge around so much, but still the novelty polyglot value of having JVM and .NET in the same cloud environment may actually outweigh the negative of the DIY setup.  The presentation explains how the Tomcat is packaged and shows the contents of the packaging scripts to give you an understanding of how to do the same for another appserver.

One nice thing about the Azure platform itself is that you have production and staging slots – you can have a production app in the cloud, and also a staging version too – and swap them over when you are happy with Staging.

The other aspect is the queues/worker facility to allow for concurrency when running your app across multiple nodes, asynchronous architectures and scalability.

To try it out, you’ll get free access to Azure while its in CTP status (till Jan 09), and then MS will start asking for money. Apparently, Dominoes pizza is testing out their next version of their ordering webapp on the platform, if you wanted a vote of confidence too

Azure Java SDK available here: windowsazure4j.org

Windows XP SP3 Activation Issues

My father’s PC recently died and needed a new motherboard.  Taking the opportunity to upgrade, we put in new RAM, CPU, but left the old hard drive.

Using the old hard-drive, the PC would go to boot and restart half way through the boot process.  This was the same in safe mode as well.

A repair install was the best way to go, so I downloaded a XP SP3 retail image from Technet and wen’t along with the install process.  All seemed to go well until the next major reboot after setup is complete, a smaller than normal Windows logo with a Please Wait… message at the bottom.  This did not go away so after half an hour, I reset the PC.

The Welcome screen showed up, I thought all was well.  I went to login as my user and a prompt appeared telling me that Windows needed to be activated before I could login.  I chose Yes and allowed it to do its thing.  My backdrop screen appeared, and there was a lot of disk activity for about 10 mins, before it then stopped doing anything useful.  It just sat there.  I could move the mouse and nothing more.

I’ve experienced a fair few encounters with WGA and most of the time, the fix involved getting to the registration wizard, by starting it from the Start->Run prompt.  Once there, Windows could do its thing.  Without a working explorer, no control+alt+delete to bring up task manager, I could do nothing.  You cant run the wizard in safe mode either, and whilst there are some hacks to bring up a command prompt in the welcome dialog and lots of other workarounds, nothing I tried worked.

In the end I simply installed XP SP2. Because it came with IE 6 or 7 though and the installed IE was version 8 there were periodic program exceptions regarding a synchronisation app (i think what IE 8 uses to keep its RSS feed list up to date).  An upgrade through windows update to internet explorer fixed that but we were reluctant to change anything.  In the end, I bought Dad a bigger harddrive, a proper copy of Win7 and haven’t had to worry about it since.

Firefox Keyboard Shortcuts

Following my previous post on IDEA keyboard shortcuts, I was inspired to look for the same thing for Firefox.  In particular I use the Copy URL function a fair bit but saddened to learn it doesn’t have a shortcut provided out of the box.

There is the keyconfig addon that provides the ability to look and add keyboard shortcuts to functions.  Strangely you cant change a shortcut, only add new ones by default. However, there are addons for this addon 🙂 that allow you to set shortcuts to actions that normally don’t have such functions.

Firefox as it stands

KeyConfig Extension

Functions for KeyConfig

Blank PDF tabs in Firefox

If you ever have issues with PDF’s not displaying correctly in your browser then this Adobe support link appears quite helpful.

I installed Foxit Reader then uninstalled it on my Windows 7 box and now my Firefox wont open PDF’s.  Just a blank page. 🙁

Easily Unhide an NTFS partition with included Windows Tools

Warnings:

Make sure the hidden partition is NTFS!!!! 

No responsibility taken if you follow these instructions and you fubar your disk.  If in doubt, use a graphical tool like Partition Magic to help you out.

Open a cmd window

Type diskpart and enter

A seperate diskpart window kicks off with a DISKPART> prompt.

Find the partition you want to unhide using LIST and SELECT commands

DISKPART> list partition

  Partition ###  Type              Size     Offset
————-  —————-  ——-  ——-
Partition 1    Primary             55 MB    32 KB
Partition 2    Primary             89 GB    55 MB
Partition 3    Primary             60 GB    89 GB

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
——–  ————-  ——-  ——-  —  —
Disk 0    Online          149 GB      0 B
Disk 1    Online         5831 MB      0 B

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
————-  —————-  ——-  ——-
Partition 1    Primary             55 MB    32 KB
Partition 2    Primary             89 GB    55 MB
Partition 3    Primary             60 GB    89 GB

DISKPART> select partition 2

Partition 2 is now the selected partition.

DISKPART> detail partition

 

Partition 2
Type  : 17
Hidden: Yes
Active: No
Offset in Bytes: 57576960

There is no volume associated with this partition.

DISKPART> SET ID=07

DISKPART> detail partition

Partition 2
Type  : 07
Hidden: No
Active: No
Offset in Bytes: 57576960

Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
———-  —  ———–  —–  ———-  ——-  ———  ——–
* Volume 3     F                NTFS   Partition     89 GB  Healthy

Its all Greek to me

Ok, so I’m learning Greek right now.  When venturing onto a colleagues PC, I noticed he was running Firefox in French.  So I thought what a great opportunity to expose myself to the Greek language by running my apps in a foreign language also.

Although when we design apps, we generally include locale’s for different regions, switching an already installed app to a different language doesn’t seem to be as easy as changing a setting in Preferences.

For Firefox and the windows live apps, special language versions exist.  I downloaded the Greek Firefox from here to get started.  Interestingly, the installer looked all gyberish characters (yes more gyberish than greek!), but once installed all the menu’s, dialogs, status bars, etc came up in the Greek as expected.  I decided to keep my installs separate as well rather than over the top of the existing one, but it does share the same profile folder without any strange issues so far.

Once your browser is in Greek, when you go to browse websites such as Windows Live, Google, etc, you’re results are all in Greek also (where applicable).  Its one thing to read about (and even implement support for) internalisation and another to actually see it in practice.  Nice touch.

The next thing you need to do is setup the Greek keyboard so you can type in Greek.  There are a couple of keyboard layouts.  Basically a modifier so you can type the accent characters.  Greek Polytonic seems to be working for me.  This Microsoft site has keymaps for each of the layouts showing you what key types what and how to get access to the modifiers.

RSA Client Downloads

RSA clients for windows from 5.2 -> 7.0

Both 64 bit and 32 bit versions.

Am using the remote agent with 6.1 on Vista Ultimate and everything is hunky dory.

What prompted me to upgrade was a recent Vista SP1 upgrade and some strange behaviour afterwards.  Some connections would cause the authentication process to lockup and a particular Windows service to fail.

https://www.rsa.com/node.aspx?id=2518