When Scala tests mock too much
Why interaction-heavy unit tests become coupled to implementation, how to recognise the damage, and how state, stubs, fakes, contract tests and integration tests restore useful confidence.
Read articleInsights
Technical articles on languages, databases, serverless platforms and the awkward realities of keeping systems moving.
Showing 46–54 of 71 articles
Why interaction-heavy unit tests become coupled to implementation, how to recognise the damage, and how state, stubs, fakes, contract tests and integration tests restore useful confidence.
Read articleA type-led guide to foldLeft, foldRight, reduce and scan, with accumulator design, evaluation order, performance and practical alternatives.
Read articleHow Scala patterns deconstruct algebraic data types, collections and extractors; where exhaustivity helps; and how guards, partial functions and overly broad matches create risk.
Read articleHow Scala Future starts, composes and fails; how ExecutionContext choices affect Play services; and how to test asynchronous behaviour without sleeps or misleading mocks.
Read articleA practical guide to method-call shorthand, apply and update, operators, for-comprehensions, placeholders, varargs, string interpolation and the semantics hidden by concise Scala syntax.
Read articleHow PartialFunction models a function defined for only part of its input, how collect and recover use it, and where ordinary total functions are safer.
Read articleA practical route from untrusted HTTP input to validated domain commands, explicit service outcomes and stable Play JSON responses.
Read articleWhat Scala case classes generate, why value semantics are useful, and how to keep validation, invariants and persistence concerns under control.
Read articleTraits can define capabilities, share behaviour and close a domain hierarchy; those are different jobs with different design trade-offs.
Read articleStart a conversation
A feature that needs shipping, an ageing service that needs attention, or a deployment that has become harder than the code. Talk to us about your problems.