Semester: summer 2024/25
Page in SIS: NPRG043
Grading: Graded credit

About

Programming is not just a matter of writing a program that runs (correctly), or implementing a particular algorithm. Modern programming has become a task in managing structural complexity of computer systems. For small-scale programs, which often serve as a wrapper (handling inputs and outputs) for some algorithm, the (structural) complexity is dominated by the abstractions, operations, and data structures required to implement the algorithm. In medium-sized programs and large-scale software systems, the complexity due to algorithm and the associated data structures is no longer the dominating factor, because the program becomes complex as a result of the number of concepts and their interactions. For such programs, design plays a critical role as the ability to develop and maintain such programs surpasses the capacity of a single person.

In such projects, the ability of team members to communicate effectively becomes extremely important, and the source code of a software system becomes one of the communication channels, which also happens to exactly reflect the current state of the system. While source code quality is (usually) not directly related to correct function of a software system, it does have a significant impact on other important aspects, such as readability, maintainability, and together with design also extensibility and reusability.

The source code quality manifests in many ways, from source code formatting, ordering of statements, choice of variable and function names, decomposition into methods, the content of comments, to design of classes and interfaces. At the lowest level, the goal is to find how to clearly and conveniently capture the executed operations, while at the highest level, the goal is to identify and use good abstractions, which simplify writing and orientation in code, and thus make a program easier to maintain and extend.

Through lectures and lab work during the semester, the course aims to introduce the students to (best) programming practices that lead to better code and program design. The goal is to motivate the students to adopt and use these techniques in practice.

Topics covered

  • Software construction and design, managing essential and accidental complexity.
  • API design, general principles, impact on class and method design.
  • Class design, abstraction & encapsulation, inheritance & composition, polymorphism, immutability.
  • SOLID design principles, design patterns in the context of design principles.
  • Method design, cohesion, naming, parameter passing, returning values, using exceptions, defensive programming.
  • Basic building blocks, variables and constants, general guidelines, naming convetions, fundamental data types.
  • Control structures and primitives, general guidelines, conditional statements, loop statements, code organization.
  • Code formatting, general principles, formatting blocks of code and code elements, formatting aids.
  • Documentation, internal documentation and comments, self-explanatory code.

Last year …

… contents is available here.