Agenda
Theory
Practice
Understanding before doing
Beautiful code
Guessing the future
2
Theory
3
Lost in Terminology
Software metric primitives are non-isomorphic:
“defect”
“resource”
“programmer”
“time”
4
Lost in Terminology
Entailment?I need help *FINDING*
my tail!
http://www.flickr.com/photos/efleming/237379205/
5
60/60 Rule
Cost of softwareover entire lifecycle
6
Understanding and Bugs
Causes of bugs:The greatest number of bugs
occur in requirements specification and design
Cost of repair:The greatest cost is incurred in correcting requirements bugs
7
Three Fallacies
The Fallacy of Perfect Knowledge:It is possible to capture complete, non-conflicting requirements with sufficient attention to detail.
8
Three Fallacies
The Fallacy of Perfect Knowledge:It is possible to capture complete, non-conflicting requirements with sufficient attention to detail.
Users generally do not know what is possible, do not agree among themselves and may not understand all aspects of their system.
9
Three Fallacies
The Fallacy of the Big Round Ball:Requirements don’t change appreciably after delivery or can be controlled.
10
Three Fallacies
The Fallacy of the Big Round Ball:Requirements don’t change appreciably after delivery or can be controlled.
Requirements change continuously as software ages. This should be seen as a benefit.
11
Three Fallacies
The Fallacy of Perfect Execution:It is possible to create flawless code with sufficient attention to detail.
12
Three Fallacies
The Fallacy of Perfect Execution:It is possible to create flawless code with sufficient attention to detail.
We need to admit that arbitrary logic is hard to verify in the general case, hard or impossible to fully test and, combined with inconsistent or changing requirements, hard to trace programmer intent.
13
Practice
14
(With apologies to S. Gross)
The Real World isSoft and Mushy
15
A History of Silos
1970s 1980s 1990s
$ cat foo.txt | grep blah | sort
A neat little package Client-Server The Early Web
16
The Next Great Leap
Web of Data
Extending theUniversal Client
Expanding theUniversal Connection
Providing theUniversal Database
Explaining the Logic
Ubiquitous,reusable applications
17
Examples
18
New Applications
19
And More....
20
Understanding Before Doing
Some material adapted from Kurt Akeley,General Manager, Microsoft Research Asia, 21 July 2006
21
The Cost of Failure
“If you can’t code something, it is because you don’t understand it” -- Jon Butler
Sadly, the reverse is not true.
22
Writing Facilitates Understanding
The process of writing is the process of refining one’s thoughts.
Refinement of thought applies to writing both words and code.
23
“This, surely, is the secret of Lincoln’s eloquence. He not only read aloud, to think his way into sounds, but wrote as a way of ordering his thought.”
— Garry WellsIn Lincoln at GettysburgSimon & Shuster, 1992
24
“Don’t worry if you don’t understand this book completely on the first reading. We didn’t understand it all on the first writing!”
— Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (aka The Gang of Four)In Design Patterns, Addison Wesley, 1995
25
Write Up
ResultsDone?
Research &
Develop
Yes
No
Stop
?
Write First
26
Beautiful Code
27
What Does Your CodeLook Like?
28
A Hardware Analogy
29
Another Hardware Analogy
30
“Higher-level programming ... allows good programmers to write more beautiful code, and bad programmers to write stuff that's even uglier than it used to be.”
— Andy Oram & Greg Wilson (eds.)Beautiful Code, O’Reilly, 2007
31
Creating Beautiful Code
Beauty counts“Omit needless words!” -- Strunk and WhiteDevelop a habit of refactoring for both
design and maintenanceThe art changes; keep up
32
Guessing the Future
33
Writing Business Applications
1970s 1980s 1990s 2000s
Code written
Dataformatted
34
Same Data, Different Forms
HumanReadable
MachineReadable
35
Getting to the Web 2.0+ Enterprise
Thanks to CBS Paramount Television. TM & Copyright © 2007 CBS Studios Inc.
36
2000 3B
2001 6B
2002 12B
200324B
40,000 BCEcave paintings
bone tools
writingpaper
printing
electricity, telephone
transistorcomputing
Internet(DARPA) The web
GIGABYTES
2000 rich contentSource: UC Berkeley School of Information Management and Systems,Robert Steele, CEO OSS, Inc.
The Information Economy
37
Don’t Focus on Code
Solve problems insteadStart thinking about information spacesNavigating
Creating
Extracting From
Extending
Abstraction, abstraction, abstraction
38