53
Software: the Ground Rules Truths, Facts, Axioms Itay Maman

Ground rules

Embed Size (px)

Citation preview

Page 1: Ground rules

Software: the Ground RulesTruths, Facts, Axioms

Itay Maman

Page 2: Ground rules

Solid

Nothing new

Page 3: Ground rules

You can’t control what you can’t measure.

– Tom DeMarco, 1982

Page 4: Ground rules

I can see why measuring productivity is so seductive. If we could do it we could assess software much more easily and objectively than we can now. But false measures only make things worse. This is somewhere I think we have to admit to our ignorance.

– Martin Fowler, 2003

Page 5: Ground rules

Truth 1: Software is buggy

No systematic way to detect bugs

Page 6: Ground rules

Truth 2: Recursiveness (I)

A module is built from similar modules

Page 7: Ground rules

Implications

Diffcult to estimate size (time)

A building spans a fxed-depth hierarchy

Building → Floor → Apartment → Room

A class spans a tree of unbounded depth

Page 8: Ground rules

Truth 3: Recursiveness (II)

Every programming language

is powerful enough to express itself

(or every other language)

Page 9: Ground rules

Fact 1: Long Tail

How many methods are ugly?

How ugly are they?

Page 10: Ground rules

JUnit

Page 11: Ground rules

Ant

Page 12: Ground rules

JRE

Page 13: Ground rules

Eclipse

Page 14: Ground rules

Normal Distribution

Page 15: Ground rules

Power-Law Distribution

Page 16: Ground rules
Page 17: Ground rules

Implications

Costs: Expect the worse

Cheap & expensive do not cancel out

Page 18: Ground rules

Fact 2: Entropy

Code gets messy over time

Restoring order requires explicit effort

Page 19: Ground rules

Thermodynamics

Chaos occurs naturally

External energy is needed to restore order

Page 20: Ground rules

FindBugs 0.72 (March 2004)

Page 21: Ground rules

FindBugs 1.35 (September 2008)

Page 22: Ground rules

Ant 1.65

Page 23: Ground rules
Page 24: Ground rules

Axiom 1: Discontinuity

One small step for a programmer,

One giant failure for an entire company

Page 25: Ground rules

A few hours ago I was upgrading our continuous integration setup when a confguration error caused it to run against our production environment rather than our testing environment.

– Chris Wanstrath

Page 26: Ground rules

Today we made a change to the persistent copy of a confguration value that was [mistakenly] interpreted as invalid [by an automated system for verifying confguration values].

This meant that every single client saw the invalid value and attempted to fx it. Because the fx involves making a query to a cluster of databases, that cluster was quickly overwhelmed by hundreds of thousands of queries a second.

Page 27: Ground rules

… To make matters worse, every time a client got an error attempting to query one of the databases it interpreted it as an invalid value, and deleted the corresponding cache key.

This meant that even after the original problem had been fxed, the stream of queries continued. As long as the databases failed to service some of the requests, they were causing even more requests to themselves. We had entered a feedback loop that didn’t allow the databases to recover.

– Robert Johnson

Page 28: Ground rules

Explanations

Binary World

Most approximations will fail

Page 29: Ground rules

Implications

Hard to predict effect/scope of a change

Retest everything

Page 30: Ground rules

Axiom 2: Super-linearity

Size Matters

Page 31: Ground rules

Axiom 2: Super-linearity

Smaller is better

Page 32: Ground rules

Axiom 2: Super-linearity

Cost of a programming task

is super-linear in its size

Page 33: Ground rules

Axiom 2: Super-linearity

Few large tasks more expensive

than

numerous small tasks

Page 34: Ground rules

Manifestation

Source control confict resolution

1 day vs. 1 month

Page 35: Ground rules

Manifestation

Debugging

Build cycle: 10 sec. vs. 5 min.

Page 36: Ground rules

Manifestation

Debugging

Reproduction steps: Automatic vs. GUI

Page 37: Ground rules

Manifestation

Page 38: Ground rules

Explanation

7 +/- 2

S/W construction == A tree of decisions

Page 39: Ground rules

Exploitation

Features

Subsystems

Page 40: Ground rules

Benefts

Features

Subsystems

Higher throughput

#Features >> #Subsystems

size(feature) << size(subsystem)

Page 41: Ground rules

Benefts

Features

Subsystems

Less starvation

Reduce the damage of delays

Page 42: Ground rules

Challenge

Features

Subsystems

Effcient decomposition

into

Small, independent, tasks

Page 43: Ground rules

Exploitation

Plugin-architectures

TDD

Continuous Deployment

Short loop to client

Page 44: Ground rules

Old data, New Conclusions

Page 45: Ground rules

Analogies

Appealing

Page 46: Ground rules

Analogies

Risky

Page 47: Ground rules

Analogies?

Car Manufacturing

Car Design

Buildings

Novels

Cities

Page 48: Ground rules
Page 49: Ground rules

Imagine...

A factory that interacts with its own products,

Can produce itself,

Goes wild when changed,

With unpredictable maintenance times

Page 50: Ground rules

In my refective mood, I’m wondering, was its advice [“You can’t control what you can’t measure”] correct at the time, is it still relevant, and do I still believe that metrics are a must for any successful software development effort?

Page 51: Ground rules

In my refective mood, I’m wondering, was its advice [“You can’t control what you can’t measure”] correct at the time, is it still relevant, and do I still believe that metrics are a must for any successful software development effort?

My answers are no, no, and no.

Page 52: Ground rules

In my refective mood, I’m wondering, was its advice [“You can’t control what you can’t measure”] correct at the time, is it still relevant, and do I still believe that metrics are a must for any successful software development effort?

My answers are no, no, and no.

– Tom DeMarco, 2009

Page 53: Ground rules

Thank you

http://javadots.blogspot.com