Tom Roche
Shared posts
Civ 1919: Treaty of Versailles pt3 – the Balkans
Tom RocheJustin and (mostly) Dave excellent as usual
Behind the News: Race and Neoliberalism w/ Quinn Slobodian
Tom RocheQuinn Slobodian EXCELLENT as usual, this time on what Slobodian calls "2nd-generation neoliberalism" (c1970-c2000, i.e., post Mont Pèlerin Society (1GN, begun 1947) but pre alt-right=3GN). Note that Slobodian uses the terms "liberalism" and "neoliberalism" in the {academic, economic-focused, non-US} sense, though economics inevitably (certainly for us Marxists :-) drives society and social discourse.
Fortunately, this huge subject is covered on a single-focus (as opposed to the "usual 2 segments") episode of [/Behind the News/](https://www.leftbusinessobserver.com/Radio.html). The ep's organizing principle is "the 3 hards" of 2GN:
- (allegedly) hardwired human behaviors and (much less well-documented) ability-hierarchies, esp IQ-ethnicity
- hard borders, vs the globalist tendencies of the MPSistas
- hard money, esp gold, vs the fiat-money acceptance of (1GN betes noire) Bretton Woods and the (totally insane) "crypto bros" of 3GN
Quinn Slobodian, author of Hayek’s Bastards, talks about the IQ- and race-obsessed goldbugs of second generation neoliberalism.
Behind the News, hosted by Doug Henwood, covers the worlds of economics and politics and their complex interactions, from the local to the global. Find the archive online: https://www.leftbusinessobserver.com/radio.html
Fresh audio product: the lesser, meaner generation of neolibs
Tom RocheQuinn Slobodian EXCELLENT as usual, this time on what Slobodian calls "2nd-generation neoliberalism" (c1970-c2000, i.e., post Mont Pèlerin Society (1GN, begun 1947) but pre alt-right=3GN). Note that Slobodian uses the terms "liberalism" and "neoliberalism" in the {academic, economic-focused, non-US} sense, though economics inevitably (certainly for us Marxists :-) drives society and social discourse.
Fortunately, this huge subject is covered on a single-focus (as opposed to the "usual 2 segments") episode of [/Behind the News/](https://www.leftbusinessobserver.com/Radio.html). The ep's organizing principle is "the 3 hards" of 2GN:
- (allegedly) hardwired human behaviors and (much less well-documented) ability-hierarchies, esp IQ-ethnicity
- hard borders, vs the globalist tendencies of the MPSistas
- hard money, esp gold, vs the fiat-money acceptance of (1GN betes noire) Bretton Woods and the (totally insane) "crypto bros" of 3GN
Just added to my radio archive (click on date for link):
April 17, 2025 Quinn Slobodian, author of Hayek’s Bastards, talks about the IQ- and race-obsessed goldbugs of second generation neoliberalism
The Skewer
Tom Rocheanother EXCELLENT (just too short--only 15 min) Skewer from the always-reliable Jon Holmes
Jon Holmes remixes the news into a current affairs comedy concept album. News meets popular culture in a multi-award-winning mash up. This week: Charlie XCX is bumpin' that with Donald Trump, Minecraft Movie vs Russia, and Starmer: Man of Steel.
Producer: Jon Holmes An unusual production for BBC Radio 4
Trump's nuclear trade war targets China - but will blow back on USA
Tom RocheEXCELLENT
E204 - Mobility in America’s Past, Present, and Future w/ Yoni Appelbaum
Tom RocheVERY EXCELLENT, despite the guest's attempt to do what you'd assume an Atlantic editor would do (i.e., ["abundance"](https://en.wikipedia.org/wiki/Abundance_(Klein_and_Thompson_book)) shitlib-ery)
Yoni Appelbaum, a deputy executive editor at The Atlantic, joins the program to talk about his book Stuck: How the Privileged and the Propertied Broke the Engine of American Opportunity. They discuss mobility in the US and how that might sacrifice community for opportunity, the “frontier” as a way of taking land and easing class antagonism, the birth of American zoning from anti-Chinese practices in 19th century California, the move toward the single-family home and it being a symbol of the American identity, how we can make homes accessible once more for working Americans, and more.
For an ad-free experience and much more content, subscribe!
Learn more about your ad choices. Visit megaphone.fm/adchoices
Irreal: The Zen Of Task Management
Tom Roche[source post](https://bzg.fr/en/the-zen-of-task-management-with-org/) archived [here](http://web.archive.org/web/20250418195903/https://bzg.fr/en/the-zen-of-task-management-with-org/). looks {simple, effective, good for initial adopters}, plus links to excellent [XKCD comic](http://web.archive.org/web/20250326071038im_/https://imgs.xkcd.com/comics/automation_2x.png)
Bastien Guerry has a longish post on how he uses Org mode for task management. If you’ve been around Org mode for any amount of time, Guerry will be familiar to you. He took over the maintainership of Org mode when Carsten Dominick decided he needed to get back to Astronomy, which is, after all, his profession. Since then, Guerry has stepped in when Org needed him and has continued to be a presence in the project.
His years of working on Org mode internals have given him a first rate understanding of how Org works and the best way to use it. Therefore his post on how he uses Org to manage his tasks is must reading for all Org users. Guerry will be the first to tell you that his system may not be what you need but his reasoning for why he made the choices he did is instructive for us all.
I don’t really use Org to manage my tasks to the extent that Guerry does. For me, my agenda is more of a display of my daily log although some tasks do find their way into my agenda. Regardless, I found his discussion of his organization of tags to be very helpful.
No matter how you use Org mode, you should take a look at Guerry’s post. He has a lot of good ideas that you may find useful.
Radio War Nerd EP 514 — The Original Fascismo, feat. Annibale
Tom Rocheanother EXCELLENT outing from Annibale--though (even with runtime=111 min) this episode is too short to well-cover even the origins of Italian Fascism, and doesn't much try to cover anything after c1936
The Naked Week: Ep6. Tariffs, Theme Parks, and Twister.
Tom RocheNWS2 ends unbeaten: all 6 consistently amusing (just like series 1)
The Naked Week team are back to place satirical news-tariffs on current events with a mix of correspondents, guests and, occasionally, live animals.
This week we mourn the death of globalisation, take a tour of Keir's new theme park, and play a game of BBC Balance Local Elections Naked Week Joke Twister.
From The Skewer’s Jon Holmes and host Andrew Hunter Murray comes The Naked Week, a fresh way of dressing the week’s news in the altogether and parading it around for everyone to laugh at.
With award-winning writers and a crack team of contemporary satirists - and recorded in front of a live audience - The Naked Week delivers a topical news-nude straight to your ears.
Written by: Jon Holmes Katie Sayer Gareth Ceredig Sarah Dempster Jason Hazeley.
Investigations Team: Cat Neilan Louis Mian Freya Shaw Matt Brown
Guests: Freya Parker and Alicia Fitzgerald.
Production Team: Laura Grimshaw, Tony Churnside, Jerry Peal, Katie Sayer, Phoebe Butler.
Executive Producer: Philip Abrams Produced and Directed by Jon Holmes
An unusual production for BBC Radio 4
The Naked Week: Ep5. Tariffic Trump retaliation, and Woop Woop - it's the sound of the Thought Police.
Tom Rocheamusing as usual
The Naked Week team are back to place satirical news-tariffs on current events with a mix of correspondents, guests and, occasionally, live animals.
This week we 'woop woop' at the sound of the Thought Police, enjoy a spot of 'tariffic' retaliation, and bang a gong for the local elections.
From The Skewer’s Jon Holmes and host Andrew Hunter Murray comes The Naked Week, a fresh way of dressing the week’s news in the altogether and parading it around for everyone to laugh at.
With award-winning writers and a crack team of contemporary satirists - and recorded in front of a live audience - The Naked Week delivers a topical news-nude straight to your ears.
Written by: Jon Holmes Katie Sayer Gareth Ceredig Sarah Dempster Jason Hazeley.
wth additional material.
Investigations Team: Cat Neilan Louis Mian Freya Shaw Matt Brown
Guests: Larry Budd, and Felicity Hannah out of off of Radio 4's Moneybox Live.
Production Team: Laura Grimshaw, Tony Churnside, Jerry Peal, Katie Sayer, Phoebe Butler.
Executive Producer: Philip Abrams Produced and Directed by Jon Holmes
An unusual production for BBC Radio 4.
Tax Revolt: The Man Who Started the War on Taxes
Tom RocheVERY EXCELLENT successor to [/Master Plan/](https://www.levernews.com/masterplan/): [/Tax Revolt/](https://the.levernews.com/tax-revolt/) part 1 of 4 focuses on California roots of modern US antitax policies c1966-c1986
In the 1970s, an eccentric anti-tax crusader launched a radical campaign to dismantle California’s tax system — a movement that still defines American politics today.
This is Part 1 of Tax Revolt, a new mini-series from Lever Time revealing how free-market radicals hijacked American politics and set the stage for Elon Musk, DOGE and Donald Trump’s presidency.
Want more? Become a paid subscriber to get ad-free episodes and exclusive bonus content — and support independent journalism: levernews.com/subscribe
Plus, read a bonus companion article about the anti-tax zealot behind Proposition 13, written by producer Ariella Markowitz.
Learn more about your ad choices. Visit megaphone.fm/adchoices
#614 - Record of a Tenement Gentleman
Tom Rocheanother EXCELLENT M&U, politics and aesthetics
Everyday Superpowers: Preventing painful coupling
Tom Rocheactually the /3rd/ article in series on event-driven architecture (author calls /event sourcing/), archived [here](http://web.archive.org/web/20250417170516/https://everydaysuperpowers.dev/articles/preventing-painful-coupling/)
This is the second entry in a five-part series about event sourcing:
- Why I Finally Embraced Event Sourcing—And Why You Should Too
- What is event sourcing and why you should care
- Preventing painful coupling (this page)
- Event-driven microservice in a monolith
- Get started with event sourcing today
In the first article, I introduced this series with the spark that made me so happy to finally try event sourcing.
In the last article, I showed you what event sourcing is.
In this article, I will show you how and why I’ve completely changed the way I code.
Have you ever worked on a project where adding a simple feature felt like defusing a bomb—one wrong move, and the whole system might break? You’re not alone. In 1979, the industry was reeling from how hard it was to modify software.
I came across an article from the Association for Computing Machinery 1979 that talked about a crisis in the software community: how expensive it was to modify existing software:
- quote
- Another component of the software crises is less commonly recognized, but, in fact, is often more costly… namely, the extreme difficulty encountered in attempting to modify an existing program… The cost of such evolution is almost never measured, but, in at least one case, it exceeded the original development cost by a factor of 100.
- attribution
- Terry Winograd, Beyond Programming Languages, Communications of the ACM, July 1979 Volume 22 Number 7
Could you imagine asking a team of developers to adjust a program and having to pay 100x what you paid them to write it in the first place?
I’ve been on projects where I can start to see how this happened, but it’s crazy this is where our industry came from.
This was untenable, and many smart people discussed how to improve software writing. A lot of progress was made in the 1980s and 1990s.
One of the main discoveries was that unwanted coupling made software more complex and more challenging to refactor. This was reflected in several pieces of the time, including Martin Fowler’s curation of refactoring methods in his seminal book published in 1999 and Robert Martin's curation of the SOLID principles in the early 2000s.
Despite these discoveries, the challenges of modifying software haven’t disappeared. Instead, they’ve taken on new forms, often exacerbated by the industry's rapid growth.
In the 2000s, the number of developers grew explosively, and the percentage of people who knew how to teach these concepts became a tiny percentage of the population. As a result, most developers have only heard of these techniques and patterns, like SOLID, but few truly understand or practice them[oops]{For example, I've noted a trend of programing resumes announcing they are skilled in OOPS.}.
Most developers are not familiar with or practiced in controlling complexity or refactoring to reduce unwanted coupling.
I imagine the 100x penalty for adding features to projects is a thing of the past, but I know of a project that was in trouble in a similar way.
This team struggled with slow development cycles because every feature required each developer to make changes across multiple layers, including database schema, API, UI state, and frontend components. Merge conflicts were constant, and progress slowed to a crawl. In this case, they ultimately found success by reducing complexity and shifting their React front end to HTMX.
But switching frameworks isn’t always an option. A deeper change is needed: a way to structure software that naturally reduces coupling.
One solution is to continue to educate people about refactoring, software patterns, and good habits—and define times to practice these new skills. I've been impressed with Emily Bache’s Samman Technical Coaching Society approach, which truly gives developers the space to learn and practice these skills on their codebase as a team.
I believe the Samman Society and other like-minded technical coaches are making an impact in the industry. But they can only work with so many teams. What if we could fundamentally change how we structure our applications to reduce this complexity at its source?
In the last few months, I’ve been convinced that there’s another option: changing how we write apps to reduce coupling.
The excellent book Cosmic Python (aka Architecture Patterns in Python) explains coupling in this way:
- quote
- In a large-scale system, we become constrained by the decisions made elsewhere in the system. When we’re unable to change component A for fear of breaking component B, we say that the components have become coupled. Locally, coupling is a good thing: it’s a sign that our code is working together, each component supporting the others, all of them fitting in place like the gears of a watch. In jargon, we say this works when there is high _cohesion_ between the coupled elements. Globally, coupling is a nuisance: it increases the risk and the cost of changing our code, sometimes to the point where we feel unable to make any changes at all. This is the problem with the Ball of Mud pattern: as the application grows, if we’re unable to prevent coupling between elements that have no cohesion, that coupling increases superlinearly until we are no longer able to effectively change our systems.
- attribution
- Cosmic Python
Unwanted coupling is easy to accidentally introduce into your application. Most of the time, we couple things together because it seems like a good idea at the time. We don’t know if it’s unwanted until some time in the future.
One way to tell if your code has unwanted coupling is to test it. If the test case is easy to make, you probably have an healthy level of coupling. Testing is the canary in the coal mine for coupling.
Before I understood how to deal with coupling, I watched it take over on one project, where a function grew day after day, as we added new features to it, trying to meet a deadline. It started out processing some data. Then, we needed to add a feature to notify people when it finished. That was followed by some additional processing requirements and API calls to augment data. We also decided to add code to notify us if something failed in some of these steps.
What started out as a relatively simple function turned into over 100 lines of code with several different workflows braided together. I could tell something was off by the number of parameters we had and how hard it was to test, but I had no idea how to unwind it.
So how do we reduce unwanted coupling? I mentioned above that one way is to learn how to make great software, how to refactor it, and practice it many times outside of normal project work.
In the last year, I’ve come across articles, podcasts and videos that has convinced me to change the way I work to help keep coupling low.
There are three key practices work together to keep complexity under control while enabling flexible and scalable solutions: event modeling, vertical slice architecture, and event sourcing.
Let’s look at these one at a time.
Event modeling is a documentation method that shows how data flows through a system and the domain constraints in play.
It might seem weird to start off with a documentation method, but by starting with getting the developers on the same page as the business stakeholders, you eliminate many surprises, and get a few more benefits.
Event modeling grew from event storming, a documentation workshop technique that extracts complex business domains from stakeholders and transforms them into domain-driven design concepts that developers can use.
As a user of event storming, Adam Dymitruk noticed that business stakeholders were left behind During event storming sessions once the conversation became more about bounded contexts and other technical implementation details.
After many iterations, he unveiled event modeling in 2020. It’s a documentation method that removes much of the implementation detail. Instead, it highlights the most important thing: data, and how it enters, gets used by, and exits the system, as well as domain rules that affect it, all in a simple visual language with four patterns to master.
Additionally, the application’s lifecycle is segmented into individual slices representing one process step. Each slice maps to a slice in the vertical slice architecture that we’ll discuss below.
Below is an example event modeling diagram showing part of the lifecycle of a shopping cart application. The blue boxes are commands. They represent an intent to change the state of the system. This is where domain rules are enforced, and a command either generates an event or an exception.
By creating an event, this changes the state of the system. Other slices listen to events and populate views (the green boxes). These can be caches, database tables, CSV files, or anything that formats data in a way that will be consumed.
Having done a couple event modeling diagrams, what I like about them are:
- Being able to understand the domain more as the diagram comes together
- Uncovering needs early in an project, instead of late in the process when you’re implementing the feature under time pressure.
- Making it easier for everyone—developers and stakeholders—to stay aligned
I’ve been conditioned by the majority of my projects and more senior teammates to expect the projects I work on to be organized with similar code together. The views, services, and models would be grouped by type and placed into a folder bearing its name.
Contrasting this practice, vertical slice architecture organized code by feature. For example, if we’re working on a shopping cart application. A vertically-sliced project would have folders with names like `add_item`, `checkout`, `remove_item`, and `list_items`.
In each of these folders, you would find the UI, data access code, and business logic related to those features.
I’ve found this to be a great way to work. Instead of hunting around the project or tracing through the code from the endpoint down into every layer that gets called, I can just open the folder for the feature and have a very good idea what file to open.
Adam Dymitruk’s group has seen great productivity increases from adopting vertical slice architecture. He’s mentioned having ten developers working independently on slices and not having a single merge conflict.
When all the code for a feature is in one folder, suddenly adding a feature to a “normal” project feels like performing shotgun surgery.
I like a lot about object-oriented programming, especially with an imperative shell and a functional core. With well-designed OOP software, you can trust that by editing one part of the code, you won’t introduce a bug in another part. It seems I’ve never worked on well-designed OOP code—or I’m just that good at finding the weak spots of our designs.
With an event modeling diagram and the direction to implement a specific vertical slice, a developer can concentrate on what data is entering their slice (whether from the user, an external provider, a read model, or by subscribing to events), handle the business case, and then publish the events expected from their slice or populate a database table as needed.
A event-sourced project with vertical slice architecture, each slice is isolated from the other, communicating through predefined events and views. It’s a really cool pattern.
It's important to note that you could reduce coupling without event sourcing. Communicating well with event modeling diagrams and an even-driven, vertically sliced architecture, you can have similar gains.
The three practices together have proved powerful for me. In the next article, I’ll show you more detail how, while also having the benefits of an event-driven microservice and a monolith.
Read more...
Tariffs are part of Trump's big plan to save US dollar dominance. Will it work?
Tom RocheBen Norton VERY EXCELLENT (as usual) on why the Trumpist plan to save USD hegemony via trade war is not only self-contradictory, but will accelerate (relative) US economic decline and (absolute) geopolitical power
Mr. Hooters (feat. Olly Haynes)
Tom Roche0:31 teaser only
Uma and Ciarán talk to recurring guest and all around Frankreichversteher, Olly, about Le Pen's five year ban from politics. We also talk about liberation day and Vance in Greenland.
FIND OUR GUEST:
https://podcasts.apple.com/gb/podcast/flep24-french-legislative-elections-podcast-2024/id1752354722 or find FLEP24 wherever you get your pods
https://ollyhaynesjournalist.mystrikingly.com/
HOW TO SUPPORT US:
https://www.patreon.com/cornerspaeti
HOW TO REACH US:
Bluesky https://bsky.app/profile/cornerspaeti.operationglad.io
Twitter https://twitter.com/cornerspaeti
Instagram https://www.instagram.com/cornerspaeti/
Julia https://twitter.com/KMarxiana
Rob https://twitter.com/leninkraft
Nick https://bsky.app/profile/lilouzovert.bsky.social
Uma https://bsky.app/profile/umawrnkl.bsky.social
Ciarán https://bsky.app/profile/ciaran.operationglad.io
Bonus - South Africa: Land Policies, Musk, and a Crumbling Coalition w/ Ben Fogel
Tom Roche10:01 teaser only
Subscribe now for the full episode!
Danny and Derek welcome back to the program Ben Fogel, head of publishing at the Alameda Institute and contributing editor at Jacobin, to chat about South Africa. They get into the struggling coalition government, the stories of “white genocide” stemming from eminent domain policies, Musk and how South Africa helped make him the man he is today, the roles of neoliberal and racialized ideologies there, and more.
Learn more about your ad choices. Visit megaphone.fm/adchoices
Unlocked: The Sino-Soviet Split Primer w/ Jeremy Friedman
Tom RocheEXCELLENT (and no ads)
In anticipation for our two-part conversation on the Sino-Soviet split, we're reposting the episode we did laying the groundwork.
Danny and Derek welcome Jeremy Friedman, Marvin Bower associate professor at Harvard Business School, for a discussion about the Sino-Soviet split. They talk about the early days of the revolutionary states’ relationship, the differences in their ideologies, the external forces shaping each nation’s trajectory, the heyday of their cooperation, and the beginning of the fissure in the mid-1950s.
Grab a copy of Jeremy’s great book Shadow Cold War: The Sino-Soviet Competition for the Third World!
Learn more about your ad choices. Visit megaphone.fm/adchoices
Bad Hasbara 97: Down With The Glickness, with Brace Belden
Tom RocheBH+TA=reliable hilariity
Matt and Daniel are joined by returning champion Brace Belden (TrueAnon) to examine Betar’s one-time figurehead - the oddly shaped Ross Glick - as well as Brace’s aversion to the Ivy League and whether Tarantino’s Bear Jew presupposes the existence of twink and otter Jews.
Donate to the Palestine Red Crescent Society: https://www.palestinercs.org/en
See Matt and Francesca Fiorentini at Cobb’s in San Francisco on May 7: http://bit.ly/mattfrancobbs
Visit TrueAnon at https://podcast.trueanon.com/
Subscribe to the Patreon https://www.patreon.com/badhasbara
Subscribe/listen to Bad Hasbara wherever you get your podcasts.
Spotify https://open.spotify.com/show/5RDvo87OzNLA78UH82MI55
Apple Podcasts https://podcasts.apple.com/us/podcast/bad-hasbara-the-worlds-most-moral-podcast/id1721813926
Support this podcast at — https://redcircle.com/bad-hasbara/donations
Privacy & Opt-Out: https://redcircle.com/privacy
News - Tariff Chaos, US-Iran Talks, Trump Considers Drones Against Cartels
Tom Rocheanother EXCELLENT (except for the pre-, inter-, and post-content ads) week-in-review, but this time Alex Jordan (@ Quincy Institute aka QIRS) subs for the vacationing Derek Davison
We reluctantly approved Derek’s vacation time, but the news marches on, so Danny welcomes back to the show Alex Jordan of the Quincy Institute to help bring you headlines from around the world. They first take some time to catch up about where things stand with Trump 2.0 and critique what they see as premature analyses of this administration before getting into the news.
This week: Trump goes back and forth on massive tariffs (16:47); US and Iranian officials are set to meet in Oman for direct nuclear talks (24:22); the US appears to be considering a ground invasion of Yemen (29:51); the Israeli government and military seem to be moving on to a new stage in preparation for annexing Gaza (34:43); the US and the Philippines carry out military exercises in the South China Sea (40:47); South Korea’s Yoon leaves office as the country prepares for a snap election (44:30); Trump might be considering using drones against Mexican drug cartels (48:48); and Ukrainian president Zelenskyy has accused Russia of recruiting Chinese nationals to fight (52:26) as negotiators visit DC to discuss the so-called “mineral deal” (56:36).
Catch Alex on X/Twitter @alexjordanatl and on the Quincy Institute’s upcoming YouTube program “Always at War”, which he will co-host with Courtney Rawlings.
Subscribe now for an ad-free experience and much more content.
Learn more about your ad choices. Visit megaphone.fm/adchoices
Jon Stewart on Trump's Botched Tariff Rollout & Market Meltdown | Rahm Emanuel
Tom Rocheas usual: Jon Stewart does EXCELLENT bits ... then an /extremely/ skippable interview (as in, save your mental health) so bail @ 21:51
Jon Stewart on the fallout from Trump's tariffs, a stock market in a near-recession free fall, and the GOP's spin of the economic turmoil as "no biggie."
Rahm Emanuel, former ambassador to Japan under Biden and a current advisor at investment-banking firm Centerview Partners, joins Jon Stewart to talk about the United States’ international trade predicament in the wake of Trump’s tariffs. They discuss why it’s one of the most “reckless” things done by a president, why he thinks these policies gave China a “get-out-of-jail-free” card, his experience under the Obama administration, and why he believes a Democratic governor could be the one to turn the party around.
See omnystudio.com/listener for privacy information.
Learn more about your ad choices. Visit podcastchoices.com/adchoices
Panic World: Who turned Gen Z fascist? (With Felix Biederman)
Tom Rocheexcellent survey of rightwing influencers c2017-2025
923 - The Banks Are Out of Money feat. Dave Weigel (4/7/25)
Tom Rocheexcellent, funny
Everyday Superpowers: Why I Finally Embraced Event Sourcing—And Why You Should Too
Tom Rochepart 1 of (projected) 5. pullquote (barely edited):
> event sourcing [is] a [design] pattern where instead of just storing the latest state of the system, we store every change as a sequence of events.
[archived here](http://web.archive.org/web/20250408183716/https://everydaysuperpowers.dev/articles/why-i-finally-embraced-event-sourcingand-why-you-should-too/)
This is the first entry in a five-part series about event sourcing:
- Why I Finally Embraced Event Sourcing—And Why You Should Too
- What is event sourcing and why you should care
- Preventing painful coupling
- Event-driven microservice in a monolith
- Get started with event sourcing today
A project I’m working on processes files in multiple phases. To help users track progress, I built a status page that shows details like this:
- html
File Name Pages Percent complete Last updated 5466-harbor-4542.pdf 23 33% two minutes ago 5423-seeds-5675.pdf 35 50% five minutes ago 9021-lights-3980.pdf 19 100% 30 seconds ago - alignment
- normal
After using it for a while, the team had a request: they wanted to see how long each file took to process. That seemed like a useful addition, so I set out to add it.
One way to track processing time is simple: create two new columns in the database called `start_time` and `end_time` and populate them as the documents are being processed. Then, subtract `start_time` from `end_time` to get the duration. If `end_time` doesn’t exist, subtract `start_time` from the current time.
That works well—for new files.
But what about files that have already been processed? How do we estimate their duration?
This is a familiar challenge. Over and over in my career, I’ve seen business requirements change. Maybe our understanding of the project improves, or we discover a better way of doing things. But there’s always a frustrating reality: any new behavior we introduce can only apply going forward. The existing data is locked in its current form.
Why? Because traditional applications lose information.
The database holds the latest version of every row, and when updated, the row overwrites the older information with the new.
My application doesn’t have this problem.
That’s because I built it using event sourcing—a pattern where instead of just storing the latest state of the system, we store every change as a sequence of events.
With event sourcing, I had data going back to day one. That meant I could calculate the duration for every file submitted to the system.
In just a few minutes, I adjusted some code, ran some tests, and confirmed that I could retroactively compute durations for all past files, even ones that had failed partway through processing.
Then came my favorite moment.
Since my status page updates live via HTMX over a server-sent-events connection, I watched in real-time as durations magically appeared next to every file. The data had always been there, I just added a new way to present it.
And for the first time in my career, I didn’t have to say, “We can do this going forward, but…”
I first learned about event sourcing over a decade ago. The concept fascinated me, but I was hesitant to use it in a production system.
Then, after getting laid off last year, I finally had time to experiment with it on side projects. That gave me the confidence to introduce it to a project at work.
And I wish I had done it years ago.
Event sourcing is a way of building applications that never lose data.
Traditional applications update records in place. If a user removes an item from their cart, the application updates the database to reflect the new state. But that means we’ve lost valuable history—we can’t tell what was removed or when.
With event sourcing, every change is stored as an immutable event. Instead of just storing the final cart contents, we store every action. A user’s shopping cart interaction could look like this:
- html
Event ID Cart ID Event Type Data Timestamp 23 1234 CartCreated {} 2025-01-12T11:01:31 24 1234 ItemAdded {“product_id”: 2} 2025-01-12T11:02:15 25 1234 ItemAdded {“product_id”: 5} 2025-01-12T11:05:42 26 1234 ItemRemoved {“product_id”: 2} 2025-01-12T11:06:59 27 1234 CheckedOut {} 2025-01-12T11:07:10 - alignment
- normal
To get the current cart state, we replay the events in order.
This simple shift—from storing state to storing history—changes everything.
Surprisingly, no.
Replaying events for a single entity is incredibly fast—it’s just a simple query that retrieves rows in order. I’ve been told that retrieving and replaying hundreds of events[hundreds]{Chances are you won't be building history from hundreds of events. There's a concept called "closing the books" that will keep your event streams small.} is faster than most SQL statements with a join clause.
And when you need to query large amounts of data, like for a dashboard or reporting status for a number of items, event-sourced applications create read models—precomputed views optimized for fast retrieval.
So while a CRUD-based system needs complex queries to piece together data stored across tables, an event-sourced system has the same data ready to go.
No More “Going Forward” Caveats
The biggest win? When business needs change, I don’t have to tell stakeholders, “We can only do this for new data.”
Instead, I can just replay the history and calculate what they need—even for data that existed before we thought to track it.
Microservices Without the Complexity
At one point, this project I'm working on had five separate event-driven microservices, each serving specific purposes.
After adopting event sourcing in one of those services, I looked to see if we could simplify the project by relocating code to the event-sourced system and have the code subscribe to events.
To my surprise, I realized we could incorporate all of them into one service that was simpler to understand, maintain, and deploy.
Blazing fast views
By incrementally updating read models custom-made for your complicated web pages and API endpoints, those views that used to take time to render can return quickly.
I've seen this approach turn an expensive file-creation-and-download action into a simple static file transfer.
It Just Feels Right
I can’t overstate how satisfying it is to trust that no data is ever lost.
No more digging through logs to reconstruct what happened. No more uncertainty when debugging. The entire history is right there.
Absolutely. Yes.
Hear me out. I'm not saying you should go and rewrite your production app. I'm saying that you should use it.
Try it out on a small side project so you know what it's like.
I kept thinking I needed to build a full-blown application and write my own implementation of the event sourcing mechanisms before I would feel comfortable trying it for a job. As a result, it took me over a decade before I even tried it.
Instead, I ask that you be open about the idea of event sourcing, read this series, think about it, try it on as an exercise, and let me know what you think.
I’ve been inspired by Adam Dymitruk and Martin Dilger who both own consulting agencies that use event sourcing in for every project… even those focused on high-frequency trading. They've been operating this way for over a decade and have learned how powerful the pattern is and how to keep it simple. I'll be sharing what I've learned from them over the next few posts.
But for some perspective, after nearly 20 years of writing software and a few years of coaching people on how to write software, the way I write code has changed drastically in this last year.
Check back for the next post, where I'll get more into the practical details of it.
Read more...
Civ 1919: Treaty of Versailles pt2
Tom RocheJustin and (mostly) Dave excellent as usual
Why has the theatre interval gone out of style?
Tom Rocheinformative and amusing
For the past century the interval has been as much a part of the theatre experience as the curtain call and the standing ovation. So why is it disappearing? And how will our bladders cope?
- GUEST: John Shand, theatre critic, Sydney Morning Herald
- PRODUCER: Helen Pitt
Tariffs are as old as the Roman Empire
Tom Rocheexcellent
Global markets are reeling in response to US President Donald Trump's sweeping tariffs, but the tariff itself is nothing new. The ancient Romans applied duties to imports from the East - including incense, spices and jewels - designed to generate vast amounts of government revenue. But Roman tariffs also created problems - from price inflation to the emergence of black markets.
- Guest: Peter Edwell, Associate Professor of Ancient History, Macquarie University
Radio War Nerd EP 513 — The Great White Oaf, feat. Dan Boeckner
Tom RocheVERY EXCELLENT, funny and insightful
#612 - The Classical Work That All of Us Have Done
Tom Rocheexcellent
Dan Tiernan: Going Under
Tom Rocheskip
Dan Tiernan doesn't just perform stand up - he attacks it. In Going Under, he debuts his unique brand of furious, unpredictable and wildly entertaining comedy on the radio, covering living with dyspraxia, becoming a dinner lady, and his sister's cancer diagnosis.
An exhilarating mix of raw personal chaos, cutting observations, and gloriously queasy gags, recorded live at Backyard Comedy Club.
Written and Performed by Dan Tiernan Produced by Ewan McAdam
Production Manager - Laura Shaw Executive Producer - Charlie Dinkin A Daddy's SuperYacht Production for BBC Radio 4.
The Naked Week: Ep4. Performing, Potholes, and Paddington.
Tom Rocheamusing as usual
The Naked Week team are back to place satirical news-tariffs on current events with a mix of correspondents, guests and, occasionally, live animals.
This week we Spring (Statement) into action with a timely tune for - and by - Rachel Reeves, explore a pothole that's opened up in the programme, and accidentally get added to Radio 4's Group Chat.
From The Skewer’s Jon Holmes and host Andrew Hunter Murray comes The Naked Week, a fresh way of dressing the week’s news in the altogether and parading it around for everyone to laugh at.
With award-winning writers and a crack team of contemporary satirists - and recorded in front of a live audience - The Naked Week delivers a topical news-nude straight to your ears.
Written by: Jon Holmes Katie Sayer Gareth Ceredig Sarah Dempster Jason Hazeley
Investigations Team: Cat Neilan Louis Mian Freya Shaw Matt Brown
Guests: Ania Magliano, Bethany Reeves, with music by The Naked Week Wind Section.
Production Team: Laura Grimshaw, Tony Churnside, Jerry Peal, Katie Sayer, Phoebe Butler.
Executive Producer: Philip Abrams Produced and Directed by Jon Holmes
An unusual production for BBC Radio 4.