My Photo
Auckland, New Zealand
Smurf sized person with a penchant for IT, gaming, music and books. Addicted to Travian. MD of Beegle Ltd, on board of directors for GITCA APAC, founder of NZ Girl Geek Dinners and half of industrial duo 'The Grace Jones'.

Thursday, 15 May 2014

Continuous Delivery


Setting up a continuous delivery process can be quite a momentous task, especially when retrofitting to an existing product, however, I'm quite lucky with a current project in that we're at the very start of the project so there are no existing processes in place.

Once you've read this, I'd love feedback on my solution and ideas for improvements if you have any.

When I joined the project the developers had already put continuous integration and deployment processes into place using Team Foundation Server (TFS) and Octopus. So the challenge placed before me was to extend this process out to a full continuous delivery plan complete with testing, reporting, full end to end life cycle overview, and of course, happy project, change and release managers.

This is taking a bit of thinking.  I can easily do the geek thing and get down into the nitty gritty of setting all of this up but the business needs to see how it works at a higher level, and they also need to be given confidence in the solution provided. So this means writing documents.

I started out by figuring out the environments we'd need. Initially I requested far too many environments and after being told 'No' by the infrastructure team (boo sucks!) I had a rethink and came up with the following:
  1. CI - continuous integration server - already in place.
  2. DQT - automation server - already in place (just needed to aquire it for my own nefarious means). Needs to match production.
  3. QA - New - needs to match production.
  4. Staging - New - needs to match production.
  5. Production - New - needs to match pro... oh, nevermind...
The next issue was how to maintain the quality into and out of each environment. To do this I created something called Quality Gates(TM me) and a pretty picture to go with them.   Each Quality Gate has an owner to ensure standards do not slip and quality remains high.

Product development needs to pass each quality gate in order to move on to the next phase.

Quality Gate 1 - Requirements & Design
The team already had a quality strategy in place for the requirements.  All the requirements are reviewed by the test team and they also require business sign-off. The business analysts work closely with the business and project team to ensure accuracy of requirements. Architectural governance and design reviews ensure adherence to best practice and satisfaction of requirements.

Quality Gate 2 – Developing the code
Based on the criteria already set up by the development team, this gateway has the following criteria. All the developers working on building the solution need to follow a strict set of coding standards from the outset, the aim being a high quality product from the beginning of the application development lifecycle. Each check-in of code must be preceded by a code review. Prior to a code review, a developer must build the project and have it pass code analysis. The code is analysed by a code analysis tool that enforces strict coding standards rules. Any overrides or suppressions of code analysis errors or warnings must be discussed as part of the code review. All code checked in to source control is linked to either a requirement, a change request, a task or an issue.

Quality Gate 3 – Automated Build, Source Code & Version Control
The development team automate the build process. When code is checked in, a build is triggered. This automated build process re-runs the code analysis tool, performs unit tests and smoke tests to check that the build process has run correctly and that the software can be deployed to another environment. The scripts that run the automated build process are also subject to Source Code & Version Control, so that any changes to the build scripts are picked up and tested as thoroughly as any other code changes.

Quality Gate 4 - Deployment
Deployments are automated to ensure consistency and accuracy. Once deployed to an environment, automated tests need to run to check that the deployment into the new environment was successful. If the deployment is successful, the deployment tool will pass a success message to the automated test tool that will trigger automated smoke and integration tests. If these tests pass, then automated release notes should be created that include all test results, code changes and any build script changes.

Quality Gate 5 - QA Automation
If the automated smoke and integration tests pass, then the full automated suite of testcases should run. The tool should be set up to run automated regression, smoke, use case, performance, load and integration tests. If these tests pass, the release notes should be updated to show the testing results obtained and the process can then move forward.

Quality Gate 6 - QA Manual Testing
After being successfully tested on the automation server, a deployment is made to the QA server. This allows for another test of the deployment process to a new environment. Automated smoke and integration tests should be performed to ensure the deployment was successful prior to commencing manual testing. Manual Tests are performed on new functionality, changes and defect fixes, these tests are then automated so that they are covered in the next release. Using this process ensures the manual testing is extremely focused and detailed. There should be versions of the software available on the QA environment. One will always be a version behind the current version. This will allow for manual regression/comparison testing should an issue be found in the current version. Once manual testing has been completed on this environment, the release notes should be updated to show the testing results obtained, and the process can then move forward to the staging server.

Quality Gate 7 - Staging/Pre-Prod
Here we perform another test of the deployment process. Once deployment to the is environment has been completed, automated smoke and integration tests should be performed. Release notes should be updated to show that these tests have been performed and the environment is handed over to the business for final evaluation and approval. Only when the business approves can the process move to the next phase.

Quality Gate 8 - Production
If the business passes and approves the staging/pre-prod deployment, the process can then deploy into Production. Again, automated tests should be run across the deployment to smoke and integration test the application but this time without affecting any underlying data - for rather obvious reasons.

Here's the pretty picture I created in Visio to match the words above:


That was the plan, next was figuring out a way to do all of the above. And so began the multiple weeks of evaluating software.

The tool needed to provide an end to end lifecycle view, it needed to hook into TFS and Octopus, it needed to manage manual and automated testing, and test automation needed to be powerful and flexible but still easy to set up and understand.   Cut a long story short... we found SpiraTeam and Rapise. They do everything we want them to do, and more.

And now we're onto the next phase, setting up the tools.  I've managed to get TFS, SpiraTeam and Rapise all hooked up, the next challenge is setting up the interaction between Octopus and SpiraTeam using the command line interface in SpiraTeam.  Once that is set up we'll have an end to end automation from coding through to deployment through to automated testing through to deployment to the next environment.

A few myths I've had to debunk over the past few weeks:

1. Manual deployment into production is better than an automated deployment. 
The automated deployment process will have passed testing on multiple environments before reaching production. You can still decide to manually deploy at this point, no-one is preventing that, however, it seems a risky strategy, you could use the well tested automated deployment, or you could use the potentially error prone human deployment.

With Continuous Delivery You can step in and step out of the continuous delivery process at any point. You're not tied to having a fully automated process, in fact, it is probably better to have some manual human check points on the way just to make sure the automation is running the way it should.  For example, you could add in a CAB between staging and production to make sure the change board are happy to proceed into production, and then wait for sign-off before proceeding to the deployment into production phase.

2. Quality isn't as good as you don't have a dedicated system test phase.
Quality in a continuous delivery process is much higher as strict rules are put in place from the outset.  Instead of the developers spending weeks or months writing code then delivering a package to a system test team to spend a few weeks manually testing, the process is continuously tested throughout the lifecycle using a combination of automated and manual testing.  Only code that has passed rigorous testing and has made it through each stage of the continuous delivery process will make it to production.

3. There's no change control
Oh change control, how I love thee. I'm a stickler for change control processes to ensure broken builds don't get into production, however, I can see the benefits of doing it in a new way, both in reduction of time and reduction of risk to the product.

The old way: Build a change register of items requested by the business.  Pick 20 or so of the changes and assign them to build x.  Developers work on build x and the 20 or so changes touch a lot of other code  with risk increased for each additional change included in the build.  When the build is complete and tested, it goes to UAT for each and every change to be tested by the business. If one change isn't correct, or the business decide that change isn't quite the way they want it, the entire build is rejected. This is a very high risk method of implementing change both in terms of time and the risk to the code base.

The new way: as a change or defectc is identified, it is coded, built and deployed through the continuous delivery process.  The testing is very detailed around this one change and when it gets to UAT there is only one item to sign-off. This is a low risk method of implementing change into a system.

Anyway - that's all I have so far.  Feel free to leave feedback.  :-)

Thursday, 1 May 2014

20 Week Challenge

The 20 week challenge started on the 28th April 2014, so hopefully it's goodbye wobbly bits.

I'm planning to blog progress on a weekly basis to make sure I stay on track with this. I will also make my exercise schedule available so that anyone who wants it can download it and join in with the madness.

My goals for this 20 week challenge period are:

  • Get my weight down to 70kg
  • Shrink my boobs (please boobs, shrink)
  • Get rid of any back flab
  • Get slimmer upper arms 

My longer term goals are:

  • Get my weight down to 55kg
  • Get back into my size 8 brushed cotton jeans because they are seriously comfy 

I've already lost a ton of weight, down from 105kg to 73kg in 2010, but then a few years ago this insane nagging, constant hunger took over and my weight went up a little. It now fluctuates between 81kg and 85kg. My GP and I now have this monster hunger under control with high doses of ranitidine, and since further upping the dose of ranitidine two weeks ago I've lost 4kg and am no longer distracted by an ever present gnawing pain in my oesophagus. Throughout this hunger period I have been working out at the gym and walking 5-12km per day because I quite like being fit and healthy, but now it's time for phase two of the weight loss and getting hot and sexy. Whoop!

Last night my REPs certified PT, Melinda Rhodes, came over to do my starting assessment. I am that nerd who enjoys gym assessments way more than normal gym stuff, it was loads of fun.

My starting stats:
  • Weight: 81.6kg
  • Body fat % using calipers: Melinda had issues getting any fat on my waist - whoop! This is good news for my heart, I don't store fat around my waist. My arms and hips were a different story though. So lots of work to do there. Just waiting to get the calculated results back from Melinda.
  • Resting heart rate: Resting heart rate was higher than normal at 73bpm as I'd just been rushing around, feeding dogs and was generally stressed from my drive home taking 1hr 45 mins instead of 45 mins.
  • Heart rate recovery: 3 mins of stepping in time to music on a very high step - seriously, that thing is designed for giants, not smurfs. Heart rate at end was 151bpm. After 1 minute it was 129bpm. So not a bad recovery but it could be better.
  • Pushups in 1 minute: 30 (full ones, not the girl ones).
  • Situps in 1 minute: 27 (full sit ups, from flat to fully upright each time).
  • Squats in 1 minute: 30 (deep squats, had to squat and touch bum on the step behind me).
  • Balance tests: I can stand on one leg all day and after a few minutes we decided static balance tests were a bit easy, so we switched to some dynamic balance tests. These are a lot harder and I definitely need to work on improvement in this area. You stand on one leg, raise one leg behind you whilst raising your hands in the air and leaning forward, then stand upright again, but you can't put your hands or foot on the ground. It's a pendulum type motion. I managed three on each leg before wobbling and putting down a foot. Then it was balancing squats on the wobble board - easy peasy again.
All in all, not too bad but there are definite areas for improvement.

My goals for the next 2 weeks:
  • Pick up rowing machine on Sat morning from Elite Fitness.
  • Set up an interval training schedule for the rower, planning to use a combination of HIIT and Tabata Methods.
  • Do daily interval training on the rower.
  • Keep working on push-ups, situps, squats and those pesky dynamic balance pendulum things.
  • Lose another 2kg by 14th May.
Food:
Two days a week I only eat a max of 500 calories, on these days I eat hard boiled eggs, meal replacement shakes and veggies; the other five days I eat what I like, which for me is usually soup, tomatoes and more eggs. This method is easier than a diet as you're not actually dieting. This is a lifestyle change and a pretty easy one at that. It's how I used to eat until my late 20s and I was always very slim, full of energy and had no health issues. It was hard to restart eating like this when "The Hunger" was present but now that's been resolved it's proving quite easy to drop back into this way of eating. Seems that research now shows that I wasn't an anorexic exercise junky but was simply eating the right way for the human body to work at its best.

Fixed Interval High Intensity Interval Training
Fixed interval HIIT. Row high intensity intervals at about 85-95% of maximum intensity alternated with low intensity intervals to recover. Adjust the length of the intervals to the level of fitness. A beginning rower can start with high intensity intervals of 30 seconds and recovery periods of 1.5 to 2 minutes, and repeat this for about 10 minutes.

What is the Tabata Method?
The Tabata method involves performing 8 – 10 sets of 20 seconds very high intensity exercise separated with 10 second recovery periods giving a total training time = 4 – 5 minutes. The caveat of the Tabata Method is that all the intervals have to be done at 100% intensity – an absolute flat out effort. You have to strive to perform as much work in each 20 second interval as possible and try to maintain that work rate for the 8 – 10 sets.

Sunday, 17 November 2013

Trying New Things

A while back I looked into getting Lasik because contact lenses were uncomfortable after a few hours due to dry eye, and glasses are just impractical when walking dogs in the rain or going to the gym. It took me ten years to pluck up the courage as I'm a bit sqeamish with eyes, but eventually off I trotted to the eye clinic with my loan offer all sorted for the fees so that I can do things quickly before chickening out. I get the eye checks done and find out that the only part of me that isn't too fat is my corneas. They are both too thin for Lasik and there's nothing I can do, there are no alternatives, I just have to live with being a speccy four eyes. ARRGGHHH... Fast forward a few months..{{{wibble wobble fast forward hands thing}}}.. I'm reading a magazine a few weeks ago and I read about something called Ortho-K. It's been around for a while apparently but no-one I've spoken to has heard of it. Why does no-one know about it? It's freaking awesome! Ortho-K: contact lenses you wear at night that correct your cornea so that during the day you don't need to wear glasses or contact lenses. And NO SURGERY REQUIRED! It's cheaper than Lasik but is of course more high maintenance. With Lasik you get it done and that's it. With Ortho-K you need to keep wearing the lenses at night to make sure your cornea is the right shape in the morning for clear vision. In New Zealand, Lasik costs $5800 to get both eyes done, Ortho-K costs $940 the first week when you get the lenses and fitting, then you have 3-4 follow up visits at around $200 each throughout the first year, all up it works out at around $1700. On Thursday I had my lens fitting and Friday morning I could see! When you're young apparently you get awesome vision after the first night, when you're an old fuddy duddy like me, it can take a few nights. I've noticed a gradual improvement over the past few days. The lenses are not the most comfortable thing to wear, but as you're asleep most of the time you're wearing them it's not normally an issue, and the first night was definitely the worst, by the third night (last night) they weren't too bad. If you've never worn lenses it will probably be quite unpleasant initially. In the morning you have to apply liquid tears to free up the lens as it suctions itself to the cornea over night (it's supposed to). Once it's freed up and moving, you have a little orange tool that you use to get it out of the eye - it comes out with a popping sound. :) For the first few minutes things are blurry, and then you realise you can see the pattern on the curtains on the other side of the house - RESULT! Driving to work without glasses or lenses made me feel as though I was back in my early 20's. It's so nice driving without the discomfort of lenses or the peripheral limits of glasses. My sight wasn't 100% perfect, but I could see road signs clearly a long way down the road. 8.30am on Friday was the first night follow up, and the sight test showed an improvement of 2 points, from a -3 to -1, plus the astigatism was also improved by 2/3rds. The legal limit for driving without glasses in NZ is -1.5. The optician gave me some -1.5 soft lenses for the evening as I'm pretty picky about having good vision for driving and your cornea does start to reset over the day, so by bedtime you're not as clear as first thing in the morning. The eyes should continue improving each night to get better and better vision, with longer last effects, some people report having improved sight for 2 days at a time, only needing to wear their overnight lenses on alternatte days. I will find out at the follow up next week just how much improvement we get over a week. It was fantastic going to Taste of Auckland without glasses or lenses, and even better was a really challenging hike on today around Waiheke Island unencumbered by glasses or lenses. If you're thinking of giving these a try, I went to OPSM at 185-187 Queen Street, Level 1. http://en.wikipedia.org/wiki/Orthokeratology http://www.opsm.co.nz

Thursday, 14 November 2013

Shiny Has Shipped

The new phone has shipped overnight. If the US postal service gets a shifty on, it could arrive next week and the queue of people wanting to check it out before I leave MBIE will not be disappointed. I have turned into an excited Tigger! Bounce, bounce, bounce.

Wednesday, 13 November 2013

New Shiny - Nexus 5 32GB in Black

I've needed a new phone for a while now. My first edition HTC Desire from a gazillion years ago is starting to get quite battered and its second battery is now starting to fail, prompting me to finally give up and buy a new phone.

The problem I have with buying a new phone is researching them; I always end up finding something amazing that isn't yet available, which means a new phone never ends up being purchased. This time though my research wish list item from earlier this year was the Nexus 5, and given that my HTC Desire is due for retirement I have decided to stick to my guns, not look at any new shinies that are coming out in the next few months. I have closed my eyes to the Phone Arena phone compare tool - it will not taunt me with the pretty 50tetragigamegabyte camera phones covered in bling that would make a magpie envious.

So, having decided to actually buy a new phone, it's time to research prices.

As you probably know, this little gem of a phone isn't yet released in NZ. Pah! No problem. It's available on the Google Play store for US$399(32GB) or US$349(16GB).

Purchasing Stage 1 - Go to Google Play Store. Denied. You can only buy a device from the Google Play store if you live in the States. Google tells you to 'go away because we don't want your money you horrible foreigner'. I tried setting up through a US proxy but none of the buy now buttons would work - tried several different proxies, all to no avail. Nevermind, it doesn't really matter that I can't buy it on Google Play as they've sold out and there's a 2-3 week delay. Maybe that's why the buy now button doesn't work. Hmmm....

Purchasing Stage 2 - See if an NZ based company has managed to bypass the Google Play defences and get their mitts on the shiny lovelies. Only one so far, Parallel Imported. They are selling the 16GB Nexus 5 for $769 with a delivery estimate of 7-10 days. Ouch. Considering the 16GB version is US$349 retail on the Google Play store (which works out at NZ$425 on xe.com today) that's quite a mark up. I'm paying NZ$120 for shipping, that still would only work out at $545 if I could just get the damn Google Play store to work - ah well.... So after taking delivery costs into account, they are marking up over $200 on each phone - I suggest haggling with them if you have the urge to be annoying - I did consider it as I do enjoy a good bout of annoyingness, but decided that 7-10 days was too long to wait.

Purchasing Stage 3 - Look on Amazonwho very helpfully bill you in NZ dollars so you can see how much it's costing you complete with postage. Here I find a 32GB Black version (sold out on Google Play) for US$499, with shipping it came to NZ$749.

So for $20 less than PI I have the 32GB version and it's being shipped directly to me. Would have still preferred to pay US$100 less as those of us in Non-US countries could do with a bit of a break on the high prices, but things are what they are and I doubt they will change before my HTC Desire dies completely.

Below is a picture of new Shiny - image provided by the internets. I will post a review and more pictures when it arrives. I am now off to dance around like a crazy person who is a little bit excited about a new shiny, and then I will go onto the Zagg page to buy all the protection my new lovely needs.

Friday, 26 October 2012

New presentation added - CodeMania - Google Maps Quick Start Guide

I've uploaded the presentation from tonight's talk at CodeMania after dark.   

It was great fun showing everyone how easy it is to create your own Google map, and it was quite interesting the number of people afterwards who said they'd always thought it was something difficult to do.  

Lots of people are hopefully now going away to play with customising their own Google maps and with any luck creating loads of funky fun things to play with online.   

I can't quite name the overall highlight of the evening for me, but it's a close run thing between the great diversity of topics covered by the other amazing speakers, Corey's disco ball hoodie and Zak the Cat!


Monday, 22 October 2012

CodeMania After Dark - 26 Oct 2012


26th October 2012

Codemania After Dark
Hopefully you've already got your tickets to this spiffing event that's happening on the 26th October.

Info here:  http://codemania.co.nz/

I'm doing a lightning talk on creating custom Google maps - very lightning, how to create a map in 10 mins - phew... this will require some fast talking.

If you're not going to the event and you want to check out the quick start guide to creating a custom Google map, then check out the presentation.