Software Development Lifecycle

Overview

Teaching: 0 min
Exercises: 0 min
Questions
  • What is a software development process?

  • Why is a development process important?

  • What are the different development stages?

Objectives
  • Explain some of the common issues found in academic software development

  • Summarise the benefits of following a process of developing software

  • Define the fundamental stages in software development

  • Express how different process stages are connected

  • Summarise the differences between the waterfall and agile models of software development

In this section, we will take a look at coding - or writing software - as a process of development.

Even if you are now solely a software user and do not plan to develop any code, it’s still useful to know how software is typically developed and what practices are used. You may find a good reason to get into developing code (even small, simple programs can be immensely useful), end up supervising others who will need to develop software, or become involved in projects where software is being developed: software, and its development, is becoming increasingly prevalent as a key tool for research across many fields of research.

“If you fail to plan, you are planning to fail.” - Benjamin Franklin

Typical Software Development in Academia

Traditionally in academia, software - and the process of writing it - is often seen as a necessary but throwaway artefact in research. For example, there may be research questions (for a given research project), code is created to answer those questions, the code is run over some data and analysed, and finally a publication is written based on those results. These steps are often taken informally.

The terms programming (or even coding) and software engineering are often used interchangeably. They are not. Programmers or coders tend to focus on one part of the software development process: implementation, more than any other. In academic research, often they are writing software for themselves - they are their own stakeholders. And ideally, they are writing software from a design, that fulfils a research goal to publish research papers.

Someone who is engineering software, on the other hand takes a wider view:

The Levels of Software Reusability

We mentioned that having reusable software is a good idea, so let’s take a closer look at what we mean by that.

Firstly, whilst we want to ensure our software is reusable by others, as well as ourselves, we should be clear what we mean by ‘reusable’. There are a number of definitions out there, but a helpful one written by Benureau and Rougler in 2017 offers the following levels by which software can be characterised:

  1. Re-runnable: the code is simply executable and can be run again (but there are no guarantees beyond that)
  2. Repeatable: the software will produce the same result more than once
  3. Reproducible: published research results generated from the same version of the software can be generated again from the same input data
  4. Reusable: easy to use, understand, and modify
  5. Replicable: the software can act as an available reference for any ambiguity in the algorithmic descriptions made in the published article. That is, a new implementation can be created from the descriptions in the article that provide the same results as the original implementation, and that the original - or reference - implementation, can be used to clarify any ambiguity in those descriptions for the purposes of reimplementation

Later levels imply the earlier ones. So what should we aim for? As researchers who develop software - or developers who write research software - we should be aiming for at least the fourth one: reusability. Reproducibility is required if we are to successfully claim that what we are doing when we write software fits within acceptable scientific practice, but it is also crucial that we can write software that can be understood by others. Where ‘others’, of course, can include a future version of ourselves: coming back and understanding our own code even after only six months can be difficult!

What Do You Think?

Have you used any academically-produced software in your work, or perhaps developed some yourself? What was good about it, what were its shortcomings, and what aspects do you think should have been given greater attention during its development (or even afterwards)?

The Software Development Process

The typical stages of a software development process can be categorised as follows:

Whether you are aware of them or not, these stages are followed implicitly or explicitly in every software project. What is required is always considered, for example, even if it isn’t explored sufficiently or well understood.

Following a process of development offers some major benefits:

How Should it Have Been Improved?

For your software example used in the first exercise (or perhaps another piece of software entirely), for each problem you identified, within which stage do you think that aspect should have been addressed?

FIXME: briefly show alternative arrangements of how the process can work, e.g. agile?

The Importance of Getting Requirements Right

The importance of gaining a solid understanding for what is required for a software project (or any project) before you begin cannot be overstated. As mentioned, going back and changing an existing implementation is an expensive process.

Requirements can be categorised in many ways, but at a high level a useful way to split them is into Business Requirements, User Requirements, and Solution Requirements. Let’s take a look at these now. As an exemplar we’ll use some hypothetical statistical analysis software for clinical trials to illustrate the differences between them.

FIXME: change example to an HPC-oriented research project: from a simple software package, to running it on DiRAC, to results analysis for publication

Business Requirements

Business requirements describe what is needed from the perspective of the organisation, and define the strategic path of the project, e.g. to increase profit margin or market share, or embark on a new research area or collaborative partnership. These are captured in something like a Business Requirements document.

For adapting our clinical trial software project, example business requirements could include:

User (or Stakeholder) Requirements

These define what particular stakeholder groups each expect from an eventual solution, essentially acting as a bridge between the higher-level business requirements and specific solution requirements. These are typically captured in a User Requirements Specification.

For our software, they could include things for trial managers such as (building on the business requirements):

Solution Requirements

Solution (or product) requirements describe characteristics that a concrete solution or product must have to satisfy the stakeholder requirements. They fall into two key categories:

From Requirements to Implementation

In practice, these different types of requirements are sometimes confused and conflated when different classes of stakeholder are discussing them, which is understandable: each group of stakeholder has a different view of what is required from a project. The key is to understand the stakeholder’s perspective as to how their requirements should be classified and interpreted, and for that to be made explicit. A related misconception is that each of these types are simply requirements specified at different levels of detail. At each level, not only are the perspectives different, but so are the nature of the objectives and the language used to describe them.

Key Points

  • Software engineering takes a wider view of software development beyond programming (or coding).

  • Software you produce has inherent value.

  • Always assume your code will be read and used by others (including a future version of yourself).

  • Additionally, aim to make your software reusable by others.

  • Reproducibility is a cornerstone of science, so ensure your software-generated results are reproducible.

  • Following a process makes development predictable, can save time, and helps ensure each stage of development is given sufficient consideration before proceeding to the next.

  • Ensuring requirements are sufficiently captured is critical to the success of any project.