Make the BIG Change

(One SMALL Change at a Time)

Chris Geihsler

@seejee

picture of me covered in cats

Hi, I'm Chris

BIG changes are HARD 

SOFTWARE is CRUFTY 

CHANGE it SAFELY 

ONE

COOL

TRICK

TELL a STORY 

TRY something NEW 

3 million STUDENTS

ROSTERS change

HARD problem

MANUAL entry

picture of someone at a keyboard

BULK upload

picture of excel or something

2013

+

PROBLEM?

120,000

picture of meagan from support looking sad

GOAL

Drastically reduce Clever-related support burden.

DESIGN cruft

TAKEAWAY

Protect your data from 3rd party integrations.

SOLUTION

Know what a Clever sync will change without making any changes.

SYNC

CODE cruft

GOAL

Lay the foundation for future integrations.

PHASE 0:

High Level Plan

explain high level plan

 

Clever -> Sync -> Actions -> TTM Database

INCREMENTAL

or

REWRITE?

YOUR PROCESS

TAKEAWAY

Tune your process to enable lots of small, isolated changes.

5 PHASES

5-10 PRs/PHASE

TAKEAWAY

Planning is more important than the plan itself.

TAKEAWAY

Big changes are easier when your stakeholders buy-in.

PHASE 1:

Extract and Isolate

show student model with line numbers that are huge

 

show same code from before moving into a Sync::Clever::Student.sync

TAKEAWAY

Complexity becomes apparent when code is in small, isolated pieces.

TAKEAWAY

You can't fix everything.

PHASE 1:

5 Pull Requests

~ 4 weeks

PHASE 2:

Split Decisions from Actions

if classroom.include?(student)

classroom.students << student

if classroom.include?(student)

actions << AddStudentToClassroom.new

show actions being returned from sync object and immediately being invoked

PHASE 2:

7 Pull Requests

~ 3 weeks

PHASE 3:

Serialize Actions

show the anatomy of a few actions

show generating a series of actions and then immediately invoking them

TAKEAWAY

Interim states won't be ideal. That's OK.

PHASE 3:

3 Pull Requests

~ 2 weeks

PHASE 4:

Defer Actions

show example where we add students to a classroom

 

talk about how we have to associate things that don't exist yet

talk about EntityRef

show a diagram of TTM State + pending actions = new state

show code again, and point out that this is the proposed state as a function of the other pending actions

 

talk about the example of a student moving to another school in this pending batch

TAKEAWAY

Treating mutations as data has lots of cool benefits.

PHASE 4:

7 Pull Requests

~ 4 weeks

PHASE 5:

Decouple from Clever

intermediate data format

PHASE 5:

2 Pull Requests

~ 1 week

PHASE 6:

Implement new CSV format

PHASE 5:

4 Pull Requests

~ 2 week

FUTURE:

Implement OneRoster

FUTURE:

Undo

TESTING

TAKEAWAY

Refactor your tests as aggressively as your production code.

TAKEAWAY

Consider deleting tests that provide minimal value.

TEAM

picture of joel, manda, and sara

TAKEAWAY

Diverse teams make better products.

show pretty dry run screenshots

MORE CAPABLE

MAINTAINBLE

EXTENSIBLE

TAKEAWAY

When you know your domain well, it's OK not to be idiomatic.

CONQUER your CRUFT

TELL us a STORY 

THANKS!

Chris Geihsler

@seejee

make the big change - old

By Chris Geihsler

make the big change - old

  • 1,237