
airhacks.fm podcast with adam bien· Folge 376
How PowerMock Happened
Samstag, 20. Dezember 2025 · 1 h 07
Kapitelklicken springt direkt hin
Shownotes
An airhacks.fm conversation with Johan Haleby (@johanhaleby (twitter.com/johanhaleby)) about:
first computer experience with en.wikipedia.org/wiki/Commodore_64 C64 (en.wikipedia.org/wiki/Commodore_64) and typing Basic (en.wikipedia.org/wiki/BASIC) programs from instruction manuals,
early gaming experiences and interest in understanding load commands,
transition to Amiga 500 (en.wikipedia.org/wiki/Amiga_500) Plus for demo scene scripting and composition,
moving to PC era with en.wikipedia.org/wiki/Intel_80486 SX25 and four megabytes of RAM,
learning Turbo Pascal (en.wikipedia.org/wiki/Turbo_Pascal) and creating 2D Super Mario-inspired games,
experimenting with inline assembler (en.wikipedia.org/wiki/Assembly_language) in c64-wiki.com/wiki/Pascal and reading "The Art of Assembly Programming",
reverse engineering games using Win32 disassembler to bypass license checks,
studying computer science at Blekinge and Lund University (en.wikipedia.org/wiki/Lund_University) in Sweden,
first job at JayWay consultancy firm working on en.wikipedia.org/wiki/IKEA project in 2005,
early adoption of Spring framework and automated testing practices,
comparison of old-style EJB (en.wikipedia.org/wiki/Jakarta_Enterprise_Beans) with heavy XML configuration versus Spring's lightweight approach,
the evolution from XML-based configuration to annotation-based Java EE (javaee.github.io) 5 and 6,
creating PowerMock (github.com/powermock/powermock) with colleague Jan Kronqvist to mock static methods and final classes,
using asm.ow2.io and JavaAssist for bytecode manipulation instead of en.wikipedia.org/wiki/AspectJ,
implementing custom class loaders where each JUnit (junit.org/junit5) method executed in different class loader,
deep clone module for cloning object graphs between class loaders,
tight coupling challenges between PowerMock and Mockito/EasyMock/JUnit versions,
transition from EasyMock's record-replay pattern to Mockito's when-then approach,
modern preference for avoiding mocks and testing against real cloud environments,
optimizing for fast CI/CD pipelines rather than local simulation,
structuring code to separate infrastructure concerns from pure business logic,
using Java Records (adambien.blog/roller/abien/entry/java_14_a_sim…) as pure data carriers versus adding behavior to records,
Clojure-inspired philosophy of decoupling state from behavior and identity,
Rich Hickey's "Simple Made Easy" talk and definitions of simple versus easy,
multi-methods in functional languages as alternative to polymorphism (en.wikipedia.org/wiki/Polymorphism_(computer_s…)),
domain modeling example with network devices and fiber channel connections,
benefits of object-oriented polymorphism for transparent persistence and simple code,
avoiding religious adherence to patterns in favor of pragmatic solutions,
Maven's stability and opinionated approach versus Gradle's flexibility,
reducing external dependencies and Maven plugins in favor of CI/CD automation,
the NPM ecosystem's over-modularization compared to Java's more reasonable approach,
decline of en.wikipedia.org/wiki/OSGi hype and return to simpler monolithic architectures,
Johan's current work on Occurrent Event Sourcing (martinfowler.com/eaaDev/EventSourcing.html) library and cloud events (cloudevents.io)
Johan Haleby on twitter: @johanhaleby (twitter.com/johanhaleby)