The only way developers can finish projects on-time and under-budget is by taking on Technical Debt. Taking shortcuts, using quick fixes, and writing unmaintainable code builds up a technical debt that get the project delivered today. Tomorrow, there will be a reckoning, as development costs spiral and progress grinds to a halt. This talk helps you embrace the debt, love the cowboys, and gives you a way to make repayments.
9. XXIV - XV = ?
1. Normalize: XXIV → XXIIII
2. Eliminate: XXIIII - XV → XIIII - V
3. Expand: XIIII - V → VIIIIIIIII - V
4. Repeat 2 and 3 until no moves left
5. Reduce: IIIIIIIII → IX
Tuesday 5 November 2013
30. 2x2 Matrix!
unintentional
Tuesday 5 November 2013
live with it
you are a bad
person
unknown
unknowns
incidental
intentional
deliberate
choice
inherent
35. Color Television
Three Colors: Red, Green, Blue
Each Color needs 3Mhz
You only have 6Mhz
and you need 9Mhz!
Technical Debt FTW
Tuesday 5 November 2013
36. You can't Break the
old Black+White TVs
Tuesday 5 November 2013
37. We must send the old brightness signal
White Light =
30% Red
59% Green
11% Blue
Send White, Red and Blue
Tuesday 5 November 2013
38. You need to embed the
color signals inside
the brightness signal
Tuesday 5 November 2013
39. Color TV circuits are
more complicated
than they should be.
Tuesday 5 November 2013
40. How do you Reduce
Technical Debt?
Tuesday 5 November 2013
51. Micro Services
•Do one job
•One feature
•Death is natural •kill and restart
•Use messages •No shared state
•Really small
Tuesday 5 November 2013
•100 lines of code
53. how do you route
messages?
Pattern Matching
Tuesday 5 November 2013
54. The user Service
some messages
// load a user's data by name
{ user:"load", name:"alice" }
// login user - load and check password
{ user:"login", name:"alice", pass:"123"}
github.com/rjrodger/websummit2013
senecajs.org
Tuesday 5 November 2013
55. user_load action
var users = {
alice: {name:"alice", pass:"123"},
bob:
{name:"bob",
pass:"abc"},
}
function user_load( args, done ) {
// callback( err, result )
done( null, users[args.name] )
}
Tuesday 5 November 2013
57. Run user Service
using Seneca
require("seneca")()
.add({ user:"load" }, user_load)
.add({ user:"login" }, user_login)
.listen(8000)
$ node user.js
$ curl "http://localhost:8000/act ?
user=login & name=alice & pass=123"
{ "name":"alice", "pass":"123" }
Tuesday 5 November 2013
58. What Happens?
•Easy to change - just rewrite!
•Easy to scale - run more instances
•Easy to reason about - just messages
•Easy to make robust - kill and restart!
•Easy to build - natural units of work
Tuesday 5 November 2013
59. Technical Debt?
lower interest rate!
See github for
scaling and adapting
github.com/rjrodger/websummit2013
senecajs.org
Tuesday 5 November 2013
60. Try this at Home!
•Java: twitter.github.io/finagle
•Ruby: sinatrarb.com
•Node: senecajs.org
Tuesday 5 November 2013
61. Technical Debt
•overwhelms every other factor
•should drive your architecture
•can be mitigated with awareness
Tuesday 5 November 2013