SPM - Chapter - 7 Design and Programming
SPM - Chapter - 7 Design and Programming
Project
Management
Chapter - 7 Design and Programming
Review the Design
In many project teams, the programmers begin coding as soon as they have a
software requirements specification that everyone agrees on.
The designers and programmers have several 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 is written, which includes some or all of these
tools.
Review the Design
In order to ensure that the software is designed well, the project manager works with
the team during the creation of the work breakdown structure and estimates to
determine which of these options is appropriate for the project. The design tasks
should be estimated and included in the project schedule.The design tasks should
always include reviews, even when there is no written design specification. Any
written documentation should be reviewed and, if possible, inspected. However, it is
important that the reviews and inspections reach the correct audience.
Version Control with Subversion
1. svn create
2. svn update.
3. svn add, svn delete, svn move, and svn copy.
4. svn status and svn diff.
5. svn checkout
6. svn commit.
7. svn revert
Refactoring
To refactor a program is to improve the design of that program without altering its
behavior.
Refactoring introduces a new concept: adding, removing, or changing the source
code for the sole purpose of making it easier to maintain. There are many
different refactorings, or techniques, through which programmers can alter their
code to make it easier to understand.
Code that is easier to understand is easier to maintain, and code that is harder to
understand is harder to maintain. Each refactoring is aimed at correcting a
common pattern that makes the code harder to read.
Benefits of Refactoring
The main activity in unit testing is creating test cases that verify the software. A test
case is a piece of code that verifies one particular behavior of the software. Each test
should be able to run without any user input; its only output is whether it passed,
failed, or halted due to an error.
The name "unit test" comes from the fact that each individual unit of code is tested
separately.
Unit Testing
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.
A framework typically allows a programmer to write a set of test cases for each unit.
For example:
Java has JUnit, C has CUnit, Python has PyUnit
Test-Driven Development: Test-driven development means that the unit tests are
created before the code is built.
By adopting unit tests and test-driven development, the programmers can develop a
very clear picture of exactly what their testing responsibilities are. Before the
programmers deliver their code to QA, the code should pass every unit test. This does
not necessarily mean that the software does what it's supposed to do, but it does mean
that it works well enough that a tester can determine whether it does its intended job.
Use Automation
There are many tasks over the course of a software project that can be automated. Unit
tests are a good example of automation. But unit tests are not the only manual
programming task that can be automated. Other automation tasks include:
Retrieving the latest build from the version control system, building it, copying it to a
folder, and reporting any build warnings or errors
Running automated unit tests, generating a test report, and reporting critical failures
Running automated code review tools and reporting any warnings or rule violations
Listing any changes that have been committed and by whom, including links to code
listings for the changes
Emailing results as text or visual reports (or sent via SMS text messages or some
other communications system)