37
Using XP practices on 1960s green screen technology The system that time forgot Brian Leach Nik Silver

Green Screen ci at Travis Perkins

Embed Size (px)

Citation preview

Using XP practices on 1960s green screen technology

The system that time forgot

Brian Leach

Nik Silver

Context

How we went…

from this… …to this

Wider Context

• Senior management buy-in

• More team-working

It’s not legacy, it’s a

heritage system.

Pairing, independent teams, breaking down of knowledge silos, closer involvement of stakeholders.

Knowledge silos and functional teams.

The technology

What is It?

The Original

No SQL

Database

What is UniVerse?

UniVerse BASIC

The UniVerse Business Language

Runtime Loaded

Data centric

Concurrent

Procedural

Business focused

Embedded

No encapsulation

No type-safety

No standard tooling

Do you have global variables ?

Hell, yes

Challenges from the UniVerse Environment

The database

is NOT adependency

Bad Codeis platform independent

TDD

What engineers were seeing

TDD + FitNesse training for Java/.NET

Sometimes learning Eclipse, and Java, too

There was a basic test “template”

With if/then instead of assert

Could not see how unit testing applied to them:

Procedural code

Not designed to be tested

Not part of the culture

The Challenge – In Numbers

•40,000+ concurrent connections

• 4x HP Superdomes

• 1 million+ reads/machine/second

• 12,000+ programs

• 4,644,481 lines of application code

• 31% have cyc. complexity > 50

• 12 TB changes every day

• 120 software engineers

• ... And growing

Over 700 lines of code added every working day for 25 years

Lest we Forget

This application has powered a business for over 25 years

to an annual turnover of5 billion pounds

What we did

• Wrote our own framework

Created own refactoring catalogue

Started UniVerse-specific TDD training

• Rewrote the framework

Simpler API

Collaborative effort

• Extended the framework

File configuration

Subroutine fakes

Some Lessons

and shared..

Via refactoring catalogue

Via TDD champions

Critically, they drive each other

Starting to inherit tests

Community site for discussion of techniques

Learned ..

Units are different in UniVerse.

The database is under test

There are limits to breaking down procedural code.

Areas of resistance

“It’s a waste of time”

“It takes too long”

“We’re going to throw it away anyway”

“We can’t spend time on it if our product owner doesn’t prioritise it”

Effective pairing is more difficult with procedural code.

We had to name the framework

We had to name the framework

Git

Experiences Introducing git for UniVerse

• February 2013:

TFS introduced for source control

Very slow

File-driven/fragmented in a central repository

• April 2013:

CloudShop moved to git (practical and strategic), trigger for similar move for UniVerse

• Ambition:

Switch over in June firebreak, but lots of anguish…

Git Anguish

• Change of workflow

Whole codebase snapshots

File locking

• Inclination to want all problems are solved.

“Git is not suitable

for UniVerse”

Git anguish resolutions… and disappointment

• Regular discussions and steering

• Adjusting world view

• Git training

• Adopting better tools

• Some people still use old editors

• Difficulties with three way merges

• Finally went live in…

September

CI Pipeline

CI Pipeline

listener

Lo

cal

Devs gitlab

CommitLog

CI (pull,make,test,sync)

ReleaseArea

PackagerSystem

QA

Sys

tem

s

Consistent reliable environments

• Chaining to/calling fatal errors or stop

• Calls which kill the CI process

• Lots of assumptions about the environment, and continually challenging to ensure it’s clean.

• Non-compiling programs

CI Surprises

• Needed to clarify the development process

• Engagement around non-compiling code

• Reaction to global CI email

Good results:

Whole codebase compiled for the first time

Real collective ownership

Commits circulated to whole of Engineering as a matter of pride.

Wrap-up

Achievements

• Human rewards…

• Engineers feel part of the modern world

Hackathon

Coding katas

• Feel invested-in

• Have more transferable skills

• TP held up as an exemplar

• “Best Agile Team” award 2013

Where Next ?

• Improve CI process

• Extend packaging

• BDD

• And on and on…

TimelineSw

itch

-ov

er to

git +

CI

Sta

rt git tra

inin

g fo

r Un

iVe

rse

Sta

rt bu

ildin

g C

I pip

elin

e

Targ

et fo

r git sw

itch

-ov

er (m

issed

)

Pla

nn

ing

git a

nd

CI

for U

niV

erse

Sta

rted

TDD

for U

niV

erse

Clo

ud

sho

pm

ov

es to

git

So

urc

e c

on

trol in

trod

uc

ed

(TFS)

tea

ms sta

rt wo

rkin

g in

step

TDD

train

ing

starts

Sc

rum

tea

ms a

rran

ge

d

Se

nio

r tea

m a

ssem

ble

d

1987: D

ev

elo

pm

en

t starts

1987: D

ev

elo

pm

en

t starts

19

96

: Mig

ratio

n to

Un

iVe

rse

Co

din

g ....

1987

2012 2013

Jun Sep Dec Mar

Ne

w C

IO a

rrive

s

Jun Sep1996

Tech appendix follows…