Title: ⁙ SE
Tags: SoftwareDesign SoftwareArchitecture ClassDiagram Compilation Process ProductLines Patterns Configuration DesignPatterns Testing Evolution Management OpenSource Maintenance SequenceDiagram Requirements Git Agile CICD

Q: "Weeks of coding can save you horus of planning"
A: Software architecture is something that saves a ton of time in the long run (ref. Big Ball of Mud)

Q: For which software systems is architecture most important?
A: Large software systems

Q: Separation of Concerns
A: Separation of Concerns is the process of taking a big system and dividing it into smaller subsystems

Q: What is the Requirements Specification?
A: Result of the Requirements Elicitation Step
Combination of all requirements for a software system

Q: What steps in Software Engineering are described as Analysis?
A: Requirements Elicitation and System Modeling

Q: What is Architectural Design? (Architekturentwurf)
A: "Architectural Design is a creative process in whcih you design a system organization that will statisfy the functional and non-functional requirements of a system."
(Sommerville)

Q: What is Software Architecture
A: "A Software Architecture is a description of how a software system is organized. Properties of a system such as performance, security and availability are influenced by the architecture used."
(Sommerville)

Q: The main goals of software architecture are:
- Being able to [libraries]
- [assertThis]
- [communication]
A: re-use components and subsystems for other subsystems; Meeting critical requirements (for example having all systems for a nuclear power plant only inside, and not accessible from the outside); Communication between stakeholders and developers can be streamlined

Q: How many views are there in software architecture (after Sommerville)?
A: 4

Q: What is a logical view in software architecture?
A: A logical view shows the key abstractions in the system as objects or object classes. (as in logical components or classes)

Q: What is a process view in software architecture?
A: A process view shows the composition of a system at runtime when viewing the processes, and communication between them.

Q: What is a process view (Software Architecture) good for?
A: A process view can show where bottlenecks might happen, or why they don't. It is helpful for predicting metrics such as performance of the system.

Q: What is a development view in Software Architecture?
A: A development view shows how the software is decomposed for development. It shows the components making up the system that are being developed individually

Q: What is a development view (Software Architecture) good for?
A: A development view can help a project coordinator (as in a manager) understand and streamline the coordination of development, and it can help a programmer to more efficiently predict and develop APIs between different components, or choose which teams to collaborate with more.

Q: Conway's Law
A: Any Organization that designs a system will produce a design whose structure is a copy of the organization's communication structure

Q: How many diagram types exist in UML?
A: 14

Q: What is a component (context: Component Diagram)
A: A component is a replaceable part ofa  system that conforms to and provides the realization of a set of interfaces.

Q: What is an interface (context: Component Diagram)
A: An interface is a collection of operations that speicfy a service that is provided by or requested from a class or component.

Q: What is a provided interface (context: Component Diagram)
A: A provided interface is an interface provided by a component that provides a service to other components.

Q: What is a required interface (context: Component Diagram)
A: A required interface is an interface that the component conforms to when requesting services from other components.

Q: Nesting of components (Component Diagrams)
A: A component may contain any number of subcomponents.

Q: Ports and Delegates (Component Diagrams)
A: A port is an explicit window into an encapsulated component. A delegate connects provided or required interfaces with ports.

Header: What is the missing element's name?

Header: What direction is the delegate arrow pointing?

Q: In a component diagram, component names are [property]
A: unique

Q: In a component diagram, a component may have [number] of [element]
A: any number; required or provided interfaces

Q: [which] [what] interface is connected to a [what] interface
A: Every; required; provided

Q: Every component is directly or indirectly connected to [which components]
A: every other component

Q: Subcomponents may be nested to [which level]
A: any level

Q: When subcomponents communicate to a [component kind], they communicate via [element kind]
A: higher-level component; ports

Q: "The [advantage] components are [which]."
A: cheapest, fastest and most reliable; those that aren't there
Back Extra: Quote by Gordon Bell

Q: Architectural Patterns capture the [...] that has been used in different software systems. Architectural Patterns are a [means of]
A: essence of an architecture; means of reusing knowledge about generic system architectures.

Q: What is the problem that inspires the use of a Layered Software Architecture?
A: Subsystems are hard to adapt and replace

Q: What is the idea of a layered system architecture?
A: Components are decomposed into layers. Each layer provides services to the layer above, and delegates subtasks to the layer below.

Q: What does strict layers mean in the context of a layered software architecture?
A: Every layer can only access the next layer

Q: What does relaxed layers mean in the context of a layered software architecture?
A: Every layer can access all layers below

Q: What does information hiding mean in the context of a layered software architecture?
A: A layer hides their implementation details behind an interface

Layered Architecture (general component diagram structure)

Q: What is the problem that inspires the use of a Client-Server Architecture?
A: Several clients need to access the same data

Q: What is the core idea of the Client-Server Architecture?
A: Separation of application (Client) and data management (Server).

Q: Typically, in a Client-Server-Architecture, a Server is connected to [client?], but [other clients].
A: several clients of the same type; clients of different types are also a valid Client-Server-Architecture

Client-Server-Architecture (general component diagram structure)

Q: What is the problem that a 3-Tier-Architecture solves?
A: Different clients with the same functionality but different presentations are needed (e.g. a website and an app)

Q: What is the core idea of a 3-Tier-Architecture?
A: The presentation, application logic and data management are separated, so that the logic can be reused.

Q: What is thin-client application architecture in the context of a 3-Tier-Architecture?
A: The application logic is on the server, while the client only consists of the presentation tier.

Q: What is rich-client application architecture in the context of a 3-Tier-Architecture?
A: The application logic is on the client, while the server only consists of the Data tier.

3-Tier-Architecture (general component diagram structure)

Q: What is the problem that a Peer-to-Peer Architecture solves?
A: High loads on a server caused by a large number of clients that connect to a single server, as well as the existence of a single point of failure

Q: What is the core idea of a Peer-to-Peer-Architecture?
A: Decentralized Transmission of data, as peers connect to each other directly to transfer data

Q: Why is a peer-to-peer-architecture often combined with a light-weight client-server-architecture?
A: The peers need to know how to find the other peers. Also, the peers can obtain metadata about other peers (e.g. seeders / leechers in torrents)

Q: What is the problem that a Model-View-Controller Architecture solves?
A: Data is presented and manipulated over several views, which causes data inconsistencies and makes new views hard to add

Q: What is the core idea of a Model-View-Controller Architecture?
A: Separation into three components:
- Model
- View
- Controller

Q: In a Model-View-Controller Architecture, the different components play the following roles:
- The model [...]
- The view [...]
- The controller [...]
A: stores the relevant data independent of their presentation; shows (a part of) the data independent of manipulations; manipulates the data based on the input events from the view

Q: What is Software Design?
A: Software Design is the process of transforming a software architecture into an implementable software

Q: "Without requirements or design, programmin is the art of adding bugs to an empty text file"
A: Quote by Louis Srygley
Oftentimes, starting from an empty text file (clean slate) is not a good idea, and  instead reusing software as much as possible should be preferred

Q: What is the result of the Software Design step?
A: Module Specification

Q: What type of UML diagram is a Class Diagram?
A: A Class Diagram is a diagram in the category of Structure Diagrams.

Q: What is a class (context: Class Diagram)
A: A class is a description of a set of objects that share the same attributes, operations, relationships and semantics.

Q: What is an association? (context: Class Diagram)
A: An association is a structural relationship that specifies that objects on one thing are connected to objects of another

Q: What is a role (context: Class Diagram)
A: A role describes the face the class at the far end of the association presents to the class at the near end of the association

Q: What is a multiplicity (context: Class Diagram)
A: A multiplicity describes that, for each object at the near end of an association, what number of objects exist at the far end of the association.

Describe a multiplicity describing:
- four or more: 4..*
- sixteen to twenty-three: 16..23
- exactly five: =5
- any number: 0..* or *

Header: What is the missing multiplicity?

Header: What is the name of the diagram element? (Context: UML Class Diagram)

Q: What is an attribute? (context: Class Diagram)
A: An attribute is a named property of a class that describes a range of values that instances of the property may hold. A variable, basically.

Q: What is an operation? (context: Class Diagram)
A: An operation is an abstraction of something you can do to an object that is shared by all objects of that class. A method, basically.

Q: What is a static attribute or operation? (context: Class Diagram)
A: A static attribute or operation exists only once for each class. In the diagram, they are underlined.

Visibility Modifiers in UML class diagrams:
- - private (is available only in this class)
- + public (is available from every class)
- # protected (is available from each subclass)
- ~ package-private (is available to classes in the same package only)

Header: What is the covered element called? (UML class diagram)

Q: Does a class need to show all attributes and operations that will be implemented later on?
A: No, the opposite is true. A class should contain only what is important, to the diagram, not every smallest detail.

Q: What is an Aggregation? (context: Class Diagram)
A: An Aggregation is a special association in which one class represents a larger thing (the whole), which consists of smaller things (the parts) (i.e., has-a-relationship).

Q: What is a Composition (context: Class Diagram)
A: A Composition is a form of Aggregation, with strong ownership and coincident lifetime as part of the whole. To put it simply: The parts exist only if and while the whole exists, not longer, or outside of that timeframe

Header: Add aggregations / compositions where they seem useful

Composition (graphical)

Aggregation (graphical)

Q: What is a generalization in an UML class diagram?
A: A generalization is a relationship between a general kind of thing (superclass) and a more specific kind of thing (called subclass)

Q: What is an abstract class in an UML class diagram?
A: An abstract class is a class that cannot be instantiated, but only inherited from. It is denoted with an italic class name.

Q: What is an Interface in an UML class diagram?
A: An interface is a special class that only has static non-private attributes, abstract non-private operations, cannot be instantiated, and not be in a generalization relationship

Q: Classes may [...] an interface (context: Class Diagram)
A: realize

Q: Classes can [...] an [which classes].
A: generalize; abstract class or superclass

Header: (context: UML Class Diagram)

Q: What does a Sequence Diagram model?
A: A Sequence Diagram models the communication between objects during the runtime of a program

Header: What is the shown part of the Sequence Diagram called?

Header: What is the missing part of the sequence diagram called?

Q: What are desired Properties of Programming Languages? (Knowing some is fine)
A: 1. Modular Implementation
2. Separation of interfaces and implementations
3. Type system: Strongly / weakly typed languages
4. Readable syntax
5. Automatic Pointer Management
6. Exception Handling

Q: What does the term Computer-aided Software Engineering (CASE) mean?
A: CASE describes Software Engineering using computer tools. So, basically all the software engineering today.

Q: What is the Gang of Four?
A: The Gang of Four are the authors that wrote the original Design Patterns book

Q: What is a Design Pattern?
A: A Design Pattern (Entwurfsmuster) is a generalized solution for a problem.
GOF design patterns:

Q: Why is a design pattern useful?
A: A design pattern gives a common name to a solution to a problem, which causes developers to have names for them (e.g. Singleton, ThreadPool)

Q: What is a creational design pattern?
A: A creational design pattern concerns itself with the process of object creation.

Q: What is a structural design pattern?
A: A structural design pattern concerns itself with the composition of classes or objects

Q: What is a behavioral design pattern?
A: A behavioral design pattern characterizes the way in which classes or objects interact and distribute responsibility

Q: What is the Object Adapter Pattern?
A: An Object Adapter Pattern adapts the API of one object to make working together with other classes possible which wouldn't be possible otherwise
aka: Wrapper

Q: What is the advantage of the Object Adapter pattern?
A: The Object Adapter pattern enables reusing classes even though interfaces are actually incompatible

Q: What is the Composite pattern?
A: A Composite pattern composes objets into tree structures to represent part-whole hierarchies. This enables treating composites of objects the same way as treating a single object.
Example: Calculator. A pair of values (an expression) does not only describe multiplication and addition, but also expressions.

Q: What is the advantage of the Composite pattern?
A: The Composite pattern avoids needing to treat certain objects differently to others, effectively avoiding instanceof checks

Q: What is the Decorator pattern?
A: The Decorator pattern enables attaching additional responsibility to objects dynamically. Decorators are an alternative to inheritance.

Q: What is the advantage of the Decorator design pattern?
A: The Decorator design pattern enables creating a multitude of possible variations of classes without creating \(n!\) separate classes.
The best example of what this might fix is my Events json stuff in the Sopra. Just give them a Position, Message and ID decorator, and 95% of events would be done with like 5% of the code.
Less trivial decorators would be brackets in a calculator.

Q: What is the Singleton pattern?
A: A Singleton ensures that there is only one instance of a class at a time, and provides a global (static) pointer to it.

Q: What is the advantage of the Singleton pattern?
A: No instances of an object can be created anywhere else in the system. As a result, the global instance is the only valid one.

Q: What is the Abstract Factory pattern?
A: The Abstract Factory pattern is based around a factory that creates objects that are instances of an abstract class or interface.

Q: What is the advantage of the Abstract Factory pattern?
A: Changing which objects are created is easy, even when instantiating objects at hundereds of positions in the code. In comparison to changing all constructor, only the factory type needs to be changed.

Q: What is the Observer pattern?
A: The Observer pattern describes an object (the observable) that keeps a list of and notifies several other objects (the observers) when the state of the object changes.

Q: What is the advantage of the Observer design pattern?
A: Objects do not need to poll another object for state, but are notified directly. This decreases complexity, and increases perfcormance.

Q: What is Software Quality?
A: Quality is the entirety of poperties and characteristics of a product or process that indicate adequacy with repsect to given requirements

Q: What is Quality Assurance?
A: Quality Assurance (Qualitätssicherung) are all activities with the goal to improve the quality.

Q: What is the goal of Software Testing?
A: The goal of software testing is to show that a program does what it is intended to do and to discover program defects before it is put into use.

Q: What is Validation Testing (also Acceptance Testing)?
A: Validation Testing is demonstratign to the developer and the customer that the software meets  its requirements

Q: What is Defect Testing?
A: Defect Testing is to find edge cases where the behavoir of the software is incorrect, undesirable, or does not conform to specification.

Q: V&V (Boehm 1979)
A: Validation: Are we building the right product?
Verification: Are we building the product right?

Q: What are Code Reviews?
A: Code Reviews describe a developer reviewing the new additions to the codebase that have been contributed in the current state, which is often done for each incremental change that is committed

Q: What is a Systematic Test?
A: A systematic test is a test, in which:
1. The environment is defined
2. The inputs are chosen systematically
3. The results are documented and evaluated by criteria being defined prior to the test

Q: What does a test case consist of?
A: A test case consists of input values for a single execution, and expected outputs.

Q: What is an exhaustive test?
A: An exhaustive test refers to a test in which the test cases cover all possible inputs. It is mainly a theoretical and unachievable construct.

Q: What is Test Case Design?
A: Test Case Design describes the process of designing tests that respresent a large number of feasible test cases, have a high probability to detect a failure, and are non-redundant.

Q: What is White-Box Testing?
A: White-Box Testing describes designing test cases by using the internal structure of the software system. These tests try to achieve a high amount of code coverage.

Q: What is statement coverage (Anweisungsüberdeckung)?
A: Perfect statement coverage implies that all statements are executed by at least one test case

Q: What is branching coverage?
A: Branching coverage describes that all branches have been executed by at least one test case

Q: What is term coverage?
A: Term coverage describes all terms executed based on each possible branch. Perfect term coverage describes that all possible branches that can be achieved and differ from any other branches by at least one statement are executed by at least one test case.

Q: What is Black-Box Testing?
A: Black-Box Testing describes testing a software system without using the source code (unavailable / ignored). Test case design is based on specification.

Q: What is Equivalence Class Testing?
A: Equivalence Class Testing (in Black Box Testing) describes testing based on classifying inputs and outputs into equivalence classes, as equivalent test cases detect the same faults, which is why one test case is sufficient

Q: What is Boundary Testing?
A: Boundary Testing is an extension if equivalence class testing, whereby some specific cases are included (e.g. smallest, typical and largest value)

Q: What are User Requirements?
A: User requirements are statements of what services the system is expected to provide to system users and the constraints under which it must operate.

Q: What is an User Requirements Document? (Lastenheft)
A: A System description from the user's point of view. Basically, what the system should be able to do, and for what.

Q: What are System Requirements?
A: System requirements are more detailed descriptions of the software sytem's functions. These requirements are more technical than User Requirements, and with that more accurate.

Q: What is a System Requirements Document (Pflichtenheft) ?
A: A System Requirements Document is a description of the system from a technical point of view. It describes how to implement the system, and in what way.

Q: What are Functional Requirements?
A: Functional requirements describe what services the system should provide, how it should react to particular inputs, or other descriptions of what the system should or should not do.

Q: What are Non-functional Requirements?
A: Non-functional requirements are statements related to the behavior, but not the explicit function of a system, like that the software consumes less than 10MB of RAM, or that it should react to external input in at least to 200ms to external input for example.

Q: What kinds of non-functional requirements are there?
A: 1. Product Requirements
2. Organizational Requirements
3. External Requirements

Q: Are vague / imprecise requirements acceptable?
A: No, as the interpretation of the programmer might differ significantly from the customer's wish. Requirements should always be as precise as possible.

Q: Ideally, the functional requirements specification of a system should be both [...] and [...].
A: complete; consistent

Q: What is Completeness in the context of Requirements?
A: Completeness means that all services and information required by the user should be defined.

Q: What is Consistency in the context of Requirements?
A: Consistency means that requirements should not be contradictory.

Q: The phases of requirements elicitation are:
1. Requirements [...]
2. Requirements [...]
3. Requirements [...]
A: Elicitation and Analysis; Specification; Validation

Q: What is Requirements Validation?
A: An activity that check the requirements for realism, consistency and completeness.

Spannungsdreieck

Q: What is Configuration Management?
A: Configuration Management is concerned with the policies, processes and tools for managing changing software systems

Activities in Configuration Management are:
1. Version Control / Management (Git)
2. System building (compile)
3. Change management (tracking change requests)
4. Release Management (preparing new and managing old releases)

Q: Three phases of software development:
1. [...] phase (adding new functionality)
2. [...] phase (internal release, bugfixing and so on, but no new functionality
3. [...] phase: bug reports and feature requests by users or customers
A: Development; System testing; Release

Q: Can different phases of Configuration Management be happening at the same time?
A: Yes, for example the Development phase for a new, big version, while the Release phase for the current version, and the System testing phase for the next update.

Q: What are the goals of a Version Control System?
A: - Accessing older version of a software
- Collaborate on the same codebase
- > Merge files edited by several users

Q: What is a Centralized Version Control System?
A: A Centralized VCS is a VCS that is built up according to a Client-Server Architecture:
- The server has the "true" copy of the source code
- The client obtains a working copy of the repository from the server
- The client uploads all changes to the server, which saves the history

Q: What is a decentralized Version Control System?
A: A decentralized (or distributed) VCS (like Git) clones the entire repository including its entire history instead of just the current working copy on the client.
- Changes can be done locally
- Changes can be synchronized with a server, but every peer can act as a server themselves
- Technically no Ground Truth version of the repo, instead the truth is a mish mash of all of the current versions

Q: What does git clone <source> <folder> do?
A: - Creates a repository clone in the given folder
- Entire history is downloaded, so no newest version is needed

Q: What does git fetch do?
A: git fetch downloads the new changes in the repository, but doesn't modify the working copy.

Q: What does git commit do?
A: git commit commits all local changes in the staging area to the local repository.

Q: What does git push do?
A: git push pushes all changes in the local repository to the server. This is only possible if the local repository contains all remote changes.

Q: What does git merge do?
A: git merge compares the working copy with the local repository, and merges these changes.

Q: What does git pull do?
A: git pull is a shorthand for (based on the configuration) two commands:
- git fetch and git merge (default)
- git fetch and git rebase (always rebase setting)

Q: What is a .gitignore file?
A: A .gitignore file defines what files should be ignored, e.g. *.log or /build

Q: What is an automatic Git merge?
A: When changes are easily mergeable (e.g. new lines are added), Git automatically merges the changes into the current working copy.

Q: What is a manual Git merge?
A: When changes are not automatically mergeable, a developer has to manually fix merge conflicts, which is referred to as a manual Git merge.

Q: What is System Building (Context: Configuration)
A: System Building is the process of compiling and linking the system components and dependencies to create an executable release.

Q: Building involves three platforms:
- [...]: Compilers and editors on the developers' computer
- [...]: Server to build and distribute executable versions, triggered by commits or schedule (ref. Nightly)
- [...]: Intended platform for the executable system (e.g. a car's ECU)
A: Development System; Build Server; Target Environment

Q: Tooling for Building and System Integration (knowing some is fine)
A: - build script generation (e.g. cmake, cargo. Identify required components,)
- VCS integration (Build server registers itself with the VCS)
- Minimal recompilation (Don't spend hours compiling the entire thing when changing two lines)
- Executable system creation (compillation, linking)
- Test automation
- reporting (build / test success or errors)
- documentation generation (Doxygen, Javadoc, ...)

Q: What is Continuous Integration?
A: CI describes creating frequent builds, and running tests frequently (often per commit or push to a repository)

Q: What is DevOps?
A: DevOps (from Agile development) describes building a team from developers and administrators that are responsible for both.

Header: What's the covered field of the Waterfall model?

Q: In the Waterfall model, is it possible to go back to a previous development step?
A: Yes, but all steps that are regressed need to be redone from the one that was regressed to.

Q: What are Advantages of the Waterfall model?
A: I's a very foolproof model for software development

Q: What are disadvantages of the Waterfall model?
A: New requirements require that the entire process needs to be redone from scratch, which is why the waterfall model is horrible at adapting to changes.

Header: What are the covered steps of the V model?

Q: What is the relationship between the V-Model and the Waterfall model?
A: The V-Model is an adaptation of the Waterfall model with simillar strengths and weaknesses.

Q: What is a User Story?
A: User Stories are informal, natural language descriptions of how a user might use the system written from the perspective of an user of the system. They are used in Agile and Scrum.

The waterfall model consists of:
- Requirement Analysis
- System and Software Design
- Implementation & Unit Tests
- Integration & System Tests
- Operation and Maintanance

Q: In the waterfall model each step is [...].
A: consecutive

What are the according tests in the V-Model?
- Requirement Elicitation --> Acceptance Test
- System Modeling --> System Test
- Architecture Design --> Integration Test
- Software Design --> Unit Tests

Q: What is the main goal of a sprint in SCRUM?
A: Increment of software.

Q: During a sprint it's important to work [when?] and have a [time] team meeting.
A: every day; short

Q: Agile Software Development requires for [...] and [...] to work together.
A: developers; clients

Q: Working software is [...]! (Agile Dev)
A: progress

Q: Agile teams need to be [...] and [...]
A: flexible; self-organizing.

Q: In an Agile Process clients can change requirements [when?]
A: whenever they want.

Q: What is a High-level Programming Language?
A: A High-level Programming Language is a programming language where a single statement compiles to many instructions in machine code

Q: What is an Intermediate Language?
A: An Intermediate Language (like Java Bytecode, or IL) is a language that a programming language is compiled to, but cannot run on the processor directly. It is interpreted by an interpreter (.NET runtime, JVM).

Q: What is Compile time?
A: Compile time is the time in which the software is being compiled (e.g. after starting rustc ./somefile.rs before getting the two million errors you coded)

Q: What is Run time?
A: Run time is when the software is actually running on the target machine. (e.g. after starting rimworld, where some infinite loop in the mod updates volumetric gas distribution so many times per frame that the entire OS freezes)

Q: What is Just-in-Time Compilation?
A: JIT describes compiling code into machine code at runtime, for example if some methods are called hundreds of times per second that part might be JIT-compiled.

Q: Why does software using JIT-compilation need a warm-up period to reach maximum speed?
A: The runtime first needs to find what to just-in-time-compile, and then needs to compile these parts of the software.

Q: What software architecture is a compiler generally based on?
A: Compilers are generally based on the Pipe-and-Filter architecture.

Header: What is the missing step (and its result) in a Compiler?

Header: What is the missing part of the Compiler?

Q: What is Type Safety?
A: A program is Type Safe if its execution cannot lead to type errors.

Q: What is Type Correctness?
A: Language specification defines types rules checked by the compiler or interpreter. A program is type correct if it statisfies the type rules.

Q: What is a Strongly typed language?
A: A language is strongly typed if any type correct program is also type safe.

Q: What does the acronym TDD stand for?
A: TDD stands for Test Driven Development.

Q: What is a Type Error? (Context: Compilation)
A: A Type Error describes that a method is called with arguments that do not match its signature.

Q: What is a Runtime Error? (Context: Compilation)
A: A Runtime Error (such as a null pointer exception in Java) is an error that happens while the program is running.

Q: What is the core idea behind Test Driven Development?
A: Write the test first so that it fails, then write the source code so that the test succeeds. After that, refactor if necessary.
Red, Green, Refactor.

Q: What is a Logical Error? (Context: Compilation)
A: A Logical Error is an error that happens at Runtime, but doesn't necessarily cause the program to panic (exception). When a Logical Error happens, a wrong value is computed or returned.

Q: What is Design by Contract? (Context: Compilation)
A: Formal (as in machine readable) specification (like that a parameter cannot be null) are written directly into the code (code level), like assertions on methods or classes (e.g. Java Modeling Language JML)

Q: What are advantages of Design by Contract? (Context: Compilation)
A: As the formal specification of some method / class is machine readable, documentation or unit tests can be generated from the formal specification.

Q: What is Blame Assignment? (Context: Compilation)
A: Blame Assignment is a concept in Design by Contract, where when an error occurs a blame is assigned to the method that has not fulfilled its contract defined by its formal specification.

Q: What is a Parser Error? (Context: Compilation)
A: A Parser Error happens when the parser cannot parse the source code successfully, and therefore when the source code is syntactically wrong.

Q: What is a Lexical Error?
A: A Lexical Error happens when a token cannot be parsed. For example:
a = §@X4%!;

Q: What is Greenfield Development?
A: Greenfield Development describes developing software "on a green field", from the ground up, without restricting software to be expanded on or other restrictions.

Q: What is Mass Customization? (Context: Product Lines)
A: Mass Customization is the combination of Mass Production and Custom Orders, such as individually being able to select the color and features of a mostly mass-produced car.

Q: What is a Software Product Line?
A: A Software Product Line describes a group of software systems (as in products) that share a common, managed set of features, and are developed from a common set of core assets.

Q: What is a Feature? (Context: Product Lines)
A: A feature is a domain abstraction that is used to communicate by stakeholders (e.g. manager, dev, tester, customer, ...). Example: A smartphone has a camera, and is therefore distinct from a camera-less smartphone.

Q: Features specify the [property] between [what?].
A: differences; products

Q: Features are often [relationship kind] on other features.
A: dependent

Q: What is a Feature Model? (Context: Product Lines)
A: A Feature Model is a hierarchy of features.
Example:

Q: What is an Optional Feature? (Context: Product Lines)
A: An Optional Feature is a feature that has no further constraints.
Example: Transactions

Q: What is a Mandatory Feature? (Context: Product Lines)
A: A mandatory feature is required by its parent
Example: Basis, API, OS

Q: What is an or group? (Context: Product Lines)
A: An or group is a group of features of which at least one feature is required when the parent feature is required.
Example: Get, Put, Delete

Q: What is an alternative group? (Context: Product Lines)
A: An alternative group is a group of features of which exactly one feature is required when the parent feature is required.
Example: Win, Unix

Q: What is an Abstract Feature? (Context: Product Lines)
A: An Abstract Feature is used to group together other features.
Example: ConfigurableDatabase, API, OS

Q: What is a Concrete Feature? (Context: Product Lines)
A: A Concrete Feature is a feature that has an implementation.
Example: Basis, Transactions, Get, Put, Delete, Win, Unix

Q: What are tree constraints in a feature model?
A: Tree constriaints are constraints between features defined by their hierarchy.
Example: all the lines

Q: What are cross-tree constraints in a feature model?
A: Cross-tree constraints are propositional formulas over features.
Example: \(\text{Transactions }\Rightarrow \text{ Put }\lor\text{ Delete}\)

Q: What is a Preprocessor?
A: A Preprocessor is a program (often as part of a compiler) that analyzes and executes preprocessor code before compiling the source code.
Example: C++ preprocessor

Q: Why are preprocessors useful for the implementation of product lines?
A: Preprocessors can remove or include parts of the source code based on certain flags (feature flags), and with that include or remove features. Therefore, it is possible to compile to an entire line of products from a single codebase by using said feature flags.

Q: Why are Plugin Frameworks useful for the implementation of product lines?
A: As plugin frameworks are based on writing plugins, by implementing features in plugins features can either be removed or included, and therefore the codebase can compile to an entire product line of different software systems.

Q: What is a Plugin Framework?
A: A Plugin Framework is a framework that is based on compiling / loading custom plugins that are selected at compile time.

Q: What is the problem in testing product lines of software systems?
A: Product lines might have trillions of trillions of feature combinations, so testing every single one is de-facto impossible.

Q: What is Feature Interaction? (Context: Product Lines)
A: Features work well in isolation, but not in combination. Example: Sprinkler system in a skyscraper that - after triggering because of a fire - gets turned off by the flood control system.

Q: What is Pairwise Interaction Testing?
A: Pairwise Interaction Testing is testing the interaction between two features in Software Product Lines.

Q: What is T-Wise Interaction Testing?
A: T-Wise Interaction Testing is testing the interactions of T features. For example, with T=3 all feature combinations of exactly 3 features will be tested.

Q: What is Open Source Software?
A: Open Source Software (OSS) describes software where the source code is openly available, and where any developer can contribute to the software.

Q: Is Open Source Software free to use?
A: Only if the license permits it. If there is no license, one needs to negotiate with the developer for this.

Q: Mosher's Law of Software Engineering
A: Don't worry if it doesn't work right. If everything did, you'd be out of a job.

Q: What does FOSS stand for?
A: FOSS stands for Free and Open Source Software. Hereby, Free as in Free speech and as in Free beer.

Q: Who is RMS?
A: Richard Matthew Stallman, renowned for fighting for freedom in software development (FOSS)

Q: What is Copyright (Urheberrecht)?
A: Copyright is the right protecting intellectual property such as patents, trademarks, books, movies, software.

Q: Copyright is often governed by [law-creator] laws.
A: national

Q: What is Copyleft?
A: Copyleft is the right to distribute and modify intellectual property.

Q: What is Strong Copyleft?
A: Strong Copyleft describes licenses that require publishing the entire software system that uses a licensed dependency.
Example: GPL

Q: What is Weak Copyleft?
A: Weak Copyleft describes licenses that only require modifications of the software to be required to be publicised, not the entire software system.
Example: LGPL license

Q: What Copyleft category does the MIT License belong to?
A: The MIT License has no copyleft, so it can be used in commercial, proprietary products, for free, without republishing it. Even changing the license is allowed.

Q: What Copyleft category does the GPL belong to?
A: GPL is a license with strong copyleft, which means that if GPL software is used in a bigger software system, the entire system also needs to use the GPL. If GPL software is used internally and not distributed, its source code doesn't need to be published.

Q: What Copyleft category does the LGPL belong to?
A: LGPL is a license with weak copyleft. Software using LGPL software does not have to be released under LGPL, but only the LGPL-licensed Software components if they were modified.

Q: Can you use GPL code in a project under the MIT license?
A: No, as the MIT License is incompatible with the GPL.

Q: How can software be re-licensed under another license?
A: Technically, all developers (code owners) need to consent to changing the license. In practise, this is often around 85-90%.

Q: What is Dual Licensing?
A: The owner is not bound to their own copyleft or license. Therefore, a developer (code owner) can redistribute their software with a different license. (Example: Open source under GPL, but for payment MIT to be usable in proprietary software)

Q: What is a Software Development Project? (context Management)
A: A temporary activity with a start and end date, with clearly defined goals such as
- Creation / Modification of a software product or components
- gaining experience
- using unused capacity
- ...

Q: When is a Software Development Project successful? (context: Management)
A: When its goals are mostly fulfilled.

Q: What are the goals of Project Management?
A: 1. Deliver software on time
2. Keep costs low
3. Deliver software that meets expectations
4. Maintain a well-functioning development team

Q: What tasks are there in Project Management?
A: 1. Project Planning
2. Risk Management
3. People Management
4. Reporting
5. Proposal Writing

Q: What is Risk Management? (Context: Management)
A: Finding and identifying Risks that might impede the success of the project.

Q: Who is responsible for Project Management? (Context: Management)
A: Project Managers

Q: Risks are classified in Risk Management as:
- [...] Risks (might impede software project)
- [...] Risks (might affect software quality)
- [...] Risks (might affect company / business)
A: Project; Product; Business

The stages in Risk Management are:
- Risk Identification (finding risks)
- Risk Analysis (asses likelyhood and consequences)
- Risk Planning (plan how to avoid or minimize effect)
- Risk Monitoring (regularly asses risks and revise plans if needed)

Q: What is People Management?
A: Managing People to optimize productivity while retaining engineers / developers, as hiring and training is expensive.

Q: Should programmers be team managers?
A: Only if they have the soft skills needed for the task. Before proven otherwise, assume they shouldn't be.

The most important factors in People Management are:
1. Consistency (treat people comparably with similar rewards)
2. Respect (Let all people contribute, respect difference in skill)
3. Inclusion (consider views of least experienced people)
4. Honesty (manager is honest about own skills and team performance)

Q: When does Project Planning happen?
A: At the Proposal Stage, when bidding for a contract.

For software pricing, the costs that need to be considered are:
- Effort Costs (Developers / Managers)
- Hardware and Software Costs (Assets)
- Training costs (Newbies)
- Travel costs (Developer time more significant than travel price)

Q: Based on a cost estimate, how is the proposed software price estimated? (Context: Management)
A: \(\text{price} = \text{estimated costs} + \text{profit} + \text{contingency (extra effort, 30-50%)}\)

Q: What is a Gantt Chart?
A: Bar Chart with time on the X-Axis, and tasks on the Y-Axis

Q: What is the Critical Path? (Context: Management)
A: The Critical Path describes what delays in which projects would cause delays in the entire project.

Q: What is a Network Diagram?
A: A Network Diagram is a directed graph with projects as nodes. Network Diagrams are useful for analyzing the critical path of the project.

Q: What kinds of Software Design Patterns exist?
A: Structural, Creational and Behavioral Design Patterns.

Q: What is Regression Testing?
A: Selective retesting of a system or component to verify that modifications have not broken them, and that they still comply with user requirements.

Q: When is Regression Testing useful?
A: As Regression Testing is only supposed to verify correctness of changes:
- The software needs to be mostly correct before.
- The changes need to be relatively minor.

Q: Why does software need to be changed? (Context: Evolution)
A: - Adjusting to new developments
- New / adjusted requirements
- Hardware changes
- Legal changes
- ...

Q: An evolving system [tendency] its complexity unless work is done to [do what?].
A: increases; reduce it
Back Extra: Quote by Meir "Manny" Lehman

Lehman's Laws are:
- Continuing Change: Systems must be continually adapted to stay statisfactory
- Increasing Complexity: Complexity increases during evolution unless work is done to reduce it
- Conservation of Familiarity: Statisfactory evolution excludes excessive growth
- Continuing Growth: Functionaltiy must be continually increased to maintain user statisfaction
- Declining Quality: quality will decline unless rigorously maintained and adapted to operations envoronment changes

Q: Functional changes are [...]. (Context: Evolution)
A: inevitable

Make it correct, make it clear, make it concise, make it fast. In that order.
Back Extra: Quote by Wes Dyer

Q: When should Refactoring be done?
A: Refactoring should be done constantly, whenever non-clean code is spotted, even during other programming tasks.

Q: When is constant refactoring not possible?
A: For example, during sprints or while a deadline is approaching, it might not be possible to make time for refactoring. The unclean code needs to be refactored later.

Q: What is the Code Smell Mysterious Name?
A: Mysterious Name refers to a variable, method or (...) name being hard to understand.
Example:
a = 15
b = 12
c = Obj3()
d = c.d(a, b)
d.c(b, 14, "something")

Q: What is the Code Smell Duplicated Code?
A: If the same code structure is in more than one place, programs can be structured better if they are unified.

Q: What are fixes for Duplicated Code?
A: - Extraction into method
- Pull-up into method (copy methods of subclasses into superclass)

Q: What is the Code Smell Long Method?
A: Long methods makes recognizing the actual purpose of a method hard to recognize (ref. Seperation of Concerns). Methods should try to do only one thing, but do that well.

Q: Eagleson's Law
A: Any code of your own that you haven't looked at for six or more moths might as well have been written by someone else

Q: What is Spaghetti Code?
A: Code that jumps around everywhere (GOTO) is called Spaghetti Code.

Q: What is Lasagna Code?
A: Object-oriented version of Spaghetti Code. ZZ extends ZY extends ZX extends ZW extends ... extends AA. (Too many layers)

Q: When debugging, novices [fix how?] code; experts [fix how?] code.
A: insert corrective; remove defective
Back Extra: Quote by Richard E. Pattis

Q: Why is Software Maintenance a thing, even though software doesn't degrade?
A: Software Maintenance and the necessity of it follows from either finding bugs that were there in the first place, or changes in the environment the software runs in, not the software degrading.
(Example: Cloudflare's servers going down because of a leap second, and therefore a negative delta-time value)

Q: What is Adaptive Maintenance?
A: Software Maintenance performed to make a computer program usable in a changed environment. (example: desktop app for Win7 to Win10)

Q: What is Corrective Maintenance?
A: Maintenance performed to correct faults in software; bugfixing.

Q: What is Perfective Maintenance?
A: Software maintenance performed to improve the software system in aspects such as performance and maintainability

Q: What is Preventive Maintenance?
A: Maintenance performed for the prupose of preventing problems before they occur. (example: the year 2000 problem)

Q: When are changes in the software system maintenance and not evolution?
A: - Mostly corrections
- Small changes
- Often unforseen changes
- Patches and Hotfixes instead of Updates
- Minor releases (2.3.0 \(\Rightarrow\) 2.3.1)

Q: When are changes in the software system evolution and not maintenance?
A: - New / removed functionality
- Large changes
- Often forseen changes
- Results in Upgrates or Service Packs
- Major release, new major version (2.3.2 \(\Rightarrow\) 2.4.0)

Q: What is Reverse Engineering?
A: Analyzing a system to identify the system's components and their interrelationships, and document that (for example in an UML diagram)

Q: What is Forward Engineering?
A: Basically all normal software engineering. Moving from high-level abstractions (like UML diagrams) to implementations in code.

Q: What is Restructuring?
A: Restructuring is transforming from one form of representation to another, while the functionality and behavior stays the same.

Q: What is Reengineering?
A: Reengineering is examining and altering a part of a Software System into a new form. Basically a combination of reverse engineering, refactoring and forward engineering.

Q: What is Legacy Software?
A: A large, old and outdated software system that is still used and vital in some shape or form, but is hard to cope with.

Q: Typical properties of Legacy Software Systems (knowing some is fine)
A: - larger than 100k Lines of Code
- older than 10 years
- original devs and architects not available anymore
- outdated programming languages (e.g. Cobol for the world's financial systems)
- business-critical
- outdated or missing documentation
- based on outdated hardware and system software
- subject to numerous iterations of corrective and adaptive maintenance
- high costs for maintenance

Q: What is Software Migration?
A: Migrating software is renewing or replacing business-critical legacy software, often with migrations for data, and reducing time the software is unavailable to a minimum.

Strategies for migrating legacy software are:
1. wrapping: building a new software around the old system
2. redevelopment: completely re-implement all functionality and replace the legacy software
3. incremental migration: renew the legacy software step-wise
4. big bang migration: migrate the entire legacy software system in  a single step
Strategies can be - and are often - combined