Archive for May, 2008

Windows Media Player 11 – Resuming from Pause giving an error

I’ve been using my notebook as my main Media Player (mainly because all my music is on it). I noticed that if I was pausing a song in Windows Media Player 11 when I click to continue playing it would error on the current song and skip to the next one? This, I thought, was very strange, but of course I knew it had to be the fault of something to do with Vista’s new Audio stack, so I went searching through various control panel dialogs to do with my audio device where I found the culprit:


Un-ticking the "Allow applications to take exclusive control of this device" fixed the issue.

This can be found like by going Start -> Control Panel -> Hardware and Sound -> Sound -> Playback Tab -> (Select "Speakers") -> Properties -> Advanced…. Now that was easy to find wasn’t it?

EDIT: This didn’t fix the problem, the error still happens but only after the song has been paused for at least a minute or two… I’m stumped…



The notebook I ended up buying (Review of the Asus 5RL Notebook)

I thought I’d post an update about what happened after I deciding on buying a notebook in my an earlier post. I called up CPL to order it on Sunday, and was told that they would order it in, after I pay $100 deposit, and that I would be able to pick it up either Monday or Tuesday at the latest. Tuesday comes around and I call them to ask if the notebook is available, to which I’m told, "Oh they don’t make that model anymore." My response of course being "So what did I just put a $100 deposit on?" apparently there was a mix-up and the last of that model was sold on the Friday before… anyway they put me on to a sales guy that organises what seems to be a better spec machine for a cheaper price anyway.

I get there to inspect an Acer 5RL which comes 1GB of RAM by default, but me wanting to run Windows Vista properly, I asked if that could be upgraded to 3GB of RAM, which they attempt but discover it can only be upgraded to 2GB… bugger, oh well 2GB is enough I guess, but in the back of my mind I’m thinking "That’s strange, I thought all Core 2 Duo’s are upgradable to 4GB). Anyway I think nothing of it and I’m pretty stoked with machine I get for a price of $940, which even has an ATI Radeon XPress graphics card (better than the crappy Intel chips you usually get for that price). It’s only when I got home I realised it’s not a Core 2 Duo, but a Core Duo, bugger… After all that research I did, I end up getting a Core Duo. That’s not to say I’m not happy with the machine, in fact I challenge anyone to get a better machine for the price.

Final Specifications (Acer 5RL Notebook)

Processor 1.6Ghz Core Duo
RAM 2GB (After a 1GB stick upgrade)
Screen 15.4" WXGA (1280×800)
Networking LAN, W/LAN, Bluetooth, 56K Modem
Hard Drive 160GB 5400 RPM
Optical Drive DVD/RW Multi-Recorder (with Lightscribe)
Other Hardware 1.3MB Web Cam (with swivel to face in front or behind notebook),
xD/SDMMC/MS/PRO card reader,
Infineon Trusted Platform Module (TPM) 1.2
Battery Life Approx 2hrs
Weight 2.8kg
Operating System Windows Vista Business
Bundled Software Nero, Norton Internet Security (Trial), Office 2007 (Trial), Nero Express, Asus PowerDVD, PowerDirector, MediaShow, ASUS LifeFrame (webcam software)
Final Price $940 AUD

Windows Experience Index


What I hate about the ASUS 5RL (Rant)

  • Keyboard – The keyboard is a little flimsy, pushing some of the keys moves other keys, and while this doesn’t actually affect the usage it can sometimes make the notebook feel a little cheap.
  • Keyboard – The Function key is right below the Shift on the left hand side, right where I expect the Ctrl key to be, instead the Ctrl key is the same size as a normal letter key and sits to the right of the Function key. This may not seem like a big thing, but I always hold Ctrl down with the arrow keys to jump whole words, and I constantly find myself hitting the function key instead, nothing bad happens it just annoys me, I imagine this is something I will get used to after extended use.
  • Web Cam – Quite stuttered and blurry and no good if you want to video anything faster than about 3 frames per second. I expect more from a web cam these days, the quality’s not bad, but not great either…
  • Initial Setup – Despite the loads of crap-ware being pre-installed, it is the fact that my hard drive has been pre-partitioned into an 80GB and 60GB drive that pisses me off. "But wait" I hear you say… "wasn’t it a 160GB disk, where’s the other 20 odd gigs?" Well I think they’ve seen fit to put recovery software in a hidden partition, which really annoys me when they’ve already given me a recovery DVD to do this.

What I love about the ASUS 5RL (Rave)

  • Aesthetics – It’s a very stylish looking laptop with a metallic gray finish.
  • Performance – Can’t complain despite my concerns about the CPU it performs admirably with all tasks including running Visual Studio 2008 and Expression Blend 2. WPF runs pretty will too from my highly accurate performance test, using Flip3D (Win+Tab keys) to see if it feels snappy.
  • Hardware Buttons – There’s a button for quickly switching between power modes, which configures the sound levels, light levels and power consumption with the click of a button, it even switches to Vista Basic Graphics in Battery Saver mode and it does all of this instantaneously, fantastic!
  • Hardware Buttons – This the first laptop I’ve seen that has a button above the keyboard for turning on and off the Touchpad. My god it’s brilliant, with a tap it’s gone so that you can type in peace, tap and it’s back again.
  • Touchpad – Maybe I’ve just had a bad experience with older Dells but this Touchpad doesn’t seem to get in the way when I type, I haven’t bumped accidentally once while typing, unlike the Dells at work which annoy the friggin’ s**t out of me, and you can’t turn them off like this one. This one also has pretty good sensitivity and has reserved areas at the right and bottom for auto-scrolling, another nice feature that I use a lot. I have to say this is probably the first laptop where I don’t mind using the Touchpad over a mouse.
  • Price – To buy a machine that I could easily see replacing my desktop, i’m stoked with the $940 price tag.
  • Its a Notebook – Gone are the days of waiting for a computer to boot, now I just start up from standby and in less than 30 seconds I’m in. Then when I’m done I just snap the lid shut. Why aren’t all desktop computers built this way? I say all desktops should have a battery for quick standby and in case of power failure.

Final Thoughts

All in all, i’m stoked and anyone who’s been thinking about getting a new computer (notebook or otherwise), should strongly consider getting a machine like this.

Leave a comment

The Wonderful World of Collapsing Margins in CSS (Or how I learned to hate the web)

I’ve been trying to make an <A> tag look like a nice button when you hover over it. The problem I have is that the unhovered state has no border, while hovered state does have a border. No matter what I seemed to do I could never get the two to look the same with their margins until I discovered the wonderful world of Collapsing Margins.

God I hate HTML…

Leave a comment

The Car Design Influence Experiment

I love cars, specifically fast cars, but it always intrigues me what people think is a good car design. The following is a summary of my observations about the influences that I think car designers have used in producing their distinctive car shapes.

Car Design Seemingly Influenced By
Porsche’s Carrera, for the last 40 years or so…
…has been inspired by the shapely outline of Toads and their aerodynamic efficiency.
Land Rover redefines the sleek and practical styling’s…
…of boxes.
BMW’s 5-series stands out as…
…well, you get the idea.
Mazda’s new MX-5, sporty…
…and so very Japanese looking (give me the old design).
Honda’s Type-R delivers revolutionary power…
…ranger style headlights.

I know, I know… some of those comparisons are uncanny… Almost plagiaristic, but I guess that’s the fine line the car designer’s tread. They could almost be forgiven for thinking they got away with it, without anyone ever noticing… but don’t worry, I’m onto their tricks…


Leave a comment

The Ultimate Notebook Buyer’s Guide (Well my ultimate buyer’s guide anyway)

I’ve been meaning to buy a laptop (or Notebook for the politically correct), for quite some time now, and seeing as tax time is coming up, making the decision to do so sooner rather than later is probably a good idea.  This laptop is going to be primarily a home web machine, seeing as the web is quite often needed ad-hoc it seems silly to have a desktop PC on all the time for this purpose alone. Me being a software developer, however, I want something that I can obviously do a bit of development "tinkering" with it as well so it can’t be a completely crap machine (Celerons are definitely out for example…)

The GLW (Good lady-wife) says that my budget is $1000, and while I agree we want to keep the price down, I take that to mean "as close to $1000 as possible", which I happily agreed to 🙂

The Spec’s


I was checking out the difference between Core Duo and Core 2 Duo’s today, and despite the article being slightly outdated, I have concluded that a Core 2 Duo is a must have for it’s better performance with no discernable increase in power consumption. Probably a 1.6Ghz-1.8Ghz will be sufficient, I do want semi-decent battery life.


This is something I don’t intend to budge on, this is going to be a Windows Vista machine, so it MUST have 2GB of RAM, no question.


This is probably my biggest sticking point and one that I think will have to be determined ultimately by price, I would love an NVidia or ATI card as I know how woeful the Intel graphics chips are for anything but 2D graphics. I’m an NVidia man myself, more for software reasons than hardware, but usually I find these cards adding some $100-$200 to the price. I did find a forum post on which GPU to choose, which was pretty helpful. I’m thinking a minimum of a Intel GMA X3100, seeing as the machine has to run Vista’s Aero nicely 🙂


The standard these days is WGXA (which gives a resolution of around 1280×800) and to be honest it’s usually enough, I’ve seen some WXGA+ screens which would be nicer (especially as it’s one of the few parts of a laptop you can’t upgrade later). But I doubt I’ll hit my budget if get one. I’m definitely only going for a 15", after all this is something we should be able to use in bed as a "laptop", not have to put on a table as a "portable desktop".

Hard Disk

Minimum 120gb, preferably at least 160gb, if I need more I’m thinking a portable USB drive will do the trick.

Other Must Haves

  • Minimum 2 USB ports (preferably more)
  • Wireless LAN
  • Wired Ethernet Port
  • DVD Burner (who cares what speed, it’s going to be a rare occurrence that I burn something with it)

I’m starting to wonder whether I’ve missed anything.

What’s out there

From a little searching it seems like an Acer Extensa 5620Z almost perfectly fits the bill, and here I was thinking what I wanted wasn’t achievable.

Leave a comment

More SQL Server Date Processing

In my previous post I mentioned a few useful tidbits when working with dates, today I’ve been working on a comprehensive date formatting function for SQL Server which can accept an explicit .NET DateTime.ToString() style Custom Date Format string.

SQL FormatDate Function

    SELECT * 
    FROM sys.objects 
        object_id = OBJECT_ID(N'[dbo].[fnFormatDate]') AND 
        type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[fnFormatDate]
CREATE FUNCTION dbo.fnFormatDate 
    @DateValue datetime,
    @DateFormat nvarchar(50)
RETURNS nvarchar(50)
    -- Temporarily replace formats with reserved characters 
    -- (so that the 'd' in 'Tuesday' etc. doesn't get replaced)
    SET @DateFormat = REPLACE(@DateFormat, 'dddd', '*AA*')
    SET @DateFormat = REPLACE(@DateFormat, 'ddd', '*A*')
    SET @DateFormat = REPLACE(@DateFormat, 'mmmm', '*BB*')
    SET @DateFormat = REPLACE(@DateFormat, 'mmm', '*B*')

    SET @DateFormat = REPLACE(@DateFormat, 'dd', 
        RIGHT('00' + DATENAME(day, @DateValue), 2))
    SET @DateFormat = REPLACE(@DateFormat, 'd', 
        DATENAME(day, @DateValue))

    SET @DateFormat = REPLACE(@DateFormat, 'mm', 
        RIGHT('00' + CAST(DATEPART(month, @DateValue) as varchar(2)), 2))
    SET @DateFormat = REPLACE(@DateFormat, 'm', 
        CAST(DATEPART(month, @DateValue) as varchar(2)))

    SET @DateFormat = REPLACE(@DateFormat, 'yyyy', 
        DATENAME(year, @DateValue))
    SET @DateFormat = REPLACE(@DateFormat, 'yy', 
        RIGHT('00' + CAST(DATEPART(year, @DateValue) as varchar(4)), 2))

    SET @DateFormat = REPLACE(@DateFormat, '*AA*', 
        DATENAME(weekday, @DateValue))
    -- NOTE: The 'ddd' format is not culture agnostic, for some languages this will be incorrect
    SET @DateFormat = REPLACE(@DateFormat, '*A*', 
        LEFT(DATENAME(weekday, @DateValue), 3))

    SET @DateFormat = REPLACE(@DateFormat, '*BB*', 
        DATENAME(month, @DateValue))
    -- NOTE: The 'mmm' format is not culture agnostic, for some languages this will be incorrect
    SET @DateFormat = REPLACE(@DateFormat, '*B*', 
        LEFT(DATENAME(month, @DateValue), 3))

    RETURN @DateFormat 

Example Usage

DECLARE @TestDate datetime
SET @TestDate = '2001-02-03T04:05:06'
    dbo.fnFormatDate(@TestDate, Format)
    (SELECT 'dd/mm/yyyy' Format
    SELECT 'mm/dd/yyyy'
    SELECT 'dd mmmm yyyy'
    SELECT 'dd mmm yyyy'
    SELECT 'ddd dd mmm yyyy'
    SELECT 'dddd dd mmm yyyy'
    SELECT 'dddd d mmm yy'
    SELECT 'yyyy-mm-dd'
    SELECT 'yy-mm-dd') Formats

Warning: I don’t make any claims about the performance of this function, so use it judiciously in your queries. If performance is a major concern then using a SQL-CLR assembly might be the better option (more accurate results also).

Feel free to post a comment if you find this useful

Leave a comment

SQL Server Date Processing

This post is a blatant link post about an issue I was having with SQL Server 2005 when writing T-SQL queries that needed to display dates based on the current connection’s language, in summary when writing queries always express explicit dates as ‘yyyy-mm-ddT00:00:00’ omitting the T or omitting the time will make the date language ambiguous. (I was using ‘yyyy-mm-dd’ thinking this was explicit)

Thanks to Jamie Thomson for posting this.

Truncating Dates

I find it useful to be able to truncate dates to a specific level, this is done like so:


The above SQL statement gets the current UTC date rounded to the day, just change the two day intervals to minute or whatever to truncate to smaller values.

Leave a comment