Skip to Computer Science content

Plain CS learning guide

University Students

Build connections between your CS subjects, strengthen your problem-solving and turn assignments into work you understand. Start with the gaps that matter to your current courses.

Use this guide to connect the subjects in your degree. Read an explanation, work the example, attempt the exercise and compare your reasoning with the answer. You can trace the examples on paper; implementation adds another level of practice.

Check your starting point

For undergraduates. If you cannot yet write a small program independently, take the computing foundation first. Follow your institution’s syllabus and academic integrity rules.

Your goal: Explain a design choice, analyse its tradeoffs and support it with tests and a clear technical report.

A question to begin with

A list contains 10,000 student records. You must find one ID, update its details and explain how you prevented an unauthorised change. Which kinds of knowledge are involved?

Compare your reasoning

Algorithms and data structures guide lookup; a data model and transaction govern the update; authentication and authorisation control access; testing and ethics address mistakes and effects on people. A working screen alone does not demonstrate all these concerns.

Your learning path

Use these four stages to organise your work. The lessons, exercises and project below give you material to practise directly on this page.

Review programming, logic, sets, functions and basic proofs against your current modules.

Try it: Choose a recent exercise you found difficult. Identify its prerequisites and solve a smaller example without copying a solution.

Checkpoint: State what you understand, what remains unclear and the next exercise to attempt.

Study what each structure supports and how input size changes the work required.

Try it: Implement a stack or queue, test its boundary cases and compare two ways to store the same data.

Checkpoint: Explain correctness and operation costs, including the assumptions behind your analysis.

Connect algorithms to a database, networked service or operating-system concept from your degree.

Try it: Build a small application with one persistent data model. Document how information moves and how failures are handled.

Checkpoint: Trace an input through the system and identify where correctness or performance could fail.

Make your reasoning reproducible and distinguish your contributions from borrowed material.

Try it: Write a README, tests and a short design report. Cite sources and disclose tool assistance as your course requires.

Checkpoint: A peer can run the project and question your choices using the evidence you provide.

  1. Check your foundations

    Review programming, logic, sets, functions and basic proofs against your current modules.

    Try it: Choose a recent exercise you found difficult. Identify its prerequisites and solve a smaller example without copying a solution.

    Checkpoint: State what you understand, what remains unclear and the next exercise to attempt.

  2. Connect data structures to costs

    Study what each structure supports and how input size changes the work required.

    Try it: Implement a stack or queue, test its boundary cases and compare two ways to store the same data.

    Checkpoint: Explain correctness and operation costs, including the assumptions behind your analysis.

  3. Apply ideas in one system

    Connect algorithms to a database, networked service or operating-system concept from your degree.

    Try it: Build a small application with one persistent data model. Document how information moves and how failures are handled.

    Checkpoint: Trace an input through the system and identify where correctness or performance could fail.

  4. Communicate and review your work

    Make your reasoning reproducible and distinguish your contributions from borrowed material.

    Try it: Write a README, tests and a short design report. Cite sources and disclose tool assistance as your course requires.

    Checkpoint: A peer can run the project and question your choices using the evidence you provide.

Learn the core ideas

Read the explanation, follow the worked example, then attempt the exercise before opening its answer. The examples are small teaching cases; they are not reports of measured production systems or completed research.

What this guide covers

Lesson 1 of 8

Programming and language foundations

A program transforms state according to rules. A function separates one operation behind an interface; a type describes permitted values and operations. Learn control flow, recursion, scope, exceptions and the difference between a value and a reference. Trace behaviour before selecting a language feature.

Worked example

Let a list be [2, 4]. If b refers to the same list as a, appending 6 through b changes what a sees. Copying the list first creates a separate outer container.

Try it yourself

After b = a and b[0] = 9, what does a contain? How would a copy change the result?

Show suggested answer

With shared-reference list semantics, a becomes [9, 4]. With a separate copy of this list of numbers, a remains [2, 4]. Copy depth matters when elements are themselves mutable containers.

Checkpoint: Trace state changes and explain an interface, a type and a side effect.

Lesson 2 of 8

Mathematics, correctness and algorithms

Logic, sets, functions, graphs and probability help state a problem precisely. An invariant is a fact preserved by an algorithm. Complexity describes growth in work or space as the input grows; it does not predict exact elapsed time. Distinguish a proof from a few passing examples.

Worked example

For a running sum, after processing the first k values, total equals their sum. Initialising total to zero establishes the invariant; adding the next value preserves it. A single pass takes linear work.

Try it yourself

Trace [3, -1, 5]. State the running totals and explain the empty-list case.

Show suggested answer

The totals are 3, 2 and 7. Starting with zero makes the empty sum zero. Every element is visited once, so the traversal is O(n); a constant number of accumulator variables adds O(1) auxiliary space.

Checkpoint: State assumptions, an invariant and a growth bound for a simple algorithm.

Lesson 3 of 8

The machine, memory and operating system

Instructions run on hardware, while an operating system manages processes, memory, files and access to devices. Caches reduce some memory-access costs; virtual memory gives processes a managed address space. A process and a thread are different execution concepts. Resource ownership matters even when a language manages memory for you.

Worked example

Two workers read a shared counter at 4. Each computes 5 and writes it back. The final value may be 5 rather than 6: the read-modify-write sequence was not coordinated.

Try it yourself

Show an interleaving that loses an increment and explain one possible fix.

Show suggested answer

Read 4, read 4, write 5, write 5 loses an update. Protect the entire operation with an appropriate lock or atomic increment. Locking only the write leaves the earlier reads unprotected.

Checkpoint: Explain a race, a process boundary and why resources need explicit ownership.

Lesson 4 of 8

Networks and distributed work

A protocol defines how participants exchange messages. Messages take time and may fail; separate machines do not share one instantaneous view of state. Parallel work can reduce elapsed time, but coordination and serial work limit gains. Design for partial failures instead of assuming every request either clearly succeeds or fails.

Worked example

A client sends an order. The server saves it, but the reply is lost. A timeout tells the client that it lacks an answer, not that the server did nothing.

Try it yourself

What could happen if the client retries? Propose a way to recognise the same intended operation.

Show suggested answer

A retry may create a duplicate order. A stable operation key, stored and checked with the order, can recognise repeats. The design must also define key scope, lifetime and behaviour when the same key has different parameters.

Checkpoint: Distinguish a failed response from proof that an operation never happened.

Lesson 5 of 8

Data models and reliable updates

A schema describes entities, relationships and constraints. Keys identify rows; constraints protect facts such as uniqueness. A transaction groups changes into a unit with defined guarantees. Indexes can improve certain reads at the cost of extra storage and update work. Learn query reasoning before adding indexes blindly.

Worked example

Represent students and modules separately, with Enrolment(student_id, module_id) between them. A unique constraint on that pair prevents recording the same enrolment twice.

Try it yourself

Why is one comma-separated module field in each student row awkward? What happens when a module name changes?

Show suggested answer

It mixes a relationship with text encoding, making joins, validation and individual updates harder. Keep stable module IDs and store the module name once in a module table. Exact constraints depend on the requirements.

Checkpoint: Design a small relational model and name the facts each constraint protects.

Lesson 6 of 8

AI, data evaluation and visual computing

An AI system estimates or decides from a model and data; evaluation must match the intended task. Keep training and evaluation data appropriately separate. Graphics represents and transforms visual information through geometry, coordinates and rendering. Both fields require attention to representations, approximation and the limits of a result.

Worked example

A classifier tested on 100 items predicts the majority class every time. If 95 items belong to that class, it achieves 95% accuracy while missing all five minority examples.

Try it yourself

What additional information would you request before calling that classifier useful?

Show suggested answer

Inspect class-specific errors, the costs of mistakes, the data source and the intended use. Compare against the majority baseline. High overall accuracy alone does not demonstrate useful minority-class behaviour or future performance.

Checkpoint: Question a representation or evaluation metric rather than accepting a polished output.

Lesson 7 of 8

Engineering software for a platform

Requirements describe outcomes and constraints; architecture divides responsibilities. A platform adds concrete limits such as browser permissions, mobile lifecycle events or embedded memory. Use version control, tests and review to manage change. Keep business rules separable from presentation so platform behaviour does not silently change meaning.

Worked example

A mobile screen is recreated after a configuration change. If the only copy of the user’s draft lived inside that view, the draft can disappear even though the save function itself was correct.

Try it yourself

Where should draft state live, and which lifecycle events should a test cover?

Show suggested answer

Use a suitable state owner and persistent recovery when needed, rather than relying only on the view. Test editing, recreation, backgrounding, process loss and recovery against explicit save guarantees.

Checkpoint: Turn a lifecycle or platform constraint into a design decision and a test.

Lesson 8 of 8

People, security and professional responsibility

Usability asks whether people can achieve their task; accessibility considers different abilities and ways of interacting. Security protects assets under explicit threats. Ethics asks who benefits, who bears the risk and what responsibilities remain. Apply these concerns during design, not as a final visual inspection.

Worked example

An “admin only” button is hidden in the interface, but the update endpoint accepts requests from any logged-in account. The visual restriction is not server-side authorisation.

Try it yourself

Name one security check, one accessibility check and one stakeholder question for a student-record editor.

Show suggested answer

Check permission for the specific record on the server. Verify keyboard operation and understandable validation errors. Ask who can correct an inaccurate record and what happens if an update is wrong.

Checkpoint: Separate identity, permission and usability while considering effects on people.

Put it into practice

Build a small course-enrolment system

Use fictional students and modules. Implement enrolment, lookup and cancellation; keep the first version small enough to explain completely.

Project brief

  1. Write input/output rules and model students, modules and enrolments.
  2. Implement the operations and one lookup strategy; state its cost.
  3. Add constraints, permission checks and tests for duplicate or missing records.
  4. Document one architectural choice, one accessibility check and the limits of the prototype.

What to produce

  • A schema or model diagram and a trace through one operation.
  • Normal, boundary and failure test cases with expected outcomes.
  • A short correctness/complexity explanation and source credits.
  • A demonstration and reflection following your institution’s integrity rules.

Check your readiness

Use evidence, not the number of pages you have read. If one statement is unclear, return to the relevant lesson and try a new example.

  • I can explain a central idea in my own words and trace a new example.
  • I can attempt the exercises and explain why an answer is reasonable.
  • I can test or challenge my work and record a mistake or limitation.
  • I can produce the project evidence and identify the next gap to address.

The eight groups above map all 17 CS2023 knowledge areas, but introduce rather than exhaust them. Use your programme’s syllabus for depth, electives, laboratory work and assessment. Revisit the group that limits your current project.

Sources and scope

The teaching text, examples and exercises above are provided on Plain CS. These external references document the knowledge and professional guidance behind this selected overview; you do not need to leave the page to attempt its lessons.

  • CS2023 knowledge areas

    Reference for subject breadth. The lesson groups and examples here are Plain CS explanations, not the full curriculum.

  • CS2023 final report

    Curricular scope and the distinction between subject knowledge and demonstrated competence.

  • ACM Code of Ethics (PDF)

    Reference for professional responsibility and consideration of affected people.

This is an introductory guide with practice, not a complete degree, accreditation, professional certification or a substitute for domain-specific instruction. Follow your institution’s or organisation’s requirements where applicable.

References reviewed .

Browse all Computer Science audiences

Image preview

Fit