Software Engineering

How software is planned, structured, tested and shipped by teams: process models, requirements, coupling and cohesion, UML, the testing pyramid, and CI/CD.

If you remember nothing else

  • Verification asks 'are we building the product right?'; validation asks 'are we building the right product?'
  • Good design means low coupling and high cohesion — modules that depend on each other minimally and do one thing internally.
  • Waterfall fixes requirements up front; agile assumes they will change. Choose by how well the requirements are actually understood.
  • Testing levels go unit → integration → system → acceptance; each catches a class of defect the previous one structurally cannot.
  • Black-box testing works from the specification, white-box from the source; they find different bugs and neither replaces the other.
  • The cost of fixing a defect rises steeply with the phase in which it is found — which is the entire economic argument for early testing and review.

The SDLC and process models

  1. Requirements gathering & analysis

    Establish what the system must do, and record it in an SRS.
  2. Design

    Architecture, module decomposition, interfaces, data structures — high-level then detailed.
  3. Implementation

    Write the code against the design.
  4. Testing

    Unit, integration, system and acceptance testing.
  5. Deployment

    Release to the production environment.
  6. Maintenance

    Corrective, adaptive, perfective and preventive changes — typically the longest and most expensive phase.
ModelShapeBest whenWeakness
WaterfallStrictly sequential; each phase completes before the next beginsRequirements are stable and well understood; regulated or safety-critical workNo working software until late; changes are extremely costly
V-modelWaterfall with a matching test level for each development phaseVerification and traceability matterSame rigidity as waterfall
IncrementalBuild and deliver in successive slicesCore requirements are clear; the rest can followNeeds good early architecture or slices conflict
SpiralIterative loops, each with an explicit risk analysisLarge, expensive, high-risk projectsHeavy process overhead; needs risk expertise
Agile / ScrumShort iterations delivering working softwareRequirements are expected to change; the customer is availableWeak for fixed-price contracts; can under-document
  • Scrum roles — Product Owner (owns the backlog and priorities), Scrum Master (removes impediments, guards the process), Development Team (self-organising).
  • Scrum artefacts — product backlog, sprint backlog, the increment.
  • Scrum events — sprint (typically 2–4 weeks), sprint planning, daily standup, sprint review (demo to stakeholders), retrospective (improve the process).
  • Velocity is story points completed per sprint — useful for a team's own forecasting, meaningless for comparing teams.

Requirements engineering

Functional requirementNon-functional requirement
DescribesWhat the system doesHow well it does it
Example"The system shall email a receipt after payment""95% of pages shall load in under 2 seconds"
Also calledBehaviouralQuality attributes, constraints
CategoriesFeatures, business rules, data handlingPerformance, security, usability, reliability, scalability, maintainability, portability
TestingUsually straightforwardOften needs load, security or usability testing

Design: coupling, cohesion and modularity

Coupling typeModules shareRating
Data couplingSimple parameters onlyBest
Stamp couplingA whole record, where only part is neededGood
Control couplingA flag telling the callee what to doModerate
External couplingAn externally imposed format or devicePoor
Common couplingGlobal dataBad
Content couplingOne module modifies another's internalsWorst
Cohesion typeElements grouped becauseRating
FunctionalThey all contribute to one single taskBest
SequentialOne's output is the next's inputGood
CommunicationalThey operate on the same dataGood
ProceduralThey execute in a particular orderModerate
TemporalThey happen at the same time (e.g. all startup code)Poor
LogicalThey are the same category of task, selected by a flagBad
CoincidentalNo meaningful relationship — a Utils grab-bagWorst

UML diagrams worth naming

DiagramCategoryShows
ClassStructuralClasses, attributes, methods and their relationships
ObjectStructuralA snapshot of instances at one moment
Component / DeploymentStructuralSoftware components and their physical placement
Use caseBehaviouralActors and the system functions they invoke
SequenceBehaviouralMessage exchanges ordered in time
ActivityBehaviouralWorkflow, including decisions and parallel paths
State machineBehaviouralStates of one object and the events that transition it

Testing

LevelTestsPerformed byCatches
UnitOne function or class in isolationDevelopersLogic errors within a component
IntegrationInteraction between modulesDevelopers / testersInterface mismatches, wrong assumptions between modules
SystemThe complete integrated systemIndependent testersEnd-to-end behaviour, non-functional failures
AcceptanceAgainst the user's actual requirementsCustomer / end usersThe system solving the wrong problem
Black boxWhite box
Based onThe specificationThe source code
Tester needsNo knowledge of internalsFull knowledge of internals
TechniquesEquivalence partitioning, boundary value analysis, decision tables, state transitionStatement, branch, path and condition coverage
FindsMissing functionality, wrong behaviourUnreachable code, untested branches, logic errors
MissesUntested internal paths that happen to produce right answersRequirements that were never implemented at all

Grey-box testing combines the two: specification-driven tests written with some knowledge of the implementation.

Test typePurpose
RegressionConfirm that a change has not broken previously working behaviour
SmokeA quick check that the build is stable enough to test at all
SanityA narrow check that one specific fix works
AlphaIn-house testing by staff before external release
BetaReal users in their own environment before general release
StressBehaviour beyond the specified limits — does it fail gracefully?
LoadBehaviour under expected peak load

Version control, CI/CD and maintenance

  • Version control records every change with its author, time and reason, allows parallel work on branches, and makes any prior state recoverable. Distributed systems (Git) give every clone the full history; centralised ones (SVN) keep a single authoritative server.
  • Branching strategiesGit Flow (long-lived develop and release branches; suits scheduled releases), GitHub Flow (short-lived feature branches merged to main; suits continuous deployment), trunk-based (everyone commits to main behind feature flags; suits high-frequency delivery).
  • Merge vs rebase — merge preserves the true history and creates a merge commit; rebase rewrites commits onto a new base for a linear history. Never rebase commits that others have already pulled.
PracticeMeansDelivers
Continuous IntegrationEvery commit is merged to a shared branch and automatically built and testedIntegration problems surface within minutes rather than at a release
Continuous DeliveryEvery passing build is automatically prepared for releaseDeployment becomes a business decision, not an engineering event
Continuous DeploymentEvery passing build is released to production automaticallyNo manual gate at all — requires strong automated testing
Maintenance typeReasonShare of effort
CorrectiveFixing defects found in production~20%
AdaptiveResponding to a changed environment — new OS, new API version, new regulation~25%
PerfectiveNew features and performance improvements requested by users~50%
PreventiveRefactoring and restructuring to reduce future cost~5%

The distribution is the point: most maintenance is enhancement, not bug fixing — which is why designing for change matters more than designing for correctness alone.

Self-check

10 questions on Software Engineering · nothing is stored

0/10 answered
Question 1

1.Verification differs from validation in that verification asks:

Question 2

2.Which combination indicates good modular design?

Question 3

3.What distinguishes the spiral model from other iterative models?

Question 4

4.For an input field accepting values 1 to 100, boundary value analysis suggests testing:

Question 5

5.A module that reads and writes another module's internal variables exhibits:

Question 6

6."The system should be fast" is a poor requirement mainly because it is:

Question 7

7.Which testing level is performed by the customer against their actual requirements?

Question 8

8.Continuous Delivery differs from Continuous Deployment in that Continuous Delivery:

Question 9

9.The largest share of maintenance effort typically goes to:

Question 10

10.Brooks's law states that adding people to a late software project: