continuous integration
TRANSCRIPT
Tips and Tools forHappy Productive Hackers
Bruce Becker | [email protected], SAGridMeraka Institute, CSIR
Ok, ready to write some code ?!
This is the outline of my presentation. I will describe some of the philosophy, interventions and lessons we have learned in South Arica regarding the development of an integrated e-Infrastructure; then I will briefly give a snapshot of the status of such activities in Africa.Thereafter, I will go into some consideration on how to sustainably support and grow these, leading into the core of my presentation the Africa and Arabia Regional Operations Centre. Finally, a summary and outlook will be given.
We're not just here to hack
This school is about sustainability and a community
We want to teach you not only technologies, but methodologies
We want to collaborate with you
We want you to have marketable skills
It's time for a crash course in continuous integration
Make your work count,
let people find you
Go to Bootcamp
http://software-carpentry.org/bootcamps
It's normal to get excited when you're
starting out on a new project
but it's better to know what
you're getting yourself into
What could possibly go wrong?
It's easy to trick yourself into thinking
that a few lines of code will do the trick
After all, why deal with all the overhead
of a properly-managed project...
BUT
THINGS
WILL
GO
HORRIBLY
WRONG
The real world is far more complicated than the tutorial
Don't be discouraged !
Plan ahead and prepare
Lesson 1 : Track your changes
Lesson 2 : Try before you buy
Lesson 3 : Don't take your own word for it
Lesson 4 : Automate
Lesson 5 : Collaborate
Lesson 1 Source Code Management
If you don't have an account on Github, go make one nowHey, at least you'll achieve something today :)
When working on your code, make frequent commits with meaningful messages.
Push to the repo when you think you've made an atomic change and nothing is broken
If you find yourself stuck, revert back
to a previous commit when things were
working and start again
Be courteous to collaborators
Assume you're not the only
one who will use this code'
Lesson 2 : Testing
Code is like DNA it needs a living organism to see whether it workFlaws in the code are often not picked up by the compiler
You need to test it in a lab environment
Consider writing objective tests for your code what should it be doing ?While developing, fail-fast
It should compile/deploy (at least)
What output should it be giving ?
What messages should it be sending ?
Tag your branches when you reach milestones
Testing 2
Consider functional tests separately to build tests
Test several different environments if you can healthy code
Ensure that issues are reported...
and resolved !
Tests help you know which direction you're going in, instead of hacking away pointlessly !
Lesson 3 : Don't take your own word for it
Use an independent third party testing framework to check whether your commits are passing your tests (or the application's own tests)
This is especially important when there is more than one person working on a project
You can see which commits started to
http://ci.sagrid.ac.za:8080
Lesson 4 : Automate
Automation can be tricky...
Best to use a service to automate building,
testing, reporting and integration for you.
There's a steep learning curve and it seems
like a lot of complicated overhead, but it
really pays off !
Lesson 5 : Collaborate
Everything = Code ! Code as much as you canVersion controlled
Testable
Publish your code in public repositories
Plan, publish and discuss the goals of the project with your collaboratorsIf necessary, fork and eventually merge.
Let's get to work
Join the @SAGridOps github organisation
Further reading :http://en.wikipedia.org/wiki/Continuous_integration
http://jenkins-ci.org
http://en.wikipedia.org/wiki/Scrum_(development)
Muokkaa otsikon tekstimuotoa napsauttamalla
Muokkaa jsennyksen tekstimuotoa napsauttamallaToinen jsennystasoKolmas jsennystasoNeljs jsennystasoViides jsennystasoKuudes jsennystasoSeitsems jsennystasoKahdeksas jsennystasoYhdekss jsennystaso`
Bruce Becker: Coordinator, SAGrid | [email protected] | http://www.sagrid.ac.za