Workbench / Volume 3 Exercises: The Backend
Volume 3 · Exercises
Volume 3 Exercises: The Backend
Exercises that prove you understand each chapter from first principles: theory questions you answer in your own words, programs you build, run and measure, and integration tasks that combine everything covered so far. Every solution is hidden until you open it, and every programming solution shows real output from running it.
What each chapter's exercises hold
Theory (T)Questions you answer in your own words, from first principles
Programming (P)Programs you build, run and measure, with real output to compare against
Cumulative (C)Larger tasks combining the chapter with every earlier one
Senior (S)Production problems, after What the chapter leaves out
How to use this book
- Read the chapter first; the exercises point back to its sections by name.
- Write your answer in the box before opening anything. Hints unlock as your answer grows, and the solution after the second hint and a little thinking time.
- Run every programming exercise yourself and compare with the real output in the solution.
- Rate yourself after reading a solution, and tick an exercise Done only when you could do it again without help.
Mastery levels
L1 RecognitionDefine it and identify it.
L2 WorkingUse it correctly in code or config.
L3 InternalsExplain why it works.
L4 DebuggingDiagnose failures and performance problems.
L5 DesignChoose among competing approaches.
L6 ProductionOperate it under scale, failure, security and cost.
Languages used throughout
Java 21 · SpringC · C++ · Rust · Zig · GoPostgreSQL 16TypeScript · React · browserPython · PyTorchKubernetes · cloud · CI/CDLLMs · RAG · agents
How to use it: one entry per chapter, added as you read. Write or type your answer before opening a solution; tick an exercise Done only when you could do it again without help. Programming solutions were run on a Linux lab machine (Java 21, Python 3.13, GCC); timings on your laptop will differ, but the patterns should not.
Contents
- V3·33Language FoundationsExercises for Volume 3, chapter 33: syntax families and program structure; primitive types, integer overflow and floating point; reference and value…15 min
- V3·34Object-Oriented ProgrammingExercises for Volume 3, chapter 34: what objects solve and when not to use them; encapsulation, abstraction, inheritance and polymorphism; dispatch…13 min
- V3·35CollectionsExercises for Volume 3, chapter 35: the four shapes of data (list, set, map, queue); the collection interfaces and implementations and their…14 min
- V3·36GenericsExercises for Volume 3, chapter 36: the problem generics solve and the four implementation strategies (erasure, reification, monomorphisation…14 min
- V3·37Functional ProgrammingExercises for Volume 3, chapter 37: what makes programming functional; map, filter and fold; functional interfaces, lambdas, closures, method…15 min
- V3·38ConcurrencyExercises for Volume 3, chapter 38: why backends are concurrent; concurrency versus parallelism and the concurrency models; threads, Runnable and…16 min
- V3·39Modern Java through JDK 27Exercises for Volume 3, chapter 39: the release train, JEPs and preview features; var, switch expressions, text blocks, records, sealed types and…15 min
- V3·40JVM InternalsExercises for Volume 3, chapter 40: the spectrum of runtimes and the life of a Java program; bytecode and the stack machine; class loading, class…15 min
- V3·41Memory & PerformanceExercises for Volume 3, chapter 41: the performance workflow (measure, don't guess); stack versus heap, object layout, allocation and TLABs, escape…15 min
- V3·42Modules & PackagingExercises for Volume 3, chapter 42: JAR, WAR and EAR artifacts; the class path and the module path; JPMS in practice, jlink and jpackage; executable…16 min
- V3·43Build SystemsExercises for Volume 3, chapter 43: the jobs of a build tool and its models; Maven's POM, lifecycle, phases, goals and plugins, scopes…15 min
- V3·44Backend FundamentalsExercises for Volume 3, chapter 44: what every backend does and the same service in different frameworks; request and response; routing; middleware…15 min
- V3·45HTTP API DesignExercises for Volume 3, chapter 45: what REST is and resource modelling; HTTP methods, status codes, headers and content negotiation; pagination…15 min
- V3·46Spring CoreExercises for Volume 3, chapter 46: inversion of control and dependency injection; injection styles; the ApplicationContext and configuration styles…15 min
- V3·47Spring BootExercises for Volume 3, chapter 47: the problem Boot solves and what SpringApplication.run does; auto-configuration and starters; configuration…15 min
- V3·48Spring Web MVC & WebFluxExercises for Volume 3, chapter 48: the DispatcherServlet; controllers and request mapping; validation; exception handling and ProblemDetail…16 min
- V3·49Persistence: JDBC, JPA & Spring DataExercises for Volume 3, chapter 49: the persistence stack; JDBC; JPA mapping; the entity lifecycle and persistence context; lazy and eager loading…15 min
- V3·50Security & IdentityExercises for Volume 3, chapter 50: authentication against authorisation; Spring Security's filter chain and authentication internals; passwords…15 min
- V3·51Async Work, Jobs & MessagingExercises for Volume 3, chapter 51: choosing synchronous or asynchronous work; async tasks, executors and futures; scheduled jobs; background workers…15 min
- V3·52ResilienceExercises for Volume 3, chapter 52: why systems fail; timeouts and retries; retry amplification; non-idempotent operations; circuit breakers…15 min
- V3·53CachingExercises for Volume 3, chapter 53: why caches work (locality and skew) and what they cost; cache layers; local against distributed caches; Redis…15 min
- V3·54Testing Backend SystemsExercises for Volume 3, chapter 54: what tests are for and the shape of a suite; test doubles; unit tests with JUnit, AssertJ and Mockito…15 min
- V3·55Backend ProjectsExercises for Volume 3, chapter 55: checkpoints for the eight backend projects that grow one tiffin-centre ordering service (the order API in plain…14 min