Continuous Integration, Plugins and Going Too Far

I quite like the Continuous Integration software 'Hudson'.

While it is from the java world, it has some useful .net plugins, and it is so easy to extend that .net programmers can get a lot out of it. This blog post is a good guide for .net developers wanting to get started with it.

One oddity about Hudson is that it uses Blue to indicate success, rather than the more traditional Green.

hudson with blue success marker ball

Perhaps this is done to help people with red-green colour blindness.

Either way, I was happy to see there's a plugin called "Green Balls" which changes the success images to green, rather than blue.

hudson with green balls

I thought this worked fine, and I was quite happy with the newly installed Green Balls, until we'd been running for a few days.

There was a loud crashing sound, I turned around to the build monitor and noticed something unexpected:

hudson with green balls and incredible hulk smashing the place up

Yes, yes. I am groaning too. It is bad. Yes.

 

The Rules of Stand Up

If this is your first day at stand-up YOU HAVE TO TALK.

Jesus almigthy! Employers are crying out for employees who "hit the ground running" and let me tell you, IT'S NOT THAT HARD.

And yet, I see people fail. Many, many people -- intelligent people -- they hit that first tiny hurdle, they bellyflop into it and collapse on the floor in a ball. Why people why!?

I guess I have to start by quoting the rules of 'fight club' since i'm clearly referencing them, and then I need to define what I mean by 'stand-up' since that is the matter at hand.

The rules of 'fight club'

  1. The first rule of Fight Club is, you do not talk about Fight Club.
  2. The second rule of Fight Club is, you DO NOT talk about Fight Club.
  3. If someone says stop, goes limp, taps out, the fight is over.
  4. Two guys to a fight.
  5. One fight at a time.
  6. No shirts, no shoes.
  7. Fights will go on as long as they have to.
  8. If this is your first night at Fight Club, you have to fight.

About 'stand up'

By 'Stand up' I mean "the Daily Stand Up Meeting" as introduced by the scrum software methodology and (pretty much?) adopted by all software teams everywhere.

At stand up, you stand in a circle and each speak in turn. We stand up because time is precious. Each person says... well, let me just explain 'the rules of stand up' in the style of 'fight club'. Let's see:


if this is your first day at Stand Up, you have to talk.
If this is your first day at Stand Up,
you have to talk.

The Rules of Stand Up

  1. The first rule of Stand Up is, you do not talk while someone else is talking.
     
  2. The second rule of Stand Up is, you DO NOT talk while someone else is talking.
     
  3. You talk fast and you keep it moving fast.
     
  4. Tell us what you did yesterday.
     
  5. Tell us what you FAILED to do yesterday.
     
  6. Tell us what you will do today.
     
  7. Tell us who is BLOCKING you today.
     
  8. If this is your first day at Stand Up, you have to talk.
     

I could go on, but I already have. ;-)

 

Sydney International Airport: Stupid, Criminal, or Criminally Stupid?

Hanlon's razor tells us:

"Never attribute to malice that which can be adequately explained by stupidity"

and this maxim has been my good friend for a long time.

But sometimes the stupidity is too acute to be plausible. Surely stupidity has limits?

Here's a case that left me gobsmacked.

For the last few years, airport security checks have been confiscating any liquid that is over 150ml or is not in a clear container. This is due to a security scare at some time. Fair enough, I accept that.

It turns out that they are also confiscating items purchased in-transit -- perfumes and duty free liquor, for example. I accept this too: I mean it's stupid, but it's within the usual bounds of plausible stupidity that we encounter every day. It's been going on for a few years now.

But here's the case of implausible stupidity I encountered last week at Syndey airport.

There's a duty free store encountered in-transit, just before a blind corner, at which there is an unexpected security check point.

So a store is selling items to people who will be forced, just 10 metres down the road, to relinquish their purchases.

Here's my mud map of the situation:

store with check point around the corner.

(Note that I didn't suffer this fate myself, I witnessed it happen to about 10 percent of the people from my plane.)

A duty free store sells goods just before a blind corner.

You walk around the blind corner and you enter a small, fast moving security check point.

Once your liquid goods have passed through the x-ray machine, they are confiscated. Everyone looks surprised. Even the security guards act like this has never happened before.

For many of the victims of this situations, this is their very first experience of Australia. Some kind of a crazy country where everyone is out to trick you.

(My wife and I were so impressed by this, that we found a quiet spot to observe the security checkpoint from above. It definitely wasn't an isolated case, it was very common. And the security guards looked amazed every time.)

I am pretty sure there's some organised crime occuring here, because the alternative explanation, stupidity, is just too impossible to be believed.

In the absence of a criminal conspiracy, here's 6 solutions that would've been better than confiscating the liquor:

  1. The shop should inform the in-transit passengers that their liquor will be confiscated, before making the purchase.
  2. The checkpoint could allow the passengers to return to the shop and demand a refund on the sale of the liquor.
  3. The airline could warn the in-transit passengers (before they leave the plane) that any liquor they purchase in transit will be confiscated.
  4. Instead of issuing the actual liquor, issue some kind of voucher which the person can use to collect the liquor at a final destination.
  5. Respect the shop's tamper-proof packaging, as this ought to indicate that the goods are safe for travel. (If need be, an upgraded form of tamper proofing would be sufficient).
  6. The security checkpoint could confiscate the goods, put them into tamper proof bags of their own, and deliver them to the cargo hold of the plane. (This is how 'dangerous items' like fruit knives used to be transported)(If this costs too much it could be reimbured by fining the shop who sold the goods)

But what's really going on here? What do you think happens to all that liquor?

I sincerely hope that there's a racket of some sort. Maybe it gets sold back to the shop. Maybe the security guards hang onto it.

I'm not sure, but I just hope there's a profitable crime going on, because in such a blatant case, malice is far more understandable than stupidity.


Sorry for the hiatus. Have been on holiday.

 

God No! ...The ReBuilder

Do you ever have a software idea so horrible that you feel physically sick?

At times like that, you can block out the idea immediately, but I find it's best to follow the idea through to it's logical conclusion.

So here's a repulsive idea I had, which I've since discussed with a bunch of people who helped flesh it out a little more, making it extra terrible.

var person = new Person();

Introducing 'The ReBuilder'

Ah, yes. It's called 'The ReBuilder'

Here's an example of what happens when you're foolish enough to use it.

So, you open up Visual Studio and choose to create a new console application.

You type the line:

var person = new Person();

Try to compile and see an error, essentially 'Person? No such type!'

"Error 1 The type or namespace name 'Person' could not be found (are you missing a using directive or an assembly reference?)"

Rather than have the programmer waste his or her precious time creating this new class, the Rebuilder does it for you. It goes right ahead and creates a class with the name 'Person'. It doesn't ask you to confirm the action, it just goes ahead and does it. No ifs or buts. Where does it put this new class? Wherever is the most conventional place. It builds the application again, right away. There's no new compilation errors, so it rests.

person.FirstName = "Jim";

You type another line of code... you now add:

person.FirstName = "Jim";

The rebuilder picks up on this straight away. (Actually, screw it, you don't need to specifically try and build... this is a background compilation. It's always present.)

Rebuilder notices the resulting error...

"Error 1 'Person' does not contain a definition for 'FirstName' and no extension method 'FirstName' accepting a first argument of type 'Person' could be found (are you missing a using directive or an assembly reference?)"

Clearly you're not after a method called FirstName, you're after a property. So rebuilder adds a property named FirstName of type string. No magic.

Next you try to save your object...

person.FirstName = "Jim";

person.Save();

This yields a fresh error:

"Error 1 'Person' does not contain a definition for 'Save' and no extension method 'Save' accepting a first argument of type 'Person' could be found (are you missing a using directive or an assembly reference?)"

This time the missing method is, indeed, a missing method. So ReBuilder gets in builds a method with the appropriate signature.

And it doesn't flesh out the body of the method with some dodgy 'Throw New NotImplementedException()' bullshit like the 'Generate Method Stub' feature in Visual Studio. It analyzes the name of the method, and implements it on your behalf.

"Hmmm, 'Save'," thinks the ReBuilder. "I guess you want to 'save' a person." So rebuilder writes a save method, saving to the most conventional place it knows: the database.

If there's a useful database connection in the application, then it uses that. If not, it creates one.

If the database contains a table named 'person', it will save to there. If not, it will build a table.

If there's no database to begin with -- well the ReBuilder goes ahead and builds it.

Obviously, you wouldn't do all this without any code coverage, so hell, RB churns out a sweet suite of tests to cover all the branches of the save routine.

(If the database, and the person table already exist, then we make sure all the relevant properties exist. This might include creating a migration script for updating any other environments with previous versions of our database)

Next you type:

person.GetByFirstName("Jim");

"Hmmm. Judging by the name GetBy<PropertyName>(<string>)..."

It looks like you expect a well understood pattern to be implemented.

(Yes, this bit is blatantly inspired by Ruby on Rails use of method_missing...

"def method_missing(method_id, *arguments)
   if match = /find_(all_by|by)_([_a-zA-Z]\w*)/.match(method_id.to_s)
")

And rebuilder will add an index to the Person table, on the column indicated by the property name, plus create the relevant goo for performing the expected retrieval. (And again, whatever tests are needed to cover all paths.)

Finally, you branch out a little and type:

Satellite.ReCalibrateAfterSolarFlare(magnitude:=237);

ReBuilder, naturally, doesn't have a freakin clue what that means. It doesn't fit any known convention -- so it falls back on its "Convention_Missing" convention.

Convention_Missing

First, ReBuilder looks on Koders, Krugle, codase, google codesearch... every last place it can to see if any indexed open source code contains a method like the one we're after.

Failing that, RB opens your email account and writes to a few of your coder buddies (on your behalf) to see if any of them have experience with a similar problem.

Failing that, it sends a polite (though assertive) email to Scott Hanselman, asking him if he can (a)help out, or (b)point you in the direction of someone who can.

When a suitable method is located as a starting point for 'ReCalibrateAfterSolarFlare' -- it is pasted into the code, and a new compilation is attempted.

Rebuilder attempts to complete any compiler errors at this point through simple deducation, through the use of markov chains, through Any compiler errors at this point are submitted as polite (though assertive) questions at StackOverflow, in the persona of a very awkward but honest noob, struggling to solve this one temporary and specific problem.

While waiting for the responses there, ReBuilder runs a logo competition online at 99designs or crowdSpring, then holds back, letting the community provide the content as well as picking the winner.

Once the responses from StackOverflow are sufficient to get the code compiling, ReBuilder checks that all the unit tests (written by the lowest bidder at www.RentABusinessAnalyst.com ) are beginning to pass.

Once all code compiles and all tests pass, the logo is in place and the typical page layout and css are fully baked (munged together from every cool site mentioned on every cool design blog) the app is shunted onto the first available cloud computing platform, cross promoted at your facebook and twitter profiles, cross posted to reddit, hacker news and digg, where it's upvoted and astroturfed by a distributed swarm of sockpuppets launched by every other PC on the planet running a copy of Rebuilder Zombie daemon, promoted with whatever relevant google adwords are cheap enough to suit your budget, and plastered with enough punch the monkey ads to bring in a steady trickly of cold cash.

You, meanwhile, sipping cocktails on the beaches of Tahiti, receive an SMS telling you the app is done, and your resume is automatically updated with glowing details of the amazing "ReCalibrate After Solar Flare" 2.0 app.

No magic. None.

 

Matt, The Office Mortar

Ah-ha! I have another ghost-blog entry, sent in by a tortured enterprise-peon who wishes to remain anonymous. (Personally, I like to imagine the voice of David Attenborough when reading this one.)

A mortar outside of its Office Habitat

Matt, The Office Mortar

Like its military namesake, the mortar found in offices has one primary purpose - the lobbing of grenades.

The Office Mortar often uses domain or technical knowledge, anecdotes or rule-lawyering to inflict heavy casualties. In an open, pluralist office where everyone is encouraged to speak up about problems it is difficult to deal with a mortar directly, but many people see them for what they are, constantly throwing out problematic issues that either need to be defused or blow up in somebody's face.

Often used by insurgents keen to derail a project, a mortar placed in a strategic position such as testing, architecture or business analysis, can keep a team pinned down for weeks or months, and cause horrific loss of morale and productivity.

Although the mortar likes to deliver its lethal payload by lobbing grenades indiscriminately into groups (in office parlance this is called a "meeting") mortars in the 21st century have devised a new means of spreading fear and error - grenades delivered by email!

Now, Let's watch as this mortar unleashes a deadly barrage of nebulous issues, process meta-questions and second guessing.

Organizer: We're here to finalize any remaining details of the user stories in the development cycle that's now underway...

Matt the Mortar: Half these need to go. X isn't fully specified, and there's no point doing Y without it. And why isn't Z in scope?

Organizer: Sorry Matt, we agreed on the list of stories last week. You were in that meeting, and as a group we all agreed on this list.

Matt the Mortar: The whole process is broken! What's the point of saying we're agile if we're unwilling to change.

Organizer: We value your opinions Matt, but perhaps this meeting isn't the best forum to...

Matt the Mortar: There should be a full review of the process by which the list of stories is defined for the cycle, and I'd like the outcomes of any meetings where scope is discussed to be mailed to the whole team.

Organizer: Now Matt, we held a retrospective meeting just last Thursday, and all of these points would've been excellent things to raise on that occasion...

Matt the Mortar: Furthermore, let me say that I for one don't have any faith in these so called 'business reps' and whether or not they actually represent the business itself. You need to raise that back to the project sponsors.

Organizer: The what? Look, getting back on track, we need to ensure the first user story is...

Matt the Mortar: That story is completely broken -- it will never work with the FizzBuzz system they have in production.

Organizer: Hold on, integration with the FizzBuzz system is strictly out of scope for this project.

Matt the Mortar: No, I've been talking to other business reps and they're very keen to see a lot of improvements to FizzBuzz as soon possible including cloud based...

And we leave our meeting there, irretrievably drowning in a deep vat of confusion. Matt will of-course have forgotten all of these bomb shells when the next retrospective is held. He will instead insist that the retrospective is a waste of time that stops them from implementing many important features that he alone understands.

It is at moments such at this that managers around the world choose to bring in a highly successful counter measure: The Office Sharp-Shooter. But more on that topic next week.

;-)

 

'Outlook style' rules for Subversion

At work, when I get an email from an idiot, I set a rule.

Example

I start work at a new company.

I notice they use Microsoft Outlook.

Within minutes I get an email:

From: Jenny@work
To: Everyone@work
This message was sent with High Importance!
Subject: "URGENT!!!! Get your footing tipping entries in by Tuesday week!"

Hmmm. It's "URGENT!!!!" so I spring into action:

Add new rule -> Messages from: 'Jenny@work' -> Delete.

Done.

But now look at all this crappy code the other devs keep commiting to the repository.

Every time I perform an "SVN update" it's like I've just invited a carnival of freaks to crap all over my hard drive.

A nice feature would be if we could get the same utility from subversion as I get from outlook.

"Do not accept any code changes from Trevor, if they relate to internationalization."

Trevor, you see, doesn't have a freakin' clue about internationalization. But he thinks he's God's gift to the unicodes.

And Joella, who thinks every programming nail is another excuse to wield the hammer of reflection.

"If you see code submitted by Joella, containing 'System.Reflection' replace with '//TODO: write actual code here, rather than namby-pamby show off serialization code.'

It's just a humble dream I have. The best approach to implementing it, that I've come up with so far, is to build a custom version of Tortoise SVN (it's open source right? I can fork it a little if I want to ) and then dump this custom version of tortoise on Trevor and Joella's machines.

From Trevor's point of view, it will look like he's committing his changes to the repository. But tortoise will in fact be just quietly twiddling its thumbs and doing nothing. If you count 'logging keystroke and scraping bank account details' as 'doing nothing', that is.

Trevor may realise sooner or later that he's never getting anyone else's changes. That no matter how often he updates, he never gets any new code. He may even begin to suspect something is up and he may bring it to our attention. At that stage it's time to enact the "remote 'overwrite every byte on the hard drive, and perform thorough boot sector corruption' " feature of his custom tortoise build.

With a little creativity, a little software, and a little patience, we truly can make the world a better place.

p.s. the solution is: DVCS. Please discuss.

 

Really deep linking: Url + regex

Here's today's boil the ocean scheme idea — and it's not a new idea by any means. I'm sure it has occurred to many people at many times, I've just never seen it written down. (links to further reading welcome)

Just say you want to bookmark a particular paragraph on a particular web document.

Perhaps you want to perform the electronic equivalent of using a highlighter pen to point out a particular fragment of a document in its original context.

You can give the uri of the page, but you can't give a specific link to the actual paragraph you are interested in.

(Sure, if the author of the document provided a named anchor tag for the paragraph then you are in luck. But only semantic web fanboys and egomaniacs go to this kind of extreme)

What I'm thinking is that, instead, you could provide a little extra bit of regex-goodness in the url. Say for example you said:

href='https://secretgeek.net/regexUri.asp --highlight "Say for example you said:"'

...then this could act as a pair of instructions to the browser: the first one is "get from 'https://secretgeek.net/regexUri.asp' and the second instruction is "highlight the text that matches this regex: "Say for example you said:" (excluding the quotes). The instructions are separated by spaces, qualified by quotes and so on. Click on the link and the page is shown, with the relevant text highlighted.

Okay — i'm thinking four different things at once here:

  1. Why stop at highlight? what other commands could the new commandline accept?
  2. "Major security flaws waiting to happen"
  3. Some people, when confronted with a problem, think "I know, I'll use regular expressions." (etc...)
  4. Subtle differences in implementations between browsers.... NO!!!1!

And of course, as always, I'm hearing the voice of some strange ever-present character in my head (who sounds a lot like comic-book-store-guy from the simpsons) and he alternates between:

  • You can already do that in firefox with addins/greasemonkey, idiot. And
  • 'course, there'a an emacs command to do that

Thoughts? Additions? Subtractions? Jakob?

 

hExcel -- A Hexagonal Spreadsheet

Here's a wacky idea, I've got no use for.

hexcel, the hexagonal spreadsheet

'Hexcel' is a spreadsheet with hexagonal cells.

How does it work? What is the advantage? I have no idea. But there could conceivably be some advantage to it.

Bees for example, planning their hive. Settlers of Catan fans, developing game optimization macros. Or experimental musicians, planning new forms of musical notation to accompany their Jankó keyboards.

hexcel

 

Is the remote control a thing of the past?

We humans used to be almighty atheletes, then the TV was invented.

For a time, the only exercise we found was in hopping up to change the channel (this was usually relegated to the youngest member of a family unit)

Time went on and we got lazier still.

The remote control became a must-have for every lounge room.

The next step is to become so lazy that we can no longer reach for a remote control.

We'll use mind-power to control the volume.

Pretty soon, thinking will be too much trouble.

The TV will need to do the thinking. You watch TV -- and TV watches you.

"He's looking bored? Better switch channel."

Automatic volume control will be easy. TV pays attention to the ambient noise level in the room, looks where the audience are seated, and listens to the shows its broadcasting, adjusting to keep everyone comfortable.

Maybe we end up putting ourselves into the matrix, one little feat of laziness at a time.

 

The Utterly Thorough Guide To Awesome Application Compatibility on Windows 7.

How does backward compatibility work in windows 7?

I'm glad you asked.

You don't got to be a Hanselman to know all this.

Here's a pictographicatorial guide to compatibility checking in the windows 7.

XXX

* In point of fact, it's a virtual Raymond Chen (a VRC), but the MS guys are so freakin good at virtualization now that You Will Never Ever Ever EVER Be Able To Detect The Difference. Even Mrs Chen is rarely sure. And only when that fails do they invoke the real Ray Chen.

So take it from me, a world expert on the computing technologies, that this new version of windows will be just about the best thing since Vista.