Mining Code

Backing up Atlassian OnDemand

Reason

When somebody wants to backup either the JIRA or Confluence onDemand databases.

Context

Atlassian onDemand does not currently have any features for automating a backup of either JIRA or Confluence.  To get around this we can trigger a backup from Atlassian and then automatically download the resulting file to a location of our choosing.  We can take this a step further by automating this processes with a cron job on Mac or Unix, or by using Windows Task Scheduler.

Disclaimer

These scripts were based on one given for Jira by Marlon Aguiar of Atlassian, the original can be found here.  Some minor modifications were made and a separate script for Confluence was created from the resulting code.

Continue reading “Backing up Atlassian OnDemand”

Agile Estimation

The following is an adaptation of content I wrote to help a new agile team.  It was meant to be a brief skim over the surface of estimation, rather than an exhaustive document.  It generally sticks to the classical agile approach, but has some additional techniques that I have found useful.  The information on which this is based is largely attributable to Mike Cohn, of Mountain Goat Software, perhaps my favourite technical author of all time and, for me, certainly one of the most readable.  I would love to hear peoples opinions on estimation, feel free to drop me a line with any tools and techniques that you use.


 

Story Points

It is very difficult to provide an off the cuff estimate for something unknown.  We may hazard a guess or try and compare it to something else of similar or relative size.  If asked to estimate the size of a mountain, it would be much easier to estimate it as double the size of another mountain than to specify a weight in kilograms.  There is also significant scientific evidence to support the hypothesis than humans are much better at estimating relatively than absolutely.

Story points are way of estimating effort to complete a feature that decouples that tie to specific units of measurement, such as time.  By estimating effort in relation to other estimates, we can derive a value for time.  Because we have estimated relatively, our final value for time is likely to be more accurate.

A story point is a unit independent measurement of effort required to complete something.  Features are measured in a number of story points.

A useful video by Mike Cohn discussing User Stories can be found here: http://www.youtube.com/watch?v=6q5-cVeNjCE.

Continue reading “Agile Estimation”

Sieve of Eratosthenes

I was rummaging around in some old directories and found an implementation of the Sieve of Eratosthenes that I’d thought I’d share.  I thought I’d share it because of the simplicity of the algorithm, it represented a very enjoyable programming exercise and one that I now use as a standard kata when learning a new language. The Sieve of Eratosthenes is an algorithm used to identify prime numbers.

In it’s simplest form, the algorithm states:

set Array to array of size N
set Array to all true
for i from 2 to N
  for each j where i divides j, j from i + 1 to N
    set Array(j) to false

Basically, it trawls an array of “on” bits and “turns off” any index that is cleanly divisible by any number less than the square root of it’s size.

Continue reading “Sieve of Eratosthenes”