<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Matt Colyer</title>
        <description>Multipurpose Jekyll Blog Theme</description>
        <link>https://matt.colyer.name/</link>
        <atom:link href="https://matt.colyer.name/feed.xml" rel="self" type="application/rss+xml"/>
        <pubDate>Wed, 02 Dec 2026 13:23:49 +0000</pubDate>
        <lastBuildDate>Wed, 02 Dec 2026 13:23:49 +0000</lastBuildDate>
        <generator>Jekyll v4.3.1</generator>
        
            <item>
                <title></title>
                <description>&lt;p&gt;One of the techniques I’ve been using more and more is running &lt;a href=&quot;https://sqlite.org/wasm/doc/trunk/index.md&quot;&gt;SQLite&lt;/a&gt; or &lt;a href=&quot;https://duckdb.org/docs/api/wasm/overview&quot;&gt;DuckDB&lt;/a&gt; inside my browser, thanks to their WebAssembly builds. That means you can query and manipulate a dataset with no backend at all.&lt;/p&gt;

&lt;p&gt;This lets you build an interface for the exact question you’re trying to answer.&lt;/p&gt;

&lt;p&gt;Put a Parquet or SQLite file next to your HTML, host it on S3 or GitHub Pages, and use DuckDB-WASM to query it. You can filter, sort, and aggregate tens of millions of rows in the browser.&lt;/p&gt;

&lt;p&gt;Even better, you can map a dataset by meaning. Compute the embeddings once, ahead of time, and store them as a column in the same Parquet file. The browser never runs a model. DuckDB’s built-in &lt;a href=&quot;https://duckdb.org/docs/sql/functions/array&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;array_cosine_similarity&lt;/code&gt;&lt;/a&gt; finds similar rows with plain SQL.&lt;/p&gt;

&lt;p&gt;I’ve always wondered what the San Mateo County Board of Supervisors actually spends its time on. It turns out every agenda item comes with a staff report, and they’re all public. That’s 15 meetings and several hundred decisions in the last six months, more than I can read.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;duckdb&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm/+esm&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Load DuckDB in the browser&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;bundle&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;duckdb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;selectBundle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;duckdb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getJsDelivrBundles&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;worker&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;duckdb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createWorker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bundle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mainWorker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;duckdb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AsyncDuckDB&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;duckdb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ConsoleLogger&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;worker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;instantiate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bundle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;mainModule&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Point at a Parquet file sitting next to this page&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;conn&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;connect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;conn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;`
  CREATE VIEW items AS
  SELECT * FROM &apos;https://example.com/agenda_items.parquet&apos;
`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// Find the 10 decisions most similar to the permit task force contract&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;conn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;`
  WITH target AS (
    SELECT matter_id, embedding FROM items
    WHERE title LIKE &apos;%Permit Entitlement Blue Ribbon Task Force%&apos;
  )
  SELECT i.meeting_date, i.department, i.title,
         array_cosine_similarity(
           i.embedding::FLOAT[384], target.embedding::FLOAT[384]
         ) AS similarity
  FROM items i, target
  WHERE i.matter_id &amp;lt;&amp;gt; target.matter_id
  ORDER BY similarity DESC
  LIMIT 10
`&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toArray&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Embed each staff report once on your laptop. Then plot the results as an interactive 3D map with &lt;a href=&quot;https://threejs.org/&quot;&gt;three.js&lt;/a&gt;. Click any point to read the staff report behind it.&lt;/p&gt;

&lt;p&gt;Next time you have a spreadsheet you want to share, try turning it into a site instead. I think you’ll be surprised how far a single HTML file can go.&lt;/p&gt;
</description>
                <pubDate>Mon, 23 Nov 2026 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2026/11/23/data-based-sites/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2026/11/23/data-based-sites/</guid>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;Everyone at this point has heard of vibe coding, software development through quick, casual input and then built by AI. By speeding up the rate of iteration, mistakes become cheap and expected.&lt;/p&gt;

&lt;p&gt;I’ve noticed that there’s untapped potential that many folks are currently missing. When you stop relying on a single model, the opportunities really expand. Which brings us to Ping-Pong Vibe Coding – think of your workflow as a conversation between minds. In this case, the two minds are AI models:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.anthropic.com/claude-code&quot;&gt;&lt;strong&gt;Claude Code&lt;/strong&gt;&lt;/a&gt; the current state of the art for generating software with AI.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/sst/opencode/&quot;&gt;&lt;strong&gt;Open Code&lt;/strong&gt;&lt;/a&gt; which is similar but allows the use of any model on &lt;a href=&quot;https://openrouter.ai&quot;&gt;OpenRouter&lt;/a&gt; which allows you to leverage the best frontier models including &lt;a href=&quot;https://openrouter.ai/google/gemini-2.5-pro&quot;&gt;Gemini 2.5 Pro&lt;/a&gt;, or o3 directly via OpenAI to act as your expert reviewer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of running in a straight line from prompt to code, you bounce ideas between models.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Claude implements&lt;/li&gt;
  &lt;li&gt;OpenCode critiques&lt;/li&gt;
  &lt;li&gt;Claude adapts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The results improve as models have different blind spots, so while they won’t catch their own mistakes, working together it becomes easy. It’s like having two different senior engineers reviewing each other’s work.&lt;/p&gt;

&lt;h2 id=&quot;the-pattern&quot;&gt;The Pattern&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Write a plan&lt;/strong&gt; in Claude Code.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Ask Claude to implement&lt;/strong&gt; the plan.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Use Open Code&lt;/strong&gt; to review the resulting diff:&lt;/p&gt;

    &lt;p&gt;“You are an expert code reviewer. Review the current branch against main. Provide a code review point by point. Look for dead-code or other common mistakes.”&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Incorporate the review feedback&lt;/strong&gt; into Claude Code, either manually or by summarizing the review as a prompt.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Repeat the loop&lt;/strong&gt;, surfacing issues, tightening code, and getting multiple perspectives.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You don’t wait until everything is built to start reviewing – do it in steps along the way.&lt;/p&gt;

&lt;h2 id=&quot;bonus-tips-for-using-claude-code-effectively&quot;&gt;Bonus Tips for Using Claude Code Effectively&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Guardrails Make It Work&lt;/strong&gt; Always make sure your project has a &lt;strong&gt;linter&lt;/strong&gt; and a &lt;strong&gt;test suite&lt;/strong&gt;. &lt;a href=&quot;https://docs.anthropic.com/en/docs/claude-code/hooks&quot;&gt;Hooks&lt;/a&gt; are especially valuable for this.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Ask Claude to configure linters, tests, and GitHub actions&lt;/strong&gt; It does workflows just as well as it writes code!&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;GitHub PRs are still valuable&lt;/strong&gt; Split tasks into logical PRs, commit frequently, and rely on GitHub Actions to keep Claude honest.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Automate project tasks with commands&lt;/strong&gt; Claude Code supports &lt;a href=&quot;https://docs.anthropic.com/en/docs/claude-code/slash-commands#custom-slash-commands&quot;&gt;custom slash commands&lt;/a&gt; so you can automate tasks like creating releases with a single &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/command&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Run in parallel&lt;/strong&gt; There are a number of tools like &lt;a href=&quot;https://conductor.build&quot;&gt;Conductor&lt;/a&gt; and &lt;a href=&quot;https://www.vibekanban.com&quot;&gt;Vibekanban&lt;/a&gt; which automate running parallel instances.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ping-pong vibe coding is more than a clever trick—it’s a mindset. You don’t need to rely on a single answer. You alternate between distinct perspectives, generating friction that sharpens ideas and leads to better results. Of course, some projects are simple and might not require this, so use your judgement.&lt;/p&gt;

&lt;p&gt;Try it out. Write a test, ship a draft, bounce the diff. What new software will you create with this ability?&lt;/p&gt;
</description>
                <pubDate>Wed, 30 Jul 2025 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2025/07/30/ping-pong-vibe-coding/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2025/07/30/ping-pong-vibe-coding/</guid>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;For the first 50 years of computing, we adopted the interfaces of computers.
First, it was the punch card:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2025/03/punchcard.jpg&quot; alt=&quot;Punch card&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then it was assembly code:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2025/03/assembly.jpg&quot; alt=&quot;Assembly Code&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next came computer languages:&lt;/p&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#define args int argc, char** argv
&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;printf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;%s&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Hello, world!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Although it has evolved, the digital world we navigate today is still built
around rectangles—small text boxes, buttons, and screens that form a rigid,
limited canvas.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2025/03/slack.jpg&quot; alt=&quot;Slack&quot; /&gt;&lt;/p&gt;

&lt;p&gt;But the limitations of these interfaces are becoming increasingly apparent as
we push the boundaries of what computers can do.&lt;/p&gt;

&lt;p&gt;For the first time, computers are beginning to act like us. They can hear, see,
and even begin to understand. This evolution creates a new frontier—an
opportunity to rethink how we interact with machines from first principles.&lt;/p&gt;

&lt;p&gt;What if, instead of us adapting to computers’ rigid interfaces, computers could
adapt to us?&lt;/p&gt;

&lt;h2 id=&quot;they-can-hear&quot;&gt;They can hear&lt;/h2&gt;

&lt;p&gt;Typing averages 40 words per minute, but speech hits 150. Talking’s
faster—ideal for first drafts. They’re messy, but that’s the point. Separate
creation from editing, and more ideas emerge.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2025/03/divergent-convergent.jpg&quot; alt=&quot;Divergent and convergent thinking&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Your first draft will inevitably be worse, but you can refine it (either by
hand or with an LLM!). Divergent thinking allows ideas to flow freely,
generating a wealth of concepts and possibilities. Convergent thinking, on the
other hand, refines and narrows those ideas into practical, actionable
solutions. This dance between exploration and refinement is essential.&lt;/p&gt;

&lt;p&gt;I encourage you to give it a &lt;a href=&quot;https://sot.interactiveai.dev&quot;&gt;try&lt;/a&gt;. There is a
plethora of dictation tools available (including the ones built directly
into your phone or desktop). &lt;/p&gt;

&lt;h2 id=&quot;they-can-see&quot;&gt;They can see&lt;/h2&gt;

&lt;p&gt;It’s not just voice—computers can now see as we do. Handwriting recognition in
the past was laughably bad.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2025/03/note.jpg&quot; alt=&quot;Note&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now it’s easily transcribed by ChatGPT with impressive accuracy. This shift is
significant enough that I’ve stopped taking notes on iPads and returned to
paper and pencil — which offers a far superior writing experience. And yet, with
a quick snapshot, my handwritten thoughts can be preserved, editable and
searchable forever.&lt;/p&gt;

&lt;h2 id=&quot;in-closing&quot;&gt;In Closing&lt;/h2&gt;

&lt;p&gt;We’re at a turning point where computers are adapting to us rather than the
other way around. They can hear, see, and understand—bringing us closer to a
seamless, natural partnership between human creativity and machine capability.
By challenging old patterns and embracing these new interactions, we hold the
potential to create in ways we never have before.&lt;/p&gt;
</description>
                <pubDate>Sun, 30 Mar 2025 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2025/03/30/computing-like-a-human/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2025/03/30/computing-like-a-human/</guid>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;h3 id=&quot;one-weird-trick-for-openai-o1&quot;&gt;One Weird Trick for OpenAI o1&lt;/h3&gt;

&lt;p&gt;OpenAI o1 is like having your own graduate-level research assistant. It can handle complex reasoning tasks and break them down into manageable solutions. For instance, if you’re in the process of buying a car, you might wonder how much you would actually save by going electric (rather than relying on what the marketing says). Most people would stop there, but the magic of o1 is that if you take that thought and ask it directly, it will provide the answer for you.&lt;/p&gt;

&lt;h3 id=&quot;the-challenge-making-accurate-assumptions&quot;&gt;The Challenge: Making accurate assumptions&lt;/h3&gt;

&lt;p&gt;While o1 is incredibly powerful, it works best when you provide a comprehensive list of assumptions upfront. Since o1 isn’t connected to real-time search, if left to its own devices, it makes poor assumptions. So you have to do it yourself like this:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;I want you to calculate the difference in fuel costs and create a model to check it.
Assumptions:
 - Model X uses 34 kWh per 100 miles
 - 1 kWh costs $0.30
 - I drive 12,000 miles a year
 - The comparison car is a Lexus LX which gets a combined mpg of 19
 - Gas costs $4.25 a gallon
How much do I save in fuel with a model X?
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, identifying and researching this information is tedious. Then, I discovered an even better way to unlock o1’s capabilities.&lt;/p&gt;

&lt;h3 id=&quot;the-weird-trick&quot;&gt;The weird trick&lt;/h3&gt;

&lt;p&gt;It turns out GPT-4o is really good at writing prompts. And then I realized GPT-4o is connected to real-time search, so all you need is a prompt like this:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;You are an expert prompt writer for o1. I want to compare the fuel cost of a 2022 Tesla Model X to a 2022 Lexus LX. State all of the necessary assumptions for o1 and search for the correct values.

Format:

Question: …
Assumptions:
- Assumption 1
- Assumption 2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;GPT-4o then determines what assumptions are necessary and provides the correct values and all you had to ask was “Compare the fuel cost of a 2022 Tesla Model X to a 2022 Lexus LX”, here’s what it looks like:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Question: Compare the fuel cost of a 2022 Tesla Model X to a 2022 Lexus LX.

Assumptions:

- **Annual Mileage**: Both vehicles are driven 15,000 miles per year.
- **Driving Conditions**: The driving pattern consists of 55% city driving and 45% highway driving.
- **Fuel Economy**:
  - *2022 Tesla Model X*:
    - City: 107 MPGe
    - Highway: 97 MPGe
    - Combined: 102 MPGe
  - *2022 Lexus LX 600*:
    - City: 17 MPG
    - Highway: 22 MPG
    - Combined: 19 MPG
- **Fuel/Electricity Costs**:
  - *Electricity*: The national average residential electricity rate is $0.14 per kWh.
  - *Gasoline*: The national average price for premium gasoline is $4.00 per gallon.
- **Energy Consumption**:
  - *2022 Tesla Model X*:
    - Energy consumption: 33 kWh per 100 miles
- **Fuel Costs**:
  - *2022 Tesla Model X*:
    - Annual electricity cost: $693
    - Cost per mile: $0.046
  - *2022 Lexus LX 600*:
    - Annual fuel cost: $3,158
    - Cost per mile: $0.210
- **Location**: The user is located in California, where electricity and gasoline prices may vary from the national average.

These assumptions are based on data from the U.S. Department of Energy&apos;s FuelEconomy.gov website.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And when you give it to o1, you get:&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Under national-average assumptions ($0.14/kWh and $4.00/gallon), the 2022 Tesla Model X’s annual electricity cost ($693) is far lower than the 2022 Lexus LX 600’s annual gasoline cost ($3,158). In California, where both electricity and gasoline are pricier, the Tesla’s charging cost may rise to around $1,100–$1,200 per year, whereas the Lexus LX 600 can easily climb to $3,900–$4,000 or more in fuel costs—still leaving a significant cost advantage for the Tesla.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;bonus-weird-trick&quot;&gt;Bonus weird trick&lt;/h3&gt;

&lt;p&gt;If you’re interested in seeing how changing the assumptions affects the outcome, just ask o1 to create a static HTML page in the same thread. This allows you to tweak parameters like mileage, energy costs, or fuel economy directly in a browser, making it easy to see how adjustments affect the results.&lt;/p&gt;

&lt;div class=&quot;language-text highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Build a static HTML page using tailwind css that allows me to change the assumptions.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/2025/01/calculator.png#center&quot; alt=&quot;Final result&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;OpenAI o1 and GPT-4o, when used together, are powerful tools for solving real-world problems. The key lies in leveraging each model’s strengths effectively.&lt;/p&gt;
</description>
                <pubDate>Sun, 19 Jan 2025 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2025/01/19/one-weird-trick-for-openai-o1/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2025/01/19/one-weird-trick-for-openai-o1/</guid>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;I recently got an Anova Precision Oven, which I love. But what would make it
even better is if I could control it from &lt;a href=&quot;https://www.home-assistant.io&quot;&gt;Home Assistant&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let’s dive in! While my goal is to control this specific oven, these strategies
are broadly applicable to any IoT device which uses an Android app.&lt;/p&gt;

&lt;h2 id=&quot;getting-setup&quot;&gt;Getting Setup&lt;/h2&gt;

&lt;p&gt;First you’ll need &lt;a href=&quot;https://developer.android.com/studio&quot;&gt;Android Studio&lt;/a&gt;. Then you’ll need to configure a virtual
device which has &lt;strong&gt;Google Play support&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/uploads/2024/02/emulator-selection.png&quot; alt=&quot;How to get an emulator with Google Play support&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once you get the emulator running, go to the Google Play store within the
virtual device and download the &lt;a href=&quot;https://play.google.com/store/apps/details/?id=com.anovaculinary.anovaoven&amp;amp;gl=US&amp;amp;pli=1&quot;&gt;Anova application&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next you’ll need to setup ADB (as &lt;a href=&quot;https://stackoverflow.com/questions/17901692/set-up-adb-on-mac-os-x&quot;&gt;suggested in this Stack Overflow thread&lt;/a&gt;) on your
host machine:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ export PATH=$PATH:/Users/&amp;lt;User&amp;gt;/Library/Android/sdk/tools/
$ export PATH=$PATH:/Users/&amp;lt;User&amp;gt;/Library/Android/sdk/plaform-tools/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now you’ll need to pull a copy of the app on to your host machine so you can
patch it for &lt;a href=&quot;https://gist.github.com/nstarke/615ca3603fdded8aee47fab6f4917826?permalink_comment_id=2558212&quot;&gt;ADB debugging&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ adb shell pm list packages -f -3
$ adb pull /data/app/~~gbepSifcBxr_eECRmeaY0w==/com.anovaculinary.anovaoven-5f9AKiKjqnsVZvllYdzCuA==/base.apk
$ apktool d -o output-dir base.apk
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;output-dir&lt;/code&gt;, find &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AndroidManifest.xml&lt;/code&gt; and open it up in the text editor of
your choice. In the application xml node, add the following xml attribute:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;android:debuggable=&quot;true&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And set the following to be true (&lt;a href=&quot;https://github.com/iBotPeaches/Apktool/issues/1626&quot;&gt;for reasons&lt;/a&gt;):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;android:extractNativeLibs=&quot;true&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now you’ll need to reassemble the application. You can do this by running:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ apktool b -o com.anovaculinary.anovaoven.apk output-dir
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next you’ll need to permit mitmproxy in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;output-dir/res/xml/network_security_config.xml&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;network-security-config&amp;gt;
   &amp;lt;debug-overrides&amp;gt;
      &amp;lt;trust-anchors&amp;gt;
         &amp;lt;certificates src=&quot;system&quot; /&amp;gt;
         &amp;lt;certificates src=&quot;user&quot; /&amp;gt;
      &amp;lt;/trust-anchors&amp;gt;
   &amp;lt;/debug-overrides&amp;gt;
&amp;lt;/network-security-config&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now resign the APK so that the device will accept it:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ keytool -genkey -v -keystore resign.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
$ apksigner sign -v --out signed.apk --ks resign.keystore --ks-key-alias alias_name com.anovaculinary.anovaoven.apk
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next you have to delete the existing application from the emulator and then
upload and install the new package:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ adb install signed.apk
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then fire up the &lt;a href=&quot;https://developer.android.com/studio/debug/network-profiler&quot;&gt;network inspector&lt;/a&gt; to record requests and you’re off
to the races.&lt;/p&gt;

&lt;p&gt;As I said before, these steps above can be repeated for any Android application
and allow you to inspect all of it’s network traffic.&lt;/p&gt;

&lt;h2 id=&quot;what-i-found&quot;&gt;What I found&lt;/h2&gt;

&lt;p&gt;It looks like the Anova application used Firebase and Alogia to implement it’s
UI. However none of the oven commands appeared in the network inspector.
After a bit more digging, it became clear that the app utilized a separate
library to communicate with the oven. Good thing we configured a proxy.&lt;/p&gt;

&lt;p&gt;Using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mitmproxy&lt;/code&gt; I was able to find a copy of the oven &lt;a href=&quot;https://storage.googleapis.com/anova-app.appspot.com/oven-firmware/oven-controller-1.4.24.bin&quot;&gt;firmware&lt;/a&gt; but
unfortunately the firmware blob was also encrypted so that was a deadend.&lt;/p&gt;

&lt;p&gt;Next I searched the application binaries for strings and found
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wss://app.oven.anovaculinary.io&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Luckily with mitmproxy, I was able to intercept and decode all of the traffic
and therefore document the &lt;a href=&quot;https://mcolyer.github.io/anova-oven-api/#introduction&quot;&gt;API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Sadly after finishing the initial research Anova has migrated their APIs to a
new platform. Luckily you can find the new API &lt;a href=&quot;https://github.com/bogd/anova-oven-api/tree/main/docs/oven&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Happy hunting!&lt;/p&gt;

</description>
                <pubDate>Thu, 01 Feb 2024 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2024/02/01/reverse-engineering-the-anova-precision-oven/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2024/02/01/reverse-engineering-the-anova-precision-oven/</guid>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;I’ve been lucky enough to have access to the FSD beta for a number of months.
At first everything worked great but eventually I noticed that I was no longer
able to use autopilot at night. Not knowing exactly when it started I assumed
it was a bug but when it persisted for multiple months I started to wonder. So
I googled it and found &lt;a href=&quot;https://www.reddit.com/r/TeslaModelY/comments/10527la/fsd_beta_consistently_not_working_when_dark/&quot;&gt;this thread&lt;/a&gt;, &lt;a href=&quot;https://www.reddit.com/r/RealTesla/comments/w4lujf/fsd_not_working_at_night/&quot;&gt;another thread&lt;/a&gt; and finally this &lt;a href=&quot;https://teslamotorsclub.com/tmc/threads/fsd-not-working-at-night.270261/&quot;&gt;one&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After reading the threads it became pretty clear that Tesla produced a number
of cars which had cabin cameras &lt;strong&gt;but didn’t include the required infrared LEDs
to illuminate the cabin at night&lt;/strong&gt; (watch &lt;a href=&quot;https://www.youtube.com/watch?v=O5lkjMY9_RI&quot;&gt;this video&lt;/a&gt; to see if yours has
one). Why Tesla hasn’t issued a recall for this defect is 🤔.&lt;/p&gt;

&lt;p&gt;Luckily there’s a pretty cheap solution you can use until you’re able to get
Tesla to replace your camera (I’m still waiting for my appointment). You’ll
need this &lt;a href=&quot;https://amzn.to/3WEN7vN&quot;&gt;IR light&lt;/a&gt; (which you can plug into the usb-c ports in the car to
charge) and a &lt;a href=&quot;https://amzn.to/3Hybxm0&quot;&gt;phone mount&lt;/a&gt; (which you can use to position the light at your
face). Ta-da, now your Tesla can see again at night.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2022/01/tesla-ir-light.jpg#center&quot; alt=&quot;Tesla IR Hack&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Tesla, if you’re reading - please issue a recall for all affected vehicles and
proactively replace your defective hardware.&lt;/p&gt;

</description>
                <pubDate>Wed, 25 Jan 2023 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2023/01/25/why-is-tesla-fsd-afraid-of-the-dark/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2023/01/25/why-is-tesla-fsd-afraid-of-the-dark/</guid>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;It turns out that the previous owner of our house had several ADT
NV214A video encoders installed to digitize the CCTV system. At first, I
thought they’d end up being totally useless as the documentation
&lt;a href=&quot;https://www.adt.com/content/dam/adt/downloads/manuals/QIG+NV412A+Video+Encoder_1013.pdf&quot;&gt;online&lt;/a&gt; is pretty minimal and there was a password set from the
previous ADT installation.&lt;/p&gt;

&lt;p&gt;Luckily with a bit of digging, I was able to find this &lt;a href=&quot;http://forum.micasaverde.com/index.php?topic=28648.0&quot;&gt;thread&lt;/a&gt;, which
helpfully pointed out that you can reset the cameras by “Using a pin or
paper clip, press and hold the reset button for at least 10 seconds when
the power light is flashing”.&lt;/p&gt;

&lt;p&gt;So after a couple tries, I was able to reset the device which then
opened up &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://&amp;lt;ip address&amp;gt;/img/video.asf&lt;/code&gt; and yielded an
MPEG-4 stream. The manual also mentioned it had MJPEG support as well.
After a couple guesses I successfully found &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://&amp;lt;ip
address&amp;gt;/img/video.mjpeg&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Hopefully this helps you on your quest to open up your ADT cameras.&lt;/p&gt;

</description>
                <pubDate>Tue, 19 Mar 2019 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2019/03/19/getting-an-mjpeg-stream-from-adt-cctv-cameras/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2019/03/19/getting-an-mjpeg-stream-from-adt-cctv-cameras/</guid>
                
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;This is a pretty major update as two significant things have changed
relating to SmarterMeter. First Google PowerMeter no longer exists,
therefore SmarterMeter now supports &lt;a href=&quot;https://pachube.com/&quot;&gt;Pachube&lt;/a&gt;. Second, PG&amp;amp;E changed
their web data service to &lt;a href=&quot;http://opower.com/&quot;&gt;OPower&lt;/a&gt;, which is admittely much better
but also different which required a rewrite of parts of SmarterMeter.&lt;/p&gt;

&lt;p&gt;One thing I am excited about with the change to OPower, is that a
universal format (&lt;a href=&quot;http://geospatial.blogs.com/geospatial/2011/12/open-standards-for-sharing-electric-power-usage-data.html&quot;&gt;ESPI&lt;/a&gt;) for power data is emerging and SmarterMeter
supports it. It doesn’t do everything I want yet but it’s an exciting
development none the less. Now if only OPower/PG&amp;amp;E provided an OAuth
authentication mechanism to access the data, then SmarterMeter would be
truly unnecessary.&lt;/p&gt;

&lt;p&gt;Unfortunately I haven’t had a chance to update the GUI version of
SmarterMeter so this release is only available via the &lt;a href=&quot;http://rubygems.org/gems/smartermeter&quot;&gt;rubygem&lt;/a&gt;.&lt;/p&gt;

</description>
                <pubDate>Sat, 28 Jan 2012 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2012/01/28/smartermeter-v0.4.0-released/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2012/01/28/smartermeter-v0.4.0-released/</guid>
                
                
                <category>smartermeter</category>
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;Earlier this year at Google IO, Google announced that Google PowerMeter
would be retired but they didn’t give many specifics. They’ve now
followed up with details including a clear date when the service will be
shutoff, Sept. 16, 2011.  You can find the full list of reasons why the
project was discontinued on the &lt;a href=&quot;http://googleblog.blogspot.com/2011/06/update-on-google-health-and-google.html&amp;quot;&amp;gt;Google&quot;&gt;Google Blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While this is unfortunate, SmarterMeter is able to migrate to another
service as it keeps a copy of all your power data before it was uploaded
to Google.&lt;/p&gt;

&lt;p&gt;This means in the near future that SmarterMeter will need to switch to a
new service for it’s graphing interface. I’ve heard of &lt;a href=&quot;http://pachube.com/&quot;&gt;pachube&lt;/a&gt; but
I’m wondering if there are other solutions worth looking at. Suggestions
and/or volunteers are appreciated.&lt;/p&gt;

</description>
                <pubDate>Mon, 18 Jul 2011 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2011/07/18/smartermeter-and-google-powermeter-part-ways/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2011/07/18/smartermeter-and-google-powermeter-part-ways/</guid>
                
                
                <category>smartermeter</category>
                
            </item>
        
            <item>
                <title></title>
                <description>&lt;p&gt;This is just a small update with two important bugfixes. The first bug
prevented data from being sent to Google PowerMeter correctly and the
second prevent exceptions from being appropriately handled.&lt;/p&gt;

&lt;p&gt;I strongly suggest you update. Also I wanted to say a quick thanks to
&lt;a href=&quot;https://github.com/kruton&quot;&gt;kruton&lt;/a&gt; who found and fixed the PowerMeter issue.&lt;/p&gt;

</description>
                <pubDate>Thu, 21 Apr 2011 00:00:00 +0000</pubDate>
                <link>https://matt.colyer.name/2011/04/21/smartermeter-v0.3.3-released/</link>
                <guid isPermaLink="true">https://matt.colyer.name/2011/04/21/smartermeter-v0.3.3-released/</guid>
                
                
                <category>smartermeter</category>
                
            </item>
        
    </channel>
</rss>