robsonkades
- 275 skills
- 0 followers
- 6 hours ago last updated
- ▌ Tdd · robsonkades bundleTest-driven development as a judgement call rather than a doctrine: the red-green-refactor loop and what each step is actually for, the discipline of watching a test fail for the stated reason, step size, and an explicit account of where TDD pays and where test-after or characterisation is the better choice. Use when deciding whether to drive a change with tests, when starting a bug fix, when a design is hard to test and the cause is not obvious, when tests are being written after the fact to satisfy a rule, when the refactor step keeps getting skipped, or when someone claims TDD is mandatory or useless. Does not cover which level to test at (java-testing-strategy), how a test is written (java-test-design), doubles (java-test-doubles), refactoring mechanics and safety (java-refactoring), or breaking a dependency to get untestable code into a harness (java-legacy-code-testing).
- ▌ Debugging · robsonkades bundleFinding the cause of a fault instead of a change that makes the symptom go away: reproducing before diagnosing, shrinking the reproduction until nothing is removable, stating a hypothesis that predicts an observation, changing one variable at a time, bisecting, and choosing which evidence to collect from a running production system before it is destroyed. Use when a fix is being guessed at, when a change "seems to work", when the same bug keeps coming back, when a fault cannot be reproduced, when a production incident needs a cause rather than a restart, when print statements are being added everywhere, or when several changes were made at once and it now works. Does not cover JVM performance triage (java-performance), GC (jvm-gc-tuning), live thread diagnosis (concurrency-diagnostics), heap dump mechanics (heap-dump-analysis), or deliberately injecting failures (distributed-systems-testing).
- ▌ Gof Proxy · robsonkades bundleProxy in modern Java: a stand-in that controls access to another object behind that object's own interface — virtual (lazy), remote, protection and caching variants. Covers the central danger of making a network call look like a method call, how a proxy differs from a decorator, the self-invocation hole that silently disables @Transactional and @Cacheable, JPA lazy proxies and LazyInitializationException, what CGLIB cannot proxy, and safe publication in a virtual proxy. Use when a lazy-loading wrapper is proposed, when a remote call hides behind a plain interface, when an annotation on a self-called method does nothing, when instanceof fails on an injected bean or a JPA entity, or when authorisation is enforced by a wrapper the caller can bypass. Does not cover adding stackable behaviour (gof-decorator), changing an interface (gof-adapter), sharing instances to save memory (gof-flyweight), lazy loading strategy in JPA (orm-behavioral-patterns), or client-side resilience policy (circuit-breakers).
- ▌ Gof State · robsonkades bundleState in modern Java: making an object's behaviour depend on an explicit state, with the transitions themselves modelled rather than implied by scattered flags. Covers the intent difference from Strategy, where transitions should live — in the state classes, in a table, or in one exhaustive switch — sealed records against enums, rejecting illegal transitions by default, persisting a state through stable codes rather than ordinals, atomic transitions under concurrency, and timeouts as transitions in a durable workflow. Use when boolean flags multiply on an entity, when a status field is checked in scattered ifs, when an illegal transition reaches production, when a workflow must survive a restart, or when two requests transition the same entity concurrently. Does not cover interchangeable algorithms chosen by a caller (gof-strategy), saga orchestration across services (distributed-transactions-and-sagas, gof-mediator), or optimistic locking mechanics (offline-concurrency-control).
- ▌ Gof Bridge · robsonkades bundleBridge in modern Java: separating an abstraction hierarchy from an implementation hierarchy so the two vary independently instead of multiplying into N×M classes. Covers the two-axis test that distinguishes it from Strategy, what to do when the matrix has illegal combinations, why the implementor interface must be designed for its slowest and least reliable implementation, and the thread-safety contract that belongs to the interface rather than to each implementation. Use when class names start combining two adjectives, when adding either a variant or a backend requires editing the other side, when a transport or storage backend must be swappable, when one backend is remote and the others are local, or when someone proposes Bridge for a single axis of variation. Does not cover retrofitting an incompatible existing type (gof-adapter), one varying algorithm (gof-strategy), families of matched products (gof-abstract-factory), or choosing a hierarchy shape in general (java-composition-over-inheritance).
- ▌ Gof Facade · robsonkades bundleFacade in modern Java: one coherent entry point over a subsystem of collaborators, so callers depend on an intention rather than on a sequence. Covers the difference between a facade (simplifies, does not forbid) and a boundary (forbids), the god-facade drift where one class accumulates unrelated use cases, how application services and gateways can play this role while retaining their own boundary responsibilities, and the transaction and fan-out decisions a facade method silently owns. Use when callers repeat the same orchestration sequence, when a legacy subsystem needs fencing, when unrelated responsibilities accumulate in a service, or when a facade method fans out to remote services. Does not cover changing one type's interface (gof-adapter), adding behaviour to one object (gof-decorator), hub-based coordination between peers (gof-mediator), the coarse-grained remote boundary and its DTOs (remote-facade-and-dto), or transaction-boundary mechanics (enterprise-transactions).
- ▌ Java Enums · robsonkades bundleEnums as types rather than labelled integers: instance fields instead of ordinal, constant-specific behaviour and strategy enums, extensibility through interfaces, EnumSet and EnumMap instead of bit fields and ordinal-indexed arrays, exhaustive switch and what separate compilation does to it, and what happens when an enum value crosses a database, a JSON payload or a topic. Use when int or String constants stand in for a closed set, when ordinal() appears anywhere outside a library, when @Enumerated is declared ORDINAL or left at its default, when a switch over an enum has a default branch that hides new constants, when adding a constant breaks a consumer during a rolling deploy, when values() is called in a loop, or when a set of flags is packed into an int. Does not cover annotations (java-annotations), sealed hierarchies and records as the open-data alternative (java-composition-over-inheritance), or equality and ordering contracts in general (java-object-contracts).
- ▌ Java Solid · robsonkades bundleThe five SOLID principles as decision tools for evidence-based Java review, with depth on single responsibility, open-closed, Liskov substitution and interface segregation. Use when reviewing a design or pull request against SOLID, when a principle is being cited to justify a change, when deciding whether a class has too many responsibilities, or when an override breaks substitutability. Dependency inversion depth lives in java-dependency-inversion, contract formalism for LSP in java-design-by-contract, and cohesion/coupling vocabulary in java-cohesion-coupling.
- ▌ Safepoints · robsonkades bundleThe HotSpot safepoint mechanism on JDK 25: thread-local polling words and where the JIT emits polls, loop strip mining, global safepoints versus thread-local handshakes, the VM operations other than GC that stop the world, time-to-safepoint versus operation time, and reading `-Xlog:safepoint`. Use when measured p99 or p99.9 is far worse than the GC log explains, when GC logs look clean but latency does not match, when a stop-the-world pause has no GC event behind it, when JNI critical regions or runtime/native transitions are suspected, when a profiler's hot path never responds to optimisation, or when someone proposes `-XX:+UseCountedLoopSafepoints`, `UseThreadLocalHandshakes` or blames `RevokeBias` on a modern JDK. Does not cover the introductory TTSP treatment or collector mechanics (gc-fundamentals), attributing an observed production pause across GC phase, safepoint and OS (pause-attribution), or host-side causes such as CPU throttling and page faults (linux-for-jvm).
- ▌ Tcp Tuning · robsonkades bundleThe network stack under a JVM service: listen backlog and accept queues, Nagle and delayed ACK, socket buffer sizing against bandwidth-delay product, congestion control choice, keepalive and timeout alignment along the path, and diagnosing retransmissions and queue drops. Use when a small request/response protocol shows a stable ~40 ms latency floor, when a client throws BindException or EADDRNOTAVAIL under burst, when SYNs are dropped at peak, when one core saturates while the others idle on a multi-core server, when throughput plateaus far below a high bandwidth-delay link, when somaxconn was raised and nothing changed, when TIME_WAIT sockets accumulate, or when someone proposes switching to BBR or DCTCP. Does not cover host memory, CPU and signals (linux-for-jvm), the data-movement path itself (io-uring-and-zero-copy), or application-level connection reuse (connection-pool-sizing).
- ▌ Code Review · robsonkades bundleReviewing a change as an engineering activity: setting review depth from the change's risk rather than its size, looking in the order that finds the expensive defects first, refusing to spend human attention on what a formatter or linter should own, writing a finding that can be acted on, separating blocking objections from preferences, and receiving review without either capitulating or defending. Use when reviewing a pull request or a diff, when a review has become a list of style comments, when reviews are slow or rubber-stamped, when a reviewer and an author are deadlocked, when a defect reached production through an approved change, or when deciding what a review must catch versus what CI should. Does not cover the smell catalogue (java-code-smells), SOLID as review criteria (java-solid), readability heuristics (java-clean-code), or which automated gates to run (quality-gates).
- ▌ Gof Adapter · robsonkades bundleAdapter in modern Java: making an existing type usable through an interface it was not written for, and keeping a foreign model, vocabulary and failure mode from leaking inward. Covers object versus class adapters, why a lambda already adapts a single-method interface, the error-translation duty most adapters omit, when an adapter has quietly become a translator with business rules in it, and when a passthrough should be deleted. Use when integrating a vendor SDK or legacy type behind your own port, when two libraries must interoperate, when an adapter is proposed between types you own, when foreign exceptions or DTOs appear in domain code, or when reviewing a wrapper that renames methods and does nothing else. Does not cover the Kubernetes telemetry sidecar (adapter-sidecar-pattern), simplifying a subsystem you own (gof-facade), adding behaviour to the same interface (gof-decorator), controlling access to an object (gof-proxy), or layering rules in general (layering-and-boundaries).
- ▌ Gof Builder · robsonkades bundleBuilder in modern Java: distinguish the original GoF separation of construction process from representation from the Effective Java fluent value builder. Covers selection signals rather than parameter-count thresholds, staged builders, invariant placement, mutable-builder concurrency hazards, Lombok/JPA boundaries, performance evidence, and test data builders. Use for ambiguous or telescoping construction, incremental input, multiple representations, or a builder that permits invalid combinations. Does not cover product-type selection (gof-factory-method, gof-abstract-factory), copying (gof-prototype), fluent APIs generally (java-fluent-apis), or value semantics (java-immutability).
- ▌ Gof Command · robsonkades bundleCommand in modern Java: turning an invocation into an object so it can be queued, logged, scheduled, retried or undone — and the distinction from an event, which is a fact rather than a request. Covers when reifying a call earns its cost and when a method reference is enough, undo through inverses versus mementos versus compensation, what changes when a command is persisted or sent to a broker (versioning, at-least-once delivery, idempotency), and the captured-state hazard when a command executes later than it was created. Use when an operation must be deferred, queued, audited or undone, when a command bus is proposed, when a class is created per method with no queue or undo behind it, or when commands and events are being used interchangeably. Does not cover domain and integration events and the outbox (event-driven-architecture), broker delivery semantics (delivery-semantics), executor and task lifecycle (executors-and-task-lifecycle), or algorithm selection (gof-strategy).
- ▌ Gof Memento · robsonkades bundleMemento in modern Java: capturing an object's state so it can be restored later, without exposing that state to whoever holds the capture. Covers the encapsulation techniques Java offers, why an immutable object is its own memento, the memory cost of an undo stack and the alternatives (inverses, diffs, structural sharing), the torn capture when the source mutates mid-copy, and the distinction from a durable snapshot and from event sourcing. Use when undo, drafts, what-if branches or checkpoints are being designed, when a getState/setState pair is proposed on a domain object, when an undo stack grows without bound, or when someone calls a persisted snapshot a memento. Does not cover the operations being undone (gof-command), copying an object for reuse (gof-prototype), event-sourced aggregates and projections (event-sourcing), or distributed checkpoint barriers (distributed-aggregation-and-barriers).
- ▌ Gof Visitor · robsonkades bundleVisitor in modern Java: adding operations over a stable set of element types without editing them, and how a sealed hierarchy with an exhaustive switch competes with the classical double-dispatch version. Covers the expression problem—new operations cheap versus new element types cheap — the cases where classical Visitor still wins (types you do not compile, libraries whose API is accept()), stateful visitors that are unsafe to share, recursion depth on deep structures, and unknown element types from a newer producer. Use when several operations must run over one object structure, when instanceof chains grow over a closed hierarchy, when adding an operation means editing every element class, or when an accept/visit pair is proposed. Does not cover the structure being traversed (gof-composite), traversal protocols (gof-iterator), sealed hierarchy design (java-composition-over-inheritance), or value semantics (java-immutability).
- ▌ Graalvm Jit · robsonkades bundleGraal as a JIT compiler compared with C2: partial escape analysis, graph-size inlining and speculation, where Graal wins and where it loses, JVMCI and what JEP 410 removed, libgraal versus jargraal, and how to evaluate the swap with a fair measurement. Use when someone proposes switching to GraalVM for throughput, when a Graal-versus-C2 benchmark shows Graal "slower" with no warm-up control, when `-XX:+UseJVMCICompiler` or `-XX:+UseGraalJIT` is set on a stock OpenJDK, when a `-Dgraal.*` flag is copied from old material, when an Oracle JDK 24 deployment relied on its bundled Graal JIT, when a Truffle language warns about a fallback runtime, when a percentage gain is quoted with no source or workload, when GraalVM JIT is being confused with native image, or when picking a distribution and its licence. Does not cover how C2 itself works (c2-sea-of-nodes), ahead-of-time compilation as a separate product decision (graalvm-native-image), or running the comparison benchmark correctly (jmh-advanced).
- ▌ Idempotency · robsonkades bundleMaking an operation safe to apply more than once: natural idempotency versus an idempotency key plus durable operation state; choosing and scoping the key, and why a broker message id covers only one redelivery scope; handling concurrent in-flight duplicates; replaying the stored response instead of returning a conflict; and why idempotent is not commutative. Use when a retry produces a second row, charge or email, when a handler starts with an exists() check before a write, when an Idempotency-Key header is being added or ignored, when two identical requests arrive concurrently, or when a dedup table has no TTL. Does not cover why duplicates arrive (delivery-semantics), compensating actions (distributed-transactions-and-sagas), what the dedup store's own consistency must be (consistency-models), or caching (caching-strategies).
- ▌ Jni And Ffm · robsonkades bundleCrossing into native code: JNI call overhead, critical sections and what they block, the FFM downcall and upcall path, `Linker` and method handles, why a native frame pins a virtual thread, and measuring the boundary cost. Use when a native call sits inside a tight loop, when someone proposes migrating JNI to Panama to fix pinning, when `Linker.Option.critical()` is applied without a measured duration, when `jdk.VirtualThreadPinned` events point at a `native` method or `MethodHandle.invokeExact`, when `WARNING: A restricted method ... has been called` appears after a JDK upgrade, when a runbook still references `-Djdk.tracePinnedThreads` or `--enable-preview` for FFM, when `jextract` is assumed to ship with the JDK, when a downcall fails with `WrongThreadException` on a confined arena, or when `GCLocker Initiated GC` appears as a cause in the GC log. Does not cover holding native memory (off-heap-memory), pinning as scheduling (virtual-threads-internals), or the native memory budget (jvm-memory-regions).
- ▌ Ebpf For Jvm · robsonkades bundleUsing eBPF/bpftrace to measure kernel-visible behavior around a JVM without inventing attribution: selecting stable tracepoints versus kprobes/uprobes/USDT, scoping by process/thread/cgroup, tracking syscall/futex/scheduler/block-I/O lifecycles, managing BPF map loss and cardinality, resolving native and time-varying JIT code, and correlating—not summing—kernel, JFR, profile, and application evidence. Use when scheduler delay, kernel I/O, faults, networking, or cross-process interference may explain JVM symptoms, or when a BPF script is empty/plausible-but-wrong. Does not own ordinary host diagnosis (linux-for-jvm), JVM-local profiling (jfr-and-async-profiler), or continuous profile operations (continuous-profiling).
- ▌ G1 Internals · robsonkades bundleHow G1 actually works: uniform regions and the ergonomic sizing formula, remembered sets and the card table with its write barrier, SATB and the pre-write barrier, the phases of an evacuation pause, humongous allocation and why it bypasses the young generation, and how the collection set is chosen for a mixed collection. Use when a pause is longer than the live-set size explains, when `Merge Heap Roots` or `Merge RS` dominates `-Xlog:gc+phases`, when legacy `To-space exhausted` or current `Evacuation Failure` appears, when the old generation grows without the application retaining anything, when `Humongous regions` climbs in the log, when someone sets `-Xmn` under G1, or when mixed GC is being described as a full GC. Does not cover the introductory collector mental model and generational hypothesis (gc-fundamentals), choosing values for the flags against a latency SLO (g1-tuning-for-slo), or the concurrent marking cycle in depth (g1-concurrent-marking).
- ▌ Gof Iterator · robsonkades bundleIterator in modern Java: traversing an aggregate without exposing it, and choosing between Iterator, Stream and Spliterator — external pull versus internal lazy pipeline versus the parallel decomposition primitive. Covers when a Spliterator can adapt to both, what fail-fast really promises and how weakly consistent iterators differ, streams that hold a resource and must be closed, remote pagination as iteration with page drift, and the characteristics that decide whether a stream can be sized or split. Use when exposing a collection from a type, when a custom traversal is being written, when ConcurrentModificationException appears, when a stream over a file or a result set leaks, when paging through a remote API, or when a parallel stream is not faster. Does not cover stream pipeline design and collectors in general, the tree being traversed (gof-composite), adding operations over it (gof-visitor), or database paging strategy.
- ▌ Gof Mediator · robsonkades bundleMediator in modern Java, treated as high-risk: replacing many-to-many collaboration with a hub that owns the interaction protocol, and the god object that hub becomes when nothing bounds it. Covers the direction test that separates it from a facade, why an event bus is the decoupled alternative and what it gives up, the reentrancy loop when a colleague notifies the hub that notifies it back, the hub as a serialisation point, and orchestration versus choreography with the availability coupling an orchestrator introduces. Use when collaborators reference each other in a web, when a coordinator class keeps growing, when a command bus is called a mediator, when a saga orchestrator is designed, or when a notification loops between two components. Does not cover one-way notification to unknown subscribers (gof-observer, event-driven-architecture), a simplifying entry point (gof-facade), request dispatch to one handler (gof-command), or saga mechanics (distributed-transactions-and-sagas).
- ▌ Gof Observer · robsonkades bundleObserver in Java: choosing and reviewing in-process listener contracts for ordering, errors, threads, registration lifetime, reentrancy and notification outside locks. Use when adding listeners, investigating retained listeners or missed callbacks, or assessing a move from local notifications to a broker. Covers migration contract changes; detailed transaction/outbox design belongs to event-driven-architecture, broker guarantees to delivery-semantics, demand protocols to reactive-backpressure, and hub coordination to gof-mediator.
- ▌ Gof Strategy · robsonkades bundleStrategy in modern Java, separated into three things that are usually conflated: the design concept (an algorithm varies), the classical class hierarchy, and the lambda or functional interface that expresses it today. Covers when a function value is enough and when a named type earns its keep, selecting a strategy by key instead of an if-else chain, the trap of strategies that differ only in constants and may be configuration, how shared state changes concurrency obligations, and the contract test implementations can share. Use when an algorithm must vary at runtime, when a switch over a type code keeps growing, when a class hierarchy exists whose members are one-line methods, or when strategy classes differ only in a rate or a threshold. Does not cover behaviour that changes with the object's own state (gof-state), two independently varying hierarchies (gof-bridge), an algorithm skeleton with varying steps (gof-template-method), or choosing which object to create (gof-factory-method).
- ▌ Java Streams · robsonkades bundleStream pipelines as a design decision: when a stream is clearer than a loop and when it is not, side-effect-free stages and mutable reduction with collectors, the toMap and groupingBy traps, Collection versus Stream as a return type, streams that hold an open resource, parallel streams and the shared common pool, and Gatherers for custom intermediate operations. Use when a pipeline mutates state outside itself or uses forEach to accumulate, when Collectors.toMap throws IllegalStateException or NullPointerException, when a method returns a Stream that callers iterate twice, when a stream over Files.lines or a JDBC cursor is never closed, when parallelStream() appears — especially with blocking I/O — or when a loop is being rewritten as a stream for its own sake. Does not cover lambda capture and functional interfaces (java-lambdas-and-functional-interfaces), ForkJoinPool internals (forkjoinpool-and-work-stealing), or collection choice and complexity.
- ▌ Jfr Advanced · robsonkades bundleEngineering JDK Flight Recorder evidence beyond stock settings: discovering event schemas and settings on the target build, designing threshold/period/throttle/stack trade-offs, composing and validating JFC configurations, accounting for concurrent recordings, defining low-cost custom events and relational metadata, operating Recording/RecordingStream/MXBean consumers, and validating loss, parsing, retention, privacy, and Java 25 JFR features. Use when an event is absent, a field/parser is guessed, fine events are thresholded away, custom instrumentation or live export is proposed, or recording overhead/coverage is uncertain. Does not own first-tool selection, async-profiler, or fleet continuous-profiling operations.
- ▌ Jmh Advanced · robsonkades bundleDesigning advanced JMH experiments: shared and asymmetric state topologies, groups, parameter matrices, auxiliary counters, fixture arbitration, fork/JVM controls, profilers, hardware counters, annotated assembly, compiler controls, cold-state protocols, and multi-modal variance diagnosis. Uses runtime capability discovery and separates diagnostic profiled runs from decision runs. Use when a benchmark is concurrent, fork-dependent, profiler-sensitive, cold/startup-oriented, or produces unexplained clusters. Basic benchmark validity, statistical gates, assembly interpretation, and load tests have separate owners.
- ▌ Jvm Bytecode · robsonkades bundleReading and reasoning about JVM bytecode: javap -c -p -v, operand stack and local slots, the constant pool and resolution timing, descriptors versus Signature, the invoke* family with invokedynamic and inline caching, verification and the StackMapTable, the class-file limits, what javac desugars, and what bytecode does and does not say about performance. Use when a VerifyError appears after instrumentation by an agent, proxy or mock library, when UnsupportedClassVersionError names two class file versions, when javac reports "code too large", when a coverage or mocking agent fails with "Unsupported class file major version" after a JDK upgrade, when auditing what a lambda, record, sealed switch or synchronized block compiled to, when checking for hidden boxing in a hot method, or when a cycles-per-bytecode table is quoted. Does not cover tiered compilation or warm-up (jit-compilation), what the JIT did with the code (compilation-and-inlining-logs), or loading, linking and initialisation (jvm-class-loading).
- ▌ Load Testing · robsonkades bundleDesigning valid service load experiments: choosing open or closed workload models, defining offered, admitted and successful work, controlling generator and environment bias, representative workload and data, state-based warmup, run validity, uncertainty, and reproducible evidence. Use when designing or reviewing k6, Gatling, JMeter or similar tests, diagnosing a throughput plateau, validating a baseline, or deciding whether a run measured the target rather than the generator. Profile selection and breakpoint, burst, stress and soak procedures belong to load-testing-advanced; coordinated omission belongs to coordinated-omission; inference belongs to latency-statistics.
- ▌ Gof Composite · robsonkades bundleComposite in modern Java: treating a leaf and a tree of leaves through one interface, and the hazards that come with a recursive structure. Covers the transparent-versus-safe trade-off and when a sealed interface with exhaustive pattern matching changes that trade-off, unbounded depth and StackOverflowError, cycles introduced by parent pointers and the infinite recursion they cause in equals, hashCode and toString, mutation during traversal, and why a tree whose children live in other services is not this pattern. Use when a part-whole hierarchy is being modelled, when a leaf class is forced to implement add() and throw, when a recursive walk overflows the stack on production data, when nested structures arrive from untrusted input, or when someone proposes Composite for a flat group of items. Does not cover adding operations over a tree (gof-visitor), traversal protocols (gof-iterator), adding behaviour to one object (gof-decorator), or aggregate boundaries in a domain model (domain-logic-organization).
- ▌ Gof Decorator · robsonkades bundleDecorator in modern Java: wrapping an object in something of its own interface to add behaviour, stackably, at runtime — and the fact that the stacking order changes the semantics. Covers the ordering of retry, timeout, circuit breaker, cache, metrics and logging and what each arrangement means, retry amplification across layers, the identity loss that breaks ==, instanceof and listener deregistration, when a framework interceptor is the same pattern already provided, and the thread-safety a stateful decorator introduces. Use when resilience or observability layers are added around a client, when a wrapper chain is reordered, when a decorated object fails an instanceof check, when retries appear at two levels, or when a wrapper is proposed that changes the interface. Does not cover changing an interface (gof-adapter), controlling access to an object (gof-proxy), one entry point over a subsystem (gof-facade), or the retry and timeout policies themselves (circuit-breakers, retries-and-backoff).
- ▌ Gof Flyweight · robsonkades bundleFlyweight in modern Java: sharing one immutable instance across many logical occurrences to reduce retained memory, with benefits dependent on duplicate lifetimes and lookup cost. Covers the intrinsic/extrinsic split, why cheap TLAB allocation does not make reclamation free, the memory arithmetic deciding whether a cache entry costs more than the object it saves, string deduplication and boundary canonicalisation as cheaper alternatives, the unbounded intern map as a leak, and the == trap. Use when object pooling or interning is proposed, when a heap dump shows millions of duplicate values, when someone suggests caching small objects for speed, when a shared instance is mutable, or when a flyweight cache is described as a distributed cache. Does not cover application-level caching policy (caching-strategies), finding the duplicates (heap-dump-analysis), allocation cost in general (allocation-profiling), or one-instance-with-global-access (gof-singleton).
- ▌ Gof Prototype · robsonkades bundlePrototype in modern Java: producing a new object from an existing instance's state, when the configuration is expensive or the concrete type is unknown to the caller. Covers why Cloneable/clone() needs an explicit contract and what replaces it, the deep-versus-shallow decision on graphs with identity and cycles, when immutable values can be shared, the torn-copy hazard under concurrency, and the identity rules when copying persisted objects. Use when clone() or Cloneable appears, when an object is duplicated by serialising and deserialising it, when a configured template must be instantiated many times, when a JPA entity is copied with its id still set, or when a "copy" turns out to share a mutable list with its original. Does not cover constructing from parameters (gof-builder), selecting a type to create (gof-factory-method), sharing rather than copying (gof-flyweight), or snapshot semantics for undo (gof-memento).
- ▌ Gof Singleton · robsonkades bundleSingleton in modern Java, treated as a high-risk pattern: it conflates "one instance" with "reachable from anywhere", which must be justified separately. Covers why dependency injection gives uniqueness as a consequence of wiring, the scale ladder showing a Java singleton is unique per class loader and never per cluster, the safe lazy-initialisation idioms and the class-initialisation deadlock they invite, the static-state leakage that makes tests order-dependent, and the distributed mechanisms that give system-wide singularity. Use when getInstance() appears, when a scheduled job must run once across replicas, when someone says "singleton" meaning Spring's singleton scope, when tests pass alone and fail together, or when a cache or registry is being made global. Does not cover shared immutable instances for memory (gof-flyweight), wiring in general (java-dependency-inversion), cluster-wide leadership (leader-election), or once-only scheduling across replicas (distributed-locks-and-leases).
- ▌ Java Generics · robsonkades bundleGenerics as a compile-time contract over an erased runtime: raw types and what they disable, eliminating unchecked warnings rather than suppressing them, why arrays and generics do not mix, generic types and methods, bounded wildcards for API flexibility (PECS), generic varargs and @SafeVarargs, and typesafe heterogeneous containers with class tokens. Use when a raw type, a cast to a generic type, or an unchecked warning appears; when code creates an array of a generic type or a generic varargs parameter; when a collection parameter forces callers to convert before calling; when ClassCastException surfaces far from any visible cast; when a deserialised list of strings turns out to contain something else; or when designing a container that must hold values of several types safely. Does not cover null contracts (java-null-safety), collection choice and stream pipelines (java-streams), or the wider API-shape decisions (java-api-design).
- ▌ Java Optional · robsonkades bundleOptional as designed: a return type for "no result is a normal outcome". Covers orElse versus orElseGet (eager versus lazy), orElseThrow over get, map/flatMap/filter chains versus a plain conditional, or(), ifPresentOrElse, stream() integration, the costs of Optional in fields, parameters or collections, valid exceptions, and when Optional makes an API worse. Use when reviewing Optional.get() without a guard, orElse with a costly or side-effecting fallback, isPresent()+get() pairs, Optional-typed fields or parameters, or when deciding whether a lookup should return Optional, null or throw. Nullability contracts and annotations are java-null-safety.
- ▌ Jvm Gc Tuning · robsonkades bundleDeciding whether GC is the actual bottleneck, then choosing a collector and sizing the heap. Use when GC pauses appear on the critical path of a latency profile, when full collections show up, when the heap grows toward its limit, when sizing a JVM for a container, or when a collector change is being proposed. Start from java-performance instead when the symptom is latency or CPU and GC has not been confirmed as the cause. Does not cover how collectors work internally (gc-fundamentals), configuring and reading the GC log (gc-log-analysis), the non-heap memory budget (jvm-memory-regions), or allocation profiling (allocation-profiling) or leak hunting (java-reference-types-and-leaks). Deriving G1 flag values from an SLO is g1-tuning-for-slo and operating the concurrent collectors is zgc-and-shenandoah.
- ▌ Linux For Jvm · robsonkades bundleThe Linux side of a JVM incident: RSS versus virtual memory, page faults and swap, AlwaysPreTouch, transparent huge pages, cgroup CPU throttling, the two OOM killers, file-descriptor and process limits, signals and graceful shutdown, and PSI as a direct stall signal. Use when a process dies with exit code 137 or no log at all, when a GC pause in the log does not match the pause the client felt, when "too many open files" or "unable to create native thread" appears, when THP or swappiness is being changed by reflex, when kill -9 is the first response, or when container CPU limits may be throttling the JVM. Does not cover the JVM-side memory budget (jvm-memory-regions), collector behaviour (gc-fundamentals), or CPU cache and NUMA topology (cpu-cache-and-numa). What the JVM detects inside a cgroup is container-awareness, kernel-side tracing is ebpf-for-jvm, and the network stack is tcp-tuning.
- ▌ Quality Gates · robsonkades bundleChoosing which automated checks a change must pass, and making them cheap enough that they stay switched on: matching the gate set to the change's risk rather than running everything on everything, where each gate belongs (pre-commit, pull request, main, release), the Java toolchain that enforces each class of defect, ratcheting a gate onto a codebase that already violates it, and what to do when a gate goes red. Use when setting up or trimming a pipeline, when the build is slow enough that people push without running it, when a check is routinely bypassed or its failures ignored, when a defect class keeps reaching production, when a coverage or static-analysis threshold is being proposed, or when deciding whether a small change really needs the full pipeline. Does not cover writing the tests (java-testing-strategy), architecture rules (architecture-testing), performance thresholds (performance-regression-ci), or human review (code-review).
- ▌ Scoped Values · robsonkades bundleScopedValue as one-way, immutable, lexically bounded context: where/run/call, rebinding in a nested scope, inheritance by StructuredTaskScope subtasks and by nothing else, and the cases where ThreadLocal is still the right answer. Final in JDK 25 (JEP 506) after four preview rounds, with callWhere and runWhere removed along the way. Use when a ThreadLocal carries per-request context under virtual threads, when context is empty inside a forked subtask or a pool thread, when a ThreadLocal is never removed and leaks across pooled tasks, when code calls ScopedValue.get outside any binding and gets NoSuchElementException, when callWhere or runWhere appears in an example, or when MDC or SecurityContextHolder must keep working. Not the fan-out that inherits (structured-concurrency), ThreadLocal-as-cache sizing (thread-sizing-and-virtual-threads), deadlines (timeouts-and-deadlines), or context across CompletableFuture stages (completablefuture-composition).
- ▌ Deoptimization · robsonkades bundleDeoptimisation and recompilation on HotSpot: uncommon traps and their reason codes, the none / maybe_recompile / reinterpret / make_not_entrant / make_not_compilable actions, jdk.Deoptimization in JFR, -XX:+TraceDeoptimization, the per-method trap limits and recompilation cutoffs, and diagnosing a method that never stabilises. Use when a method repeatedly shows "made not entrant" in the compilation log, when latency spikes correlate with class loading or a deploy, when a burst of "marked for deoptimization" follows a deploy or a plugin load, when a feature flag or APM agent is suspected of invalidating compiled code, when "made not compilable" or a flood of action "none" appears for a hot method, when someone proposes raising PerMethodRecompilationCutoff, or when -Xlog:jit+deoptimization produced an empty file. Does not cover the tiered pipeline and warm-up (jit-compilation), reading the compilation log itself (compilation-and-inlining-logs), or C2's internal representation (c2-sea-of-nodes).
- ▌ Event Sourcing · robsonkades bundleEvent streams as authoritative state: adoption criteria, stream boundaries, expected-version appends, command idempotency, snapshots, projection correctness/rebuild, temporal replay, schema evolution and erasure. Use when event sourcing is proposed, projections drift, old payloads must evolve, or write/read visibility surprises users. Integration messaging, delivery, sagas, mutable-row locking and replica consistency remain separate skills.
- ▌ Failure Models · robsonkades bundleStating a system's fault model before designing against it: crash-stop, crash-recovery, omission, timing and Byzantine faults; partial failure and the third outcome of every remote call (unknown); gray failure and the slow node whose health check stays green; the eight fallacies as a checklist; blast radius, correlated versus independent failure, and the availability arithmetic of a dependency chain. Use when a design says "if the service is down" without defining down, when a retry is added to a call whose outcome is unknown, when a node is slow rather than dead, when replicas share a host, an AZ or a database, or when an availability target is quoted for a service built on ten others. Does not cover what the model implies about messages (delivery-semantics) or reads (consistency-models), how a failure spreads (cascading-failures), the named shapes (distributed-failure-catalogue), what an orchestrator does with a failed pod (kubernetes-service-lifecycle), or failures as types (java-exception-design).
- ▌ Lock Inflation · robsonkades bundleDiagnosing and engineering Java intrinsic-monitor contention across fast and inflated monitor states without freezing one HotSpot release's internals. Covers ownership, recursion, wait sets, entry queues, inflation/deflation, virtual-thread behavior, JFR/thread-dump evidence, threshold/censoring, convoys, fairness, lock graphs, critical-section redesign, partitioning and validation. Use when `synchronized` wait/hold time is suspected; JMM correctness, explicit locks, false sharing and lock-free algorithms have separate owners.
- ▌ Scatter Gather · robsonkades bundleFanning one request out to N workers and combining answers: order-statistic latency, choosing N against tail exposure, all-of-N/first-of-N/k-of-N completion, safe hedging, partial-result completeness and watermarks, deadline propagation, and cancelling losers. Use when a keyless query fans out to every shard, when leaf dashboards are green but user-facing p99 is not, when more leaves made the request slower, when a fan-out gives no way to tell no-data from no-answer, when a hedge is proposed, or when an in-flight gauge stays high after the caller gave up. Not StructuredTaskScope (structured-concurrency), bounding in-flight work (concurrency-limiting-and-bulkheads), tail arithmetic (tail-latency-analysis), percentiles (latency-statistics), retry policy (retries-and-backoff), offline fan-out (distributed-aggregation-and-barriers), deadlines (timeouts-and-deadlines), or shard keys (sharding-and-partitioning).
- ▌ C2 Sea Of Nodes · robsonkades bundleHow HotSpot actually executes and compiles: the runtime-generated template interpreter, C2's sea-of-nodes IR, a release-scoped diagnostic map of compilation phases, and why a given transformation fired or did not. Use when a method is believed to be "not optimised", when an allocation that looks eliminable still shows up in allocation profiling, when a hot call site reports `too large` or stays non-inlined, when `made not entrant` repeats on the same method, when someone prescribes `-XX:CompileThreshold` under tiered compilation, or when explaining why the JIT did not fix an O(n^2) loop. Does not cover the tiered pipeline, warm-up and code cache sizing (jit-compilation), reading the compiler's own decision logs end to end (compilation-and-inlining-logs), the emitted machine code (reading-jit-assembly), or the bytecode the compiler consumes (jvm-bytecode).
- ▌ Gc Fundamentals · robsonkades bundleHow JVM garbage collectors work, as the mental model behind every GC diagnosis: the generational hypothesis and where it fails, mark-sweep versus mark-compact versus copying, how survivors, allocation and roots affect collection cost, write barriers, safepoints and Time-To-SafePoint, and the JDK 25 collector landscape. Use when explaining why a collection is expensive, when the reported pause does not match the latency the client feels, when a young pause is long although little survived, when a cache or pool breaks the generational assumption, when humongous allocations appear, or when comparing collectors written before JDK 23. Does not cover choosing a collector or sizing the heap (jvm-gc-tuning), parsing the log (gc-log-analysis), or the non-heap regions (jvm-memory-regions). Per-collector internals are g1-internals and zgc-and-shenandoah, and the safepoint mechanism is safepoints.
- ▌ Gc Log Analysis · robsonkades bundleConfiguring and reading JVM unified GC logs: the -Xlog:gc* baseline with decorators and rotation, the cause field, the before->after->capacity triple and headroom, pause distribution, Eden-refill and old-region-growth estimates derived from region lines, adaptive tenuring pressure via gc+age, and correlation with -Xlog:safepoint. Use when a log needs to be interpreted, when GC logging is not enabled and the right GC tag-sets have to be chosen, when full collections or Metadata GC Threshold appear, when the heap floor rises after equivalent reclamation points, when an allocation or promotion proxy has to come from the log rather than a profiler, when a log starts above zero uptime, or when an analysis script reports zero pauses. Does not cover collector mechanics (gc-fundamentals), collector choice and heap sizing (jvm-gc-tuning), or allocation profiling (jfr-and-async-profiler). Syntax is unified-logging; cross-layer pause attribution is pause-attribution.
- ▌ Gof Interpreter · robsonkades bundleInterpreter in modern Java: representing a small language as a typed tree and evaluating it, expressed today as a sealed AST with an exhaustive switch rather than an eval() method per node. Covers parsing as a separate problem the pattern does not solve, when an existing expression language beats writing one, how general expression engines become code-execution surfaces when exposed with unsafe capabilities, the resource bounds an interpreter over untrusted input needs, and closure compilation when tree walking is too slow. Use when a filter, rule or formula language is designed, when configuration has grown conditionals, when someone proposes embedding an expression evaluator, or when an expression from a request is passed to a template or EL engine. Does not cover adding operations over an existing tree (gof-visitor), the tree structure itself (gof-composite), query specifications over a database (query-objects-and-specifications), or JIT compilation of Java (jit-compilation).
- ▌ Java API Design · robsonkades bundleNaming and API design for Java code that others call: names carrying domain vocabulary, method and boolean naming conventions, arity and parameter objects, overload hazards, discoverability, public versus internal surface (package-private, JPMS exports), and API evolution — binary, source and behavioural compatibility, deprecation, semantic versioning. Use when designing or reviewing a public type, when a signature has grown past three parameters, when adding a method, overload or record component to a published API, or when deciding what a module exports. Does not cover builder and fluent-chain mechanics (java-fluent-apis) or exception contracts (java-exception-design).
- ▌ Java Clean Code · robsonkades bundleReadability and intention-revealing structure in Java: method and class sizing — including the point where splitting becomes harmful fragmentation — abstraction levels within a method, comments, hidden side effects, temporal coupling and hidden dependencies. Use when reviewing or refactoring for clarity, when a method has grown past comprehension or a class has shattered into fragments that only make sense together, or when callers must know an unwritten call order. Does not cover naming and API shape (java-api-design), the smell catalogue (java-code-smells), exception handling (java-exception-design) or null handling (java-null-safety).
- ▌ Jit Compilation · robsonkades bundleHotSpot JIT compilation and warm-up: tiered policy, C1/C2 queues and profiling, OSR, deoptimization, code-cache pressure, compiler resources in containers, and warm-up as a workload-dependent curve rather than a clock delay. Use when p99 is bad for the first minutes after a deploy, when performance degrades permanently until a restart, when "CodeCache is full" appears, when a startup probe or traffic gate needs a warm-up criterion, when -XX:-TieredCompilation or -Xcomp is proposed, when scaling out a low-traffic service makes latency worse, when a 1-2 CPU pod warms up far slower than a workstation, or when an autoscaler keeps adding cold replicas. Does not cover inlining and escape analysis (jit-inlining-and-escape-analysis), microbenchmarks (jmh-microbenchmarks), or the code cache in the memory budget (jvm-memory-regions). Reading the compiler output is compilation-and-inlining-logs, recompilation is deoptimization, and per-segment exhaustion is code-cache-segments.
- ▌ Leader Election · robsonkades bundleElecting one active instance for work that must not run concurrently: the lease renewal model and the rule that failed renewal never extends the leader's conservative deadline; split-brain and resource-side fencing/idempotency; failover time as detection, election and warm-up; coordination-store leases, Kubernetes Lease objects and ShedLock rows, and what each is adequate for; and when not to elect. Use when a @Scheduled job runs once per replica after scaling out, when two instances both believe they lead, when a leader keeps working after its lease expired, when failover takes a minute nobody budgeted, or when ShedLock is described as leader election. Not lease and fencing mechanics (distributed-locks-and-leases), how the election is decided (consensus-and-quorums), why a scheduled job duplicates (stateless-service-design), splitting work by key (sharding-and-partitioning), or pod termination (kubernetes-service-lifecycle).
- ▌ Low Latency Jvm · robsonkades bundleDesigning and validating JVM systems whose primary objective is bounded jitter rather than low average latency: latency-distribution budgets, allocation strategy, GC choice, warm-up and deoptimization, CPU/NUMA placement, busy-spin cost and evidence for kernel bypass. Use when p99.99-to-p50 spread matters, a trading or real-time path claims to be GC-free, CPUs are isolated, Epsilon or busy waiting is proposed, or an optimization shifts jitter between JVM, OS and network. General tail diagnosis belongs to tail-latency-analysis; individual JVM and OS mechanisms retain their specialist owners.
- ▌ Off Heap Memory · robsonkades bundleMemory outside the Java heap: direct `ByteBuffer` and its Cleaner-driven release, `MemorySegment` and `Arena` in the FFM API, lifetime and thread confinement, when off-heap actually pays, and diagnosing native growth no heap dump explains. Use when RSS grows while the Java heap stays flat, on `OutOfMemoryError: Direct buffer memory` or an OOMKilled container with no Java exception, when `-XX:MaxDirectMemorySize` is unset or copied from another service, when `ByteBuffer.allocateDirect` sits on a per-request path, when `Unsafe.allocateMemory` appears without a matching `freeMemory`, on a `WrongThreadException` from a segment, or on a JEP 498 `sun.misc.Unsafe` runtime warning. Does not cover the six-region container budget and which OOM means what (jvm-memory-regions), calling into native code as opposed to holding native memory (jni-and-ffm), or on-heap retention (heap-dump-analysis).
- ▌ Queueing Models · robsonkades bundleChoosing, parameterising and falsifying queueing models: M/M/1, M/M/c, M/G/1, finite/loss and closed networks; Erlang C/B, Pollaczek–Khinchine, Kingman/Allen–Cunneen, variability, queue topology and what model assumptions permit. Use when a predicted wait time disagrees with the measured one, when latency is far worse than utilisation suggests, when service times are bimodal or GC-spiked, when arrivals are retries or cron bursts rather than independent users, when Erlang C must be computed for a large number of servers, when routing or partitioning changes the queue topology, or when deciding whether a measured tail can be inferred from an analytical model. Does not cover the `L = λW` conservation law or operational pool sizing (littles-law-and-queueing), the alpha/beta scalability model (universal-scalability-law), or the statistics of the measured numbers themselves (latency-statistics).
- ▌ Sidecar Pattern · robsonkades bundleComposing a second container into the same pod to add a capability to a container you cannot or will not modify: the shared network namespace and volumes that make this different from a library, native sidecar containers (an init container with restartPolicy Always) and the startup and shutdown ordering they fix, per-container requests against pod-level QoS, and the failure matrix of a two-container pod. Use when a proxy, TLS terminator, config reloader or log shipper is added beside an application, when requests fail in the first seconds after a pod starts because the app came up before its proxy, when a Job's pod stays Running because the sidecar never exits, or when a sidecar is up but broken and the app cannot tell. Does not cover probes and graceful shutdown (kubernetes-service-lifecycle), mediating outbound traffic (ambassador-pattern), normalising what the app emits (adapter-sidecar-pattern), or JVM cgroup detection (container-awareness).
- ▌ Unified Logging · robsonkades bundleConstructing, validating and operating HotSpot unified JVM logging: exact versus wildcard tag-set selection, levels, outputs, decorators, file rotation, asynchronous drop/stall modes, runtime VM.log changes, environment-injected options and legacy-flag migration. Use when -Xlog is empty, excessive, missing after restart, rejected at startup, changed live with jcmd, mixed with container logs, or evaluated for overhead. Producing and preserving the intended evidence belongs here; interpretation belongs to GC, safepoint, JIT, class-loading and other owning skills.
- ▌ Circuit Breakers · robsonkades bundleThe breaker as a state machine that stops calling a failing dependency: closed, open and half-open; choosing rate windows versus consecutive failures; why half-open admits a bounded number of probes; the failure predicate—classifying correlated dependency failures rather than blindly counting status classes—and the distinction between protecting caller resources by failing fast and providing a semantically valid fallback. Use when a breaker trips on consecutive failures, when it never trips or trips on one client's bad requests, when half-open sends full traffic at a recovering dependency, when a breaker sits on a call with no timeout under it, or when a dependency is slow rather than failing. Does not cover bulkheads (concurrency-limiting-and-bulkheads), retry policy (retries-and-backoff), the bound itself (timeouts-and-deadlines), the system-wide loop (cascading-failures), shedding (rate-limiting-and-load-shedding), or serving a cached fallback (caching-strategies).
- ▌ Java Annotations · robsonkades bundleAnnotations as metadata that only means something if code reads it: retention policies and what each one costs, targets and where an annotation on a record component actually lands, @Inherited and its limits, marker interfaces versus marker annotations, @Override as a correctness check rather than decoration, and the gap between annotating something and enforcing it. Use when defining a custom annotation, when an annotation appears to have no effect, when validation or security annotations are trusted without a validator or a proxy invoking them, when @Override is missing on an override, when a naming convention encodes behaviour that an annotation should carry, when annotation scanning slows startup or breaks under native image, or when deciding between a marker interface and a marker annotation. Does not cover nullability annotation contracts (java-null-safety), reflective access mechanics (java-reflection-and-method-handles), or the enum type itself (java-enums).
- ▌ Java Code Smells · robsonkades bundleThe detection catalogue for Java code smells: Long Method, God Object, Feature Envy, Primitive Obsession, Data Clumps, Shotgun Surgery, Divergent Change, Mysterious Name, Mutable and Global Data, Data Class, Loops, Lazy Element, Refused Bequest, boolean blindness, null-heavy APIs and leaky abstraction, plus how modern Java changes the list and the routing table from a finding to the refactoring that fixes it. Use when auditing code for structural problems, before planning a refactoring, when one change keeps fanning out across many files, when several refactorings could address one finding, when a switch over a sealed type carries a default branch, or when deciding whether a suspect pattern is actually a problem. Detection and severity only — refactoring mechanics are java-refactoring, navigation-chain depth is java-law-of-demeter, and the economics of duplication and premature abstraction are java-dry-kiss-yagni.
- ▌ Java Concurrency · robsonkades bundleEntry point for designing or triaging concurrency inside one JVM. Classifies work by lifecycle, blocking and CPU demand, state ownership, arrival shape, ordering, cancellation, failure, and scarce-resource bounds, then routes to executors, virtual threads, structured concurrency, futures, reactive streams, memory-model correctness, diagnostics, or testing. Use before selecting a concurrency abstraction or when “more threads,” “async,” or “reactive” is proposed as a performance fix. Detailed construct internals and distributed coordination have separate owners.
- ▌ Java Fluent Apis · robsonkades bundleFluent interfaces and builders as API decisions: when a builder pays for itself versus a record, constructor or static factory; staged builders and their compatibility cost; immutable wither-style APIs; and the debugging and binary compatibility consequences of method chaining. Use when designing or reviewing a type with a costly constructor call site, several optional values, or adjacent parameters of the same type; when someone proposes a builder, staged builder or DSL; or when a long chain has become hard to read, debug or evolve. Does not cover navigation chains through other objects' structure (java-law-of-demeter) or general naming and parameter design (java-api-design).
- ▌ Java Null Safety · robsonkades bundleNull as a semantic problem, not a syntax problem: what each null means (absence, error, uninitialised), nullability as an API contract, JSpecify @NullMarked and @Nullable, where Objects.requireNonNull belongs, empty collections over null, and the boundaries where null leaks in (deserialisation, ORMs, Map.get, arrays). Use when an NPE surfaces far from its cause, when hardening a service or module boundary, when adopting nullability annotations, or when reviewing constructors and public entry points. Does not cover the Optional API — orElse/orElseGet, chaining, where Optional belongs — which is java-optional, nor general validation strategy at trust boundaries — range and state checks, normalisation — which is java-defensive-programming.
- ▌ Java Performance · robsonkades bundleEvidence-first triage and routing for ambiguous Java/JVM performance symptoms: defining the affected population and work, separating latency/throughput/resource/error dimensions, checking measurement and recent-change validity, preserving live-incident evidence, mapping competing hypotheses to discriminating signals, and handing each confirmed mechanism to its owning skill. Use for “it is slow,” regressions, saturation, memory/RSS growth, startup, uneven instances, or post-JDK/deploy changes when the cause is unknown. This is a router, not a substitute for performance-methodology or specialist JVM/OS/database/distributed skills.
- ▌ Java Refactoring · robsonkades bundleRefactoring mechanics for Java: characterisation tests, small reversible steps, what behaviour preservation actually covers, risk classification, and the catalogue — Extract/Inline, Split Phase, guard clauses, Remove Flag Argument, Pull Up and Push Down, Replace Conditional with Polymorphism or sealed types. What to detect is java-code-smells; evolution rules for published APIs are java-api-design. Use when restructuring code without changing behaviour, when a change is needed in code that has no tests, when a method resists extraction because everything shares locals, when inverting a condition into a guard clause, when converting an instanceof chain to a switch, when moving members through a hierarchy, or when you need to know whether a step crosses a lock, transaction, serialisation or published boundary and must stop. Getting a class that constructs its own dependencies into a harness in the first place is java-legacy-code-testing.
- ▌ Java Test Design · robsonkades bundleWriting a Java test that survives refactoring and says why it failed: naming the behaviour rather than the method, one reason to fail, test data builders over shared mutable setup, choosing the assertion that produces a readable failure, parameterised and nested tests, and removing every input the test does not control — clock, ordering, locale, randomness. Use when a test name does not say what broke, when a failure message has to be decoded by reading the test, when setup is shared across unrelated tests, when a test sleeps, when tests pass alone and fail together, when a flaky test is about to be retried or disabled, or when the same assertions are being copied across cases. Does not cover which level to test at (java-testing-strategy), stubs and mocks (java-test-doubles), the red-green-refactor loop (tdd), or threading (concurrency-testing).
- ▌ Jvm Ml Inference · robsonkades bundleEngineering CPU and accelerator-backed ML inference from JVM applications: choosing in-process versus remote serving, bounding native sessions and predictors, coordinating engine and request parallelism, batching under a latency deadline, reusing direct buffers, warming deployments and diagnosing native memory outside NMT. Use when DJL, ONNX Runtime or another native inference engine loses throughput as concurrency rises, leaks RSS, overloads a model pool or needs graceful degradation. Model quality and training pipelines are outside scope.
- ▌ Metadata Mapping · robsonkades bundleExpressing the object-to-schema mapping as metadata rather than hand-written code: where the mapping lives (annotations, external XML, programmatic), what reflection costs versus generated code, and how metadata drifts from the schema it describes. Use when persistence annotations accumulate on a domain class that is supposed to be framework-free, when the same mapping is expressed twice, when a schema change is discovered at runtime instead of at startup, when ddl-auto generates a schema in an environment that has migrations, when string literals name columns across the codebase, or when a fully metadata-driven model is proposed. Does not cover the mapping decisions themselves (orm-structural-mapping, inheritance-mapping-strategies) runtime ORM behaviour (orm-behavioral-patterns), or migrating from one mapping approach to another (architecture-refactoring-paths).
- ▌ Project Valhalla · robsonkades bundleEvaluating Project Valhalla value-class proposals and Early-Access builds without presenting draft syntax or flattening heuristics as released Java behavior. Use when code or documentation claims value classes remove identity, guarantee flattened storage, eliminate boxing, change object layout, or are available in a particular JDK; and when designing an experiment for a future migration. Does not replace current object-layout measurement (object-layout-and-footprint), escape-analysis diagnosis (escape-analysis-internals), or general JDK upgrade planning (jdk-upgrade-impact).
- ▌ Slo And Alerting · robsonkades bundleEngineering service-level contracts and actionable alerting: defining user-centered SLIs and SLOs with explicit populations and windows, negotiating error-budget policy, separating request- and time-based semantics, deriving multi-window burn alerts, handling low traffic and missing data, and routing symptoms or predictive hazards by urgency and actionability. Use when an SLO is ambiguous, an SLA lacks operating margin, alert noise is high, resource thresholds page without context, or PromQL burn rules need review. Instrument design belongs to metrics-and-cardinality; percentile semantics to latency-statistics; overload controls to rate-limiting-and-load-shedding.
- ▌ Capacity Planning · robsonkades bundleEvidence-based capacity decisions for Java services: defining demand and failure scenarios, measuring feasible capacity envelopes, selecting replica and resource configurations, forecasting exhaustion with uncertainty, designing autoscaling headroom, and comparing cost per successful unit of work. Use when deciding pod or instance counts, minimum replicas, scaling signals, saturation dates, infrastructure budgets, rollout or failure-domain headroom, and downstream capacity constraints. Does not own load-test design (load-testing-advanced), queueing-model selection (queueing-models), scalability curve fitting (universal-scalability-law), or overload controls (rate-limiting-and-load-shedding).
- ▌ Feature Discovery · robsonkades bundleSeparating what is actually established about a feature request from what has been filled in: a ledger in which every fact carries its source, every assumption carries what would falsify it, and every unknown carries the impact of getting it wrong. Use at the start of a feature, when a request is one sentence long and the work is not, when a plan or an estimate is being built on statements nobody has checked, when two people describe the same feature differently, when picking up a feature someone else analysed, or when an answer is about to be written as fact because it is probably true. Does not decide which unknowns to ask about or how (feature-requirement-clarification), does not investigate the repository to close them (feature-context-analysis), and does not restate the requirement without its solution or write acceptance criteria (requirements-and-acceptance).
- ▌ Feature Execution · robsonkades bundleImplementing a planned feature one resource at a time: taking a single resource to done, choosing the validation that resource actually warrants, running it and reading the output, and handling the two things that always happen — the plan turning out to be wrong, and a resource turning out to be blocked. Use when a plan exists and implementation is starting, when several resources are half-finished at once, when implementation has diverged from the plan without anyone recording it, when a resource is blocked and the work has quietly stopped, or when a change is about to be reported as done on the strength of it compiling. Does not choose which automated gates a change must pass (quality-gates), does not decide the test level or write the tests (java-testing-strategy, tdd), does not own the status artefacts (feature-progress-tracking), and does not own what may be claimed about the result (coding-agent-discipline).
- ▌ G1 Tuning For Slo · robsonkades bundleDeriving G1 flag values from a latency SLO and proving they helped: what `MaxGCPauseMillis` actually controls, the young size bounds, IHOP and adaptive IHOP with an explicit safety margin, region size as the basis of every region-denominated calculation, `G1OldCSetRegionThresholdPercent` and `G1MixedGCCountTarget`, and the measure-derive-predict-validate loop. Use when GC flags were copied from another service, when `-Xms` differs from `-Xmx` in production, when mixed GC violates the SLO while young GC is healthy, when GC overhead exceeds its explicit service budget, when a full GC follows a marking cycle that finished too late, when an IHOP was set to the theoretical ceiling, when a G1 flag makes the JVM refuse to start, or when a parser reports a promotion rate of zero. Does not cover deciding whether GC is the bottleneck at all or which collector to use (jvm-gc-tuning), why the mechanism responds the way it does (g1-internals), or configuring and parsing the GC log itself (gc-log-analysis).
- ▌ Java Immutability · robsonkades bundleImmutable objects in modern Java: records in depth, defensive copies, immutable collection factories versus unmodifiable views, deep versus shallow immutability, final-field semantics and safe publication (JMM), and the withers pattern. Use when designing a value object, when a record has a List, Map or array component, when an accessor returns internal mutable state, when an "immutable" object is observed changing, or when deciding whether immutability is worth its allocation cost. Does not cover null validation in constructors (java-null-safety) or Optional usage (java-optional).
- ▌ Java Memory Model · robsonkades bundleProving inter-thread visibility, ordering and atomicity under the Java Memory Model. Covers actions/executions, synchronization order, synchronizes-with and happens-before, data races, sequential consistency for correctly synchronized programs, volatile publication, monitor and lifecycle edges, final-field freeze semantics, safe publication, compound invariants, benign races, constructor escape, wait/notify, and architecture/JIT independence. Use for shared-state correctness reviews and intermittent outcomes. VarHandle modes, algorithms, locks and testing mechanics have separate owners.
- ▌ Java Test Doubles · robsonkades bundleChoosing and using test doubles in Java: the stub/mock/fake distinction that actually changes what a test proves, preferring the real collaborator or a hand-written fake over a mock, verifying interactions only when the interaction is the outcome, Mockito's strict stubs, and the rule against mocking types you do not own. Use when a test mocks every collaborator the class touches, when verify is asserted on a query, when a refactoring broke tests that still describe correct behaviour, when deep stubs or static mocking are proposed, when a stubbed repository is hiding a query that does not work, when UnnecessaryStubbingException appears, or when migrating from @MockBean. Does not cover which level to test at (java-testing-strategy), how the test is written (java-test-design), deterministic executors for threading (concurrency-testing), or breaking a dependency so the class can be constructed at all (java-legacy-code-testing).
- ▌ Jvm Class Loading · robsonkades bundleClass loading, class identity and classloader leaks: parent-first delegation, {defining loader, binary name} identity, loading versus linking versus initialisation, Metaspace retention, and CDS/AOT cache for startup. Use when a ClassCastException reports identical type names on both sides, when Metaspace grows monotonically across redeploys or plugin reloads, when ClassNotFoundException and NoClassDefFoundError need to be told apart, when IllegalAccessError mentions "does not export" or InaccessibleObjectException asks for --add-opens, when a startup hangs with "waiting on the Class initialization monitor" in a thread dump, when a static initialiser does I/O, or when reducing cold start. Does not cover the Metaspace budget itself (jvm-memory-regions), JIT warm-up (jit-compilation), or heap object-retention analysis (heap-dump-analysis). Metaspace internals are metaspace-internals and startup caching in depth is startup-cds-crac-leyden.
- ▌ Pause Attribution · robsonkades bundleAttributing an observed production pause to a layer: decomposing it across time-to-safepoint, safepoint operation, cleanup and host effects, correlating the GC log, the safepoint log, JFR and OS signals by timestamp, and proving which layer owns the missing milliseconds. Use when application p99 far exceeds what the GC log accounts for, when "Reaching safepoint" is large while "At safepoint" is small, when two profilers disagree about hot paths, when a safepoint-log analyser reports zero events, when someone sums "Reaching + At" by hand, or when a fix copied from an old war story does not reproduce. Does not cover the safepoint mechanism itself (safepoints), configuring and parsing the GC log (gc-log-analysis), or host-side causes such as CPU throttling, swap and page faults (linux-for-jvm).
- ▌ Skill Engineering · robsonkades bundleDesigning and reviewing agent skills: scope boundaries, the SKILL.md frontmatter contract, progressive disclosure across references and scripts, explicit decision rules, and quality gates. Use when creating a new skill, when reviewing one that is too long or never activates, when deciding what belongs in SKILL.md versus a reference, or when converting an existing prompt into a skill. Does not cover packaging, versioning or distribution, and does not cover writing the domain expertise itself.
- ▌ Ambassador Pattern · robsonkades bundleChoose or review a local outbound proxy when discovery or routing changes require client releases, a canary or shadow needs routing outside the app, or retries overlap across app, proxy and mesh. Define the listener, policy ownership, deadlines and failure behavior. Covers shard-map consumption and experiment routing, not shard algorithms (sharding-and-partitioning), container lifecycle (sidecar-pattern), or output normalization (adapter-sidecar-pattern).
- ▌ Caching Strategies · robsonkades bundleDeciding whether to cache, then doing it safely: saved origin work and latency, bounded size or weight, TTL and jitter, stampede and its four distinct scopes, cache-aside versus refreshAfterWrite, immutable DTOs rather than JPA entities, invalidation across instances, Redis serialisation, and why hit rate alone is a misleading metric. Use when a cache is being added or reviewed, when @Cacheable is called from within the same bean, when a cache has no size limit or no TTL, when entries are preloaded in bulk with one TTL, when hit rate is the only metric on the dashboard, when Old Gen keeps growing, when FLUSHALL appears in a deploy pipeline, or when instances disagree about a value. Does not cover the pool the cache protects (connection-pool-sizing), the queueing arithmetic (littles-law-and-queueing), or GC tuning for the resulting heap (jvm-gc-tuning).
- ▌ Cascading Failures · robsonkades bundleHow one slow dependency becomes a total outage: the amplification loop and the four points that close it — retry storms, unbounded queues, thread and connection exhaustion, an inner timeout longer than the outer one. Covers why cutting offered work is usually the first stabilization step in a cascade, metastability sustained by backlog, recovery herds and criticality separation. Use when one dependency's latency rise took down services that never call it, when the dependency recovered and the system did not, when adding replicas mid-incident made it worse, or when queue depth grows while goodput falls to zero. Does not cover the breaker (circuit-breakers), shedding policy (rate-limiting-and-load-shedding), bulkheads (concurrency-limiting-and-bulkheads), retry policy (retries-and-backoff), queue arithmetic (littles-law-and-queueing), replica routing (load-balancing-and-routing), or the fault model (failure-models).
- ▌ Consistency Models · robsonkades bundleChoosing distributed consistency guarantees as an engineering decision: linearizability, sequential/causal ordering, session guarantees (read-your-writes, monotonic reads), bounded staleness and eventual convergence, stated as observable contracts rather than a false total ladder; CAP stated correctly—the choice between C and A exists only while partitioned—and PACELC, replica paths and transaction isolation boundaries. Use when a user cannot see their own write, when a read after a write returns the previous value, when a design names a model instead of an observable requirement, when reads are being routed to replicas, or when someone cites "pick two". Does not cover multi-service atomicity (distributed-transactions-and-sagas), quorum arithmetic (consensus-and-quorums), caches (caching-strategies), replicated cache topology (cache-sharding-and-replication), or the JMM's happens-before (java-memory-model).
- ▌ Consistent Hashing · robsonkades bundleStable key-to-node placement across membership changes: modulo remapping, consistent-hash rings, virtual points, rendezvous hashing, collision-safe Java implementations, hash contracts, replica selection, weighting, testing and membership handoff. Use when changing node count causes a miss storm or migration, ownership is uneven, or placement relies on Object.hashCode. Does not choose the shard key (sharding-and-partitioning), repair hot keys (hot-partitions-and-rebalancing), define cache topology (cache-sharding-and-replication), or balance interchangeable replicas (load-balancing-and-routing).
- ▌ Cpu Cache And Numa · robsonkades bundleHardware-aware Java: cache-line coherence and locality, false sharing and how it differs from lock contention, object layout measured with JOL, LongAdder versus AtomicLong, data locality in arrays and collections, and NUMA topology. Use when throughput gets **worse** as threads are added, when scaling efficiency collapses, when fields are being added to a class shared between threads, when volatile counters sit next to each other, when @Contended or padding is proposed, when -XX:+UseNUMA is being set, or when someone says a volatile write "flushes the cache". Does not cover happens-before correctness (java-memory-model), pool and queue sizing (littles-law-and-queueing), or kernel and cgroup behaviour (linux-for-jvm). Proving and fixing false sharing is false-sharing-and-contended, and topology and pinning is numa-and-cpu-affinity.
- ▌ Delivery Semantics · robsonkades bundlePrecise end-to-end delivery and processing semantics: acknowledgement placement, loss and duplicate windows, Kafka transactions, visibility leases, ambiguous outcomes and external side effects. Use when reviewing "exactly once", consumer commits, redelivery or a handler that writes outside its broker. Idempotent handler design belongs to idempotency; retries, ordering, poison messages and fault assumptions have their own skills.
- ▌ Gof Factory Method · robsonkades bundleFactory Method in modern Java, and the three different things that share its name: the GoF pattern (a creation hook a subclass overrides inside an inherited algorithm), Effective Java's static factory method (a named constructor, not this pattern), and any method someone called createX. Covers when the subclass hook is genuinely right, why an injected Supplier or a keyed map replaces it in most application code, and the constructor-calls-an-overridable-method trap it invites. Use when a protected createX() hook is proposed, when a class is subclassed only to change which type it instantiates, when tests subclass production code to substitute an object, when a static factory is being called Factory Method in review, or when deciding between a subclass hook and a Supplier. Does not cover families of related products (gof-abstract-factory), the surrounding algorithm skeleton (gof-template-method), or static factory naming conventions (java-object-construction).
- ▌ Heap Dump Analysis · robsonkades bundleTaking and analysing a JVM heap dump: capturing without making the incident worse, dominator tree versus shallow and retained size, path to GC roots excluding weak references, Eclipse MAT and OQL, comparing two dumps, and separating a leak from a large working set. Use when heap grows monotonically with uptime, after an `OutOfMemoryError` or a `-XX:+HeapDumpOnOutOfMemoryError` file appears, when a histogram is being read by shallow size, when `jcmd` or `jmap` hangs against a stuck JVM, when a `WeakHashMap` or `ThreadLocal` cache never empties, when `StackChunk` or `Continuation` tops a dominator tree, or when writing OQL. Does not cover the region budget and which OOM message means what (jvm-memory-regions), why a live set costs what it costs (gc-fundamentals), classloader leaks specifically (jvm-class-loading), or core-dump and Serviceability Agent workflows (jhsdb-and-core-dumps).
- ▌ Java Numeric Types · robsonkades bundleChoosing and using Java's numeric types correctly: binary floating-point limits for exact decimal amounts, BigDecimal construction, scale, rounding and the equals/compareTo split, integer overflow and the exact-arithmetic methods, primitives versus boxed types, the boxed-value caching that makes == appear to work for some values, unboxing NPEs, boxing cost in bulk paths, and what happens to a numeric value when it crosses JSON, a database column or a JavaScript client. Use when money or any exact quantity is held in double or float, when new BigDecimal(double) appears, when divide() has no rounding mode, when BigDecimal values are compared with equals, when boxed types are compared with ==, when a nullable Integer is unboxed, when arithmetic on ids, timestamps or sizes could overflow, or when large longs are serialised to a browser. Does not cover date and time types, string formatting and parsing (java-strings-and-text), or measuring allocation (allocation-profiling).
- ▌ Java Tell Dont Ask · robsonkades bundleDecision ownership: the type that owns an invariant or policy makes the decision. Use when a service reads state with getters, decides, and writes state back (if (acct.getBalance() > x) acct.setBalance(...)), when the same rule is re-derived from the same getters in several places, when an invariant exists but no type enforces it, when a domain model is all getters and setters with the logic in services, or when a getter has side effects. Covers command–query separation and when asking is correct: boundaries, reporting, cross-aggregate orchestration. Does not cover the navigation chains that often carry the asking — that is java-law-of-demeter.
- ▌ Jdk Upgrade Impact · robsonkades bundleMoving a service between JDKs: what breaks, in what order to find it, and what should get faster — running unchanged on the new runtime with warnings visible, classifying each failure as a retired flag, strong encapsulation, a removed API, a changed default or a third-party agent, and measuring the gain claimed for the upgrade. Use when an LTS-to-LTS move is planned, when a build passes and the service will not start on the new JDK, when --add-opens is being added to make something work, when -Djava.security.manager=allow is on the command line, when sun.misc.Unsafe or an instrumentation agent is in the dependency tree, when a mocking or proxy library fails on a new class file version, when generated code goes missing after the move to JDK 23 or later, when a formatted time stopped matching a literal, or when an upgrade is credited with a speedup nobody measured. Not the flag lifecycle in detail (jvm-performance-review), collector changes (jvm-gc-tuning), or automating source edits (refactoring-automation).
- ▌ Jvm Memory Regions · robsonkades bundleThe major memory-accounting domains of a JVM process — heap, Metaspace/class space, code cache, thread stacks, direct/native/JVM-internal memory and mapped/file-backed pages — and how to budget them against a container limit. Use when a pod is OOMKilled with no Java exception, when an OutOfMemoryError names something other than "Java heap space", when -Xmx is set equal to the container limit, when RSS exceeds the heap by more than expected, when a heap above 32 GB is proposed, or when sizing a JVM for Kubernetes. Does not cover collector choice and heap tuning (jvm-gc-tuning), classloader leaks (jvm-class-loading), or kernel-side memory behaviour such as page faults, swap and the OOM killer (linux-for-jvm). Metaspace internals are metaspace-internals, memory outside the heap is off-heap-memory, and heap contents are heap-dump-analysis.
- ▌ Latency Statistics · robsonkades bundleThe statistics of latency measurement: estimands, means and quantiles, histogram aggregation, uncertainty, censoring, dependence, and coordinated omission. Use when an SLO or dashboard reports mean latency, when p99 values are averaged across instances or time windows, when a percentile is quoted without its sample count, when Prometheus buckets are the default set, or when deciding whether two measurements actually differ. Does not cover generating the load (load-testing), sizing systems from throughput (littles-law-and-queueing), or the investigation process itself (performance-methodology). The deep treatment of coordinated omission is coordinated-omission, and tail decomposition is tail-latency-analysis.
- ▌ Lock Free Patterns · robsonkades bundleDesigning and reviewing nonblocking Java algorithms: linearization points, lock-free, wait-free and obstruction-free progress, CAS/RMW loops, success/failure ordering, contention collapse, backoff/helping, ABA/version wrap, node reuse and reclamation, publication, linearizability, starvation and shutdown. Requires comparison with JDK/library and lock-based alternatives plus retry and topology measurement. Use when implementing or diagnosing atomics, striped counters, queues, stacks or ring buffers—not as a synonym for “fast.”
- ▌ Repository Pattern · robsonkades bundleThe repository as a collection-like boundary over domain objects, with aggregate-root write boundaries in DDD: what belongs behind it, where queries and read models fit, and when a redundant CRUD wrapper can be removed without losing a useful contract. Use when a repository is being added for a child entity, when a generic or base repository is proposed, when repository methods carry business verbs (cancelExpired, activateEligible), when a managed entity escapes through the repository interface, when reads and writes both go through the same interface and reads are slow, when a repository interface wraps a Spring Data interface that wraps the ORM, or when someone argues that Spring Data repositories make the pattern unnecessary. Does not cover query composition (query-objects-and-specifications), ORM runtime behaviour (orm-behavioral-patterns), which data-access pattern underlies it (data-source-patterns), or aggregate design itself (domain-logic-organization).
- ▌ Structured Logging · robsonkades bundleDesigning application logs as governed event schemas: choosing events and fields, correlation and context lifecycle, exception and severity semantics, synchronous versus buffered delivery, overload/drop behavior, injection prevention, data minimization, integrity/retention and measurable cost. Use when logs require regex parsing, correlation is missing or stale across async work, events disappear under load, fields drift between services, failures are duplicated, secrets or untrusted text reach logs, or logging appears in latency profiles. Metric labels belong to metrics-and-cardinality; span topology to distributed-tracing-design; JVM -Xlog to unified-logging.
- ▌ Zgc And Shenandoah · robsonkades bundleOperating ZGC and Shenandoah in production: concurrent relocation via coloured pointers and load barriers, the CPU the concurrent phases actually take, allocation stalls, and which flags still exist. Use when a service migrated to a concurrent collector and throughput dropped, when a GC log shows "Allocation Stall", when a pod of 1-2 CPUs runs ZGC or Shenandoah, when a config still carries -XX:+ZGenerational or G1 flags after the migration, when a ZGC-versus-Shenandoah comparison does not declare ShenandoahGCMode, or when RSS from ps/top is being used to size a ZGC container. Does not cover deciding whether GC is the bottleneck or which collector to pick (jvm-gc-tuning), the introductory collector model (gc-fundamentals), or collector source-level internals (zgc-generational-internals, epsilon-and-shenandoah-internals).