Posts
1145
Comments
890
Trackbacks
1
March 2008 Blog Posts
Vacation Time

Leaving tomorrow for a week in Canada.

For the 7-8 people who get my feed, you know what this means.  Since I've yet to push this boring thing to a real hosting provider, at some point during the week, my DSL will lockup and the site will go down.  Probably Monday.  So, I'll pop it back up when I get back on the 30th.

BTW, I restricted the IP addresses of the spammers so they can't hit the site.  It is obviously an automated process now, since they keep 403'ing happily away.  Traffic has increased tenfold as they desperately try to add spam trackbacks.  Stupid people.

posted @ Saturday, March 22, 2008 5:12 PM | Feedback (0)
King Crimson Returns

Awesome.

As noted here, not only are they returning 'to active service' (and yes, the phrase is pretty stupid, but Fripp is....an odd man), but opening said return with 3 dates at the Park West in Chicago.  My girlfriend doesn't quite understand why I would want to see them all 3 dates.

They've added Gavin Harrison from Porcupine Tree (my 2nd favorite band...just occurred to me they run their site on Cold Fusion...are they nuts?) as another drummer in the group.  It isn't clear to me if this means he is done with PT completely or not.  It also isn't clear if there will be any new music or not.  Nothing from Fripp's online blog suggests there is....guess it is related to it being the 40th year since they started.

Looking forward to it.

 

Update: Gavin Harrison is still a part of Porcupine Tree.

posted @ Thursday, March 20, 2008 6:53 PM | Feedback (0)
NCAA Brackets 2008

I apologize in advance to every pool to which I submit a bracket. I’ve got nothing. I’ve watched a bunch of games, listened to the experts, but really, I’ve got nothing. Nothing but chalk. Since chalk can’t possibly win every single game, I’ll throw in an ‘upset’ or two along the way, but I don’t mean it. Really, I don’t. For instance, I’m only dissing Stanford because they’ve screwed me a few times in the past, nothing against this year’s team.

I’ve got UCLA beating North Carolina in the finals. I’m sorry for that too.

That is all.

posted @ Wednesday, March 19, 2008 7:29 PM | Feedback (1)
Dumb-Ass Spammers

Sometime a long, long time ago, I let in a trackback to a porn site on some old post.  I think this was before I had moderation on.

In any event, a couple of months ago, after turning moderation back on, I noticed I was getting a ton of 'pingtrack' (Subtext language) comments to moderate.  A few hundred a day.  Tied to the one post that one had slipped by into.

After a few days of deleting them (more or less automatically), I turned off trackback/pingback support entirely.  Nothing more to moderate appeared in the Admin.

Well, I was looking at some reports that indicated my traffic had increased 400% (at least) recently.  Since I've never ever had anything interesting on my blog, and certainly nothing recently, I took a look at the raw logs.

They keep trying.  The fact that the links never appear seems to have increased their activity immensely.

I guess they hope that they are all stacked up and so when I turn trackbacks back on, tens of thousands of links will appear.  Dumb.

I know one standard approach is to turn off comments after a post's entry date after a certain period of time, but one thing I find personally annoying is discovering some blog post from some time ago that I've never seen till now, and been unable to respond since too much time had passed.

Still, I worry about the poor slaves in Slovakia (did trace one such spam farm to there) who are continually adding spam to (mostly) porn sites (though every once in a while they would try to slip in a trackback to Iowa Men's Soccer or something similarly benign), and they don't even get the joy of knowing I'm manually deleting them.

Idiots.

posted @ Monday, March 17, 2008 8:03 PM | Feedback (1)
NHL TV Commercials

http://www.youtube.com/watch?v=Pz3KpY5lrRc

http://www.youtube.com/watch?v=IjkUMbrT5SU

“I mean, that’s really why we lost tonight,  we couldn’t put the cat in the hat.”

posted @ Monday, March 17, 2008 7:38 PM | Feedback (0)
Why I'm Skeptical about Mocks and Testing

Last week after the Microsoft Launch Event in Chicago (for the 2008 'wave' being in this case Windows Server 2008, SQL Server 2008, and Visual Studio 2008), there was another get together of the Chicagoland Alt.NET group (there isn't a web site yet but that is forthcoming) where we discussed all sorts of things, as well as planning out the initial stages of a Code Camp in the fall (more details forthcoming).

Somewhere in there, I was able to formulate in pretty brief terms a description of why I am skeptical of mocks and testing.  It was not a formulation that was meant to convince anyone of anything, but I am going to relate it here so that it is written down and I can refine it (if I feel like it).

 

Who watches the watcher?

There are multitudes of places where one can get detailed explanations of mock objects, unit testing, integration testing, TDD, BDD, DDD, blah blah blah.  Wikipedia is a good start.  I will not pretend to give adequate presentations of any of them, because it is somewhat besides the point (and anyone who objects on that basis is just admitting to missing the point).

A point that has been made by Yegge (among many others) is (paraphrasing) that if you have really good developers, then you can implement most any methodology, most any development practices, and you will end up with good code.  What should be obvious, but maybe isn't quite so, is that the opposite is also true.

A potential use of testing is to provide some verification of the intent of the code under test.  A potential use of mocking is to allow your testing to avoid any dependencies on concrete implementations that would cause friction and interfere with the intent of the tests.

There are many other potential uses that I will not mention here.

But, if the code is such that it needs testing to verify its intent, and mocking is required to help bring this about, what happens if the same person who developed the original code also develops the tests and the mocks used in those tests?

To put it in its most coarse form, and in personal terms:  "Suppose I'm not a very good coder.  I've heard that by using testing and mocks within that testing, I can improve the quality of my code.  But, I'm the person who will be writing the tests, and the mocks used in those tests.  And we've already submitted that I'm not a good coder.  So why should I think that by adding tests and mocks that things will get better?  Isn't it just as likely that they will get worse?"

 

Less bad code is better than more bad code

Testing code is, ultimately, just more code.  To use mocks, you need to know how to code with them.  But writing tests that actually test what you think you are testing is a skill.  Writing mocks that actually properly setup your expectations is hard

I was recently in a situation where I pointed out that a particularly important piece of codebase was not under tests.  So, the other people involved went off and created a bunch of tests.  The only problem is that the tests they created were not able to prevent either false positives or false negatives.  In my view, having poorly designed tests such as these is worse than having no tests at all.

There's no compile time check that your tests actually are correct, or that your mocks have their expectations setup properly.  It requires some level of sophistication to do this.

To use another example, simply 'releasing' GOF patterns without guidance is just as likely to lead to disaster as to having never learned them.

 

How do we get to there from here, without having to take the journey?

I love integration tests.  They test what will happen in my production environment (especially if I run the tests against that environment) with my production code.  There is no leakage.

They are also incredibly slow, incredibly dangerous ("hey boss, we just placed 400 orders on your credit card, is that okay?"), and difficult to implement.  For these and many other reasons, people try to find out how to produce tests that avoid these problems and still provide value.

But there is the potential for leakage.  NUnit and Rhino Mocks are leaky abstractions (just to pick a couple).

When faced with an organizational decision of whether to embrace testing (and if you are really going to go beyond integration testing, you do really have to have some sort of mocking framework to use), I think this is a very difficult decision to make.  Once you introduce unit tests that can be green while production bugs scream red, I think the battle is lost.  Ensuring that this doesn't happen is as much a battle as whatever worth there is in testing itself.

posted @ Sunday, March 16, 2008 9:31 PM | Feedback (7)