Saturday, June 26, 2010

When tests go brown

by Richard Vowles

So I'm at Citcon 2010 in Wellington - and its after a morning session around BDD and Fit style testing that I'm writing this. People in the discussion use all sorts of frameworks - Cucumber, WebRat, Concordion and of course myself using easyb.

One of the interesting discussions I had last night was with Nigel Charman - part of the impetus behind the recent changes in easyb that I have done around turning it into a parse/run (instead of just run/evaluate). Nigel posited that they needed precondition checks - a third state basically that said that this test doesn't actually meet the qualifications required to run. Now you could just fail here - but that doesn't actually tell you anything, normally a failing test implies incorrect code, but in this case the code may be correct, but the data is wrong - so this mornings discussion further clarified that typically preconditions are around data being wrong or systems being unavailable. And knowing that separate from a failing test is a useful state.

As it turns out, the latest version of Junit (4.8.1) has an assume style clause [LINK] which supports the concept, but still only has the red/green colours. What I'm more interested in is reporting on it.

What does this have to do with easyb? Well, easyb also doesn't have this concept - and recently an issue was filed requesting shoulds be added to the given and when clauses (e.g. given "account is in arrears", { account =  getAccount(1234); account.inArrears().shouldBe true }. I accepted the request but said it should be in a plugin as I don't think it fit with the use of should and the concept of a failure. Now I understand why I am unhappy about it being there, and particularly I understand the pain this person is actually having.

So perhaps its time to revisit this particular issue - should easyb support another state - perhaps "brown" whereby preconditions or assumptions about the state is not met. This should be reported on to allow for dealing with in another manner.  I'll take it to the dev team and see what they think.

Tuesday, June 15, 2010

Goodbye, Java Posse

by Richard Vowles

So I can pretty much say I have listened to all the episodes of the Java Posse - I came in a bit late in the peace - around 150, but I went back and downloaded them all and they entertained and informed me. But now its time to stop - and I had a lot more to say (thats what a blog is for right?), but really, Joe - you have spoiled it so badly it is no longer listenable.

Dick, Carl and Tor, thanks for the good times. Good luck to you - I hope you keep enough of your loyal fans to keep it interesting for the next five.


Thursday, June 10, 2010

Shaft me, I'm an iphone user

by Richard Vowles

Disclaimer: I believe the Cult of Apple has fractured, the Cult of Mac and the Cult of iPhone. There is an overlap, but many Cult of Mac people are deeply, deeply embarrassed by Steve Jobs.

So, why am I bothering posting this. I suppose its because I still can't believe that people can be so utterly stupid to consider using iPhones or even upgrading to that silicon turd, the iPhone 4. And I think I now understand what is behind the Jobs machine.

So, in his latest round of bizarre, Steve Jobs is banning pornography on the iPhone. Oh wait, no, he is "banning" pornography from iPhone Apps. Pornography will still be freely available from Safari, where most of the porn is anyway and so you can still see it on your iBone or iPad. Its not about his kids, even saying that is laughable. So its clearly not about pornography, per se - in reality, I don't think Steve has a problem even gonzo porn.

Consider common sense for a moment - there are a lot of other ways the iPhone team could prevent you from getting porn, parental locks on phones, categorizing iphone apps, getting Norton to get their fantastic (on Windows) Online Family product sorted out for Snow Leopard and available on iPhone/iPad among other things. But no. Its not about common sense. No, this faithful reader (yes, singular I'm sure is appropriate Mark) is not about porn, this along with all the other stuff (you can't show Ads on the phone if you also make a phone os, programming in Objective-C, and the list goes on) is simply about one thing.

iPhone/iPad users - Steve Jobs is using you for his personal pleasure in the most dubious way modern technology can provide him. Thats right, he knows he can make you bend over and shaft you again and again and you will take it and come back for more. You get drip fed features other phone vendors have had for years in hardware, and then other important liberties you simply wouldn't stand for having taken away from anyone anywhere else in software, and you take it. You beg for it. And Steve is clearly getting off on it, because you deserve it.  He knows it, every person who things you are a fool knows you deserve it.

The only iPhone worth having is a jailbroken one. Those things are actually pretty good!

Thats all, I'm sure I'll post again even if I say I won't so I won't say I won't.