Andrew Stevenson's WebLog

Write Here Write Now


.Net Languages


Asp.Net (Misc.)

Asp.Net Controls

Bad Patterns

Err What?

Files and Folders


IE Add-Ins

Methods for the Madness


See Clearer, C#

Test Driven

I picked up an OCZ NIA nerve and brain wave controller

I'm not sure what I was doing when I first spotted the NIA (, but it caught my attention and I wondered if where they could be found, Amazon had them but wouldn't ship to Canada.

When I checked at the MicroBytes (local computer parts chain) site, they had it listed, but it had to be special ordered. I wasn't setting my expectations too high when I decided I would buy it; I figured the "3 days to 3 weeks" would tend towards the 3 weeks, but it only took 4 days.

The software that comes on the CD is out of date, so there is no point to installing it, you can just download and install the most recent version from the OCZ site

Getting the headband out of its protective packing was the hardest part of the setup, after that you just plug things in and put the headband on.

I seem to have the interference problem that's described in the video on the product page. I tried unplugging the chargers that are near the computer (bye bye Internet and sound for that test); the level for the muscle signal improved a bit, but I have a variety of things that may be causing interference. For the moment, Ive positioned the box so that my arm rests on it and that eliminates the interference.

Pong: I tried it, and its hard, so I switched to the brain fingers which shows you the 8 levels: Glance, Alpha 1-2-3, Beta 1-2-3, and Muscle. At first, everything is maxed out or moving around, but when the first bursts of new toy excitement cools a bit, relaxing and clearing your mind should bring all levels down.

I had having decent results in the fingers mode, I was able to get Alpha 1 maxed with every thing else at minimum; then I decided to take a screen shot and everything went crazy again. After several close calls that resulted in excitement or muscle tension I put my finders on the right buttons and tried to do it again after several tries, I got a pretty good pic (beta3 in up a tiny bit) of it* Alpha 1. After that, I seemed to get a little stuck, it became really easy to keep Alpha 1 up and everything else down, but it was really hard to look at the NIA UI without Alpha 1 going way up. Try Pong: fail.

I don't really play much FPS, so I didn't have a game that matched the built-in profiles, so I picked the basic arrow key profile and tried Warcraft 3. I was able to scroll around a bit and I was able to "press any key" using the NIA. This is better than I what was expecting, it was time to head over to my friends place where there are many FPS games to be found, Left 4 Dead being current most played game.

We had a lot more problems getting the nia calibrated at my friends house, part of the problem was that the headband wasn't solidly plugged into the box (my bad) but there was also more interference. At home, when I am touching the box, the signal comes perfectly into range, but we had to fiddle with the calibration a bit more before we got it working smoothly over there. 

It was time to try playing Left 4 Dead in the game profiles, we selected the Half-Life 2 profile because it has the same default key mappings.I had never played Left 4 Dead before, but I have watched my friends play, so I knew what I had to do. I started a game on easy at first there was nothing happening, then some weird stuff, then we set the key mappings back to the defaults :P

It took ten or fifteen minutes in the start area and a fair bit of friendly fire to get a feel for how to move and shoot, but eventually I was able to move forward and shoot without too much effort. Moving and shooting are tied to the muscle sensor; The profile wizard will show all the settings for a profile. The glance reflex is tied to strafe right and left, it was hard to use this consciously, but it worked really well a few times in the heat of battle.  The camera control stayed on the mouse, but if I can figure out how to get the glance to control the camera, it might be possible to play mouse-less.

I was really surprised how well I was able to play, I completed the chapter using the NIA to move, shoot, and pick up weapons. There were moments when I felt like I just had to will to shoot or move and I did, but most of it was stop and go; At one point I was so stuck that I just started laughing and the character in the game started running backwards and shooting. When I got close to the exit door I couldn't move forward anymore, I would move about a foot, then stop and start shooting, the harder I tried, the more likely I was to run backwards so I had back my way into the room. My friend was almost able to do it without getting incapacitaed, but he had the same problem near the end where he couldn't go forward and a hunter got him.

Its amazing what can be done with just the muscle sensor and the glance sensor, the next step is to see what can be done with a couple wave sensors.


Posted Saturday, January 17, 2009 10:25 AM by AndrewSeven | 3 comment(s)

Annother Typemock update, this time for VB.Net
Can you tell I want one of these?
If you haven't tried it, you probably should. 

Typemock have released a new version of their unit testing tool, Typemock Isolator 5.2.
This version includes a new friendly VB.NET API which makes Isolator the best Isolation tool for unit testing A Visual Basic (VB) .NET application.
Isolator now allows unit testing in VB or C# for many ‘hard to test’ technologies such as SharePoint, ASP.NET MVC, partial support for Silverlight, WPF, LINQ, WF, Entity Framework, WCF unit testing and more.

Note that the first 25 bloggers who blog this text in their blog and tell us about it, will get a Free Full Isolator license (worth $139). If you post this in aVB.NET dedicated blog, you'll get a license automatically (even if more than 25 submit) during the first week of this announcement.

Go ahead, click the following link for more information on how to get your free license.

Posted Tuesday, January 13, 2009 5:28 PM by AndrewSeven

A Typemock Isolator for sharepoint , yes please!

A great chance to test sharepooint and maybe even win a free isolator license :D

Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.

The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here. 

Posted Tuesday, November 25, 2008 12:19 PM by AndrewSeven

The wallpaper is not funny (house of spam)

It seems like every blog post on is the recipient of a comment with "funny wallpaper >>"

It looks like spam, can it not be blocked? 


Posted Tuesday, September 9, 2008 2:41 PM by AndrewSeven | 2 comment(s)

Filed under:

Commerce Server 2007 SP2 now available !

Just in case you don't already have 3 links to it, here is a link.


Posted Thursday, May 29, 2008 9:08 AM by AndrewSeven

NUnitAsp and style="display: none"

I have a control, which I test with a customvalidatortester, that produces an html span with (I thought) style="display:none" and it was failing the test for visible==false.

A closer inspection showed that there was a space after the colon:   style="display: none"

Removing the space fixes the problem, but the root of the problem is where the space comes from. The space is inserted when I use Visual Studio 2005's format document on the aspx markup.

To solve this, I mad another small change to NUnitAsp.

In ValidatorTester, I chanbed the visible property to check for both versions.

                bool displayNone = (style != null && (style.IndexOf("display:none") != -1 || style.IndexOf("display: none") != -1));


Posted Wednesday, February 13, 2008 11:32 AM by AndrewSeven

NUnitAsp and WebForm_PostBackOptions

I've decide to use NUnitAsp on the current project.

After doing some basic visibility checks I tried to call Click() on a LinkButtonTester and I got an error.

I did some digging and found that the new WebForm_PostBackOptions was not being recognized as a postback.

With a bit of hacking around, I've got it working again, the biggest issue was different quotes in the postBackScript from those in the html.


The fix:I'm not sure how comprehensive it is, but the basic fix is 2 changes in WebFormTester:

public bool IsPostBack(string candidatePostBackScript)


bool postback = (candidatePostBackScript.IndexOf("__doPostBack") != -1)

|| (candidatePostBackScript.IndexOf("WebForm_PostBackOptions") != -1);

return (candidatePostBackScript != null) && postback ;



public void PostBack(string postBackScript)


string postBackPattern1 = @"__doPostBack\('(?<target>.*?)','(?<argument>.*?)'\)";

string postBackPattern2 = @"__doPostBack\(\\'(?<target>.*?)\\',\\'(?<argument>.*?)\\'\)";

string postBackPattern3 = @"WebForm_PostBackOptions\(""(?<target>.*?)"", ""(?<argument>.*?)""";


bool succeeded = TryPostBack(postBackScript, postBackPattern1);

if (!succeeded) succeeded = TryPostBack(postBackScript, postBackPattern2);

if (!succeeded) succeeded = TryPostBack(postBackScript, postBackPattern3);

//if (!succeeded) succeeded = TryPostBack(postBackScript, postBackPattern4);

if (!succeeded)


throw new ParseException("'" + postBackScript + "' doesn't match expected patterns for postback in " + Description);




Posted Wednesday, January 30, 2008 1:39 PM by AndrewSeven

Filed under: , ,

A shortcut to TFS Explorer

I find the number of clicks it takes to get to the Team Explorer a little long so I dug up this shortcut so that I can put it on a toolbar button.

Customize your toolbars, select "View" from the available categories, then scroll down to the commands that start with T and you will find TfsSourceControlExplorer.

Drag that puppy onto your favorite toolbar.






Posted Monday, November 5, 2007 9:45 AM by AndrewSeven | 2 comment(s)

Why is GMail better about spam than hotmail.

 I have accounts on both services and I can tell that lots of spam gets sent to each account.

The big difference seems to be that most spam sent to gmail is delivered directly to the spam folder where at least half of the spam in hotmail goes to the inbox.





Posted Tuesday, October 2, 2007 2:47 PM by AndrewSeven

Filed under: , , ,

IE6 UI , Vista and Firefox

I'm looking for a browser that will run on Vista and give me the same UI that I had with IE6. 

At the moment, I'm using Firefox, it isn't my favorite, but I find the UI to be better than IE7.

I've tried some registry hacks for IE7 but now I'm ready to try other things ( I'm addicted to the Google Toolbar's search this site option so that might limit my options)



A little footnote : I still have IE 6 on one machine at home (the main web browsing machine) and the main page of this site doesn't display very well.



Posted Tuesday, September 18, 2007 1:54 PM by AndrewSeven | 4 comment(s)

More Posts Next page »