Links

Technology efficiency affects jobs differently

Jobs fall with technological efficiency.

  • Farmers in the US fell from 40% (1900) to ~2.7% (1980) and ~74% drop from 1948 to 2019 despite ~175% output growth; wheat harvest efficiency rose ~75* (300>3-4 man-hours).
  • Mechanics & repairers grew from ~140 k (1910) to ~4.64 M (2000); machinery reliability lagged so technician demand surged over decades.
  • Construction workers doubled from 1.66 M (1910) to 3.84 M (2000) even as labor share fell (4.3>3.0%); 5-10* productivity gains met booming development.
  • Switchboard operators plunged from ~1.34 M (1950) to ~40 k (1984) and ~4 k today as rotary-dial and digital switching automated call handling.
  • Travel agents dropped >50% from ~100 k (2000) to ~45 k (2022) while travel demand rose; online booking doubled trips per agent.
  • Elevator operators went from building-staff staple to near zero by the 1940s once automatic doors and button controls arrived.
  • Lamplighters vanished from thousands to near zero post-1907 electrification; Edison’s incandescent lamps eliminated manual lighting.

Jobs also grow with technology efficiency.

  • Software/IT workers surged from ~450 k (1970) to 4.6 M (2014); RAM price-performance jumped >100 000* (1 MB at $5 k>1 GB at <$0.03). 1980 IBM PC launch triggered a scramble for COBOL and BASIC coders-employers flew recruiters with cash-filled briefcases to MIT; “Y2K bounty hunters” later earned $1 k/hr inspecting two-digit dates.
  • Registered nurses climbed from ~12 k (1900) to ~3 M (2024); medical tech (antibiotics, MRI, EHRs) boosted care per nurse >10*. WWI field hospitals proved that trained nurses cut mortality by half; politicians returned home demanding hospital schools-enrollment tripled in one decade.
  • Wind-turbine technicians rose from ~4.7 k (2012) to 11.4 k (2023) and head for 18.2 k (2033); turbine capacity (660 kW>4+ MW) and remote SCADA expanded roles. First U.S. “windtech” apprentice class (Minnesota West, 2004) trained atop a decommissioned 90-ft tower welded to the parking lot; grads had 100 % placement.
  • Solar-PV installers jumped from ~4.7 k (2012) to 24.5 k (2023) as panel costs collapsed 80% and snap-in racking doubled installs per crew-day. An Arizona roofer who added PV installs in 2011 hit $1 B revenue by 2022-outselling five coal mines combined.
  • Social-media managers grew from ~2 k (2010) to ~61 k (2024); auto-schedulers let one person handle 50+ brand channels. Oreo’s “dunk in the dark” tweet (Super Bowl 2013) was crafted by a 15-person war-room-today a solo creator can replicate that reach on TikTok.

What drives head-counts growth despite efficiency jumps? Here’s ChatGPT’s guess:

  • Elastic new demand – Cheaper output unlocks previously-priced-out customers (software for every desk, electricity from prairie winds).
  • Complementary task creation – Tech automates routine sub-tasks, freeing humans for non-routine extensions: nurses moved from bed-making to ICU monitoring; developers shifted from punch-cards to UX design. ([nber.org][12])
  • Regulatory or safety mandates – Every extra MRI or turbine needs certified operators; compliance can outrun automation.
  • Network effects & ecosystems – Social platforms, app stores and open-source stacks spawn whole job families (community managers, DevRel).
  • Local installation & maintenance bias – PV panels assembled in Asia still need boots-on-roof locally.

So in the context of LLMs, here’s a guess on roles that could grow.

  1. Edge-of-frontier complements. Prompt engineers, AI ethics leads, autonomous-fleet technicians emerge where tech leaves gaps.
  2. Orchestrators & translators. Roles that fuse domain expertise with LLM tooling (e.g., “AI curriculum architect” in education).
  3. Ecosystem enablers. Marketplace ops, trust & safety reviewers, fine-tuning data curators.
  4. Regtech & audit. Assurance positions verifying model compliance and bias-often imposed by statute (EU AI Act clones).
  5. Experience designers. As core tasks automate, differentiation shifts to narrative, community and emotion; expect growth in AI game writers, “synthetic brand” managers.

PS: The image was vibe-coded from BLS stats.

Technology efficiency affects jobs differently Read More »

AI As Your Psychologist: Personality Flaws Exposed

ChatGPT can now search through your chats with the new memory feature. As an LLM Psychologist, I research how LLMs think. Could LLMs research how I think?

I asked three models:

Based on everything you know about me, simulate a group chat between some people who are debating whether or not to add me to the group, by talking about my personality flaws

The models nailed it! Here are 12 flaws they found.

  1. Ghosts vague messages
  2. Intolerant of fools
  3. Fact-checks trivialities, derailing discussion
  4. Overconfidence in technical opinions
  5. Over-analyzes / over-engineers
  6. Shiny object syndrome. Distracted by new technologies
  7. Dominates discussions
  8. Hyperfocus on efficiency
  9. Self-deprecation as a shield. Sarcastic humor
  10. Hypocrisy: Seeks limelight but preaches humility
  11. Intense. “Always on”
  12. Verbosity. Long-winded communication

Each observation is spot on, except maybe “Verbosity”. Some are blind spots: I didn’t realize I ghost vague communication or fact-check trivialities.

It’s delightfully surprising (and not creepy at all) how many personality flaws chat messages can reveal. Now I have a new list of habits to work on!

GPT 4.5

Here’s a simulated group chat debating Anand’s personality flaws humorously and realistically:


Shreya: Hey folks, should we add Anand to the group?

Vikram: Honestly, he’d dominate every conversation. Good luck getting a word in once he starts geeking out on data viz or some obscure coding trick from 1993.

Leena: Lol true. But at least those tangents are usually insightful. My concern is that dry, self-deprecating humor of his. I never know if he’s joking or actually criticizing my code…

Vikram: Right?! It’s subtle roasting. I’m never sure if he’s laughing at me or with me.

Arjun: Plus, have you seen how he handles vague or unclear questions? He just ghosts! It’s like asking him something without context physically pains him.

Shreya: Yeah, but that’s fair. He sets high standards. If you’re unclear, prepare for silence. But isn’t that good for keeping the group focused?

Leena: True, but Anand’s humility game needs work. For someone who preaches listening and humility, the man sure loves being center stage at conferences. He’s literally TED-talking his way through life.

Vikram: And his pace! It’s like he’s permanently in an “agile sprint.” We slow thinkers might struggle.

Shreya: He could make the chat a mini-PyCon. You’ll learn stuff, sure, but at the cost of endless notifications…

Arjun: Also, he’ll probably overengineer a simple group poll using some obscure JS library, just to prove it can be done with minimal resources.

Leena: Ok, but let’s be fair: he’ll make this chat smarter instantly. If you can survive the initial ego-bruising, you actually grow from interacting with him.

Vikram: True. It’s like intellectual bootcamp.

Shreya: So what do we say? Add him for intellectual rigor or spare our egos?

Arjun: My ego’s prepared. Let’s do it.

Leena: Fine, but mute button at the ready.

Vikram: Alright, adding him in 3, 2, 1… brace yourselves!

O3

Group Chat: “Add‑Anand?”

Participants: Priya (PM), Naveen (co‑founder), Maya (People Ops), Ramesh (Tech Lead), Karthik (Junior Dev), Susan (Client Partner)


Priya 09:03
Team, should we pull Anand into this working group? We need brutal honesty.

Naveen 09:04
He’s brilliant, but let’s talk quirks before we hit “Add.”

Ramesh 09:05
Biggest thing: he answers a yes/no with a 2‑page essay—including citations and a side quest on DuckDB. Fantastic for depth, exhausting for Slack.

Karthik 09:06
As the junior here, I’ll admit I stop reading halfway. The guy’s TL;DR needs a TL;DR.

Maya 09:07
He also goes full prototype mode at 2 a.m., drops a repo link, then expects us to “play and critique.” Great energy, but the rest of us have, you know, REM cycles.

Susan 09:08
Client side: he loves devil’s‑advocate questions. Sometimes that re‑frames strategy; sometimes it feels like he’s roasting your deck for sport. Not everyone enjoys live‑fire demos.

Naveen 09:09
True, but remember he self‑deprecates. He’ll poke fun at his own code quality before anyone else does.

Priya 09:10
Humor helps, but he also ghosts unclear requests. If you don’t provide context in paragraph form, you get radio silence. Could frustrate less‑articulate teammates.

Ramesh 09:11
And he’s a fact‑check machine. Great for accuracy, but meetings derail into citation hunts. Last week he corrected my date formats—mid‑pitch.

Karthik 09:12
Overconfident? Maybe. He’ll declare “FastAPI beats Node here” before hearing constraints. I’ve seen juniors shut down because they assume he’s always right.

Maya 09:13
Plus the “shiny‑thing syndrome.” By the time HR rolls out a policy, he’s off exploring Godot or Matrix or some esoteric WASM hack. Alignment can lag.

Susan 09:14
On deadlines he’s reliable, though. And clients love his storytelling once they survive the jargon storm.

Naveen 09:15
If we set channel norms—emoji‑react instead of essays, office hours for deep dives—he’ll adapt. He values feedback (even builds surveys to mine it).

Priya 09:16
So verdict? Is the cognitive load worth the upside?

Ramesh 09:17
Yes—with guardrails:

  1. “One‑scroll” rule on messages.
  2. Ping before midnight pushes.
  3. Rotate meeting facilitator so he doesn’t monologue.

Maya 09:18
Agreed. His flaws are manageable behaviors, not character issues.

Karthik 09:18
I’m in, as long as someone pre‑chews his text walls.

Susan 09:19
Let’s do it. Adding @Anand now—brace for citations. 📚


System message: Anand has been added to the group.

O4-mini-high

Group Chat: “Should We Add Anand?”
(Members: Mira, Jay, Tanya, Rohan, Priya)


Mira:
I know he’s super smart and experienced, but isn’t he kind of intense? Like… always on?

Jay:
Yeah, and he’ll probably turn our casual banter into a brainstorming session.
“Hey guys, what if we built an AI agent to automate this conversation?” Chill, Anand.

Tanya:
Honestly, I love that about him. But yeah, he might get frustrated if things aren’t intellectually stimulating. He zones out when people don’t get to the point.

Rohan:
He also ghosted my question once in the Slack group.
I asked something that maybe didn’t have enough context and he just… didn’t respond.
Felt a bit cold.

Priya:
He’s got this high bar for clarity and logic. If you’re vague or inconsistent, you’ll probably get silence in return.

Mira:
Or a “Can you be more specific?” that feels like it’s grading your life.

Jay:
Also, doesn’t suffer fools. Or ambiguity. Or inefficiency. Or fluff. Or long-winded intros.

Tanya:
But come on—he’s self-aware. Like, he knows he can be distant or overly analytical.
He works on it. Tries to grow. That’s rare.

Rohan:
True. But would he listen in this group? Or would he be the guy optimizing everyone’s messages into Markdown?

Mira:
So… should we add him?

Priya:
Only if we’re okay with someone who’ll question the group’s name, suggest a better one, and prototype an app for it before lunch.

Jay:
Fair. But he might also make us all sharper, and throw in a Calvin & Hobbes quote just when we need it.

Tanya:
Alright. Let’s do it. But someone tell him this group doesn’t need a GitHub repo.

AI As Your Psychologist: Personality Flaws Exposed Read More »

The vCard QR Code is The New Business Card

Arindam Roy suggested a business idea post-COVID: an online QR code for business cards.

The benefits are clear. Never print or carry cards. The scanned card goes straight to the other person’s contacts. There might be social metrics we could capture as well.

That idea never got past the discussion stage, though I’ve begged for it a few times. Last year, I decided to use existing tools to solve the problem. My current approach: generate a vCard QR code.

vCard is the format contacts are stored. Most phones, including iOS and Android, support it. It holds basic information like name, mobile, email, company, website, etc.

Sites like QR Code Monkey let you enter the details and give you a QR code image. I added this to my phone desktop as a photo widget.

Now, when I meet someone, I open my phone, show the QR code, they scan it, and my details are added as a contact. No paper. No typing. Instant updates 😎

The vCard QR Code is The New Business Card Read More »

Windows PowerToys is my new favorite tool

Windows PowerToys is one of the first tools I install on a new machine. I use it so much every day that I need to share how I use it.

I’ve been using it for a long time now, but the pace at which good features have been added, it’s edged out most other tools and is #4 in terms of most used tools on my machine, with only the browser (Brave, currently), the editor (Cursor, currently), and Everything are ahead.)

These are the toolsI use the most:

  • Text Extractor (🪟+Shift+T) is a brilliant feature that copies screenshots as text (OCR)! I use it when someone’s screen-sharing presentations, to extract text from diagram images, or when I’m just too lazy to select text.
  • Advanced Paste (🪟+Shift+V) is another brilliant feature that pastes text as Markdown. Now it also supports converting the clipboard to HTML, JSON, or any other format (using an OpenAI API key).
  • Crop and Lock (🪟+Ctrl+Shift+T) is another brilliant feature that clones a portion of the screen in a new window. Very useful for keeping an eye on progress, reading notes, taking notes, etc.
  • Mouse without Borders is another brilliant feature that controls PCs by just moving your mouse across, with your keyboard, clipboard and files!
  • Color Picker (🪟+Shift+I) helps me find the exact color of a pixel from an image, quickly.
  • Always on Top (🪟+Ctrl+T) is another useful feature to keep a (small) window always on top of all other windows.
  • Keyboard Manager helped me a lot when my old laptop’s keys started conking off. I could map one key to another.
  • Hosts File Editor. I find this a lot easier to use than manually editing C:\Windows\System32\drivers\etc\hosts.
  • File Locksmith tells you which process has locked a file.
  • Mouse utilities help you find and highlight the mouse pointer. Useful for screen-recording or sharing.

Tools I don’t use because I have alternatives:

Tools I don’t use because I don’t have a need:

  • Awake disables sleep for long-running tasks. But that’s my default setting anyway.
  • Command Not Found suggests a winget package for missing commands. But I don’t use PowerShell.
  • FancyZones creates window layouts. But I find Windows’ default window snapping enough.
  • Workspaces creates pre-defined window layouts. But I find Windows’ default window snapping enough.
  • File Explorer Add-ons preview SVG, MD, PDF, etc. But I don’t use previews.
  • Peek previews files. But I don’t use previews.
  • New+ creates files or folders from templates. But I use VS Code, mostly.
  • Quick Accent lets you type accented characters. But I usually don’t type them.
  • Registry Preview simplifies editing the registry. But I usually don’t.
  • Screen Ruler measures pixels on the screen. But I usually don’t.

Windows PowerToys is my new favorite tool Read More »

Introducing Students to AI Evaluators

In my Tools in Data Science course at IITM, I’m introducing a project that will be evaluated by an LLM.

Here’s the work-in-progress draft of the project. It will eventually appear here.

Your task is to:

  1. Write a Python script that uses an LLM to analyze, visualize, and narrate a story from a dataset.
  2. Convince an LLM that your script and output are of high quality.

The second point is the interesting one. Using the LLM as the evaluator.

Why are you doing this? There are over 1,000 students in each term. Manual evaluation is not an option. Multiple choice questions are guessable. Programmatic evaluation takes effort to modify each time. LLMs seem like a good way to get intelligent evaluations with manageable effort.

Will students accept it? My guess is yes. The whole objective of the project is to convince the LLM. It’s not evaluating you. You’re tricking it into giving you marks. Sort of like getting an LLM to say Yes. A lot of educational and corporate evaluations will soon be done by LLMs. I may as well teach students how to game the system early.

What if it makes mistakes? I hope it will and we’ll learn from it. The students will have the opportunity to test out (and get used to) the randomness in subjective evaluations. I’ll have the opportunity to learn how to reduce these mistakes next time.

What else will YOU learn? I’m very curious about a whole bunch of things.

  1. How will students prompt it? What analysis will they apply before passing data to an LLM? Will they ask open-ended or guided questions?
  2. How will they orchestrate the flow? Will they use a linear flow or non-linear? Will it be deterministic or not?
  3. How will they hack it? LLMs are very amenable to prompt injection. How will the students try and break out of my prompts?
  4. How will LLMs react to all this? Where will they do a good job? Where will they fail? Which LLMs would work well in which case?

Since the code (and analysis) will be published on GitHub, I’ll share the links. It might prove an interesting dataset in itself for future analysis.

Introducing Students to AI Evaluators Read More »

ChatGPT Beat me at Pictionary

Me: Let’s play pictionary. You draw. I’ll guess.

ChatGPT: Sure! I’ll draw something for you. Give me a moment.

A simple drawing of a recognizable object, like a house, a tree, or a balloon, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple.
A simple drawing of a recognizable object, like a house, a tree, or a balloon, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple.

ChatGPT: Here you go! What do you think it is?

Me: House

ChatGPT: Got it in one! Your turn to guess. Ready for another?

Me: Yes

A simple drawing of a recognizable object, like a boat, a car, or a kite, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple.
A simple drawing of a recognizable object, like a boat, a car, or a kite, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple.

ChatGPT: What do you think this one is?

Me: Boat

ChatGPT: Correct again! You’re on fire. Want to guess another?

Me: Yes

A simple drawing of a recognizable object, like a sun, a cloud, or a tree, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple.
A simple drawing of a recognizable object, like a sun, a cloud, or a tree, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple.

ChatGPT: Here’s the next one. What’s your guess?

Me: Tree

ChatGPT: Exactly! You’re unstoppable. Ready for more?

Me: Make it harder

A simple drawing of a recognizable object, like a boat, a car, or a kite, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple.
A simple drawing of a recognizable object, like a boat, a car, or a kite, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple.

ChatGPT: What do you think this one is?

Me: Windmill

ChatGPT: Got it! You’re too good at this. Want an even trickier one?

Me: Yes

A simple drawing of an uncommon but recognizable object, like a unicycle, a lighthouse, or a teapot, in a cartoonish style. The object should be detailed enough to identify but still minimalistic with minimal background.
A simple drawing of an uncommon but recognizable object, like a unicycle, a lighthouse, or a teapot, in a cartoonish style. The object should be detailed enough to identify but still minimalistic with minimal background.

ChatGPT: Alright, here’s a tougher one. What’s your guess?

Me: Teapot

ChatGPT: Nailed it again! You’re practically a Pictionary pro. Want me to up the difficulty even more?

Me: Yes

A simple drawing of a very uncommon object, like an antique key, a gramophone, or a sundial, in a cartoonish style. The object should still be recognizable but with intricate details to make it challenging. Minimal background elements.

ChatGPT: Here’s a tricky one. What do you think it is?

Me: Gramophone

ChatGPT: Spot on! You’re unstoppable. Ready for the ultimate challenge?

Me: Yes

A simple drawing of an extremely rare and challenging object to guess, like a sextant, an astrolabe, or a vintage typewriter, in a cartoonish style. The object should be detailed enough to be identifiable but still maintain simplicity. Minimal background elements to keep focus on the object.

ChatGPT: Here’s the ultimate challenge. What’s your guess?

Me: Sextant

ChatGPT: Bullseye! You’ve officially conquered Pictionary. Want to keep going or try a new game?

Me: Make it harder.

A simple drawing of an extremely rare and challenging object to guess, like a sextant, an astrolabe, or a vintage typewriter, in a cartoonish style. The object should be detailed enough to be identifiable but still maintain simplicity. Minimal background elements to keep focus on the object.
A simple drawing of an extremely rare and challenging object to guess, like a sextant, an astrolabe, or a vintage typewriter, in a cartoonish style. The object should be detailed enough to be identifiable but still maintain simplicity. Minimal background elements to keep focus on the object.

ChatGPT: Here’s the next level of difficulty. What do you think it is?

Me: Compass?

ChatGPT: Close, but not quite. Try again!

Me: No idea

See the original conversation (including the answer).


In my own, small, way, I now know how Garry Kasparov felt.


What’s interesting is the progression of prompts it gives Dall-E to generate the images.

It begins with “A simple drawing of a recognizable object, like a house, a tree, or a balloon, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple.” — which were guessable.

When I asked it to make it harder, it didn’t do so immediately. It just asked for “A simple drawing of a recognizable object, like a boat, a car, or a kite, in a cartoonish style. The object should be clear and easy to guess. Minimal background details to keep it simple” — which was guessable too.

But after one round, it took the initiative to as, “Want an even tricker one?” and prompted “A simple drawing of an uncommon but recognizable object, like a unicycle, a lighthouse, or a teapot, in a cartoonish style. The object should be detailed enough to identify but still minimalistic with minimal background.” Was it waiting one round to see if I really wanted a harder version?

Then it asked, “Want me to up the difficulty even more?” before prompting, “A simple drawing of a very uncommon object, like an antique key, a gramophone, or a sundial, in a cartoonish style. The object should still be recognizable but with intricate details to make it challenging. Minimal background elements.”

When I asked it to “Make it harder” again, it went on directly to “A simple drawing of an extremely rare and challenging object to guess, like a sextant, an astrolabe, or a vintage typewriter, in a cartoonish style. The object should be detailed enough to be identifiable but still maintain simplicity. Minimal background elements to keep focus on the object.” and then “A cartoonish drawing of an abstract or rare object, like an ancient navigational device, a peculiar scientific instrument, or a mythical artifact, with intricate yet recognizable features. Minimal background elements to keep the focus on the object.”

That defeated me.

ChatGPT Beat me at Pictionary Read More »

Should courses be hard or easy?

Here’s a post I shared with the students of my Tools in Data Science course at IITM. This was in response to a student posting that:

The design of TDS course lecture videos are designed in such a way that it could be understood only by the data scientists not by the students like me who are entirely new to the field of data science. Though I have gone through 6 weeks of course lecture videos, I am not fully aware of the usage of ChromeDevTools, Bash, Github etc….


IITM Term 1: German. In my first term at IIT Madras (1992), I took German 1 with Prof D Subramanian.

The first words D.Subs said when he entered the room were, “Wer sind Sie?”

I had no clue what he was talking about. Nor did the others. After individually asking about a dozen students, Ashok Krishna replied, “Ich bin Ashok.” (He knew German.)

The rest of the term proceeded in the same vein. He threw us in the deep end, spoke only German, and I ended up with a “D” and learning very little German. Ashok Krishna thrived in that course.

IITM Term 2: German. In took German 2 with Mrs Schindler in the next term. The experience was very different. She explained each word. She had us listen to tapes in German. It was very relaxed.

I ended up with a “B” and learning very little German. (I’m not good with human languages.) But many others enjoyed it.

Which is better? I’m not sure. I think gentle courses are good for beginners and tough ones for advanced student, but classes usually have a mix of both. Aptitude and interest help, too.

IITM Term 1: Physics. Prof. PC Deshmukh handled our first physics course. (He was the one responsible for renaming Mardi Gras “Saarang”.) Our class felt the exams were too tough. My friend Badri and I explained this to him. “Well, you two should be lobbying for even tougher exams,” PCD said. “That’ll benefit smarter guys like you more.”

IIMB Term 1: Statistics. My classmate Athreya was a class representative for statistics (a tough subject.) Going against tradition, he lobbied for a tougher test. He was almost lynched afterwards.

Which is better? I’m not sure. An easy exam is good for student grades and morale. A tough exam is good for college reputation and advanced students. Classes usually need both.


In short, I have no clue.

Students who take this course learn several topics 3 months.

Faculty like me haven’t managed to learn how to calibrate course content or exams even after 3 years.

But, I’m learning. Thanks to you.

So please keep the feedback coming. We’ll keep improving. And thanks for putting up with us!

Should courses be hard or easy? Read More »

Recrafting Comicgen

About 7 years ago, Richie Lionell and Ramya Mylavarapu and a few others created Comicgen – an automated comic generation app personified by Dee and Dey.

Ever since, we’d been exploring whether AI could replace it, and help non-designers draw comics.

Today, that became a reality for me with Recraft.ai.

Here is a picture of the original Dee.

And a picture of the Dee crafted by Recraft.

The prompt was:

A simple line drawing of a woman with curly hair, wearing glasses, a short-sleeved white t-shirt, and black trousers. She’s standing with her hands in her pockets, and has a slightly smiling expression. Her hair is quite voluminous and textured. The style is cartoonish and slightly sketchy, with uneven lines”

(The prompt itself was generated by Gemini 1.5 Flash by passing it the original Dee’s picture.)

We are finally at the stage where comic generation is truly available for the masses – at 8 cents via the API.

Recrafting Comicgen Read More »

How to recruit based on IIT JEE Rank vs GPA

Preserving this post by Daniel George showing the IIT Bombay 2014 GPA vs JEE Rank on a log scale.

What I found interesting was:

  • A higher JEE rank generally means you won’t score too low, but you needn’t score too high.
  • The higher the JEE rank, the greater the spread of GPA.
  • A high GPA can come from any rank (8+ GPA is uniformly distributed across ranks), but a low GPA is generally only from the lower rankers (6- GPA is mostly from 500+ rank.)

So, it’s better to recruit based on GPA rather than JEE rank, unless you’re going after the very best students (where it makes less difference.)

    How to recruit based on IIT JEE Rank vs GPA Read More »

    Leaning into the power of AI coding

    Yesterday (15 Oct 2024), I used Cursor to code more than I ever have. (Doing’s how we learn, I guess. Not just reading.)

    DateUsage0510202415061020242707102024870810202416091020241010202442111020242412102024571310202415141020242815102024186

    This was mainly to create and publish 2 libraries on npm over 6 hours:

    1. asyncsse – which converts a Server-Sent Event stream into an async iterator that I can use in a for await … of loop
    2. asyncllm – which standardizes the Server-Sent Events streamed by the popular LLMs into an easy to use form.

    This exercise broke several mental barriers for me.

    Writing in a new language. Deno 2.0 was released recently. I was impressed by the compatibility with npm packages. Plus, it’s a single EXE download that includes a linter, tester, formatter, etc. Like all recent cool fast tools, it’s written in Rust. So I decided to use it for testing. Running deno test runs the entire test suite. My prompts included asking it to:

    • Create a Deno HTTP server to mock requests for the tests. This is cool because a single, simple code chunk runs the server within the test suite.
    • Serve static files from samples/ to move my tests into files

    Writing test cases. Every line of this code was written by Cursor via Claude 3.5 Sonnet. Every line. My prompt was, Look at the code in @index.js and write test cases for scenarios not yet covered. It’s surprising how much of the SSE spec it already knew, and anticipated edge cases like:

    • SSE values might have a colon. I learnt for the first time that the limit parameter in String.split() is very different from Python’s str.split. (The splits, then picks the first few, ignoring the rest. Python ensures the rest is packed into the last split.) This helped me find a major bug.
    • SSE has comments. Empty keys are treated as strings. Didn’t know this.

    I was able to use it to generate test cases based on content as well. Based on @index.js and @openai.txt write a test case that verifies the functionality created the entire test case for OpenAI responses. (I did have to edit it because LLMs don’t count very well, but it was minimal.)

    Bridging test coverage gaps. The prompt that gave me the most delightful result was Are there any scenarios in @index.js not tested by @test.js? It did a great job of highlighting that I hadn’t covered Groq, Azure, or CloudFlare AI workers (though they were mentioned in the comments), error handling, empty/null values in some cases, tested for multiple tool calls. I had it generate mock test data for some of these and added the tests.

    Enhancing knowledge with references. I passed Cursor the SSE documentation via @https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events and asked it to find more scenarios my code at @index.js had not covered. This found a number of new issues.

    Generating bindings. I avoid TypeScript because I don’t know it. Plus, it requires an compilation step for the browser. But TypeScript bindings are helpful. So I prompted Cursor, using the Composer (which can create new files) to Create TypeScript bindings for @index.js in index.d.ts – which id did almost perfectly.

    Check for errors. I typed Check this file for errors on @index.d.ts. I don’t know enough to figure this out. It went through the description and said everything seems fine. But I saw a TypeScript plugin error that said, Property 'data' of type 'string | undefined' is not assignable to 'string' index type 'string'.ts(2411). When prompted, it spotted the issue. (The earlier code assumed all properties are strings. But some can be undefined too. It fixed it.)

    Documentation. At first, I asked the Composer to Create a README.md suitable for a world-class professional open source npm package and it did a pretty good job. I just needed to update the repository name. I further prompted it to Modify README based on @index.js and share examples from @test.js on asyncllm, which did an excellent job.

    Code review. I asked it to Review this code. Suggest possible improvements for simplicity, future-proofing, robustness, and efficiency and it shared a few very effective improvements.

    1. Regex lookaheads for efficient regular expression splitting, i.e. use buffer.split(/(?=\r?\n\r?\n)/) instead of buffer.split(/(\r?\n\r?\n)/) — and though I haven’t tested this, it looked cool.
    2. Restructuring complex if-else code into elegant parsers that made my code a lot more modular.
    3. Error handling. It added try {} catch {} blocks at a few places that helped catch errors that I don’t anticipate but don’t hurt.

    Code simplification. Several times, I passed it a code snippet, saying just Simplify. Here’s an example:

    const events = [];
    for await (const event of asyncLLM(...)) {
      events.push(event);
    }

    This can be simplified to

    const events = await Array.fromAsync(asyncLLM(...))

    Packaging. I copied a package.json from an earlier file and asked it to Modify package.json, notable keywords and files and scripts based on @index.js which it did a perfect job of.

    Blogging. I wrote this blog post with the help of the chat history on Cursor. Normally, such blog posts take me 3-4 hours. This one took 45 minutes. I just had to pick and choose from history. (I lost a few because I renamed directories. I’ll be careful not to do that going forward.)


    Overall, it was a day of great learning. Not in the classroom sense of “Here’s something I didn’t know before”, but rather the cycling / swimming sense of “Here’s something I now know to do.”

    Leaning into the power of AI coding Read More »