Insights
A writing archive: applied AI, data science, and the questions they touch.
Tutorials and commentary from the original blog — statistics, R and technical computing, healthcare, energy, and public-sector analysis — with the facts re-checked. Where a piece has aged, a note at the top says so.
RSS: all posts · R posts only
Start here — R, statistics and recommenders
Functional programming in R with purrr
A practical guide to purrr in R: map(), map_dbl() and pmap(), safely(), quietly() and possibly(), plus examples for CSVs, models per group and plots.
Probability and statistics: the concepts worth being precise about
The vocabulary that causes the most trouble when it is used loosely — with the visuals that make each one concrete.
R on steroids: Rcpp
How to move one slow R loop into C++ with Rcpp's cppFunction(): a complete working example, a measured 24x speedup, and when it isn't worth it.
Loops vs vectorization: the 40x you're leaving on the table
The same computation, written two ways, with a benchmark that isn't close. Why vectorized code wins in R, and when a loop is still right.
Recommendation engines run more of your day than you think
Spotify, Tinder, Steam, the news you read — the same three algorithms sit under all of it. How they work, and the one we built for hotels.
tidyverse and data.table, and when we reach for each
dplyr and data.table side by side on the same tasks, a measured group-by benchmark from 100,000 to 5 million rows, and a simple rule for choosing.
01
AI, ML, data science: three words, one map
AI is the goal, machine learning is the method, data science is the discipline. How the three fit together, where they overlap, and where to start.
- AI
- Data science
- Machine learning
August 2023
02
The trade we made for the internet
Technology quietly solved a stack of old economic problems and invoiced us in a new currency: attention, comparison and self-doubt.
- Technology
- Society
June 2023
03
Functional programming in R with purrr
A practical guide to purrr in R: map(), map_dbl() and pmap(), safely(), quietly() and possibly(), plus examples for CSVs, models per group and plots.
- R
- Functional programming
- tidyverse
April 2023
04
Probability and statistics: the concepts worth being precise about
The vocabulary that causes the most trouble when it is used loosely — with the visuals that make each one concrete.
- Statistics
- Probability
- Fundamentals
March 2023
05
What AI actually does for an airline
Forget the brochure version. Where machine learning genuinely earns money in aviation: fuel, maintenance, fraud — and where it still can't cope.
- AI
- Aviation
January 2023
06
AGI, minus the theatre
General intelligence in machines is a hypothesis, not a schedule. What the optimists and pessimists actually claim, and what's worth worrying about now.
- AI
- AGI
January 2023
07
R on steroids: Rcpp
How to move one slow R loop into C++ with Rcpp's cppFunction(): a complete working example, a measured 24x speedup, and when it isn't worth it.
- R
- C++
- Performance
January 2023
08
AI in policing: useful, and easy to get wrong
Facial recognition, predictive policing, crime mapping: what these systems genuinely do well, and the specific ways each one goes wrong.
- AI
- Policy
- Ethics
January 2023
09
The Riemann hypothesis, without the fog
What the Riemann hypothesis claims, why the zeros of the zeta function control the primes, and what rests on it. In plain language, with one picture.
- Mathematics
- Number theory
January 2023
10
Uncertainty is a safety feature
Stuart Russell's argument, in short: an AI that is certain about its objective is dangerous precisely because of that certainty.
- AI
- Ethics
January 2023
11
Fusion, AI, and a joke that stopped being funny
Written the week the NIF achieved ignition: what actually happened, the physicists' oldest joke, and where machine learning fits in a tokamak.
- Physics
- AI
- Energy
December 2022
12
Loops vs vectorization: the 40x you're leaving on the table
The same computation, written two ways, with a benchmark that isn't close. Why vectorized code wins in R, and when a loop is still right.
- R
- Python
- Performance
December 2022
13
Recommendation engines run more of your day than you think
Spotify, Tinder, Steam, the news you read — the same three algorithms sit under all of it. How they work, and the one we built for hotels.
- Machine learning
- Recommenders
December 2022
14
AI in healthcare: what's real
Imaging, records, drug discovery, hospital operations: where models genuinely help medicine, and the two failure modes that should scare you.
- AI
- Healthcare
December 2022
15
What the new era of AI actually changes
Past the headlines about robot overlords: what automation genuinely does to work, who carries the cost, and what preparing would look like.
- AI
- Economics
- Society
December 2022
16
Will language models replace search?
Written as ChatGPT was first colliding with Google: why the answer was 'enhance, not replace' — and what that prediction got right.
- AI
- Search
December 2022
17
The Collatz conjecture: two rules, no exit
Halve it if even, 3n + 1 if odd. Every number tested past 2⁶⁸ reaches 1, yet there's no proof. Why it's so hard, Tao's 2019 result, and R code to try it.
- Mathematics
- R
- Number theory
December 2022
18
The Goldbach conjecture, plainly
Is every even number above 2 the sum of two primes? Checked to 4 × 10¹⁸ with no exception, unproven since 1742. Why it's so hard, in plain language.
- Mathematics
- Number theory
December 2022
19
What a language model actually is
Strip away the noise and an LLM is a next-word predictor of colossal size. From n-grams to GPT-3, including the tiny model I built in R.
- AI
- NLP
December 2022
20
Reinforcement learning, in plain terms
The third kind of machine learning: no labels, no clusters — just an agent, its actions, and the consequences. Where it shines and where it bites.
- Machine learning
- AI
December 2022
21
AI vs ML: what's the actual difference?
The two terms get used interchangeably and they shouldn't be. The distinction, with examples you already use every day.
- AI
- Machine learning
December 2022
22
tidyverse and data.table, and when we reach for each
dplyr and data.table side by side on the same tasks, a measured group-by benchmark from 100,000 to 5 million rows, and a simple rule for choosing.
- R
- Data wrangling
- Performance
February 2021
23
Analyzing crypto markets in R, part 1: exchanges and arbitrage
Bitcoin's price wasn't one price. Pulling 2011–2018 exchange data into R and measuring the gaps arbitrage was supposed to close.
- R
- Finance
- Data analysis
December 2018
24
Analyzing crypto markets in R, part 2: everything correlates
The diversification that wasn't: daily returns for eight coins, correlation matrices, and what happens to independence when markets fall.
- R
- Finance
- Data analysis
December 2018
25
Conway's Game of Life, in R and in Python
The four rules of Conway's Game of Life, the patterns they produce (gliders, oscillators, guns), and a full simulation in Python and in R to run yourself.
- R
- Python
- Simulation
January 2018
On the older pieces
Twenty-five of the old blog's twenty-seven posts live here, including the two crypto-market analyses whose data feeds have since shut down. Those two carry a note saying exactly that: their figures are the original outputs, and their code is shown for the method.