Vibe Coding 9 -- AI Agents That Play Taboo
One thing that I've gotten pretty interested in recently is "agent engineering" or "agentic architectures" or "agentic system design" (I'm not sure there's a canonical name for it). Of course there is a lot of interesting work on "how do I use an LLM to solve some contained inference or …
Vibe Coding 8 -- Clod Code

The other day I ran across a blog post on how to build a coding agent. But it was very long and I didn't read it. (Sorry!) Instead I asked myself, what's the simplest coding agent I can build.
So I put on my PM hat and thought about it …
Vibe Coding 7 -- Human in the Loop as a dspy.Tool
As I started to think about my meme-generating agent, I figured that I might want to allow it to ask clarifying questions. That makes it not just a multi-turn conversation (which just requires maintaining a history) but more like a ReAct agent with a "human in the loop" tool for …
Vibe Coding 6 -- pymgflip
As my next project, I thought it would be fun to use AI to generate memes. For many years I have used imgflip to generate memes. And they have an API! Unfortunately, they don't have an official Python library (that I could find, I found a bunch of one-GitHub-star unofficial …
Vibe Coding 5 -- WoDRAG
"How do you know if someone does Crossfit?"
"They build a RAG system about Crossfit!"
As my next project, I wanted to build a non-trivial RAG system. To do that, I needed a non-trivial dataset.
Every day for 20+ years, Crossfit.com has published a Workout of the Day ("WoD …
Vibe Coding 4 -- Speed Scrabble
A few years ago we went on an Alaska cruise, and we sprung for a cabin in the private/exclusive part of the ship (which is the way to go!) which had its own restaurant, its own lounge, and so on. The lounge had board games, one of which was …
Vibe Coding 3 -- Simple Chatbots in DSPy
A long long time ago I took a graduate course in Econometrics. We spent the first month or two deriving linear algebra equations and proving facts about Best Linear Unbiased Estimators and Consistency and Heteroscedasticity and so on. We were locked in. Then we had our first exam and one …
Vibe Coding 2 -- SnowMeth - an AI Novel-Writing Assistant
I have started several novels, although I have never finished one. Can AI maybe help with that?
One way of writing a novel I have tried is the Snowflake method, so named because of its fractal nature: start with a one sentence summary, expand it to a paragraph, expand that …
Vibe Coding 1 -- Website Redesign
The world is getting into Vibe Coding, so I will too. As a first attempt, I asked Claude Code to redesign my website, which had grown a bit stale. (OK, a lot stale.)
I think it's an improvement.
Before

After

Next time: some actual code.
Creating Games in Streamlit
A while back I had the idea that 9yo and I would program a bunch of simple games together and she'd get interested in coding. Well, we did program a bunch of simple games together:
- Guessing Game - the computer picks a random number, you guess, it tells you "too high …
Ten Essays on Fizz Buzz
Next @joelgrus’ book: “100 ways of writing fizz buzz in Python”
— Rocco Meli ⌬ (@RoccoMeli) June 13, 2019
I've been quarantined for the last several months for reasons that are too boring to go into, which somehow gave me a lot more time to write. And so I am delighted to …
Data Science From Scratch: Second Edition
I am thrilled to announce that the second edition of Data Science from Scratch is now available! (buy from Amazon or your other favorite bookstore, or read on Safari, or get a PDF from ebooks.com it looks like.)
It's been almost exactly four years since the first edition came …
Livecoding Madness - Building a Deep Learning Library
I give talks, and this fall my talk has been to live code a deep learning library (and use the resulting library to solve Fizz Buzz).
You probably didn't get to see my talk, which is why I made a video of it:
Please enjoy!
Fizz Buzz in Tensorflow
interviewer: Welcome, can I get you coffee or anything? Do you need a break?
me: No, I've probably had too much coffee already!
interviewer: Great, great. And are you OK with writing code on the whiteboard?
me: It's the only way I code!
interviewer: ...
me: That was a joke.
interviewer …
A Simple Spot It Clone With PureScript and Pux
Long-time readers may recall that last year I wrote a blog post about the mathematics of Spot It. (For those who don't recall, Spot It is a game where you have a deck of cards, each of which has 8 pictures on it, where through the magical mathematics of finite …
Trump Tweets on a Globe (aka Fun with d3, socket.io, and the Twitter API)
When I worked at Farecast we had a giant TV in the lobby, and up on that TV was an image of a globe, and on that globe were animated paths that (as far as you know) corresponded to flight searches that people were doing on the site. It was …
Building a Stupid Data Product, Part 3: The Single-Page App (PureScript)
OK, so last time we built a web service that responds to GET requests with random (bogus) elementary school science questions. In this third (and last) installment, we'll create a single-page quiz app that consumes the service.
Here's a rough stab at a wireframe:

On the …
Building a Stupid Data Product, Part 2: The Web Service (Haskell)
Last time we collected and processed the data for generating stupid fake elementary school science questions and answers. The important parts to remember are
- we generated two files
questions.jsonandanswers.jsoncontaining transition dictionaries mapping each word to an array / list of possible following …
Building a Stupid Data Product, Part 1: The Data (Python)
As I'm not working right now* , I have a surfeit of time to hack on stupid things. In particular, it seemed like a good idea to hack together a stupid data product.
Inspiration (if you can call it such) struck when the Allen Institute released a …
Creating a Function Index Using Cycle.js
The readers of my book have been clamoring for an index of functions,
so that -- for example -- when someone sees me use vector_mean on page 200 they can
easily figure out where to find its definition.
It was easy enough (if tedious) to go through the book and create a …
Polyglot Twitter Bot, Part 4: PureScript
[The fourth in an (at least) 6-part series, all code on GitHub as always.]
- Node.js
- Node.js + AWS Lambda
- Python 2.7 + AWS Lambda
- PureScript
- PureScript + AWS Lambda
- Bonus: PureScript + Twitter Streaming
I know, you're thinking, "I've already read three parts of this series, and I haven't heard one …
Polyglot Twitter Bot, Part 3: Python 2.7 + AWS Lambda
[The third in an (at least) 6-part series, all code on GitHub as always.]
- Node.js
- Node.js + AWS Lambda
- Python 2.7 + AWS Lambda
- Purescript
- Purescript + AWS Lambda
- Bonus: Purescript + Twitter Streaming
Lambda also allows Python functions, although only Python 2.7. In practice, this won't affect us much …
Polyglot Twitter Bot, Part 2: Node.js + AWS Lambda
[The second in an (at least) 6-part series, all code on GitHub as always.]
- Node.js
- Node.js + AWS Lambda
- Python 2.7 + AWS Lambda
- Purescript
- Purescript + AWS Lambda
- Bonus: Purescript + Twitter Streaming
AWS has a recent-ish Lambda product, which lets you upload functions and then have them run on …
Polyglot Twitter Bot, Part 1: Node.js
[The first in an (at least) 6-part series, all code on GitHub as always.]
- Node.js
- Node.js + AWS Lambda
- Python 2.7 + AWS Lambda
- Purescript
- Purescript + AWS Lambda
- Bonus: Purescript + Twitter Streaming
Like most of you, I've long dreamed of making a Twitter bot. And also like most of …
Stupid Itertools Tricks for Data Science
(This is a blog post version of my PyData Seattle talk, slides and code at the link.)
In my last post
Haskell-Style Fibonacci in Python
If you've ever done a tech interview, you're probably familiar with the Fibonacci sequence:
1, 1, 2, 3, 5, 8, 13, ....
where each number is the sum of the previous two. A relatively simple (and relatively overused) interview problem is to write a function that returns the n-th Fibonacci number …
On The Mathematics of Spot It!
Last weekend we went to a party where one of the other attendees brought Spot It! Frozen for her kids. It's a simple game with circular cards, each of which has 8 pictures in it, most of them Frozen-themed.

The setup is that any two cards in the deck …
Data Science From Scratch: First Principles with Python
I am super-excited to announce that the book I've been working on for more than the last year, Data Science from Scratch: First Principles with Python is finally available! (buy from O'Reilly, use discount code AUTHD to save some money) (buy from Amazon).
My experience learning and teaching data science …
2014 Year in Review
2014 was a crazy year, mostly because I took on two very large projects either of which would have made for a pretty crazy year.
1. The Book
I am writing a book. (Yes, another one.) Actually, the first draft is done, and I am right now revising it based …
T-Shirts, Feminism, Parenting, and Data Science, Part 2: Eigenshirts
(You might want to read Part 1 first.)
When last we left off, we'd built a model using shirt colors to predict boy-ness / girl-ness.
Our second attempt will involve the shirt images themselves (sort of). For our purposes, computer images are made up of pixels, each of whose color is …
T-Shirts, Feminism, Parenting, and Data Science, Part 1: Colors
Before I was a parent I never gave much thought to children's clothing, other than to covet a few of the baby shirts at T-Shirt Hell. Now that I have a two-year-old daughter, I have trouble thinking of anything but children's clothing. (Don't tell my boss!)
What I have discovered …