Top Banner
Applied Software Project Management Design and Programming http:// www.stellman- greene.com 1
36

Applied Software Project Management Design and Programming greene.com 1.

Jan 05, 2016

Download

Documents

Leona Davidson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project ManagementDesign and Programming

http://www.stellman-greene.com

1

Page 2: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Programming

•Programming is a basic skill for a CS graduate

•A CS graduate cannot do programming just like a 體育系的學生不會運動

•Unless▫You are going for Ph.D. Your talent could

be in math or other area.▫You don’t need to earn a living by the skills

http://www.stellman-greene.com

2

Page 3: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Programming• In general, programming not just involve coding it

also include▫Problem solving (maybe more important than

coding skill) ▫Design skill▫Modularization skill▫Algorithms▫Debugging ▫Unit testing▫ Integration technique (defensive programming)▫Documentations

http://www.stellman-greene.com

3

Page 4: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Programming

•OK..these topics although are important but is not the key issues in this course.

•We suppose the programmers you hire are qualified

http://www.stellman-greene.com

4

Page 5: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

We will talk about DESIGN

• What is design anyway?

http://www.stellman-greene.com

5

Page 6: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

•many years ago, software engineers have found that we need to add a stage called “analysis and design” after specifications and before coding begins.

•Researches and experiences show that more time spent on design and analysis, much less time spent on coding and debugging

DESIGN?

Page 7: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

AnalysisAnalysis DesignDesign CodingCodingImplementationImplementationMaintenanceMaintenance

Development effort

Page 8: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

1010

Error occurs Error occurs Jan 13Jan 13

Work proceedsWork proceedsat (say) 10 person-at (say) 10 person-days per monthdays per month

Error foundError foundFeb 13Feb 13

Error foundError foundMar 13Mar 13

1010 person-days of work person-days of work has been done assuming has been done assuming the error is not there. the error is not there. Now this must be redone.Now this must be redone.

If error found this late, If error found this late,

2020 person-days mustperson-days mustbe redonebe redone

Wor

k (

pers

on-d

ays)

Wor

k (

pers

on-d

ays)

TimeTime

2020

Early detection of errors

Page 9: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

AnalysisAnalysis DesignDesign CodingCodingImplementationImplementationMaintenanceMaintenance

Development effort 2

Page 10: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Real facts and numbers• Game industry could be one of the big industry which

face, endure the problem of software engineering.• it is estimated that billions of dollars (US$) have been

wasted into failed game project by inexperienced team.

• inexperienced team▫ have talents, smart, good at programming▫ have good idea

• however, they failed. Since a game project is no longer a one-man or two-man’s cooperation.

• a typical game project require more than 10 people (including graphical artists)

• eg., a programming course for graphical artist

Page 11: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

• Suppose you have one year schedule What do you plan to distribute your time? make a guess

• specification (? %)• analysis and design (? %)• coding (?%)• testing (?%)

Page 12: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

An experienced project team schedule• A distribution (see yellow books of game

programming)

one year

Specs, Analysis & Design Coding Testing

Page 13: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

How Design can be so important?•The cost of a

design fault or wrong design direction is often very high

http://www.stellman-greene.com

13

Page 14: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Design Camp

•A camp that gather architects and senior programmers in a resort to come out a design

http://www.stellman-greene.com

14

Page 15: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Why we need to spend so much time on analysis and design•The answer is : complexity •Simply put, if a software project is not

complicated, you need not spend too much

time on analysis to produce a design

Page 16: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Design Exercise (An RPG game)• Scenarios ( by Jessica)• Kate 走道到某個村落,她的目標是經由一連串的線索,與一連串的事件,然後找到藏在村莊中某處的九陽神功秘籍。在此村莊中有許多的 NPC。此時Kate 先行到酒館裡找店小二聊天。店小二指引你去找尋某位老朽,他可能知道一些武林人士的小道消息。 Kate 在村落中找到了這位老朽。不過這位老朽卻拒絕與他談話或聊天。 Kate 不得其門而路,繼續在附近的村落中閒逛,問到另外一個老婦人,老婦人告訴 Kate,你必須帶一瓶好酒。

• Kate 於是回到酒館,用銀子買了一瓶酒,再次回到老朽所住的地方。不過老朽依舊不理 Kate。還把帶來的酒,摔在地上。 Kate 又找到那個老婦人,老婦人只回應說,「我已經把知道的都告訴你了」就不再理你了。這時候Kate 再次追上那位老婦人,並給老婦人一筆銀子。老婦人這才告訴 Kate ,你必須去買一瓶上等的女兒紅。老朽只喝女兒紅。

http://www.stellman-greene.com

16

Page 17: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Design Exercise Continued•  • Kate 再次回到酒店,想要購買女兒紅,不過這村莊唯一的酒店卻不販售女兒紅。 Kate 出了酒店,每次都會看到一個乞丐。由於 Kate 無事可做,於是賞了乞丐幾個錢。這時乞丐說話了:「俠士,你在酒店是買不到女兒紅的,由於女兒紅釀造不易。當今的縣老爺每個月都全部收購了。釀酒的人家,每個一段時間,就會把酒送到官府。感謝您的打賞」

•  • Kate 聽了乞丐的話,在村莊的路上攔截釀酒的師傅,然後搶劫女兒紅。結果引來官府補快的追捕,死於官兵的刀下。

• Kate 重來一遍,攔截釀酒的師傅,這一次他用賄賂的方式,希望釀酒的師傅能夠分一點女兒紅。結果這一次成功的拿到的女兒紅。老朽看到了女兒紅非常高興的透露了下一個線索。 Kate 繼續她的旅程。

http://www.stellman-greene.com

17

Page 18: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Please come up with a design to implement this RPG game

•Design goals:▫The design must be easy to program▫When the story change, the code should

not change

http://www.stellman-greene.com

18

Page 19: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

High level design• Now you know what is high level design.

▫ High level design is like the captain of a ship to point out what direction we should go.

▫ wrong direction can make a project into a big mess• Once a high level design is done, we can begin low level

design (sometimes, this is where OOAD analysis begins) and architecture model.

• In low level design, you need to design classes and their methods ▫ Low level design is like a captain’s chief staff (大副 )

which solve how to drive the ship towards to the direction

http://www.stellman-greene.com

19

Page 20: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

The story of design• Design is often application and domain-specific• Sometimes, you can find design on the webs or papers for

common popular problems.• Sometimes, the design is secrete of a company. It can be a

major weapon why a software company supersedes another company (for example, company X comes with a design which gain higher performance than a company Y, etc.)

• E.g., Google’s design secrete ▫ Connection speed and search speed▫ Google map is much faster than Nokia

http://www.stellman-greene.com

20

Page 21: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Different kind of Design concerns•Architecture•Reliability•Load balancing (networking traffic)•Maintainability•Performance•Scalability

http://www.stellman-greene.com

21

Page 22: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

What is a design document looks like?•Although there is a IEEE standard on how

a design should be written, it is seldom followed▫A design must be written like an academic

paper if the company organization and scale is large and communication is complicated

▫A design can be written in less formal way (such as power point slides) if a company or project scale are not large

http://www.stellman-greene.com

22

Page 23: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

When programmers are young• Inexperienced programmers think writing is a

burden and load.• Most programmers do not know how to write a good

document – actually most people are, not just programmer

• Writing Good design document requires▫Experiences▫Ability to organize contents and material▫Capable of finding a way to tell the story smoothly▫ It is actually just like writing a paper sometime

• Are you a good writer?

http://www.stellman-greene.com

23

Page 24: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Experience and Experience• Writing make you thinking and clear your mind• Sometimes in your brain, you think you already get

it right.• When you write it down, you soon find out it needs

a lot of rework or you need more survey.• A design author should also research all the

alternatives as much as possible. Maybe some existing techniques or framework can be simply adapted.

• A design is hardly completed in first draft.• Design is revised and reviewed again and again in

practice.

http://www.stellman-greene.com

24

Page 25: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

AGAIN • In general, programming not just involve coding it also include

▫ Problem solving (maybe more important than coding skill) - The ability to search feasible and best solution for the project.

▫ Design skill▫ Modularization skill▫ Algorithms (Data structures) ▫ Debugging ▫ Unit testing▫ Integration technique (defensive programming)▫ Documentations▫ The usage of other programming-aided tools▫ Ability to trace and extend code from existing source code.

http://www.stellman-greene.com

25

Page 26: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Is Design Skill Teachable?

•軟體工程教學的理想, 現實與困境以及解決之道1030.ppt

•Design document example•module programming - 4.0-2009.doc

http://www.stellman-greene.com

26

Page 27: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Review the Design• Once the SRS has been approved, implementation begins.

Programming teams have many options:▫ The programmers can simply start building the code and

create the objects and user interface elements.▫ Designers can build a user interface prototype to demonstrate

to the users, stakeholders and the rest of the team. Any code used to develop the prototype is typically thrown away once the design has been finalized.

▫ Pictures, flow charts, data flow diagrams, database design diagrams and other visual tools can be used to determine aspects of the design and architecture.

▫ An object model can be developed on paper, either using code, simple class diagrams or Unified Modeling Language (UML) diagrams.

▫ A written design specification may be created, which includes some or all of the tools above.

http://www.stellman-greene.com

27

Page 28: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Review the Design•Design tasks should always include

reviews, even when there is no written design specification.

•Any written documentation should be reviewed and, if possible, inspected. ▫It is important that the reviews and inspections

reach the correct audience. ▫Many users who have important input for the

user interface may be uninterested or confused by object models and UML diagrams.

http://www.stellman-greene.com

28

Page 29: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Computer-Aided Software Engineering tools to assist Programming•Version control•Issue tracking system (bug tracking

system)

http://www.stellman-greene.com

29

Page 30: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Version Control• A version control system allows programmers to

keep track of every revision of all source code files▫ The main element of the version control system is the

repository, a database or directory which contains each of the files contained in the system.

▫ A programmer can pick a point at any time in the history of the project and see exactly what those files looked like at the time.

▫ It is always possible to find the latest version of any file by retrieving it from the repository.

▫ Changing a file will not unexpectedly overwrite any previous changes to that file; any change can be rolled back, so no work will accidentally be overwritten.

http://www.stellman-greene.com

30

Page 31: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Version Control• There are two common models for version

control systems▫ In a copy-modify-merge system, multiple people can

work on a single file at a time. When a programmer wants to update the repository with his

changes, he retrieves all changes which have occurred to the checked out files and reconciles any of them which conflict with changes he made before updating the repository.

▫ In a lock-modify-unlock system, only one person can work on any file at a time. A programmer must check a file out of the repository before

it can be modified. The system prevents anyone else from modifying any file until it is checked back in.

On large projects, the team can run into delays because one programmer is often stuck waiting for a file to be available.

http://www.stellman-greene.com

31

Page 32: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Refactoring• Refactoring is a programming technique in

which the design of the software is improved without changing its behavior.▫ There are many choices that programmers make which

do not affect the behavior of the software but which can have an enormous impact on how easy the code is to read and understand.

▫ Refactoring works especially well during code reviews.▫ Because refactoring is a change to the design, it may

impact the design review process. If previously reviewed code is refactored, changes to that should be distributed to the review team.

http://www.stellman-greene.com

32

Page 33: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Unit Testing• Before a build is delivered, the person or program

building the software should execute unit tests to verify that each unit functions properly.▫ All code is made up of a set of objects, functions, modules

or other non-trivial units. The purpose of unit testing is to create a set of tests for each unit to verify that it performs its function correctly.

▫ Programmers create suites of unit tests, where each test is a small block of code which exercises a specific behavior of one unit.

▫ The most common (and effective) way for programmers to do unit testing is to use a framework, a piece of software that automatically runs the tests and reports the results.

http://www.stellman-greene.com

33

Page 34: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Everyone is responsible for quality

•There are different kinds of testing that serve different purposes.▫Programmers use unit tests is to verify that the

software works exactly as the programmer intended.

▫Software testers are responsible for verifying that the software meets its requirements (in the SRS) and the needs of the users and stakeholders (in the Vision and Scope Document). Many defects arise when a programmer delivers

software that worked as he intended, but did not meet the needs of the users. Software testers can catch these problems.

http://www.stellman-greene.com

34

Page 35: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Everyone is responsible for quality

•Many programmers are confused about exactly what it is that software testers do. ▫All they know is that they deliver a build to the

QA team. The QA people run the program and find bugs, which the programmers fix.

▫It is often hard for them to figure out where unit testing ends and functional testing begins.

▫The project manager should watch for this confusion, and help to clarify it by making sure that the programmers understand what kinds of testing are expected of them.

http://www.stellman-greene.com

35

Page 36: Applied Software Project Management Design and Programming  greene.com 1.

Applied Software Project Management

Project Automation• Many quality problems happen because the team

does not build the software consistently, and loses track of the health of the code.

• Effective project automation reduces these errors. The team can adopt a tool which:▫ Retrieves the latest build from the version control

system, builds it, copies it to a folder, and reports any build warnings or errors

▫ Runs unit tests, generating a test report and reporting critical failures

▫ Runs automated code review tools, reporting any warnings or rule violations

▫ Lists any changes which have been committed and by whom, including links to code listings for the changes

http://www.stellman-greene.com

36