Data Oriented Programming in Java: Progress Update 2025-07-21

Published: 2025-07-21

Early Access here: Data Oriented Programming in Java

Available in MEAP: Chapters 1, 2, 3, 4, 5, 6, 7
Pending reviews: Chapter 8
Currently working on: Chapter 11
Current Stats:

  • Words: 5401
  • Listings: 17
  • Figures Used: 4
  • Figures Made: 4

My original plan for this chapter was to self-plagiarize. I've written tons of testing docs over the years at various jobs. They're usually written in a grab bag / cook book style. "Do this." "Don't do that." But it felt too prescriptive once I started putting it together. Instead, I settled into a pattern that just riffs on a single test.

We start with this one:

@Test
void noDiscountForLargeAccountsInAMER() {   
    Set<Account> items = Set.of(accountA(), accountB(), accountC()); 
    Set<Discount> result = this.service.applyDiscounts(items);  
    assertEquals(2, result.size());   
}

And then work through why it's not great and how it can be made better. As usual, it involves a bit of navel gazing, denotations, and thinking deeper about this "for all" thing.

I'm shooting for a finished first draft this week.