1. introduction to software engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf ·...

24
Computer Science and Software Engineering University of Wisconsin - Platteville 1. Introduction To Software Engineering Yan Shi SE 2730 Lecture Notes

Upload: others

Post on 23-Sep-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Computer Science and Software Engineering

University of Wisconsin - Platteville

1. Introduction To

Software Engineering

Yan Shi

SE 2730 Lecture Notes

Page 2: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

What is software?

Computer programs

Associated documentation such as requirements, design models and user manuals

Configuration data to make these programs operate correctly

Page 3: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Types of Software

Three major types of software products:

Generic Custom Semi-Custom

Page 4: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Generic Software Products

Developed to be sold to a range of different customers.

The organization developing the software controls the software specification.

Examples:— MS Office— Photoshop— Candy Crush Saga— …

Page 5: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Custom Software Products

Developed for a single customer according to their specification.

Also known as bespoke products. The user (or person paying for the software) controls

the specification.

Example:— Air traffic control systems— Factory automation systems— Building control systems

Page 6: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Semi-Custom Software Products

Developed to generic specifications, but require significant customization for each application.

Examples:— ERP (Enterprise Resource Planning) Systems

More and more systems are moving from Custom to Semi-custom. WHY?— lower the price of software by spreading the

development costs over more sales.— makes it more profitable for the makers.— generally contains more features than a pure custom

package

Page 7: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

History of Software Development

Prior to 1980’s: — Large systems were 10’s of

thousands of lines.

— Single person or small team projects: 5 people could develop 1000 LOCs per month.

— Non-interactive; batch processing;

— input via cards or tape; output to paper or tape files or disk files.

— (Doghouse Construction Model – Grady Booch)

http://blogs.msdn.com/b/cdndevs/archive/2010/02/24/var-article-new-list-interestingdeveloperstuff.aspx

Page 8: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

History of Software Development

1980’s: — Large systems were a million

lines of code.— Only required small teams to

produce a system in a reasonable amount of time.

— Start of on-line text-based interfaces, Relational databases on large clusters, LANs.

— Would we build a small building the same way as we build a doghouse?

http://amigan.1emu.net/trs-80/

Page 9: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

History of Software Development

1990’s:

— Very large system, 10’s of million lines of code.

— Teams of 100 to 1000’s of members

— Graphical interfaces, distributed processing, web-based systems, WANs, embedded systems, etc.

— Would we build a skyscraper the same way as we build a doghouse or small building?

http://en.wikipedia.org/wiki/File:Windows_3.11_workspace.png

Page 10: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

History of Software Development

2000’s and now:

— Where do you think we are going?

— Global systems, interactive real-time distributive databases, massively distributed systems, wireless networks, distributed development, component based systems, cloud,…???

— Development teams are distributed around the world.

Page 11: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

How to Produce Software?

How do you normally see projects done? — What was done wrong?— What have you seen done right?— How will you develop a 1000LOC software?— How about 1MLOC?

Original model: just do it! “— writing large programs is just like writing small ones"

What are the problems with this model?

Page 12: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

When the Software Gets Larger…

One person cannot produce the whole system before “the sun burns out”. — 10,000,000 LOCs at 200 LOCs / month would take XXXXX

months ( XXXX years) for one person to develop. — Let’s figure this out!

A large system gets broken into smaller parts (subsystems) with one or a few people working on each of the subsystems.

The subsystems must come together (Integrate) at the end of a project to function as a total system.

This takes planning and design! Software Engineering

Page 13: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

What Is Software Engineering?

Software engineering is an engineering discipline that is concerned with all aspects of software production.

— a systematic, disciplined, quantifiable approach to the design, development, operation and maintenance of software;

— the study of these approaches.

Page 14: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Software Engineering vs.

Computer Science

Computer science is concerned with theory and fundamentals

Software engineering is concerned with the practicalities of developing and delivering useful software.

Computer science theories are still insufficient to act as a complete underpinning for software engineering (unlike e.g. physics and electrical engineering).

Page 15: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Software Engineering vs.

System Engineering

System engineering is concerned with all aspects of complex systems development including hardware, software and process engineering.

Software engineering is part of this process concerned with developing the software infrastructure, control, applications and databases in the system.

System engineers are also involved in system specification, architectural design, integration and deployment during software development process.

Page 16: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Why is Software Engineering so

important?

programs for CS 143 and other classes:— bugs aren't any big deal, you lose a few points and go

on with your life.

bugs in professional programs: productivity (compilers, word processors) operating systems games

— Result: annoyances, loss of time

But software bugs also can kill and cost a fortune!!!

Page 17: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Medical Machine Kills (1985)

Cost: 3 people dead,

3 people critically injured

Disaster: Canada’s Therac-25

radiation therapy machine

malfunctioned and delivered

lethal radiation doses to patients.

Cause: Because of a subtle bug called a race condition, a technician could accidentally configure Therac-25 so the electron beam would fire in high-power mode without the proper patient shielding.

Page 18: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Patriot Fails Soldiers (1991)

Cost: 28 soldiers dead, 100 injured Disaster: During the first Gulf War,

an American Patriot Missile system in Saudi Arabia failed to intercept an incoming Iraqi Scud missile. The missile destroyed an American Army barrack.

Cause: A software rounding error incorrectly calculated the time, causing the Patriot system to ignore the incoming Scud missile.

Page 19: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Ariane Rocket Goes Boom

(1996)

Cost: $500 million Disaster: Ariane 5, Europe’s newest unmanned rocket in

1996, was intentionally destroyed seconds after launch on its maiden flight. Also destroyed was its cargo of four scientific satellites to study how the Earth’s magnetic field interacts with solar winds.

Cause: 64-bits to a 16-bit converting overflow error. As a result, the rocket's primary processor overpowers the rocket's engines and causes the rocket to disintegrate 40 seconds after launch.

https://www.youtube.com/watch?v=tWc4gGMQ3hQ

Page 20: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

World War III… Almost (1983)

Cost: Nearly all of humanity Disaster: The Soviet early warning system falsely

indicated the United States had launched five ballistic missiles. Fortunately the Soviet duty officer had a “funny feeling in my gut” and reasoned if the U.S. was really attacking they would launch more than five missiles, so he reported the apparent attack as a false alarm.

Cause: A bug in the Soviet software failed to filter out false missile detections caused by sunlight reflecting off cloud-tops.

Interesting Reading: “Sept. 26, 1983: The Man Who Saved the World by Doing ... Nothing”

Page 21: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Software Projects Fail All the Time

Software engineering is a process that is vulnerable to cost overruns, shifting targets, poor communication, and creeping complexity.

— Approximately 50% of large projects are significantly over budget

— Approximately 25% of large projects are canceled

— Thus 75% of large projects are operational failures

Page 22: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

IBM Workplace OS Project

(1991)

Cost: $2 billion

Disaster:

— It was an ambitious plan by IBM to create a new computer operating system to improve software portability and reduce maintenance costs of IBM's software by using a common microkernel base for all of IBM's operating systems.

— Faced with poor quality; extensive cost overruns; and resulting low customer demand, the project was cancelled.

— The other long term effect was that IBM decided to stop developing new operating systems, and committed heavily to using Windows and Linux.

Cause:

— The inherent implementation difficulty

— poor communication between the teams implementing the different personalities.

Page 23: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

What is good software?

Maintainable – can fix it when it’s broken and extend it with more features/functions.

Dependable – reliable, secure, and safe. It should not cause physical or economic damage to its users.

Efficient – does not waste system resources. Acceptable – uses appropriate interfaces to allow a

user to easily make use of a system’s features/functions.

Another common mnemonic F.U.R.P.S. + (Features, Usability, Reliability, Performance, Scalability)

Page 24: 1. Introduction To Software Engineeringpeople.uwplatt.edu/~shiy/courses/se273/notes/1-intro.pdf · fortune!!! Medical Machine Kills (1985) ... in Saudi Arabia failed to intercept

Summary

What is software?

What is software engineering?— software engineering vs. computer science

— software engineering vs. system engineering

Software horror stories

What is GOOD software?

Next Generic Software Process