Feb 11 10

XSLT Reference Links

by Alex Peck

Over the last couple of days I started using XSLT for the first time. I found these useful links which were enough to get me going.

Feb 8 10

SqueezeServer WinForms Client

by Alex Peck

A couple of days ago I finally got fed up with the SqueezeCenter web interface. It’s not that it’s bad, it’s just that I open a lot of tabs in my browser, then can’t find the SqueezeCenter page when I need it.

A simple winforms Squeeze client.

I thought it would be nice to be able to control SqueezeCenter from something sitting in the taskbar, so over the last couple of days I made a simple .NET client. I’ve got 90% of what I need running, so as a proof of concept it has served its purpose.

Most of my effort was spent on data access and marshalling threads into the UI. Once I finish under the hood I might make a WPF UI layer, which would make it much more presentable.

Feb 6 10

Heavy Rain Demo

by Alex Peck

This is somewhat hidden, but if you visit Precinct 52 you can obtain a code to get the demo.

Once you register, select the following pieces of evidence (for some of them, you need to drill in to get the individual items):

1. Tyre tracks (117h)
2. Short cigarette (117b)
3. Origami bird
4. Coffee shop C (“diner”)

Once submitted you get a code which you can redeem in the Playstation store (there is a little button next to your basket icon at the top which took me an embarrassingly long time to find).

I really enjoyed the sleazy place demo, despite the clunky camera. This is a classic problem: you can let the player control the camera, or provide canned control sequences which are more cinematically gratifying. Although the shots might be framed better, you blunder about like a fool. This tends to break the suspension of disbelief, and is exacerbated by an animation engine which fails to adapt well enough to recover from most blunders.

This sort of criticism is missing the point I think, and failed to put a dent in my enjoyment. Quick time events have evolved slightly since Shenmue, and I like the way button sequences physically reflect the onscreen action and are embedded in the game world.

Watching this I realised that when I played it parts of some scenes ended differently (it clearly depends which questions you ask).

Jan 21 10

Virtual Machine Manager service crashes mysteriously

by Alex Peck

A few days ago Virtual Machine Manager started to crash, and was writing entries similar to this in the event log:

Fault bucket 736400234, type 5
Event Name: VMM20
Response: None
Cab Id: 0

Problem signature:
P1: vmmservice
P2: 2.0.4271.0
P3: Engine.TaskRepository
P4: 2.0.4271.0
P5: M.V.D.T.Task.GetAllTasks
P6: S.C.Generic.KeyNotFoundException
P7: cdb2
P8:
P9:
P10: 

Attached files:
C:\Windows\Temp\SCVMM.f5c52a6e-8f74-450c-bc57-d0ede6234a3b\report.txt

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\Report069118df

The logs were empty, and a quick search based on this error didn’t yield any useful results. Eventually, I tried running a DBCC CHECKDB in SQL Server and found some corrupted page links like this:

Table error: Object ID x index ID x, partition ID x alloc unit ID type In-row data). Page x is missing a reference from previous page Possible chain linkage problem.

No wonder I got no hits by searching, it’s quite unlikely that somebody else’s SQL Server suffered the same corruption. I had to repair with data loss, but was able to recover practically everything (my automated backup hadn’t been running for some time).

ALTER DATABASE VirtualManagerDB SET SINGLE_USER WITH NO_WAIT
DBCC CHECKDB (VirtualManagerDB, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE VirtualManagerDB SET MULTI_USER WITH NO_WAIT

Good old DBCC CHECKDB did the job.

Repair: The Nonclustered index successfully rebuilt for the object "dbo.tbl_TR_SubtaskTrail, PK_tbl_TR_SubtaskTrail" in database "VirtualManagerDB".
Msg 8945, Level 16, State 1, Line 3
Table error: Object ID 2137058649, index ID 1 will be rebuilt.
        The error has been repaired.
Msg 8978, Level 16, State 1, Line 3
Table error: Object ID 2137058649, index ID 1, partition ID 72057594039173120, alloc unit ID 72057594040418304 (type In-row data). Page (1:12338) is missing a reference from previous page (1:50295). Possible chain linkage problem.
        The error has been repaired.
Msg 8981, Level 16, State 1, Line 3
Table error: Object ID 2137058649, index ID 1, partition ID 72057594039173120, alloc unit ID 72057594040418304 (type In-row data). The next pointer of (1:50295) refers to page (1:34253). Neither (1:34253) nor its parent were encountered. Possible bad chain linkage.
        The error has been repaired.
Msg 8945, Level 16, State 1, Line 3
Table error: Object ID 2137058649, index ID 2 will be rebuilt.
        The error has been repaired.

The moral of this tale: make sure your automated backups are working properly.

Jan 15 10

Robozzle

by Alex Peck

Robozzle combines three things I like: games, programming and robots. It’s surprisingly addictive.

The source code is available here. If you get stuck, try this.

Jan 6 10

Travis Pastrana jumps 269 feet

by Alex Peck

This breaks the previous record for a ramp-to-ramp rally car jump by 98 feet.

Jan 5 10

Electromyography for the masses

by Alex Peck

Not content with Natal, Microsoft are filing a patent describing how to use EMG as an input medium. The following video demonstrates a few applications.

Ultimately, I’m sure they’re planning to miniaturise and embed this into people.

Dec 25 09

Win7 God Mode

by Alex Peck

Windows 7 provides a hidden shortcut to all control panels. Simply create a new folder and rename it as:

GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

It’s not quite TweakUI, but it is quite handy.

Dec 16 09

Change keyboard layout on Windows XP Login Screen

by Alex Peck

Having changed my password to include £ (I tend to use a UK keyboard layout) I found I was no longer able to login to several XP VMs with US layout on the login screen. Since my laptop doesn’t have a numeric keypad I couldn’t even use right ALT+156. I even tried to cheat using the onscreen keyboard’s numeric keypad, but this didn’t work either.

Some newer versions of Windows display the input region widget on the login screen if you install multiple input locales. On XP, I couldn’t get this to appear.

To get around this, I found it is possible to change the default keyboard settings in the registry. Obviously I had to log in using the local Admin account in order to make this change, which fortunately had a password I was able to type.

Dec 9 09

CHESS on Channel9

by Alex Peck

CHESS is a test tool for finding and reproducing Heisenbugs. Put simply, it takes the non out of non deterministic when testing concurrent code.


Get Microsoft Silverlight


Toward the beginning there is quite a nice illustration of why you might not find Heisenbugs by stress testing. Further in there is a more detailed explanation of how CHESS works, and how the thread interleaving state space is reduced to a manageable level.


Get Microsoft Silverlight


In this installment we see how to use the managed version of CHESS within a Visual Studio concurrency unit test.


Get Microsoft Silverlight


Finally, here we get an overview of the tooling which helps visualise different thread interleavings.