2. Lecture 1 - Introduction#

2.1. Programming and Science#

This program of study sets out to build an understanding of how to design and create high quality scientific software. Typically a practitioner acquires this understanding through years of practice and experience, and the underlying ideas and processes that it consists of are only rarely, if indeed ever, made explicit. This is not unusual in itself. In fact (at least in the United Kingdom), a complete program of scientific training can be undertaken, starting in school and finishing in graduate study, with no explicit reference ever being made to any specific scientific methodologies or their underlying principles and philosophical origins.

Maybe this is not a bad thing ? Indeed, by its very nature, a scientific methodology is unlikely to capture all the aspects associated with “doing” science, such as creativity, imagination, and guessing. Furthermore, in practice, and for many people, “doing” something is often much more enjoyable than “thinking” about it. Of course, when considering academics, the converse is sometimes true, especially when it comes to philosophers !!

Maybe somewhere between the two extremes is a good place to position a post graduate level course on scientific programming. It is this approach that has been adopted here. In doing so it is hoped that the student will acquire an understanding that has more fundamental and therefore (it is hoped) broader in application. For example, software design is studied in a language “agnostic” way, focussing on the core abstractions and ideas that make for good software design. However, the student is also required to realise these designs using one or more programming languages and systems and, in doing so, acquire some of the day to day practical skills necessary for creating quality scientific software.

A further hoped for benefit of teaching programming in a language agnostic manner is that it should furnish the student with the ability to assess the suitability and limitations of any particular language within the context of a given problem domain. This is not just wishful thinking. It is based on the belief that the language we use has an effect on how and what it is we think about. Moreover, common experience suggests that those who learn programming through a particular programming language continue to use the main idioms of this language when programming in other languages. This usually leads to poor structure which, in turn, compromises code quality.

"Langauge shapes the way we think, and determines what we can think about." - B.L.Whorf

2.2. Software Quality#

Quality software is not just about the quality of the programming. It also concerns other ideas, such as accessibility, portability, scalability, extensibility, and so on. How then do we assess the quality of software ? As with most attempts to answer questions regarding quality it only only makes sense to do so when the setting in which quality is to be assessed is understood. The basic assumption for this course is that the setting is scientific software as opposed to, for example, games software, or software for micro-controllers in commercial machines, or multimedia applications.

Does this really make any difference ? Should scientific software be considered differently ? What qualities should scientific software have ? How does the “development life cyle” of scientific software differ (if at all) from other types of software ? These questions, along with other other related ones, will be addressed as part of this course.

2.3. Course Objectives#

The main objectives of this course are

  1. Provide a framework for assessing the quality of scientific software

  2. Provide an understanding of generic programming patterns for representing and transforming abstractions appropriate for scientific software design and development

  3. Provide basic software engineering skills appropriate for creating high quality scientific software

2.4. Key Ideas#

To facilitate in making progress toward achieving these objectives it is useful to set out the key ideas that are used to arrive at the concepts that support them.

Note that the ideas are presented as premises. This is done to emphasise that they are (as far as this course is concerned) only propositions and, as such, are open to the process of discussion, refinement, and change. Students are very much encouraged to actively take part in this process !

2.4.1. Premise 1#

Computation is Transformation of Representations

2.4.2. Premise 2#

Appropriate Representations and Transformations are Domain Specific

2.4.3. Premise 3#

The Representations most commonly applied in the domain of scientific computing are Model, Algorithm, Program, and Computer.

2.4.4. Premise 4#

When it is part of a scientific endeavour the quality of computing should be quantified with respect to the same metrics as the overall endeavour. These metrics naturally include Replicability, Reproducibility, and Repeatability

2.4.5. Premise 5#

In addition to Replicability, Reproducibility, and Repeatability, the quality of computing should be quantified with respect to the intrisic software related metrics of Re-usability and Re-runability

2.4.6. Premise 6#

Quality software is composed from many specialised instances of a few generic patterns.