CD – Tea-Driven Development https://blog.mattwynne.net Matt Wynne taking it one tea at a time Wed, 21 Aug 2019 13:05:20 +0000 en-US hourly 1 https://wordpress.org/?v=6.2 165828820 Two ways to react https://blog.mattwynne.net/2013/05/09/two-ways-to-react/ https://blog.mattwynne.net/2013/05/09/two-ways-to-react/#comments Thu, 09 May 2013 11:37:45 +0000 http://blog.mattwynne.net/?p=520 Continue reading "Two ways to react"

]]>
Every organisation that makes software, makes mistakes. Sometimes, despite everybody’s best efforts, you end up releasing a bug into production. Customers are confused and angry; stakeholders are panicking.

Despite the pressure, you knuckle down and fix the bug.

Now it gets interesting: you have to deploy your fix to production. Depending on how your organisation works, this could take anywhere between a couple of minutes and a couple of weeks. You might simply run a single command, or you might spend hours shuffling emails around between different managers trying to get your change signed off. Meanwhile, your customers are still confused and angry. Perhaps they’ve started leaving you for your competitors. Perhaps you feel like leaving your job.

With the bug fixed, you sit down and try to learn some lessons. What can you do to avoid this from happening again?

There are two very different ways you can react to this kind of incident. The choice you make speaks volumes about your organisation.

Make it harder to make mistakes

A typical response to this kind of incident is to go on the defensive. Add more testing phases, hire more testers. Introduce mandatory code review into the development cycle. Add more bureaucracy to the release cycle, to make sure nobody could ever release buggy code into production again.

This is a reaction driven by fear.

Make it easier to fix mistakes

The alternative is to accept the reality. People will always make mistakes, and mistakes will sometimes slip through. From that perspective, it’s clear that what matters is to make it easier to fix your mistakes. This means cutting down on bureaucracy, and trusting developers to have access to their production environments. It means investing in test automation, to allow code to be tested quickly, and building continuous delivery pipelines to make releases happen at the push of a button.

This is a reaction driven by courage.

I know which kind of organisation I’d like to work for.

]]>
https://blog.mattwynne.net/2013/05/09/two-ways-to-react/feed/ 5 520
Saving Your WordPress Blog to CD https://blog.mattwynne.net/2008/04/11/saving-your-wordpress-blog-to-cd/ https://blog.mattwynne.net/2008/04/11/saving-your-wordpress-blog-to-cd/#comments Fri, 11 Apr 2008 10:42:04 +0000 http://blog.mattwynne.net/2008/04/11/saving-your-wordpress-blog-to-cd/ Continue reading "Saving Your WordPress Blog to CD"

]]>
So the wife has been writing her mandatory university course diary as a wordpress blog, but now she needs to hand it in.

> Can you put it on a CD for me?
She asks.

Unix to the rescue!

Following this excellent article I had the site saved down to disk in a jiffy, with all links modified to work offline, all images and CSS files copied down.

For your reference, here’s the command I used.

    wget --mirror -w 2 -p --html-extension --convert-links -P -H -Dwordpress.com ~/path/to/save/locally http://yourblog.wordpress.com

Quoting Jim’s article for the meaning of the command line options:
> –mirror: specifies to mirror the site. Wget will recursively follow all links on the site and download all necessary files. It will also only get files that have changed since the last mirror, which is handy in that it saves download time.
>
> -w: tells wget to “wait” or pause between requests, in this case for 2 seconds. This is not necessary, but is the considerate thing to do. It reduces the frequency of requests to the server, thus keeping the load down. If you are in a hurry to get the mirror done, you may eliminate this option.
>
> -p: causes wget to get all required elements for the page to load correctly. Apparently, the mirror option does not always guarantee that all images and peripheral files will be downloaded, so I add this for good measure.
>
> –html-extension: All files with a non-html extension will be converted to have an html extension. This will convert any cgi or asp generated files to html extensions for consistency.
>
> –convert-links: all links are converted so they will work when you browse locally. Otherwise, relative (or absolute) links would not necessarily load the right pages, and style sheets could break as well.
>
> -P (prefix folder): the resulting tree will be placed in this folder. This is handy for keeping different copies of the same site, or keeping a “browsable” copy separate from a mirrored copy.

I’ve also added my own at the end of Jim’s version:

-H -Dwordpress.com

These options tell wget to recursively fetch any file within the .wordpress.com domain – otherwise the stylesheets and images for the blog, which are stored in different subdomains of wordpress.com, will not be downloaded.

]]>
https://blog.mattwynne.net/2008/04/11/saving-your-wordpress-blog-to-cd/feed/ 9 47