Engineering notes
Page 3 of 5
Spring Boot Pagination and Sorting, and the Page You Should Not Return
Pageable and Page in two lines — then the runtime warning Spring Data logs about returning Page from a controller, and the COUNT query every page costs.
Backend & APIsJava Optional: The Methods Worth Knowing, and the One That Fools Everyone
Optional's useful methods with real output — and a measurement showing orElse runs its fallback even when the value is present, while orElseGet does not.
JavaJava Stream API Examples, and Four Ways They Surprise You
Complete stream examples with real output — grouping, flattening, collecting to a map — plus four behaviours that cause bugs not looking like stream bugs.
JavaHashSet vs HashMap: One Is Built Out of the Other
The difference is not two designs but one — javap shows a HashSet holding a HashMap. Every behaviour, and every failure mode, follows from that.
JavaArrayList vs LinkedList: The Numbers Behind the Table
Everyone knows the complexity table. Here is what each operation actually costs when you time it — including the one result that contradicts the folklore.
JavaHow to Run a Spring Boot App as a Linux Service (and How Small a Box It Needs)
The systemd unit file for a Spring Boot jar, the one line most of them are missing, and measured answers to how much memory the thing actually uses.
Cloud & DevOpsHow to Dockerize a Spring Boot Application, and What Each Choice Costs
Four images built from one Spring Boot app, measured — 785MB down to 531MB, and why the layered build that everyone recommends does not shrink anything.
ContainersHow to Secure a Spring Boot API with JWT (Without Writing a Filter)
Spring Security already parses and validates JWTs. Here is the whole setup — two beans and one line of DSL — plus what a short example quietly defers.
Backend & APIsHow to Build a REST API in Spring Boot, Including the Failures
Build a working Spring Boot REST API — GET, POST, 201 with Location — then see what your callers actually get back when the request is wrong, and fix it.
Backend & APIs