<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/reading-notes-on-code-that-fits-in-your-head-by-mark-seemann-lnjfkjday" -->

---
title: Reading notes on Code That Fits in Your Head by Mark Seemann
description: Reading notes and personal reflections on Mark Seemann&#x27;s book &#x27;Code That Fits in Your Head&#x27;, covering concepts like Arrange-Act-Assert testing,...
canonical: https://daily.dev/posts/reading-notes-on-code-that-fits-in-your-head-by-mark-seemann-lnjfkjday
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Reading notes on Code That Fits in Your Head by Mark Seemann | daily.dev
og:description: Reading notes and personal reflections on Mark Seemann&#x27;s book &#x27;Code That Fits in Your Head&#x27;, covering concepts like Arrange-Act-Assert testing,...
og:url: https://daily.dev/posts/reading-notes-on-code-that-fits-in-your-head-by-mark-seemann-lnjfkjday
og:image: https://api.daily.dev/og/posts/lNjFKJDAy.png
og:image:alt: Reading notes on Code That Fits in Your Head by Mark Seemann
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Reading notes on Code That Fits in Your Head by Mark Seemann

**[R-bloggers](https://daily.dev/sources/rbloggers)** · 7 min read · 0 upvotes · 0 comments

## Summary

Reading notes and personal reflections on Mark Seemann's book 'Code That Fits in Your Head', covering concepts like Arrange-Act-Assert testing, Red-Green-Refactor, the Devil's Advocate technique, code reviews, bundling breaking changes, Git bisection, time boxing, and behavioural code analysis. The author connects these ideas to R ecosystem tools such as Jarl (a linter), dittodb (database mocking), saperlipopette (Git bisection), and the mutator package for mutation testing, and closes with a recommended reading list on software design, Git, teamwork, and AI criticism.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.r-bloggers.com/2026/08/reading-notes-on-code-that-fits-in-your-head-by-mark-seemann>

## Questions this post answers

### What is the Arrange-Act-Assert pattern in unit testing?

Arrange-Act-Assert is a structure for organizing test code into three phases: arrange sets up the preconditions and test data, act calls the function or code under test, and assert checks that the result matches expectations. Some practitioners separate the three phases with blank lines for readability, a convention discussed in Mark Seemann's book Code That Fits in Your Head.

_Developers refining their testing habits can find more code-quality discussion like this on daily.dev._

### What is the Devil's Advocate technique in software testing?

The Devil's Advocate is a technique where a developer deliberately writes incorrect code to check whether the existing test suite catches the mistake. It resembles mutation testing but is applied manually and less systematically; in R, mutation testing tooling is provided by the mutator package, which evaluates how often a test suite detects mutated code.

_Anyone evaluating ways to strengthen test suites can track testing techniques and tools on daily.dev._

### What is Red-Green-Refactor in test-driven development?

Red-Green-Refactor is an iterative TDD cycle: red means writing a failing test for a feature, green means writing just enough code to make it pass, and refactor means improving that code without breaking the test. Even the red phase can be tricky, since a test expected to fail sometimes passes unexpectedly, underscoring the value of actually running tests rather than assuming their outcome.

_Developers building TDD habits can keep discovering practical testing workflows through daily.dev._

## Similar posts on daily.dev

- [One Sentence From My Senior Engineer Changed How I Think About Software](https://daily.dev/posts/one-sentence-from-my-senior-engineer-changed-how-i-think-about-software-hrfjlhuwl) · DEV · 39 upvotes · 4 comments
- [Fragments: March 19](https://daily.dev/posts/fragments-march-19-pfxhpvv14) · Martin Fowler · 0 upvotes · 0 comments
- [491: Influences that shaped our thinking](https://daily.dev/posts/491-influences-that-shaped-our-thinking-me0bf5tlf) · RUBYLAND · 0 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#git](https://daily.dev/tags/git), [#code-review](https://daily.dev/tags/code-review)

[View this post on daily.dev](https://daily.dev/posts/reading-notes-on-code-that-fits-in-your-head-by-mark-seemann-lnjfkjday)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Reading notes on Code That Fits in Your Head by Mark Seemann","url":"https://daily.dev/posts/reading-notes-on-code-that-fits-in-your-head-by-mark-seemann-lnjfkjday","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/reading-notes-on-code-that-fits-in-your-head-by-mark-seemann-lnjfkjday"},"datePublished":"2026-08-14T15:17:00.689Z","dateModified":"2026-09-14T07:54:30.618Z","description":"Reading notes and personal reflections on Mark Seemann's book 'Code That Fits in Your Head', covering concepts like Arrange-Act-Assert testing,...","image":"https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001","thumbnailUrl":"https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001","isAccessibleForFree":true,"articleSection":"R-bloggers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"R-bloggers","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/98bcbbdf72774292a55ceda8f2277f1e","url":"https://daily.dev/sources/rbloggers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/reading-notes-on-code-that-fits-in-your-head-by-mark-seemann-lnjfkjday","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,git,code-review","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"R-bloggers","item":"https://daily.dev/sources/rbloggers"},{"@type":"ListItem","position":3,"name":"Reading notes on Code That Fits in Your Head by Mark Seemann"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/reading-notes-on-code-that-fits-in-your-head-by-mark-seemann-lnjfkjday#faq","mainEntity":[{"@type":"Question","name":"What is the Arrange-Act-Assert pattern in unit testing?","acceptedAnswer":{"@type":"Answer","text":"Arrange-Act-Assert is a structure for organizing test code into three phases: arrange sets up the preconditions and test data, act calls the function or code under test, and assert checks that the result matches expectations. Some practitioners separate the three phases with blank lines for readability, a convention discussed in Mark Seemann's book Code That Fits in Your Head. Developers refining their testing habits can find more code-quality discussion like this on daily.dev."}},{"@type":"Question","name":"What is the Devil's Advocate technique in software testing?","acceptedAnswer":{"@type":"Answer","text":"The Devil's Advocate is a technique where a developer deliberately writes incorrect code to check whether the existing test suite catches the mistake. It resembles mutation testing but is applied manually and less systematically; in R, mutation testing tooling is provided by the mutator package, which evaluates how often a test suite detects mutated code. Anyone evaluating ways to strengthen test suites can track testing techniques and tools on daily.dev."}},{"@type":"Question","name":"What is Red-Green-Refactor in test-driven development?","acceptedAnswer":{"@type":"Answer","text":"Red-Green-Refactor is an iterative TDD cycle: red means writing a failing test for a feature, green means writing just enough code to make it pass, and refactor means improving that code without breaking the test. Even the red phase can be tricky, since a test expected to fail sometimes passes unexpectedly, underscoring the value of actually running tests rather than assuming their outcome. Developers building TDD habits can keep discovering practical testing workflows through daily.dev."}}]}
```

