Programming Zen

I’ve written before about all sorts of approaches to programming style, how you should do some things and why, and also why you should not do other things.  Recently, I’ve found my increasingly frustrated by the environment that I’m working in, by what I perceive at face-value to be a lack of knowledge or perhaps simply a mismatch in individuals’ idea of standards.  Of course, my employer currently has no standards. No standard anything – code layout style, data-design approach, unit-testing, in fact, testing anything is not ‘standard’ at my current employer.

Continue reading

Hibernate is not a real option in Vista

This is not a contrived situation.  I want to turn off my PC, a full-power-down, right now, to fit a new hard drive. But I also want to keep all my desktop settings, applications that are open, etc.

But I can’t, because Vista does not have a Hibernate option.  This knowledge-base article outlines how it can be switched-on, but unfortunately, even then it does not deliver fully! The best it seems to do is enable a Hibernate option as part of the Sleep logic (see the screen-shot below). I don’t want to set my computer to go to sleep and hibernate after 0 minutes – I want to be able to occasionally tell my computer to hibernate, knowing that I can then unplug it at the wall, knowing that I will then save all of the power that it might consume, even when ‘off’.  Yes, computers can use a lot of power even when ‘off’.

Continue reading

Initializing a New Disk

I just installed a new SATA disk, and was a little surprised that it did not appear on Windows Explorer as soon as I had installed it in a caddy and connected it via the caddy’s USB port.  Then I remembered that I would have to partition the disk, which is done via Administrative Tools | Computer Management (Administrative Tools is available from Control Panel, then select the Storage | Disk Management item from the tree at the left of the screen).  The unallocated (as in – not allocated to a particular type of disk partition) appears in the list as a black-barred-box, as per the screen-shot below.  I right-clicked, and tried to create a partition, but to no avail, as every time I got the message: “The operation cannot be completed because the disk is not initialized.” This quick post is about the simple solution to that problem.

Continue reading

Coding Idioms Gone Wrong

Before I started this blog, I researched the exact meaning of the word Idiom, and was surprised to find from Wikipedia that it does not mean quite what I expected; “An idiom is a term or phrase whose meaning cannot be deduced from the literal definitions and the arrangement of its parts, but refers instead to a figurative meaning that is known only through common use”. Their example is ‘Kick the bucket’ meaning to die, which has no apparent connection with striking an object for carrying solids or liquids with the extremity of one’s leg!

Continue reading

Changing the Location of My Documents

A long time ago, I got the impression that there was a sense that separating programs and data was considered a ‘Good Thing’.  The move to the Windows Registry; which centralised hundreds of ini files that previously each program had needed, was an example.  Why this idea suited me is that if we centralise data storage, we make it easier to backup key data (i.e. the stuff that changes a lot) separately from program data (which should not change so much – however ironic that may sound the day after a post about patch-frequency).

Continue reading

Patching My Head In

I’m not a massive games-player, but having recently built a new PC I was keen to see my new graphics card (a Sapphire Radeon HD 4850) at work.

CoH Patch Download Screen

I loaded Company of Heroes, forgetting that the Company of Heroes – Opposing Fronts installation would overwrite the former. Oh well. Granted, I obviously did not need to load both pieces of software to have a quick game and to see my new 3d card at work, but I did. The only problem is, I have had to apply about 6 patches so far – that means downloading probably in the region of 1GB of data, and each time wait for the download, and then the patch to occur.  As the patch itself obviously has to be done while the software is not running, that also means several restarts of the software.  I simply can not figure out how to run Opposing Fronts without the update applying.

Continue reading