<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>sql on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/sql/</link>
    <description>Recent content in sql on S Anand</description>
    <generator>Hugo -- 0.156.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 30 May 2026 11:39:10 +0800</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/sql/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Add a Verify Button</title>
      <link>https://www.s-anand.net/blog/add-a-verify-button/</link>
      <pubDate>Sat, 30 May 2026 11:39:10 +0800</pubDate>
      <guid>https://www.s-anand.net/blog/add-a-verify-button/</guid>
      <description>&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://files.s-anand.net/images/2026-05-30-add-a-verify-button.avif&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.linkedin.com/in/rohitsaran/&#34;&gt;Rohit Saran&lt;/a&gt; looked at the &lt;a href=&#34;https://sanand0.github.io/journalists/statnostics/&#34;&gt;Statoistics cards&lt;/a&gt; my AI agents are generating for &lt;a href=&#34;https://x.com/hashtag/STATOISTICS&#34;&gt;The Times of India&lt;/a&gt;, and asked about a small button under each one.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sanand0.github.io/journalists/statnostics/2026-04-27-citizen-survey/03-family-doctor-everyone-wants-nobody-has.svg&#34;&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://files.s-anand.net/images/2026-05-30-statoistics-card.avif&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In the list of Statoistics that you had put, I saw there&amp;rsquo;s a button called &amp;lsquo;Verify.&amp;rsquo; What was that meant to be or will do in future?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That verify button explains the claim, mentions the sources, and shows how to check the claim.&lt;/p&gt;
&lt;p&gt;One card said &amp;ldquo;9 in 10 Indians want a family doctor and barely 1 in 35 has one&amp;rdquo;. The button breaks that down:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;87% want a family doctor, 2.8% outpatient visits were to an Asha worker…&amp;rdquo;&lt;/li&gt;
&lt;li&gt;It identifies in the source document what are the columns that we were looking at, what numbers it verified.&lt;/li&gt;
&lt;li&gt;It links to the program that it wrote to do the verification.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I said, &amp;ldquo;it lets humans check if the numbers are right - by giving them steps &amp;ndash; where exactly to check, how to check if it is correct.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.linkedin.com/in/sajeev-kumarapuram-205ba933&#34;&gt;Sajeev&lt;/a&gt; pushed back: &lt;em&gt;&amp;ldquo;It&amp;rsquo;s more &amp;rsquo;explain&amp;rsquo; than &amp;lsquo;verify&amp;rsquo; really.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;True. &lt;a href=&#34;https://timesofindia.indiatimes.com/toireporter/author-Saurabh-Banerjee-479202560.cms&#34;&gt;Saurabh&lt;/a&gt; had asked for exactly this earlier: while a person is checking by hand, give them something that shows how the AI got to its answer. &lt;strong&gt;A verify button&amp;rsquo;s first job is not to prove the AI is right. It&amp;rsquo;s to let a nervous journalist check, cheaply, until they stop being nervous.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This instinct is old. The Royal Society took &lt;a href=&#34;https://royalsociety.org/about-us/who-we-are/history/&#34;&gt;&lt;em&gt;nullius in verba&lt;/em&gt;&lt;/a&gt; as its motto around 1662, &amp;ldquo;take nobody&amp;rsquo;s word for it.&amp;rdquo; They didn&amp;rsquo;t print claims and ask you to trust the author. In 1663 they made &lt;a href=&#34;https://en.wikipedia.org/wiki/Robert_Hooke&#34;&gt;Robert Hooke&lt;/a&gt; their Curator of Experiments, whose job was to re-run the demonstration in front of the Fellows. A verify button is that, without Hooke.&lt;/p&gt;
&lt;p&gt;(Merchants got there two centuries earlier: double-entry bookkeeping, codified by &lt;a href=&#34;https://en.wikipedia.org/wiki/Luca_Pacioli&#34;&gt;Pacioli&lt;/a&gt; in 1494, means every entry has a counter-entry and the books either balance or they don&amp;rsquo;t.)&lt;/p&gt;
&lt;p&gt;Rohit&amp;rsquo;s reason for liking it went somewhere I hadn&amp;rsquo;t fully thought through. He went to brand.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It&amp;rsquo;s like why a product with 10-year guarantee is likely to be made better than a product with 2-year warranty, because the company has confidence to tell the customer, &amp;lsquo;Look, I am standing behind this product for 10 years.&amp;rsquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And later:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Any brand that is saying, &amp;lsquo;Whatever I write is verifiable,&amp;rsquo; is so much more in this age of misinformation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;His version of why this matters for a newspaper: &lt;em&gt;&amp;ldquo;a brand is only about trust. Rest is news is anyway a commodity.&amp;rdquo;&lt;/em&gt; &lt;strong&gt;A verify button is a public claim that you&amp;rsquo;re willing to be checked.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Here&amp;rsquo;s how I actually build one &amp;ldquo;Verify&amp;rdquo; buttons, in increasing order of effort.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Link plus a searchable string.&lt;/strong&gt; A hyperlink may still be wrong. I want a link &lt;em&gt;and&lt;/em&gt; a short quote I can paste into the page&amp;rsquo;s search box and find. &lt;em&gt;&amp;ldquo;When I click on that link, I should be able to literally search for and find that piece of text, verifying that it did not hallucinate&amp;rdquo;&lt;/em&gt; Then even a plain program (not even an LLM) can open every link and confirm the text is there.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;For numbers, the SQL query.&lt;/strong&gt; If it&amp;rsquo;s data, the SQL query (or Python script) that fetches that particular result is the closest equivalent. The button should just run the query against live data and shows the number. The user doesn&amp;rsquo;t need to know SQL - they just see that the number matches.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The procedure as a checklist.&lt;/strong&gt; The button breaks the card into steps: this is the claim, this is the number, this is the column it came from, check that the D1A value matches. A person ticks down it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Verify with an AI agent.&lt;/strong&gt; Add a link that opens the claim in Google AI mode with a pre-filled prompt asking it to fact-check the claim. For example: &lt;a href=&#34;https://tools.s-anand.net/askai/?q=Fact-check+with+step-by-step+evidence%3A+According+to+Citizen+Survey+2022-23%2C+87%25+of+Indians+want+a+dedicated+family+doctor+but+only+2.8%25+actually+use+one.&#34;&gt;Fact-check with step-by-step evidence: According to Citizen Survey 2022-23, 87% of Indians want a dedicated family doctor but only 2.8% actually use one. How might it have changed since the publication?&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Rohit framed verification as three jobs, not one: &lt;em&gt;&amp;ldquo;Verification has sourcing, verification, and updation.&amp;rdquo;&lt;/em&gt; The last clause lets you also ask whether the number has gone stale since you published it.&lt;/p&gt;
&lt;p&gt;Getting the source right is not the same as getting the conclusion right. Rohit said: &lt;em&gt;&amp;ldquo;you are asking AI not only to get right source and right data, but now we are asking to interpret.&amp;rdquo;&lt;/em&gt; And interpretation is subjective on both ends. The button can confirm the number is real but not &lt;em&gt;prove&lt;/em&gt; the argument is sound.&lt;/p&gt;
&lt;p&gt;Of course, the sources could be wrong. &amp;ldquo;Check the source&amp;rdquo; assumes good data quality. Luckily, data is more often right than wrong, and verification can shine a light on bad data.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;We can start simple. The cheapest version: &lt;em&gt;every&lt;/em&gt; AI output has a &amp;ldquo;Verify&amp;rdquo; link to a search query the user can easily inspect. That changes their question from &amp;ldquo;can I trust this?&amp;rdquo; to &amp;ldquo;let me check.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;If this can establish trust and a brand for India&amp;rsquo;s largest newspaper, enterprises AI apps might do well to follow.&lt;/p&gt;
&lt;!-- https://claude.ai/chat/36780e30-48ca-4f84-af7a-4308e0880ce4 --&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 12 Jan 2025</title>
      <link>https://www.s-anand.net/blog/things-i-learned-12-jan-2025/</link>
      <pubDate>Sun, 12 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-12-jan-2025/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://getdx.com/research/measuring-developer-productivity-with-the-dx-core-4/&#34;&gt;Measuring developer productivity with the DX Core 4&lt;/a&gt; is a framework for measuring developer productivity. It encapsulates other frameworks like DORA, SPACE, and DevEx.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://minimaxir.com/2025/01/write-better-code/&#34;&gt;Can LLMs write better code if you keep asking them to “write better code?&lt;/a&gt; A delightful exploration of how Claude 3.5 Sonnet keeps optimizing and adding features to improve code. My takeaway: repeatedly applying a prompt gives us interesting new directions to explore.&lt;/li&gt;
&lt;li&gt;Wednesday comes from Wōdnesdæg - named after Odin (or Woden).&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://help.router-for.me/&#34;&gt;CLIProxyAPI&lt;/a&gt; seems a good way to allow any CLI coding agent (Codex, Claude Code, etc.) to work with any provider (e.g. Gemini, OpenRouter, etc.) The documentation needs a few more examples, but it&amp;rsquo;s usable.
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mise x github:router-for-me/CLIProxyAPI -- cli-proxy-api&lt;/code&gt; starts a local server that proxies requests.&lt;/li&gt;
&lt;li&gt;Create a &lt;a href=&#34;https://help.router-for.me/configuration/basic.html&#34;&gt;&lt;code&gt;config.yaml&lt;/code&gt;&lt;/a&gt;, update the keys, and configure your coding agent, e.g. &lt;a href=&#34;https://help.router-for.me/agent-client/codex.html&#34;&gt;Codex&lt;/a&gt; to use it.&lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s also a good way to see what prompts are being sent by the various harnesses.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://huggingface.co/blog/smolagents&#34;&gt;smolagents&lt;/a&gt; is a new agents library from HuggingFace. It seems simple enough to use.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/dimastatz/whisper-flow/&#34;&gt;whisper-flow&lt;/a&gt; does real-time speech transcription!&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://catalog.ldc.upenn.edu/LDC97S62&#34;&gt;Switchboard-1&lt;/a&gt; is a labelled audio corpus with ~260 hours of speech. It has ~2,400 calls among 500+ speakers in the US.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-local-tunnel/&#34;&gt;Cloudflare tunnel&lt;/a&gt; is like ngrok but more permanent. It&amp;rsquo;s a bit more complex, too. But given CloudFlare&amp;rsquo;s liberal free tier, it&amp;rsquo;s a good, viable option for long-term local hosting.&lt;/li&gt;
&lt;li&gt;John Wheeler: &amp;ldquo;We live on an island surrounded by a sea of ignorance. As our island of knowledge grows, so does the shore of our ignorance.&amp;rdquo; A great way to understand how ignorance actually grows as you learn more.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pypi.org/project/justhtml&#34;&gt;&lt;code&gt;justhtml&lt;/code&gt;&lt;/a&gt; is a fast enough pure Python fully HTML5 compliant library. For a faster, mostly compliant solution, &lt;a href=&#34;https://pypi.org/project/html5-parser/&#34;&gt;&lt;code&gt;html5-parser&lt;/code&gt;&lt;/a&gt; with &lt;code&gt;lxml&lt;/code&gt; works.&lt;/li&gt;
&lt;li&gt;There is little reason to use Redis. There are several clones you can use. &lt;a href=&#34;https://www.cs.cmu.edu/~pavlo/blog/2025/01/2024-databases-retrospective.html&#34;&gt;Databases in 2024: A Year in Review&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://microsoft.github.io/garnet/&#34;&gt;Microsoft&amp;rsquo;s Garnet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.keydb.dev/&#34;&gt;KeyDB&lt;/a&gt; (only Linux)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://valkey.io/&#34;&gt;ValKey&lt;/a&gt; (only source)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.dragonflydb.io/&#34;&gt;DragonFly&lt;/a&gt; (only Linux)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://redict.io/&#34;&gt;ReDict&lt;/a&gt; (only Linux)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Every few years, something comes along trying to replace relational databases and SQL, and gets absorbed. &lt;a href=&#34;https://youtu.be/8Woy5I511L8&#34;&gt;YouTube&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Key value stores. People soon realize they need more features, e.g. indices.&lt;/li&gt;
&lt;li&gt;MapReduce systems. Most MapReduce vendors put SQL on top of SQL. Then the Hadoop market crashed. (But HDFS, S3, distributed storage systems are a good idea)&lt;/li&gt;
&lt;li&gt;Document Databases. JSON. SQL absorbed that. SQLite 3.45+ supports even JSONB. DuckDB, of course, has JSON.&lt;/li&gt;
&lt;li&gt;Column Databases. Again, these introduced SQL.&lt;/li&gt;
&lt;li&gt;Graph Databases. SQL:2023 introduced graph queries via SQL/PGQ (Property Graph Queries). DuckPGQ beats Neo4J&lt;/li&gt;
&lt;li&gt;Array Databases. SQL:2023 adds SQL/MDA which allows for matrix operations. But specialized databases might make sense in this category.&lt;/li&gt;
&lt;li&gt;Vector Databases. Every DB is adding support for this.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/TheAgentCompany/TheAgentCompany&#34;&gt;TheAgentCompany&lt;/a&gt; is a benchmark of real-world &lt;a href=&#34;https://github.com/TheAgentCompany/TheAgentCompany/tree/main/workspaces/tasks&#34;&gt;tasks&lt;/a&gt; like:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/TheAgentCompany/TheAgentCompany/blob/main/workspaces/tasks/admin-arrange-meeting-rooms/task.md&#34;&gt;Arranging a meeting room&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/TheAgentCompany/TheAgentCompany/blob/main/workspaces/tasks/ds-answer-spreadsheet-questions/task.md&#34;&gt;Analyze a spreadsheet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/TheAgentCompany/TheAgentCompany/blob/main/workspaces/tasks/sde-add-wiki-page/task.md&#34;&gt;Add a Gitlab wiki page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Salvatore Sanfilippo (antirez - Redis) finds DeepSeek v3 comparable with Claude 3.5 Sonnet. &lt;a href=&#34;https://www.youtube.com/watch?v=_pLlet9Jrzc&#34;&gt;YouTube&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;He also passed a paper and his code to compare them. A useful prompt. &lt;a href=&#34;https://youtube.com/clip/Ugkx3JUGaspeLA2U2U68zSRyB2rPJ-PnCUXR?si=xCoIu5bxaFntSymm&#34;&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Technical skills in demand</title>
      <link>https://www.s-anand.net/blog/technical-skills-in-demand/</link>
      <pubDate>Mon, 25 Nov 2002 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/technical-skills-in-demand/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://advogato.org/article/584.html&#34;&gt;What technical skills are in demand&lt;/a&gt;? Just a quick sketchy search by Keith. Intruiging that the top 3 technologies in demand are SQL, UNIX and Oracle, followed by C and Java.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
