AI-assisted coding, SQL-to-UI transformation, and a bit of tree appreciation.
Mar 21, 2025
TL;DR;
Tried Claude Code—decent at navigating and editing code but expensive. Built a Querio feature that turns SQL queries into UI forms for easy tweaking. Trees are cool, both abstract syntax ones and the real kind. 🌳
At the time of writing we are doing a release tomorrow and it's 18 degrees in London. As a result I am going to do this even more livejournal 2006 style than last time.
money trees
Now to the good news. Last time I promised to regale you with more tales of me using stuff wrong bending technology to my will. But I lied, I don't do that any more. I have this new intern working for me called Claude (weird name), you might have heard about him.
After a month of heavy Claude Code use I have some impressions to share.

claude code is ok at flying around a codebase
I was surprised at how effective Claude managed to orienteer around our often dizzyingly meandering codebase.
Anthropic just let it use grep
and find
and it's off to the races. Shoutout to all the no-syntax-highlighting vi-code-editing C USB driver developers for showing a machine how to navigate large codebases from the terminal.
claude code is ok at following an established pattern
I have thrown it into some serious snake-pits crawling with generic typescript types and python statements indented 8 levels in. It manages to produce useful edits and I love the way it always adds the closing curly-bracket at the end, it just gets me going.
claude code edits are fine
It rarely manages to suggest an edit I had in mind first try, but we can go back and forth and eventually get there. And don't get me wrong...
I like sticking into a few codebases and solving a problem. I enjoy my first thought in the morning being about how I can skim down the data-model. I do not mind not shaving for 10 days, not talking to anybody - hammering keystrokes until tsserver
goes OOM or the control flow is etched on the inside of my eyelids - whichever comes first. And I will allow the occasional dream about an edge case that I haven't covered interrupt my precious REM sleep.
But, being real, I also enjoy just like eating a choc-chip cookie and drinking tea (milk, no sugar, c'mon England) while a pay-to-win API helps me out here and there. Don't hate me!
claude code is expensive
Alas, I cannot (yet) turn to cookies and tea full-time. Claude Code is expensive! I think it's value bro and I praise the heavens that my CEO thinks the same. Also sometimes Claude Code is bad. Well, not bad, just hopeless.

sql trees
17 minutes left. To type, not to read - don't worry. Unless you're in like 2nd grade. In which case: well done! Keep it up, little vibe coder!
At the beating heart of Querio is an agent, not unlike Claude Code, which can write SQL and Python to help you do analytics, track metrics, la la la, all that stuff you love to do with your data. The agent has a set of tools to do that - it can run queries, execute Python code, create visualisations. It's as smart as the latest available API and it's great.
Yawn! I'm not here to do cool agents over web-socket, I am here to build :star: boring enterprise features :star: and an occasional less-boring feature like this next one.
So imagine you got a response from Querio - it's usually a three-tuple of (sql, some_python, some_visualisation)
. Well actually, more like a singly-linked list but you get the idea. You like the answer but you want to tweak a few things: like maybe the date range you were asking over (agent inferred this from your conversation) or other conditions (that the agent set from your prompts).
You could carry on chatting. But you like your result so much that you're like: "no I don't want a new result, I want this result just slightly different!"
This is where I come in.
erm, what is sql again?

SQL is a collection of tokens - a language. Tokens arranged in a special order give rise to meaning. tokens -> meaning. Great! Class dismissed!
Not so fast. If I want to skip all the steps from tokens to meaning I have to shell out like $600 for OpenAI o1 Pro Max with Face Unblur! And after all that it might still sample your answer on the wrong end of the distribution and spit back something useless. Nah.
I just want a good-ol compooter system! Fine, then we have to
tokenize 1.1. (maybe) lex (not the podcast host)
parse
interpret
Why are we talking about this? You wanted to change your Querio output just a little bit didn't you? Remember your answer bundle: (sql, python, visualisation)
- it all hinges on the SQL. He who controls the SQL controls the Universe!
Let's go step by step: tokenize, lex, parse - boring, boring, boring - let's leave it to the clever people and give me the juicy stuff - the SQL AST. Abstract syntax tree (AST) is what happens when computer says “heh”, throws away all the carefully placed indentation, casing and other non-semantic garbage to produce an object in memory a computer can understand.
Now I have an AST I can adorn it with useful context Querio already has, like metadata about the columns, column types, other stuff.
Take the labeled AST and traverse that baby. As you hop over the tree-nodes - collect any intermediate representation that you want - crunch some nodes, ignore others, flatten these, invert those. Whoosh! We just got a new interpretation of the SQL! The great thing is that the new interpretation is just SQL with glasses and a moustache!
But here's where it gets interesting. This new interpretation isn't more SQL code - it's a collection of form fields, dropdowns, checkboxes, date pickers - you know what passes for a UI in 2025. Each WHERE
clause becomes a toggle, each date range becomes a calendar picker, each JOIN
condition becomes a dropdown menu (roughly speaking).
Think about it - when the agent gives you a SQL query with WHERE created_at BETWEEN '2023-01-01' AND '2023-01-31'
. What does that even mean? I don't know, but it sure ain't the King's English! Wrap this into an HTML form and do it fast before I scratch my own eyes out! Ahhhh, a 300MB date picker with custom styles! Says "Jan 1, 2023 - Jan 31, 2023" and lets me drag the endpoints around!
Remember: the program is the data is the interface. You plug the HTML forms, we translate them back to SQL and update your answer bundle (sql', python', visualization'). I glossed over this bit but you imagine how, naturally, all analysis depends on the data - when we change the SQL, the, erm, data changes, the analysis changes. But only a little bit! That is what we wanted! Slightly different output without sticking your hand in the Schrödinger's bag where the right AI-generated answer might or might not be.
regular trees

The birds are coming back. You know what that means - spring in the northern hemisphere baby!
I've been thinking about regular trees lately. The ones with leaves and branches.
There's a massive oak outside my window that I've been watching for the past few weeks. Happy to report it is not moving. It might have some buds. No leaves yet. I will keep you posted.
Trees are good though. No maintenance, no updates, no CRON - same code runs every year, no runtime exceptions.

thanks
That’s it. Til next time, keep your functions pure! I'll know if you don't! Thanks to SQL for being so bad people would rather use HTML from than learn it.
~ n