48
20 March XML Extreme Programming

20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Embed Size (px)

Citation preview

Page 1: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

20 March

XMLExtreme Programming

Page 2: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Customization

Separation of customization from code Create family of applications instead

of a single one Design from the start

Currently favored: XML

Page 3: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

XML

What is it?

Tools

How to use it?

Page 4: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 5: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 6: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

.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

Page 7: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 8: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 9: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 10: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Tools

XML Parser XSL Processor

Lots and lots of them Should you use them?

Page 11: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 12: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

The Goal of Software Engineering

The right software, delivered defect free,

on time and on cost,

every time.

Page 13: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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)

Page 14: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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!

Page 15: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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!

Page 16: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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.

Page 17: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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?

Page 18: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 19: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Therac-25 Turntable

Counterweight

Field Light Mirror

Beam Flattener (X-ray Mode)

Scan Magnet (Electron Mode)

Turntable

Page 20: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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”

Page 21: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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.

Page 22: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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.

Page 23: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Source of the Bug

Incompetent engineering. Design Troubleshooting

Virtually no testing of the software. The safety analysis excluded the

software! No usability testing.

Page 24: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

That’s Why We Care

Now, back to history…

Page 25: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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?

Page 26: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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?

Page 27: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 28: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Which brings us back to

What is part of software engineering?

Page 29: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 30: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 31: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Software Craftmanship

Software craftsmanship (McBreen 2001) Craft of writing software Craft of using software

Distinguish from software engineering Scope Rigor

Relevant distinction?

Page 32: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Product Sales brochure Use cases and requirements Design document: from architecture to

detailed design Fully documented code Test plan and tools Manuals

Users Administrators

Page 33: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Process

Software Engineering Steps Concept Requirements Architecture Design Implementation Unit test Integration System test Maintenance

Software Engineering Processes Reviews and Inspections

Page 34: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 35: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 36: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 37: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Unified Process Matrix

ElaborationInception Construction Transition

Requirements

Analysis

Design

Implemen-tation

Test

Page 38: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 39: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 40: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 41: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Agile Methodologies

Keep only those rules and processes that help Antidote to bureaucracy License to hack

Key characteristics Adaptive People-oriented

Page 42: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Extreme Programming: History

Kent Beck considered the inventor Ideas developed in the early 90’s First project at Daimler Chrysler in

1996

Page 43: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 44: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 45: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 46: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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.”

Page 47: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

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

Page 48: 20 March XML Extreme Programming. Customization Separation of customization from code Create family of applications instead of a single one Design from

Extreme Programming Project

http://www.extremeprogramming.org/