Background

Michael L. Collard, Ph.D.

Department of Computer Science, The University of Akron

Software Engineering

Standard Software Phases

  • Requirements
  • Analysis
  • Design
  • Implementation
  • Testing & Validation
  • Release
  • Maintenance

Waterfall Process Model

  • Heavyweight, single-pass, heavy planning-based approach
  • Each phase is completed and verified before the next phase begins
  • Solution from the Software Crisis

Greenfield Development

Start with nothing and create a finished product with no existing code, design, or previous system.

Brownfield Development

Start with an existing project/environment and create a finished product with existing code, design, or previous system

Maintenance

Changes to an existing system

  • Overwhelming part of the cost of the system over its lifetime (80%). However, it is typically not built into the cost structure
  • Bad terminology. Maintenance of software is not the same as maintenance in other fields
  • Much of what software developers do are maintenance activities.

Categories of Maintenance [Swanson, ISO/IEC 14764]

Type of Maintenance Description
Corrective Fix bugs/problems
Adaptive Change to fit new environment (API, compiler)
Perfective Improve performance or maintainability
Preventive Detect and correct latent problems before they become problems

Software Evolution

Software Evolution = Software Development + Software Maintenance

  • Focus on supporting maintenance, not development for processes, tools, etc.
  • Does not distinguish between development and maintenance
  • Example: open-source model

Lehman's Laws of Software Evolution

Law I: Continuing Change
Law II: Increasing Complexity
Law III: Self Regulation
Law IV: Conservation of Organisational Stability
Law V: Conservation of Familiarity
Law VI: Continuing Growth
Law VII: Declining Quality
Law VIII: Feedback System

  • Software must change over time.
  • Changes cause complexity, which increases the cost of change. Resources allocated to reduce complexity deplete resources for additional features.
  • Software projects in an organization tend towards the same quality, bug rate, etc.
  • Over time, the rate of development for each iteration doesn't vary much. Tend to meet the same number of goals with each iteration.
  • Must implement features that were previously not considered necessary.
  • Without changes, the software appears to decrease in quality.
  • What affects software evolution is a multi-level, multi-iteration process.

Software Lifespan

  1. Initial Development
  2. Evolution
  3. Servicing
  4. Phaseout
  5. Close Down

Version Control

  • SCCS
  • RCS
  • CVS
  • SVN
  • Git

SCCS (Source Code Control System)

  • Developed in the early 1970s at Bell Labs (primarily by Marc J. Rochkind)
  • One of the first systems to track changes in source code, storing differences (deltas) to reconstruct versions
  • Operated on a file-by-file basis, with locking-based concurrency (only one user could modify a file at a time)
  • Utilized weave files, which interwove different revisions of code into the same file

SCCS Commands

Command Description
sccs create <file> Initialize SCCS control for <file> (creates SCCS/s.<file>)
sccs edit <file> Check out <file> for editing (exclusive lock)
sccs delta <file> Check in the file (creating a new delta/revision in SCCS/s.<file>)
sccs get <file> Retrieve a read-only copy of <file> (no lock)
sccs diffs <file> Show differences between revisions
prs SCCS/s.<file> Print the SCCS file history (log of changes, etc.)

RCS (Revision Control System)

  • Developed in the early 1980s by Walter Tichy at Purdue University
  • Introduced improvements over SCCS, such as reverse deltas
  • Also uses a file-by-file approach and locking mechanisms
  • Metadata about changes stored in RCS files, typically ending in ",v"

RCS Commands

Command Description
rcs -i <file> Initialize RCS control for <file> (creates RCS/<file>,v)
co -l <file> Check out <file> for editing (exclusive lock)
ci <file> Check in <file> (creating a new revision in RCS/<file>,v)
co <file> Retrieve a read-only copy of <file> (no lock)
rcsdiff [options] <file> Show differences between revisions of <file>
rlog <file> Print information about the RCS file history (log of changes, etc)

CVS (Concurrent Versions System)

  • Developed in the 1980s, built on top of RCS
  • Moved beyond strict locking; introduced concurrent development by merging changes.
  • Provided a client-server architecture, allowing multiple developers to collaborate.
  • Became very popular in open-source projects throughout the 1990s and early 2000s.

CVS Commands

Command Description
cvs init Initialize a CVS repository in the current directory
cvs checkout <module> Check out <module> into a working directory
cvs update Update local files with changes from the CVS repository
cvs commit Commit local changes to the repository
cvs diff Show differences between working copy and repository
cvs log Print log messages for files

SVN (Apache Subversion)

  • Developed in 2000 by CollabNet, later an Apache project
  • Aimed to be a compelling replacement for CVS, addressing its shortcomings
  • Uses a centralized repository model but improves support for atomic commits, better handling of file renames, and efficient branching/tagging
  • Widely adopted in many corporate environments before distributed version control became popular

SVN Commands

Command Description
svnadmin create <repo_path> Create an empty Subversion repository at <repo_path>
svn checkout <repo_url> Check out a working copy from <repo_url>
svn update Update working copy to the latest revision from the repository
svn commit -m "message" Commit changes from the working copy to the repository
svn diff Show differences between the working copy and the repository
svn log Print log messages for files or directories

Git

  • Developed in 2005 by Linus Torvalds for the development of the Linux kernel
  • Distributed version control system (DVCS): each clone of a repository is a fully-fledged repository with a complete version history
  • Focuses on speed, non-linear development, and data integrity
  • Popularized branching and merging as everyday, lightweight tasks
  • De facto standard for version control in modern software development (used on platforms like GitHub, GitLab, Bitbucket, etc.)

Git Commands

Command Description
git init Initialize a new Git repository in the current directory
git clone <repo_url> Clone a repository from <repo_url> into a new directory
git pull Retrieve and merge changes from the remote repository into the local one
git add <file> Stage <file> for the next commit
git commit -m "message" Commit staged changes with the message "message"
git push Send local commits to the remote repository
git diff Show differences between the working copy and the repository
git log Print the log of commits, including messages

Version Control Overview

  • Early Systems SCCS and RCS established the foundation for version control: storing differences, handling revisions, and versioning files individually
  • Centralized Systems CVS and SVN introduced client-server collaboration, more flexible merges, and atomic operations on repositories
  • Distributed Systems Git revolutionized version control with a distributed approach, encouraging branching, merging, and collaboration on a global scale

Version Control Commands

SCCS RCS CVS SVN Git
sccs create <file> rcs -i <file> cvs init svnadmin create <repo_path> git init
sccs edit <file> co -l <file> cvs checkout <module> svn checkout <repo_url> git clone <repo_url>
sccs delta <file> ci <file> cvs commit svn commit -m "<msg>" git commit -m "<msg>"
sccs get <file> co <file> cvs update svn update git pull
sccs diffs <file> rcsdiff <file> cvs diff svn diff git diff
prs SCCS/s.<file> rlog <file> cvs log svn log git log

MSR

Mining Software Repositories

  • MSR Conference
  • Rise of open source
  • Increasing number of public repositories (versus private repositories)
  • Access to the history of projects
  • Going from prescriptive to descriptive

Version Control & History

  • Backwards: Analyze history
  • Forwards: Current development
  • Can use history to predict future