July 2013 Blog Posts
A sample NUnit SetUp class when using Watin

This post is largely for me, in case I need it again.

You know what NUnit is.  You probably know what Watin is. 

Watin is no longer under active development.  If you are in the business of writing browser-driven integration tests within the .NET space, you should probably be looking at Selenium.

However, if you are kicking it old school and using Watin, and you want to try to avoid all of those ‘false negatives’ (i.e., failing tests that fail because of quirks with COM, not because your test actually failed for ‘real’ reasons), I’ve found the following SetUp NUnit class useful:

    public void Init()
        bool ok = false; 
            ie = new IE();
        catch (COMException)
            ie = new IE();
        object nil = null;
            Configuration.UrlRoot + Pages.Home, ref nil, ref nil, ref nil, ref nil);
        while (!ok)
                ok = true;
            catch (TimeoutException tex)
                if (!tex.Message.Contains("'Internet Explorer busy'"))
        ie.SizeWindow(1280, 1024);

All of the threading and COMException stuff is to get around the occasional COMException you get when the new IE() call bombs out (I’d say if I ran my current 100-ish integration test suite 5 times, I’d get 3 or 4 exceptions of that sort), just because it is COM, or, well, just because.  I navigate to the home page to make sure IE is up and running for each test.

And yes, I am launching a new instance of IE for each test.  These are integration tests, they are supposed to be slow.

posted @ Wednesday, July 31, 2013 6:34 PM | Feedback (0)
Glimpse AspNet 1.3.1 Installation Errors

Given how nifty Glimpse seemed in the three minutes I spent working with it on a personal MVC app, I tried to install it locally on a work project.

No worky.

Errors in web.config, such as:


A bunch of errors with extra <HttpModules> section being added (and the like).  All of these were fixable with some manually typing.


The readme page itself threw some odd errors:


Those are just annoying.

The biggest issue was that every single page hit would throw some Javascript error, most of them in glimpse.pubsub, and no information would be available in Glimpse at all.



Tried installing through the package manager, and also tried through the console.  Upgraded the core to Glimpse 1.5.0, still no luck.

uninstall-package Glimpse.AspNet

Too bad.

posted @ Wednesday, July 24, 2013 2:20 PM | Feedback (0)
God how I hate parsing strings

There.  I said it.

posted @ Wednesday, July 24, 2013 11:06 AM | Feedback (0)
Marillion – The Great Escape – Live – Marillion Weekend 3/23/2013

Update: what the hell, the user pulled the video.  I have no idea why (I mean, I know Marillion is going to release a DVD in the fall of their Brave performances, but I find it hard to imagine they complained).  That sucks.  Oh, well, it was pretty cool, to say the least.  The Porcupine Tree show at Radio City Music Hall was special in many ways, but still, in many other ways, couldn’t hold a candle to this.

I was there

The sound quality isn’t very good (the sound from the floor was phenomenal), and the video quality isn’t great either.  But, it vividly brings to mind what it was like to be there.

As I mentioned previously, for many fans of Marillion, Brave is up there as one of the most popular releases of the group, the one that definitively established Hogarth as the singer of the band.  Except for their tour in 1994 (I think, too lazy to google it), they’d never performed this piece live in its entirety, so for most in attendance, it was a seminal event.  The energy in the room was palpable and overwhelming (in a good way).  Marillion is not, and has never been, like Peter Gabriel-era Genesis in terms of theatrics, but for what they do, it was up there.

The ‘story’ of Brave is Hogarth’s fictional account of the real life story of a woman found about to jump off of a bridge to her death.  “The Great Escape” is the ‘downer’ ending of the concept album, her death, though it is important to remember that “Made Again”, the ‘happy’ ending matches the real life events (she didn’t jump).  In any event, it is nevertheless something like the ‘real’ ending.

When the performance ends, the crowd begins to applaud, but unlike a previous loud round of applause earlier in the evening which was ‘shushed’ by Mark Kelly, no one in the band tries to stop it.  Rothery gets his acoustic, but Hogarth takes a step back to acknowledge the crowd response and it starts to build.  Recognizing their accomplishment, Hogarth begins to shake hands with the rest of the band (even though there’s still a song to be played), and the crowd responds.  Hogarth and Trewavas lean against each other and soak it in.  You can’t quite make out Hogarth’s facial expressions, but you can sense how he is ‘blown back’ a couple of times as he steps up to the mike and then back again.  As one commenter mentioned, if he hadn’t spoken, I bet we could have continue quite longer.  As Hogarth said the next day, it was a sound unlike any he’d experienced in his entire career.

I’m somewhere to Hogarth’s right.  I haven’t quite found myself in the video, though if I could, you would see me looking back at the crowd, soaking in the overwhelming energy of the night.

I’ve mentioned repeatedly that I don’t look to popular music for meaning (not much, anyway), since I find that in Shakespeare or the Bible, and for me, Brave is probably 5th in my top 5 of Marillion’s work.  Nevertheless, I don’t think I ever have, or ever will, experience anything quite like it again.  For everyone who is a music lover with a favorite band (Marillion is probably tied for third for me, but whatever), I hope that you have a chance to experience something like that night in your life.

It was an honor and a privilege to be there.  It felt like coming home.

For those interested, other videos from the weekend can be found here.

posted @ Monday, July 22, 2013 9:01 PM | Feedback (0)
Glimpse/NuGet Doh Reminder

So, I was looking at this post and liking all of the nifty functionality they’ve added to Glimpse (I’d checked it out a while ago, and not been that thrilled), and so installed the latest version.

Or so I thought.  When I ran my app, it kept telling me I had the previous version.  I uninstalled all packages and reinstalled, still nothing.  Naturally, I started cursing Nuget, as I am wont to do.

Oh, wait.  Hey, Johnny Dumbass Developer, if you add nuget packages, you think maybe you might want to recompile the app?

Oops.  Yeah, that will help.

posted @ Monday, July 22, 2013 7:05 PM | Feedback (0)
Printing from Mac OSX to an HP J4680

Go to here.  Download that.

Then add a printer.

Not sure if it lets me scan yet, but it’s a start..

posted @ Friday, July 19, 2013 1:22 AM | Feedback (0)
Dumbass Tech Idea of the Week: The Reactive Manifesto

It actually isn’t from this week, it’s only this week that I’ve seen it.

You can find it here.  If you care to, you can read the whole thing, but its conclusion is thus:

“Reactive applications represent a balanced approach to addressing a wide range of contemporary challenges in software development. Building on an event-driven, message-based foundation, they provide the tools needed to ensure scalability and resilience. On top of this they support rich, real-time user interactions. We expect that a rapidly increasing number of systems will follow this blueprint in the years ahead.“

Well, gosh, it is hard to come out against scalability and resilience but….how is this a manifesto?  What exactly is one signing if one signs this manifesto?  Whose egos created this circle jerk of a thing?  Does calling something a manifesto make it one, and if it did, why would that be a good thing again?

Dumb shit.

posted @ Thursday, July 18, 2013 12:59 AM | Feedback (0)
Repost: Unit testing is out, vertical slice testing is in

Nice post here.  Some money quotes:

"As a recovering TDD addict, I used to tell people, like many others do, that the issue with their TDD was that they didn’t do it right. If TDD is too hard, do more TDD! In other words, if it hurts, just bang that leg with that baseball bat a bit harder, eventually you will not hurt anymore.

I will come straight out with it: this approach to unit, integration and tdd testing has, by far and large, failed. It’s over. It is time to move on.”


“Instead of starting from the components I want to put under test, I start with what my users, hum, use.

If I provide users with an API, I will start by the API that I decide to publish, and consider everything else implementation details. I will only document and polish, a.k.a. test, what other people may use.

All the same, if my user interface is not an API, but some sort of UI, there is very little reason to care about all the scenarios a component may face that cannot be triggered from that user interface.”

Amen, brother.

Read the rest, this is good stuff.

posted @ Thursday, July 11, 2013 12:56 PM | Feedback (0)
Create a backup

I didn’t lose anything this time, but could have.

Back things up.  If it is code you care about, think about Amazon S3.  If it is personal files, think about just about anything in the cloud.

Take a minute (or an hour or a day) to set this up.

posted @ Thursday, July 04, 2013 11:13 PM | Feedback (0)