Posts
1145
Comments
890
Trackbacks
1
June 2012 Blog Posts
Incredibly slow performance using 64-bit IE with Selenium WebDriver

Based on a recommendation from a previous post, I decided to spend a couple of minutes setting up Selenium WebDriver (as opposed to WatiN which is what I am more familiar with, but concerned about as the project may or may not be dead, based on the lack of updates).

I had originally stated something along the lines of not liking the syntax because it seemed kind of sucky.  I’m not sure why.   Syntax looks fine (both ‘sucky’ and ‘non-sucky’ judgments occurred after 3 minute reviews, so I’m not stuck with either).

Anyhoo, since the environment I was working in requires IE, I went through the extra steps to set up to support that.  I don’t like the fact that it required extra steps.  WatiN doesn’t.  But, I’ve little doubt there are reasonable reasons why this is, so I sucked it up and spent the extra 74 seconds.

<digression>Way back in the day, I would spend extra effort and not think much about it.  As I’ve gotten older, my tolerance for that is near zero.  It’s one of the reasons I don’t like Azure or Ruby on Rails.  The first attempts to get things to work for both of them required effort and thought.  I’m old.  And lazy.  And arguably stupid.  Make it work please.</digression>

Since I’m lazy, I started with the documented demo code.  Go to Google, type in “Cheese”, output the result, exit.  Simple.

<digression>Why “cheese”?  I don’t know, why not?  Probably an inside joke.  Or maybe the person writing the sample likes to strip to his skivvies and rub a nice Gruyere on his nipples.  I don’t know</digression>.

And then watched it crawl.  You could probably count 10 seconds per letter as it typed them into the Google search box.  This is not good.  As in, end of story.

I have re-implemented the sample in my home environment.  No problem.

My Google-fu found this, but I’m otherwise stumped.  What could possibly cause this?

posted @ Friday, June 29, 2012 8:00 PM | Feedback (0)
On the Art of Misdirection

Dan North published an article about opportunity cost in which he (deliberately and provocatively) used TDD as an example.

The article itself is fairly straight forward, and states what should be rather obvious: look for the trade-offs for adopting any particular practice you adopt, and consider alternatives that might be better in some particular contexts, because there are always trade-offs and there are always alternatives.

Not surprisingly, some of the reactions are stereotypical and funny, along the lines of “How dare one suggest there are trade-offs or alternatives to TDD?”

For example:

“your (sic) disingenuously misleading the ranks of up-and-coming programmers into wasting their time looking for better design methodologies than TDD when no such beast exists.

For shame.”

The idiocy of such a statement should be apparent.  Various versions of BDD are quite obviously better and for quite obvious reasons (which I’ve laid out elsewhere).

<digression> “But Uncle Bob says BDD isn’t any different from TDD.”  This is yet another place where he’s wrong.  All of the leading practitioners of BDD don’t consider it the same.  I know that some people are of the opinion that anyone who signed the original Agile Manifesto can never be wrong, but those are opinions best discounted and ignored. </digression>

And even if you don’t like BDD, one comment includes this gem:

“when you’re working on a large project, TDD allows you to build the code in small steps, where each step is the simplest thing that can possibly work. The architecture follows immediately from that: the architecture is just the accumulation of these small steps. The architecture is a product of TDD, not a pre-designed constraint.”

Wrong, wrong, wrong, wrong, wrong.  Please, step away from your computer and go learn something instead of promoting spaghetti-code (ok, you can use the computer as a learning aid).  Do you still have all of your data access go through IRepository<T>?

Now, I’m deliberately being rude, both because I am, but also because these stereotypical defenses are not just condescending (and so deserving of a rude response), but ignorant.

For shame, my ass.

posted @ Wednesday, June 27, 2012 11:26 AM | Feedback (0)
Marillion, Park West, Chicago, IL – 6/23/12

A different concert in a couple of different ways.

But first, the set list:

  • The Invisible Man
  • Open My Eyes
  • Slainte Mhath
  • Out of This World
  • Afraid of Sunlight
  • Cannibal Surf Babe
  • The Great Escape
  • Estonia
  • Lucky Man
  • Between You and Me
  • Neverland
  • Encore 1:
  • This Strange Engine
  • Encore 2:
  • Kayleigh
  • No One Can
  • Three Minute Boy

Before the main event, a couple of words about the opening band, Sun Domingo.  They are a Georgia band, been around since 2004, yada yada yada.  Decent band.  Highlights from the first show were their cover of Pink Floyd’s “Brain Damage/Eclipse” from Dark Side of the Moon, and a 10 minute instrumental that, at one point, featured three of the four members simultaneously playing drums (it sounds weird perhaps, but it was pulled off fairly well).  So, going into this show, it was curious to see what they would play, especially since probably 75% of the crowd had been present the previous evening (that number is totally unscientific, obviously).  They decided to play a cover of Dark Side of the Moon in its entirety (then ending with the single from their latest release).  In a sense, this was risking, especially if it wasn’t done well (imagine a crowd booing the entire length of the album), but it was fairly well received.  There was some foreshadowing of the main event, when the computer hooked up to the main keyboard rebooted, causing a slight delay (during which time the audience obliged and requested “Freebird”, a joke from the previous evening.

As you may note, there are two repeats in the evening’s set list from the previous show, which wasn’t supposed to happen, so when the opening sounds/notes of “The Invisible Man” started, there was momentary confusion in the crowd (at least in the people around me).  Since it’s my favorite song of theirs, and since they absolutely nailed it (again), I didn’t mind.  After the song, Hogarth noted the repeat, claiming that there had been a personal request to play the song that involved ‘the exchange of underwear and hard currency’, or something to that effect.  He made a similarly humorously intended comment when the main set was ended with ‘Neverland’.

Since more of my favorite songs were played the first night (since I more or less knew what songs were going to be played, just not in which order), I spent a little more time watching the band, and the thing that stood out, and stands out, is how much they truly enjoy performing, and how much their dedicated fans love them.  Trite as that sounds, there are moments of near unbridled joy coming from not just Hogarth, but most of the band.  I was center-stage about 5 people from the front, and caught a few moments where Kelly, in between playing something, would just look out and stare and the crowd with a huge smile on his face.  I think a large part of this was due to the fact that this was their first US tour since 2004.  Hogarth made mention a couple of times that they had stayed away too long (he’s a showman, so of course he would say it, but I’m pretty sure he meant it).

It was also fairly clear that Hogarth was sick (and possibly also just a little…too drink-y, if you know what I mean).  He had mentioned voice issues in passing the previous night, and it seemed he was straining at a few moments.  Kelly and Trewavas would exchange glances at certain moments as if they were wondering “is he going to make it?” and Hogarth sipped at something through the evening (which he hadn’t the night before).  I’m amazed he doesn’t shred his voice.

At one point in the middle of “This Strange Engine”, there is a point where a sound effect (like a bike bell) rings and then it moves onto a piano piece that Hogarth sings over.  Or at least, it is supposed to.  Instead, in this case, the bell would ring and Hogarth would inhale to start singing, and then the bell would ring again.  After 4 or 5 times, he turned and looked at Kelly, who at this point, was pressing buttons and keys and whatnot to get it to stop, but to no avail.  He turned and stared at Hogarth and just shrugged his shoulders, and then a few seconds later, the bell stopped.  The crowd gave him a mocking ovation.  It was a light moment.

Overall, it was a fantastic two nights, and I’m seriously considering going to their Marillion Weekend in Montreal in 2013 (an event they’ve been doing once a year, it is three straight nights of concerts), as it would kill three birds with one stone: getting to visit Montreal again, three nights of Marillion, and the opportunity to see something like 6 hockey games in 10 days in one of my extended road trips.

And now, I get to go back and take another (or in some cases, a first) listen to some of their older discography, knowing in advance that even if some of it still isn’t too my liking, there are some real gems in there.

posted @ Sunday, June 24, 2012 7:10 PM | Feedback (0)
Marillion, Park West, Chicago, IL – 6/22/12

If there were two things that were confirmed at this concert, they are:

  • Though I was encouraged by the presence of my still noticeably older brethren, I am perilously close to becoming too old to rock
  • Sometimes, you can go home again

First, the set list:

  • The Invisible Man
  • Beautiful
  • You’re Gone
  • Easter
  • King
  • Fantastic Place
  • A Voice from the Past
  • Ocean Cloud
  • Power
  • This Town
  • The Rake’s Progress
  • 100 Nights
  • Man of a Thousand Faces
  • Encore 1:
  • Neverland
  • Encore 2:
  • Sugar Mice
  • Happiness is the Road

Thought I knew this already from checking out the set lists from previous concerts in the tour, tomorrow’s show will be of totally different songs, so going to both is worth it (Hogarth joked that it would be largely covers of old Beatles and Rolling Stones songs).

But before I get to the show itself…..

You know you are getting perilously close to being too old to rock when you think to yourself “Damn, I forgot to wear my back brace, I’m going to be standing for close to six hours straight” (transit combined with concert itself, I got off the train around 6:30 PM to stand in line for doors opening at 7, opening band played from 8 to 8:45 PM, then they played from 9:15 to 11:45, and I arrived home around 12:30 AM).  Though Park West does have some seating, I made a game time decision and said, Fuck it, and stood 4 people from the stage.  I’m expected back spasms big time from my programmer back at some point before the weekend is done.  I also noticed that a few of the older gentlemen around me were using ear plugs and thought to myself, Damn, I really need to do that for the next show. 

As to going home again….

I learned of and loved Marillion back in the Fish era, and in fact, the one and only time I ever saw them live was when they played Misplaced Childhood as the opening act for Rush.  When Fish left the band, I bought Seasons End and for whatever reason, it didn’t click for me, and so I let them go.  I skipped right past things like This Strange Engine and Radiation, totally missed Brave, and then checked back in for Anoraknophobia, which I also didn’t particularly like, and that seemed that.

I don’t remember the precise sequence, but at some point, I rediscovered ‘Easter’ from the Seasons End recording, which contains arguably one of Rothery’s two best solos (along with that from ‘Sugar Mice’ of the last Fish effort Clutching at Straws) and, more importantly, discovered Marbles.

The latter item was of particular personal significance to me for at least two reasons.  Though I don’t remember the exact order, the connection between Steven Wilson and the recording (he mixed a couple of tracks) led me to Porcupine Tree (or the other way around).  More so, Marbles was one of those recordings where I liked pretty much every song.

So, I’d been following them since, which led to the usual mixed results (except for the title track, Somewhere Else was pretty hit and miss, Happiness is the Road much better) and subscribed to the band’s newsletter, and helped fund both the latter and the upcoming Sounds That Cant Be Made through the pre-order program (Marillion funds their recordings to some extent through their fans).  When they announced their 2012 tour, which I assumed would be to play the new release (not knowing it won’t be released till this fall), I figured what the hell.  I haven’t seen them live since….wow, am I really that old?  Yes, yes, I am.  So, I bought tickets to both shows six months in advance.  And promptly forgot about it.  Totally.

Earlier this week, I got a newsletter from the band talking about being ‘north of the border’ and thought (since they are an English band) that they must be in Ireland or something, wondering if they knew that’s what being in Canada meant.  Yes, I’m an idiot, they were in Quebec, and I had a moment of panic when I thought that I had completely missed the concerts.  The way my brain’s calendar function works, I probably would have remembered yesterday (at 1 AM), but it would have totally sucked if I hadn’t.

Promptly, I checked out the set lists and noticed a number of songs that I didn’t recognize.  Since Jesus invented YouTube for just this purpose (and since the band doesn’t appear to mind uploads of cuts from DVDs), I started a crash course of listening to them.  Hey, WTF.  These are some really good songs.  It was almost like discovering a new band.  Normally, recognizing that I had ‘missed’ these songs for so long would have depressed me (which was my initial reaction to rediscovering ‘Easter’), but I was really looking forward to these concerts.

And, plain and simple, the band delivered.  As the opening notes to “The Invisible Man” played, which for obvious reasons was something I was especially looking forward to, they delivered a well performed set that was enthusiastically received by the crowd.  I learned to accept and even enjoy Hogarth’s ‘theatrics’ as part of the performance.  He sang the hell out of every song.  I know these guys are trained performers, but how he doesn’t lose his voice is beyond me (he did reference that it was close to the end of the tour and it was affecting him, though you wouldn’t have noticed). 

In person, Rothery is…a very large man.  Seriously, he’s huge.  He looks like he could be an offensive tackle for the Baltimore Ravens.  But, he’s simply a great guitarist (it did throw me off that, unlike most of the YouTube videos I’d seen, he was on the ‘wrong’ side of the stage, but since I was so close, it didn’t really matter).  Pete played fantastic bass and backup vocals.  The crowd was hot, and the band fed off of them.  Though I started cramping up at the end of the show, I pulled through.

I’m ready for tomorrow’s concert, where I will be suitably armed and ready with my back brace and ear plugs.  I have this vision that in a decade or so, there will be special section for geriactic fans to be wheeled in on wheelchairs.

Overall, it was a fantastic show, one of the best I’ve ever seen.

posted @ Saturday, June 23, 2012 2:00 AM | Feedback (0)
A basic fact about web browsers I was totally ignorant of

You learn something new everyday, and sometimes you learn that you don’t really understand some fundamental things.  So, let’s share johnny the developer’s ignorance.

Background:  I was setting up some WatiN automated acceptance tests for an older Asp.NET Web Forms site.

<digression> I was using WatiN because I’ve used it before, but it looks like it hasn’t been updated in a year.  Is it no longer an active project?  Should I be looking at WebDriver instead?</digression>

WatiN natively uses a lot of magic strings, and so there is a lot of ‘opportunity’ to fat finger stuff, and of course, that’s what I did.  I was doing something really basic:  setting up a test to ensure that when the value of DropDownList1 changed, the items in DropDownList2 were repopulated properly.  Since I fat fingered the control to look for, the test failed.

Not seeing my obvious typo, I did a view source of the page.   Blink.  WTF.  The view source did not show what was actually rendered.  I called over another of the web developers, and he too was surprised at this.

Another developer asked if I was using an UpdatePanel.  I didn’t create the site, but yes, that is something that was being utilized, but that still didn’t make sense to me.  Shouldn’t the view source reflect the state of the page after all rendering was done?

Turns out the answer is, well, no.  As Johnny Carson might have said, I….I did not know that <digression>To the kids out there, you see, Johnny Carson was this famous TV personality who….oh never mind</digression>.  When content is dynamically updated in a page through AJAX, Javascript, etc. in many browsers, ‘View Source’ simply doesn’t reflect it.  There are other ways and various tools you can use to see the underlying ‘source’, but view source isn’t reliable.

Like the other developer I asked, it isn’t something that I had ever looked at before, and never thought to question it.

posted @ Wednesday, June 20, 2012 9:24 PM | Feedback (2)
Words of wisdom: The Latin definition of “demo”

As I was lamenting the not unusual experience of previously texted working software behaving unexpectedly during a demo, a friend of mine reminded me:

I think that is the Latin definition of “demo”: will randomly fuck up in previously unforeseen ways.

True that.

posted @ Wednesday, June 20, 2012 11:00 AM | Feedback (0)
T4MVC RedirectToAction problem

I tried to find similar issues but Google-fu failed me.

With TVMVC, you should be able to get rid of some magic strings.  So, for instance, if you have this:

return RedirectToAction("Index", “Foo", new FooViewModel {SomeProperty = false });

you should be able to replace it with:

return RedirectToAction(MVC.Foo.Index(new FooViewModel {SomeProperty = false}));

However, the FooViewModel is always null when it gets to the controller.  I always assume user error, since johnny developer is an idiot, but nothing seems to be working.

posted @ Friday, June 08, 2012 2:17 PM | Feedback (2)
First impression of Visual Studio 2012 RC

Holy crap.  Is that thing f%^&ing ugly or what?

posted @ Thursday, June 07, 2012 2:36 PM | Feedback (0)
Words of Wisdom – Mike Halford

The actual post is only of interest to a subset of hockey fans, but it contains this gem:

“Finally, it’s worth pointing out that you can never really take anything off the Internet. It’s like trying to take pee out of a pool.”

Hard to argue with that.

posted @ Wednesday, June 06, 2012 7:54 PM | Feedback (0)