Notes from Lecture 1 – Goals and skills
1 What is the course about?
2 What skills the course aims to develop?

Notes from Lecture 1 – Goals and skills

1 What is the course about?

The goal of the course is to lift your software development skills from working with small programs (think EECS111) to designing and building software systems.

What makes software a system rather than a program is not the number of lines of code nor its algorithmic complexity. A software system is a collection of programs that all work together to form an operational whole with well-defined structure and well specified interaction with its environment. As such a software system:
  • Supports configuration for adapting to the requirements of its environment;

  • Comes with a start-up phase for setting up the connections between its different pieces and its environment and preparing for interaction with its users;

  • Maintains a stable operational phase even under adversarial load;

  • Supports graceful termination even under irregular conditions.

Example: A software system for playing a board game should:
  • Let its users configure whether players use a GUI or a textual interface, or whether the rules checker will use this or that version of the rules;

  • Come with a start-up phase of popping up its GUI, opening ports to listen for connections from remote players and setting up everything users will need to interact with the game;

  • Maintain an operational mode where users can register, initiate and play games etc even when some users attempt to cheat or connections drop;

  • Terminate without damaging the host environment or the users’ environment (those are not always the same ...) both when termination is intentional or unexpected.

The above example illustrates that building a software system involves dealing with dimensions of design complexity that go well beyond those you encountered when writing small programs. To make matters worse, decisions that developers make as early as when the system is still a prototype such as the programming language usually stick around. See for instance all the legacy COBOL code in bank software systems. It is still there under layers of wrappers of C++ and Java.

So how can you cope with this greatly complex setting? You need to develop a set of skills that will help you take good care of your code as it grows from a a prototype to a full fledged system.

2 What skills the course aims to develop?

Software construction focuses on three kinds of skills: technical, process and personal skills.

Technical skills should not be confused with technological skills. We are not going to focus on a particular technology – that would be a lost battle from the get-go given the rate of change in the field. Instead we will focus on techniques and ideas that are fundamental and will be applicable as the technological landscape changes. In particular the course aims to give you plenty of opportunities and guidance to exercise:
  • Modular development;

  • Design of interfaces and protocols;

  • Integration of (heterogeneous) components in a system;

  • (continuous) Testing with systematically constructed test harnesses.

Be prepared to see that while practicing one of the above you will start reconsidering earlier decisions. In other words these skills are not isolated modules but form a highly connected feedback loop. Be also ready to discover that the languages and tools that you will pick to work on the courses’ assignments may not support you sufficiently to do the above. As you cultivate your technical skills, you may realize that you have outgrew your tools of the trade and that those limit you instead of serve you.

Process skills help you work effectively on a project, meeting deadlines and client requirements and quality standards. Software development processes have become a highly debated topic since the days of the legendary waterfall model indeed it is an actual legend whose origins, purpose and existence are often misrepresented. Since then many proposals have appeared (vis agile, XP, test-driven) emphasizing the importance of short-cycle adaptive evolution of software rather than the discrete, serial approach of the waterfall model. In this course, we will not follow a particular model but instead we will follow the steps to answer the fundamental questions behind every software design process:
  • What is the goal of our system?

  • What are the actors-pieces that are involved in our system and how do they relate to it (internal/external)?

  • What are the use cases of the system?

  • Focusing on one use case (the most important), how do external actors interact with the system and how this external interaction triggers internal ones to complete the corresponding workflow?

  • How can we represent the information that moves between the actors of the use case as one or more components and what is their interface?

  • Can we implement these components?

  • Can we gain confidence that each component in separation is correct (e.g. unit testing)?

  • Can we integrate the components in an operational prototype?

  • Can we gain confidence that the integration is correct(e.g. integration testing)?

  • What is the next use case we should analyze?

Example Here is how the above plays out if we want to implement some automation support for a small grocery store:
  • Our goal is to implement a system that allows to automate the sales, inventory and accounting operations of the store;

  • The actors-pieces include: customers(external), sales persons (external), inventory employees (external), accountants (external) registry(internal), printer(internal), inventory(internal), bank (external)

  • Some uses cases are: a customer wants to buy some products, inventory employees want to make orders to restore the storage, the accountants want to inspect the books, balance them and pay bills;

  • We will focus first on the purchase-of-products use case: the customer brings products to the registry, the sales person rings them in, the customer swipes credit card, the registry contacts (i) the bank to get acknowledgment for available funds and charge the customer’s account; (ii) the printer to output the receipt and (ii) the inventory to alert it that the purchased products have been removed from the shelves of the store;

  • One component involved is a shopping cart component that collects the information of all the products that customers bring to the registry and offers an interface to add a product, remove a product, ask for total value of its contents, and pay for the products it holds;

  • We implement and unit test the shopping cart and each other component;

  • We connect the components and test their connections;

  • We move to the next use case.

The weekly homework assignments are designed to have you work through this process on a weekly basis. They will state the goals, provide guidance to identify actors and use cases and let you decide on the components and their interfaces. To warm you up to the latter, the first couple of weeks of the course focus on interface design, component implementation and integration. Finally, some central interfaces will be provided to you, as in real life, so that we can connect each others components.

Personal skills are necessary for a software developer as software development is only partly a technical discipline. A big part of software development is communicating with other people. First developers have to communicate with each other since they work mostly in teams and often inherit code or use components that others have built. Second they have to communicate with their managers to explain them what they have built, requirement engineers to understand what the clients need and QA engineers to understand issues with their code. Put differently a software developer needs to be able (i) to explain effectively their code both at a high-level and with all the nitty-gritty details; (ii) provide constructive feedback to others code on the fly for a problem they understand well and (iii) be open to continuous critique.

This last part is particular important as a developers ego can be an important obstacle to delivering successful artifacts. Programmers should disassociate themselves from their code and examine it and let others examine it as if it was a newly found artifact from the depths of history.

The course aims to simulate these real world conditions by giving you the opportunity to play four different roles:
  • Members of a team of two who will practice pair programming and learn to communicate (and cope) with a partner on a daily basis;

  • Codewalkers who will explain their code and especially its bugs, issues and imperfections to your peers and be open to accept continuous constructive criticism;

  • Panelists who will have to understand and provide constructive feedback to code they see for the first time;

  • Scribes who will works as a team to compile a succinct memo with feedback for the codewalkers.

For each codewalk to be a learning experience for all, we have to agree on the ethos of the class. Insulting behavior towards members of the audience or the codewalkers will be shot down immediately. Panelists, feel free speak to ask questions about the presented code or to suggest concrete improvement within the language and tool framework the codewalkers have picked (my language has feature X that can do Y is not helpful). Moreover speak to point out issues with the design and the code, but be respectful, constructive and criticize the code not the people. Codewalkers, never be defensive. Accept criticism or show why a comment is wrong in a concrete way (e.g. with a unit test).

As a final note, developers need to be able to spot and resolve ambiguity. Clients often leave out crucial details about what they want — if we assume they know exactly what they want — or they make contradictory requests. Similar issues arise when developers communicate with their managers or even with each other. To imitate these extremely common situations, some assignments in this course are underspecified. So if you think something is missing or something is not precise, just like in the real world, ask for clarification!