Wednesday, 20 April 2011

Open Source Software - my mullings

I spent 8 years running an open source software project - so I kind of have an idea what its like. Maybe I don't - maybe I just know what its like running an OSS project that is small.

I pushed some software OSS because, at the time (and this was back in 2002), I felt the best competitors at the time were buggy, and feature poor. I thought people would benefit from my software, and I think some people did.
I had some big people using it at some point - Xerox and Maersk were the biggest I think.
But mostly, it was fairly small companies, just looking to solve a problem they had, like me.
I wrote a Java connection pool - it was going against the main competitor, Apache's DBCP, and a few other OSS offerings like C3PO. You get what you take, and you take what you can get. Some people preferred mine, and some people preferred others.

So its cool for a while - you get people interested in your project, and thats great. You do some bug fixes, you feel good - you feel like you're part of the community. Jetbrains gave me an OSS IntelliJ license because I was OSS. Cool - part of the solution, not the problem.

But after a few years, you get a bit bored - most developer's I've met do.
I wound download my OSS a few months ago (well, say wound down - I just switched off the site - bad I know). But why did I do it ?

There were a couple of reasons -
1) To me, no-one ever seemed to contribute. I used to get a few "here's a bugfix" emails, and that was cool - and I appreciated them wholeheartedly - but on the whole I was contacted by hundreds of people over the years that would seem angry that "x" wasn't implemented or "y" had fricked over their site.
Now I worked hard to fix the critical bugs - I remember even taking a day off as holiday from my work position to fix a particularly bad bug (no - I wasn't supported by my workplace to work on the project, even though they were using it in their key systems).
After 8 years, 3 bug fixes from external sources makes you think "this is all take, no give".
2) I got better at coding. I started to get ashamed of the lack of unit tests, and shoddy coding. I wanted to retire it because I no longer respected the code.
3) DBCP caught up ! Its now, I believe, better (in the main sense that its better supported and no longer barfs under load (they had threading issues)).
4) I've moved on from Java ... I no longer see Java as a relevant language.

I've had a few emails since saying "where's it gone ?" and I've given them the source code ... but to be honest, I don't think my little project would be missed.

Which brings me on from the navel gazing to the real point ... I've been using a lot of not-well-known OSS lately, and I'm not really chuffed about the quality of it (which was one of the main reasons I got out of my own OSS offering).
I get that its great that you're giving out to the community - I did it too - but in 2011, is it OK to ship OSS software that isn't tested ? I'm going to go with no.

A lot of these guys are just people out there trying to give to the community, and I do respect it. It just feels there is no-where to when they don't know. Or when they get bored, like I did.

How do we (as a community) write quality OSS when the demand is small (but probably important to those using it) ?

Maybe there's an answer out there, maybe not.

Monday, 28 March 2011

Writing a JSONP codec for openrasta

So it seems Openrasta supports json out of the box, but I needed it to support jsonp - in order to do cross-domain calls.

Stealing the original json codec, I've implemented a jsonp codec, code below.
Really enjoying openrasta so far - very quick to get up and running, simple conventions, and easily extendable !

To use the codec :

ResourceSpace.Has.ResourcesOfType<MyStuff>()
.AtUri("/mystuff")
.HandledBy<MyStuffHandler>()
.TranscodedBy<JsonpDataContractCodec>();

Friday, 25 March 2011

AppHarbor - Continuous delivery done right

So I've just joined a startup dev company - http://www.agilex.co.uk , and we were wondering what to do about environments.
We didn't really want to run a bunch of hardware out of our office, as we couldn't really afford it, nor could really be bothered with it.
We'd heard of, and used Heroku in the past in a non-commercial sense, and it looked pretty cool, but only supported ruby based apps. Then we fell upon AppHarbor - Heroku for .NET, or as they say "Azure done right" (cheeky little hook , but I love it !) .

If you know nothing about appharbor or heroku - the principle is this : we'll host, compile and deploy your code. Oh, and we'll also run your unit tests, and if they fail ... no deploy. Its all hosted on Amazon's EC2 clound offering, so can scale nicely.

So it sounded great for us, and to be fair we were only looking for a couple of things - we wanted to push our code somewhere where we didn't have to maintain the hardware.

But after a few days of using appharbor, it slowly started to dawn on me that appharbor is so much more than a hosting platform which compiles and deploys your code.
Its flippin' continuous delivery. With a single click (or git command). And they're doing it - right now. And you can too :)

As someone who's being in the agile space for a while, I'd always looked upon continuous delivery as a bit of a golden unicorn (or do I mean goose ?)- I've heard people do it, and wanted to get there, but the implementation was always elusive to me.
If you think about how hard continuous delivery is - its quite tricky. OK, maybe its not rocket science, but places I've worked in the past would have trouble implementing it.
Thats what is so amazing about appharbor - they've done all the legwork - they've automated the frick out of the whole process.
New IIS site ? Clickety click. Done. New DB ? Mysql or SQL Server sir ? Done. Deploy your code sir ? Push once again to the appharbor master, default master branch, with the build behaviour, with the build behaviour ....

I feel liberated - I don't care about system teams, DB teams, copying code to here, maintaining that CI server there -I just "push once again", and my code is live (and if you want to roll back the code, you just click "deploy" on a previous version. Yay !).

So its been weird - I suddenly have continuous delivery. And all I had to do was sign up to appharbor. Its that simple. It can be for you too : http://appharbor.com .
Their tagline is "Azure done right". I'm sure thats true - but for me, its more than that - its part of the agile journey done right.

BTW ...
@ferventcoder has some great videos on appharbor where he throws the magic of roundhouse & other chucknorris goodies into the mix : http://geekswithblogs.net/robz/archive/2011/02/18/appharbor---azure-done-right-aka-heroku-for-.net.aspx

If @appharbor is reading this - please find a way of pulling that chucknorris craziness into the DB space !

Saturday, 5 March 2011

Kanban and Scrum.

Whilst I've been trying to do agile for several years, I've never been in a scrum team that I would consider as really working. I'm sure there are scrum teams out there that estimate well, sprint well ,and deliver great software. But I've never been in one, and I'm sure there are a lot of people out there that have had a similar experience as me in implementing scrum. The point of this post is to offer an alternative - something that might work for you, if scrum isn't.

There will be some people who read this that will argue that I've never done Scrum properly - that my pain-points are due to the fact that a lack of engaged product owner, or overzealous project managers, or an undisciplined team.
Whilst that might be true, I've tried to do scrum in 4 companies over the last couple of years, and I feel a theme is emerging (and yes, I know that theme could well be "you is doin' it wrong").

On paper, Scrum seems good - estimate some work, check your velocity, fit the the number of stories into the sprint as will fit that velocity in order of priority. Do the work; sprint ends, demo to the customer; accept feedback. Rinse and repeat.

Waterfall says analyse some features, work out how long it will take, commit to a deadline. Do the work, timebox ends; demo to the client.

But in my experience, Scrum often feels a bit like mini-waterfall.

Scrum's not exactly the same as waterfall - there are some clear improvements that exist in the scrum approach - quicker feedback, ability to change course & react to stakeholder input. Estimation of work is better because you're estimating every 2 weeks rather than once at the beginning.

But when I'm doing Scrum, I feel that its not enough - the feedback isn't quick enough, and the project managers start to treat it as a sequence of mini-waterfalls. They start asking why we didn't manage to fit in all the stories we put into the Scrum, and start micromanaging.
Now there are several reasons it feels like this - the main ones probably being that the PM's never really get on board with Scrum, and push the "feeling" of it to mini-waterfall. Coupled with that fact that the team is probably not very good at estimating, and we're not really engaging with the stakeholders, and still using PM's as proxy stakeholders.

But thats one of my problems with Scrum - its almost too easy to fall into mini-waterfall when you don't have available all the aspects that would make Scrum succeed - access to stakeholders, and either PM's that embrace Scrum (or dare I say it no PM's at all).

I'm also not particularly engaged with the idea of velocity or timeboxing.
When does a business care about velocity ? What does velocity mean to them ? Businesses deal in money and days. I've never been comfortable with this fibonaccian sequence of abstract points. I don't know what they mean. I'd rather say "small, medium, large, crazy big". I know that small is a couple of days, medium is a few days, large is a week, and crazy big needs to be broken down.

Timeboxing feels like overcommitting - in the same way waterfall is overcommitting. In most sprints I've been in, we've either delivered everything, and pulled in more work, or not delivered everything we'd estimated we would. I've rarely delivered exactly what we'd estimated.
Now that could be a problem in estimation, and I'm sure there are teams out there that are making it work, but I'm sure there are plenty of people who arn't.

So why do I think Kanban sorts out the pain-points I've experienced with Scrum ?
Scrum "pushes" work (a bunch of features) into a timebox. Kanban "pulls" work on a feature by feaure basis.
I like that for several reasons.
Firstly, it leaves little room for PM's to take control. Work is done when work is done.
The business just cares about delivering features - and Kanban gives that. The business doesn't care about velocity. The business knows if a team isn't delivering software quick enough - you don't need velocity to tell you developers arn't up to scratch. A business should employ developers that care - if they care, then you'll get good software delivered quickly. Its about trust, and respect.
Secondly, the feedback cycle from Kanban is immediate - you don't have to wait for the sprint to end. Couple with continuous delivery, the business sees immediate results.
The pipeline is simplified - get feature, clarify it, code it, push it.

I think Kanban can also work for PM's as long as they back of a bit. PM's need to engage in costing and timesheets - a fact that developers often don't understand, nor care about - but businesses often need. But with Kanban, costings and timesheets are done at the end of the pipeline - after the fact, not before it. They'll work in facts, not estimations, because the feedback cycle is so short (ie features get completed and signed off every few days, not every few weeks).