andrewlocatelliwoodcock

Thoughts on Software

Archive for the ‘Erlang’ Category

Waterfragile: Agile development in the Enterprise

with 3 comments

Waterfragile is my term for the most popular development methodology in use in Enterprises today.

Waterfragile is a heavily modified Agile methodology that adopts the best practises of Agile and Waterfall: the flexibility of Agile to adapt to changing (increasing!) requirements with the rigour of Waterfall to deliver promised features on a promised date. Waterfragile teams take on Agile overhead such as scrums, sprints, retrospectives, etc. but do not take on the bits they can’t be trusted with such as responsibility for the release or deciding which features should be included in each release or the deployment schedule. In fact, one of the central tenets of Waterfragile is that feature sets should only ever grow throughout the release cycle. Advanced Waterfragile practitioners refine this further by removing the ability to de-scope features as this focuses the team on developing 20 hours a day to meet the all-important external deadlines.

To do Waterfragile properly, only the development team should do scrums, sprints, etc. (it’s a development paradigm after all, no point wasting business analysis and test team time on this stuff!) and they should be slotted within a fully waterfall analysis, test and release cycle. If you fail to properly integrate the development team into the waterfall cycle, they may well miss their deadlines or skip features. Test teams should be fully prepped to pick up on all small visual defects – there’s no point spending too much time testing deep feature behaviour as that’s what development’s unit tests are for. Test teams should work to their own schedules and not waste time preparing tests ahead of the start of their test cycle so as to maximize their workload throughput.

Remember: what you are aiming for is separation not only of concerns but also of goals and responsibilities – teams should never be measured holistically on the successful delivery of a project but only on their part of it and the person responsible should never be the one making the decision as this can lead to dropping of features, missed deadlines, etc. The ability to add features, never remove them and still hit deadlines is Waterfragile’s killer feature – a minimum feature set and absolute delivery schedule can now be included in PowerPoint presentations about the project and as we all know “set in slide” is simply “set in stone 2.0”.

Done right, Waterfragile delivers all the benefits of Agile (faster release cycles, ability to make late changes to requirements) without losing any of the benefits of Waterfall (feature sets and delivery dates known months if not years in advance), a development methodology that has never failed to deliver even once over the last 40 years.

Written by andrewlocatelliwoodcock

November 14, 2013 at 19:08

Unable to replicate from local CouchDB to Cloudant – a quick resolution for the {“error”:”shutdown”} message

leave a comment »

Just in case anyone else hits an issue whereby you are unable to replicate a local CouchDB database to Cloudant … I was using Curl on Windows (which never helps of course 🙂 ) and found that I was unable to replicate from a local instance to Cloudant even though my passwords, ca cert bundle, etc. were all correct. Naturally, it took a couple of goes to get the curl escaping on Windows right but even once I’d figured that out it was still failing with the uninformative

{"error":"shutdown"}

I eventually found some posts that pointed to my (very) out-of-date CouchDB instance being the issue: you need to be running CouchDB 1.2.0 preferably on Erlang R15 for this to work correctly.

I upgraded everything and key presto! It works!

Written by andrewlocatelliwoodcock

June 15, 2012 at 18:13

Posted in CouchDb, Databases, Erlang

Tagged with , ,

Connecting to Cloudant from Erlang: a quick example of using HTTPS from httpc:request

with 2 comments

Wiser heads than me will no doubt already know this but I for one struggled with working out how to do this so I thought I’d put the example up in the hope it will help others. So, what I was trying to do was get and put to a Cloudant database from Erlang. Cloudant requires both HTTPS and a username and password and I struggled to find an Erlang example online.

First, make sure that you can connect to Cloudant over curl and fetch at least the _all_dbs resource. If you can’t, Erlang isn’t going to work either. I found that to get curl working correctly, I needed to update the ca cert bundle that came with it.

Here’s how to retrive _all_dbs for your Cloudant account using curl:

curl https://username:password@username.cloudant.com/_all_dbs

where username is your Cloudant username and password is the password associated with your username. For example, if your username were ‘foo’ and your password ‘bar’, here’s the command you would use:

curl https://foo:bar@foo.cloudant.com/_all_dbs

If this doesn’t work, the most likely explanation is that your ca cert bundle is out of date: follow the instructions on the curl website for how to update them.
Assuming this worked, your now in a position to try the same with Erlang. I’m going to use the httpc library here:

inets:start(),

ssl:start(),

httpc:request (get, {“https://foo:bar@foo.cloudant.com/_all_dbs”, []}, [{ssl,[{verify,0}]}], []).

It is important to remember to start inets and ssl before attempting to use httpc:request. A put to Cloudant is similar, here’s an example that assumes the existance of a database barfoo and a resource widget on your Cloudant instance and also that you have a suitably initialized variable Update which contains the data which you are writing to the widget resource:

inets:start(),

ssl:start(),

httpc:request (put, {“https://foo:bar@foo.cloudant.com/barfoo/widget”, [], [], Update}, [], []).

And there you have it

Written by andrewlocatelliwoodcock

June 12, 2012 at 11:40