0% found this document useful (0 votes)
7 views

SPM - Chapter - 7 Design and Programming

The document discusses software project management, focusing on design, programming, version control with Subversion, refactoring, and unit testing. It outlines the importance of design reviews, the functionalities of version control systems, and the benefits and techniques of refactoring code for maintainability. Additionally, it emphasizes the significance of unit testing and automation in the software development process.

Uploaded by

hello242412
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

SPM - Chapter - 7 Design and Programming

The document discusses software project management, focusing on design, programming, version control with Subversion, refactoring, and unit testing. It outlines the importance of design reviews, the functionalities of version control systems, and the benefits and techniques of refactoring code for maintainability. Additionally, it emphasizes the significance of unit testing and automation in the software development process.

Uploaded by

hello242412
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Software

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

Version Control System (VCS) is a software that helps software developers to


work together and maintain a complete history of their work.
The purpose of a version control system is to bring a project's source code under
control.
Modern version control systems can identify exactly what changed between two
different versions of a file, and allow the team to roll back those changes—even if
they were made a long time ago, and the affected files have had many
modifications since then.
Goal of VCS

Allow developers to work simultaneously.


Do not overwrite each other’s changes.
Maintain history of every version of everything.
Version Control with Subversion
Subversion is a free and open source version control system. It is available from
for many operating systems and platforms,includingLinux, BSD, Solaris, BeOS,
OS/2, Mac OS X, and Windows.
Subversion allows multiple people to work on a single file at the same time, using
a model called "copy-modify-merge." In this model, a file can be checked out any
number of times. When a programmer wants to update the repository with his
changes, he retrieves all changes that have occurred to the checked out files and
reconciles any of them that conflict with changes he made before updating the
repository.
A Subversion repository exists on a computer as a folder. It usually contains
subfolders named conf, dav, db, hooks, and locks. the conf folder contains
configuration files, the db folder contains a database that stores all of the files
and revision history, and the hooks folder contains scripts that can be triggered
automatically when Subversion performs certain actions.
Subversion (SVN Lifecycle)
1. Create a Repository: The repository is a central place where developers store all
their work. Repository not only stores files, but also the history about changes.The
'create' operation is used to create a new repository.
2. Checkout: 'Checkout' operation is used to create a working copy from the
repository. Working copy is a private workplace where developers do their changes,
and later on, submit these changes to the repository.
3. Update: 'update' operation is used to update working copy. This operation
synchronizes the working copy with the repository.
4. Perform Changes: After the checkout, one can do various operations to perform
changes. Edit is the most common operation. One can edit the existing file to
add/remove contents from the file. Different changes includes:
add/delete/rename/move operations.
Subversion (SVN Lifecycle)
5. Review Changes: When you check out the working copy or update the working
copy, then your working copy is completely synchronized with the repository. But as
you do changes to your working copy, it becomes newer than the repository. And it is
a good practice to review your changes before the 'commit' operation.
6. Fix Mistakes: Revert operation reverts the modifications that have been made to
the working copy.
7. Resolve Conflicts: Conflicts can occur at the time of merging. 'Merge' operation
automatically handles everything that can be done safely.
8. Commit Changes : 'Commit' operation is used to apply changes from the working
copy to the repository. This operation modifies the repository and other developers
can see these changes by updating their working copy.
Subversion (SVN Commands)

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

Promotes maintainability and scalability


Enhances readability
Improves performance
Saves money and time
Techniques of Refactoring
1. Extract Method Refactoring: Extract Method is a refactoring technique that
involves taking a chunk of code within a larger method and moving it into a separate
method.
2. Replace Magic Number with Symbolic Constant Refactoring: Replace Magic
Number with Symbolic Constant is a refactoring technique that involves replacing
numeric values (also known as magic numbers) in your code with named constants
that represent the same value.
3. Decompose Conditional Refactoring: Decompose Conditional is a refactoring
technique that involves breaking down a complex conditional statement into smaller,
more manageable parts.
4. Introduce Explaining Variable Refactoring: Explaining Variable Refactoring replace
a complex expression or calculation with a descriptive variable name that explains
the purpose of the value being calculated.
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. Each unit is built to
perform a certain function. The purpose of unit testing is to create a set of tests for
each unit to verify that it performs its function correctly.

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)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy