creating a maintainable software ecosystem jeremy d. miller november 27th, 2007

19
Creating a Maintainable Software Ecosystem Jeremy D. Miller November 27th, 2007

Upload: anabel-west

Post on 28-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Creating a Maintainable Software Ecosystem

Jeremy D. Miller

November 27th, 2007

Sharpen the Saw!

“Give me six hours to chop down a tree and I will spend the first four sharpening the axe. ”

- Abraham Lincoln

The 10X Development Ecosystem

• It’s the code, yes, but it’s also the ecosystem• What’s the Ecosystem?

Source Control Build scripts Continuous Integration infrastructure Test automation Database scripts and migrations

Themes

• Eliminating Friction• Go fast, go safe• Knowing where things are• Ratcheting up the Feedback Loops• Favoring automation over formal processes

Story Wall – Start of the Iteration

Not Started In Progress TestingCustomer Review

Done, Done, Done

Story #1        

Story #2        

Story #3        

Story #4        

Story #5        

Story #6        

Story #7        

Story #8        

Story #9        

Story #10        

Story Wall – Iteration Halfway Point

Not Started In Progress TestingCustomer Review

Done, Done, Done

        Story #1

        Story #2

      Story #3  

    Story #4    

  Story #5      

    Story #6    

  Story #7      

  Story #8      

Story #9        

Story #10        

Dude, it worked on my box!

• You can’t work if you can’t run the system• The build script should lay down the development

environment• Build script == environment documentation• 3rd Party tools and open source libraries in source control• Propagate new environmental dependencies ASAP!• Retrofit Legacy Code with automated build scripts• README.txt

I grabbed the latest code, but it’s broken!

• Lean on Continuous Integration Compile Lay down the environment Unit tests

• Clean Build Server• It’s all about feedback

The Check-In Dance1. Don’t check into or out of a broken build

2. Update your code from source control

3. Merge any conflicts

4. Run the build locally

5. If the build is successful, commit your changes

6. Monitor the build server for success or failure

7. If the build breaks, fix it!

8. Never leave a build broken overnight

Are you sure you have the right code?

• Single Source Point• Tag successful builds• Embed the build number in compiled assemblies• NEVER build and deploy from a developer environment• Repeatable, traceable builds• Promote code by build number• Communicate issues, fixes, and feature completion by build

number

• Demo: Labeling builds with CruiseControl.Net

Right code, wrong database!

• Treat all database code as just more code• DBA’s play by the same rules• One database per developer and environment

Demo: “database.build”

• If it changes together, it builds together• Propagating database changes must be reliable, easy, and

friction free Enable continuous design and incremental delivery Synchronize development environments Demo: Migrations

It’s a five minute fix…

• …but it’ll take a day to migrate the code• You will make mistakes• Cycle faster between development and testing• Automate anything that moves• Create deployment packages on successful Continuous

Integration builds• Use a no touch deployment to testing

Did it get installed correctly in test?

• Environment tests• Demo: Self-testing configuration with StructureMap• Synthetic transaction

What would it take for last minute changes to be safe?

• Comprehensive automated test coverage• Feedback cycle• Fast build, slow build

Demo: Cascading build

• Prerequisites for Test Automation If the tests haven’t been run, how do you know your code still works? Getting the latest code to the test environment Watch for file collisions Building a set of test data

My goodness, we’ve got a lot of code!

• Multiple source control repositories and builds• Propagating dependent libraries

Manual or Automatic?

• Shared resources

Are you pointed at the right server?

• Demo: Configuration profiles with StructureMap

Sharpening the Saw

• “I don’t have time to sharpen my saw, I’m too busy chopping wood!”

• Balancing technical improvements versus new business features

• Make it easy to do the right thing• No artificial process restrictions• “We’ve just got to get the project out the door”

Last Thoughts

• Project automation is a team effort Watch the Low Truck Number effect

• Use project automation as an enabler• Automate anything repetitive• Automate away friction• Look to automate bookkeeping activities• Feedback is everything

Frequent check-ins Keep the build lean and mean Run the automated tests frequently

Questions

[email protected]• The Shade Tree Developer –

http://codebetter.com/blogs/jeremy.miller