20 march xml extreme programming. customization separation of customization from code create family...
TRANSCRIPT
20 March
XMLExtreme Programming
Customization
Separation of customization from code Create family of applications instead
of a single one Design from the start
Currently favored: XML
XML
What is it?
Tools
How to use it?
What is XML?XML - eXtensible Markup Language
A "standard/specification" for describing data with markup tags
Tags can describe data or a structureXML - cornerstone of a set of technologies
XML can be used aloneRelated technologies for most effective use
History of XML
Built on other technologies GML and SGML – (Standard) Generalized Markup Language: 1960s Before there was Word and WYSIWYG editors
HTML - HyperText Markup Language W3C (World Wide Web Consortium) standard
.ce Introduction .ju .11 39 .ss The work of authors, publishers, and researchers involves, in varying degrees, three recognizable text Formatting commands: .ce center next line .ju justify right margin .ll line length .ss single spacing
Script (GML)Example
Tags
Focus on data description and structureElement -- a pair of tags with contentAttribute -- specific information about an element
Allow creation of XML DialectsSMIL -- for multimedia (RealPlayer Multimedia players) WML -- Wireless WAP-phones XHTML -- XMLized version of HTMLMathML -- for mathematicsHEML -- historical events
Hundreds of dialects
HTML XML Uses <tag> & </tag> style Markup describes text
Focus on presentation Data is text (limited reuse)
(Relatively) fixed set of tags
Loose syntax End tags assumed Nesting errors affect display
Simple and complete Single use - for Web
Uses <tag> & </tag> style Markup describes information
Focus on data structure Data retains meaning
Extensible - can define new tags
Stringent syntax End tags required Element nesting enforced
Uses related technologies Highly reusable documents
Related Technologies
XML schema (XSD replaced DTD) provides the syntax defines way elements and attributes represented
in a XML document eXtended Stylesheet Language (XSL)
enables data reuse transform XML into other XML HTML format XML for presentation (rendering)
Fonts, size, color, alignment, ... Rules for ordering
Tools
XML Parser XSL Processor
Lots and lots of them Should you use them?
How to Use XML Key uses
Separation of changeable decisions Need for multiple forms
Before you invent your own tags, are there relevant ones that you can appropriate?
Use of attributes versus elements continuing discussion
The Goal of Software Engineering
The right software, delivered defect free,
on time and on cost,
every time.
Software Engineering History
First key conference in 1968 Became important because of
perceived software crisis in productivity Cost and budget overruns (OS/360)
Morphed to issues of quality Financial implications (BoNY) Safety (Therac)
BoNY (1985)
BoNY (Bank of New York): Nation’s largest clearer of government securities
Software to track Federal securities transactions wrote new information on top of old.
Feds debited the bank for each transaction but bank did not know who owed it how much.
90 minutes => $32 Billion overdraft!
Cost of Bug Bank had to borrow $24 bill from federal
reserves. Interest paid ~$5 mill for 1 day. (Annual earnings of bank ~$120 mill)
BoNY share prices dropped by 25 cents Federal funds rate dropped from 8.4%
to 5.5% System down for 28 hours. Fear of financial crisis caused increase
in price of platinum!
Cause of bug
Message buffer counter at BoNY system was 16-bit long.
Counters at Fed (and other banks) 32 bit.
More than 32,000 transactions that morning! =>Counter overflow
Securities database corrupted.
The Drama continues…
Trying to correct it – they copied corrupted data over the backup.
Lost a few hours because of this. Does code for error recovery get
tested at all?
Therac-25 (1985-1987) Medical linear accelerator
Used to zap tumors with high energy beams.
Electron beams for shallow tissue or x-ray photons for deeper tissue.
Eleven Therac-25s were installed: Six in Canada Five in the United States
Therac-25 Turntable
Counterweight
Field Light Mirror
Beam Flattener (X-ray Mode)
Scan Magnet (Electron Mode)
Turntable
Therac-25
Changes from Therac-20 Used new “double pass” technique to
accelerate electrons…more deadly Machine itself took up less space Software coupled to the rest of the
system and responsible for safety checks.
Hardware safety interlocks removed. “Easier to use”
What Happened?
Six patients were delivered severe overdoses of radiation between 1985 and 1987. Four of these patients died.
Why? The turntable was in the wrong position. Patients were receiving x-rays without
beam-scattering.
What caused that to happen? Race conditions. Overflow error.
The turntable position was not checked every 256th time the “Class3” variable was incremented.
No hardware safety interlocks. Non-descriptive error messages.
“Malfunction 54” “H-tilt”
User-override-able error modes.
Source of the Bug
Incompetent engineering. Design Troubleshooting
Virtually no testing of the software. The safety analysis excluded the
software! No usability testing.
That’s Why We Care
Now, back to history…
1960’s 60’s
“Cowboys” wrote software anyway that they could
Difference between best programmers and worst as high as 28:1 (many sources)
1968 Edsger Dijkstra, “GOTO Statement Considered
Harmful” (CACM) Recognition that rules can improves the average
programmer The start of software engineering?
Structuring Software Development
Few rules helped immensely Good rules and practices developed over
the 70’s and 80’s If a few rules are good, more are
better… Late 80’s, major focus on process as a
key to quality ISO 9000 Malcolm Baldridge National Quality Award
Why not apply to software development?
ISO 9000 What is ISO?
International body 150 national standards organization
US: ANSI Primarily technical standards Recent years has broadened its scope
Generic management system standards First published in 1987 Revision in 2000
Compendium of best practices Not the process but the management of the process
http://www.iso.org/iso/en/ISOOnline.frontpage
Which brings us back to
What is part of software engineering?
The 4 P’s of Software Engineering
People: those doing it Product: what is produced Process: the manner in which it
is done Project: the doing of it
Models of Software Development
Process or people oriented Early Watts Humphrey work: people,
later process Different balances from each model
Number of iterations Waterfall Spiral Agile
Software Craftmanship
Software craftsmanship (McBreen 2001) Craft of writing software Craft of using software
Distinguish from software engineering Scope Rigor
Relevant distinction?
Product Sales brochure Use cases and requirements Design document: from architecture to
detailed design Fully documented code Test plan and tools Manuals
Users Administrators
Process
Software Engineering Steps Concept Requirements Architecture Design Implementation Unit test Integration System test Maintenance
Software Engineering Processes Reviews and Inspections
Software Engineering Processes
Differ by how often you do the steps Points on the spectrum Differences in overhead
Three fundamental models Waterfall Spiral Iterative
Two widely used models Rational Unified Process (a.k.a. Unified
Software Development Process) Extreme Programming
Integrated Product Development:The IBM Approach
Originated at GE Key principles
Cross-functional teams at all phases Phased approval
Example checkpoints Concept Plan Ship Sunset
Rational Unified Process
Iterations within phases 4 phases
Inception (interaction with stakeholders) Elaboration (architecture and functions) Construction (initial operational) Transition (completed product)
Core workflows for each iteration Requirements Analysis (part of Requirements) Design Implementation (includes Integration) Test
Unified Process Matrix
ElaborationInception Construction Transition
Requirements
Analysis
Design
Implemen-tation
Test
Extreme Programming
Complete development process First code drop is 2-3 weeks after start Customer a part of the development
team Iterative development to the max Derive requirements with customer
through hands-on experimentation Agile methodology
Why XP?
Companies started codifying their practices
Large documents and people to manage them Rise of the project manager
“Honored in the breach” More large projects and more late
or failed projects
1995 Standish Group Study
50% software projects challenged 2x budget 2x completion time 2/3 planned function
30% impaired Scrapped
20% success http://web.mit.edu/Saltzer/www/publications/
Saltzerthumbnails.pdf
Agile Methodologies
Keep only those rules and processes that help Antidote to bureaucracy License to hack
Key characteristics Adaptive People-oriented
Extreme Programming: History
Kent Beck considered the inventor Ideas developed in the early 90’s First project at Daimler Chrysler in
1996
XP Bills of Rights Developer has a right to
Clear requirements and priorities Determine how long a requirement will take to implement Revise estimates Always produce quality code
Customer has a right to An overall plan See progress in a running system Change requirements and priorities Be informed of changes to schedule and have input as to
how to adapt Cancel in the middle and still have something to show for
the investment
XP Bills of Rights Developer has a right to
Clear requirements and priorities Determine how long a requirement will take to implement Revise estimates Always produce quality code
Customer has a right to An overall plan See progress in a running system Change requirements and priorities Be informed of changes to schedule and have input as to
how to adapt Cancel in the middle and still have something to show for
the investment
XP Value System
Communication Focus on people, not documentation
Simplicity Of process and code
Feedback Mechanism to make useful progress
Courage To trust in people
People Most important factor in the quality of
software is the quality of the programmers If your life depended on a particular piece
of software, what would you want to know about it?
Bollinger (2001): that the person who wrote it was “both highly intelligent and possessed by an extremely rigorous, almost fanatical desire to make their program work the way it should.”
Knowledge Workers … prefer closed offices but communicate better
in open ones congregate in particular geographical areas move around in the course of their work collaborate concentrate work in the office communicate with people who are close by don't care about facilities gewgaws
Davenport, Why Office Design Matters 2005
Extreme Programming Project
http://www.extremeprogramming.org/