Software engineering develops and maintains software through systematic design, implementation and evaluation. It connects requirements to program structure, verification, deployment and later change. For example, altering a data format can require changing its parser, stored files and clients together; a locally correct code edit does not by itself ensure a working system. Software testing, version control and explicit interface contracts help manage these dependencies. The subject includes technical trade-offs between correctness, performance, maintainability and the constraints of the intended users.
Formal methods use mathematically defined models, specifications and reasoning techniques to describe and analyze systems. They include writing a formal specification, proving properties through formal verification, exploring a finite model by model checking and deriving information through static program analysis. A method's guarantee is relative to its model and assumptions.
For example, a loop summing an array can maintain the invariant that the current accumulator equals the sum of the entries already visited. Initialization, preservation by one iteration and the exit condition establish the returned sum; a separate termination argument shows that an answer is reached. Arithmetic and array bounds must be specified, since a proof using unbounded integers need not describe overflowing machine arithmetic.[ref]
Static program analysis derives information about a computer program from its representation and programming language semantics, without executing each concrete input case. An analysis commonly approximates many possible executions at once. Data-flow analysis propagates such information between locations in a control-flow graph.[ref]
For example, after if c then x=1 else x=2, an analysis can infer that x belongs to at the join and hence is nonzero. More complicated paths may force a less precise answer. A conservative warning can therefore flag a possible failure that no actual input reaches. The guarantee depends on what the approximation includes: failing to model an external call or integer overflow can invalidate an apparent proof.
Computer programming constructs, tests and revises programs that express computations in an executable or interpretable form. It connects a problem specification to data representations, algorithms, interfaces and error handling. Writing syntax is one part; deciding what results and failures should mean is also part of the task.
For example, computing an arithmetic mean requires representing the observations, accumulating their sum and dividing by the count. The computer program must also define what happens for an empty input, unavailable data or a number representation that cannot hold an intermediate result. Choosing an algorithm and testing ordinary examples does not automatically settle those boundary cases. A useful implementation makes its assumptions visible and supplies evidence through tests, analysis or proofs appropriate to the claim.
A computer program specifies operations or constraints that an implementation can execute or interpret. Its representation can be source code, bytecode or machine code; the same intended computation can have several computer program representations. Its behavior depends on the language semantics, input and execution environment.
For example, a source expression adding two variables is not yet one fixed result. A compiler can translate it into lower-level operations, while an interpreter or CPU performs those operations for particular values. Calling a library or reading a file makes additional parts of the environment relevant. A computer program is consequently distinct from its one observed execution trace and from the abstract algorithm it implements: two programs can implement the same algorithm with different representations, error behavior or resource costs.
A modeling language for describing software structures and behavior. A class diagram records types and relationships; a sequence diagram records ordered interactions; a state diagram records states and event-triggered transitions.
Describe the possible states of a system and transitions triggered by events, optionally constrained by guards and accompanied by actions. The diagram emphasizes a component's lifecycle and permitted reactions. It can describe many interaction traces, while a sequence diagram focuses on the temporal ordering of messages in an interaction.
Describe an interaction through participant lifelines and ordered messages. Time usually proceeds downward. Calls, replies and execution intervals show how participants cooperate in one scenario, with optional fragments for alternatives or repetition. The diagram emphasizes message ordering across participants.
A structural diagram showing software classes or object interfaces, their attributes and operations, and relationships such as class inheritance and associations. A hollow triangle points toward a more general classifier; a dashed realization line distinguishes implementation of an interface. A plain association does not assert exclusive lifetime ownership of the referenced object.
A strong whole-part relationship in a UML class diagram, conventionally marked by a filled diamond at the whole. It expresses exclusive composite ownership and associated lifetime constraints. A stored reference or observer-registration association alone does not establish composition: the same observer may be registered with several subjects unless the design forbids it.
The organization of a software system's major components, their responsibilities and their interactions. A software architecture constrains which components own state and which may request or observe changes. Model-view-controller is one example for interactive applications.
Separate an application's domain state and rules into a model, its presentation into a view, and interpretation of user actions into a controller. The controller requests model operations; the view renders coherent model state. A playlist model, for example, owns song order independently of whether a menu, button or keyboard action requests a move. The Observer pattern often carries model-change notifications to views, but model-view-controller defines responsibilities rather than requiring a particular notification mechanism. This supports separation of concerns and testing domain logic independently of a graphical interface.
Assign distinct responsibilities to components with explicit interfaces, so one responsibility can change without requiring unrelated changes elsewhere. For example, a model-view-controller application separates domain state, presentation and input interpretation. The Observer pattern can communicate a coherent state change to several views while keeping concrete display details out of the model. The separation should follow actual responsibilities; multiplying classes without a clear boundary does not establish it.

Articles by others on the same topic (1)