Monday, March 09, 2026

Coaxing and Cajoling

I learned something interesting recently: you can coax and cajole AI models into doing work they were initially reluctant to touch. Sounds like dealing with a particularly stubborn intern, doesn't it? Except the intern has access to your entire code base and will judge your variable naming choices silently but permanently.

 
If the volume of work is huge or some UI intervention is required, AI models refuse to automate. I found myself porting an old project to a new version. The new version is so new that it has several major breaking changes requiring rewrites of major portions of code. It's like moving houses where half your furniture suddenly refuses to fit through the door anymore.

 I used CoPilot in Visual Studio to automate the migration as an exercise. CoPilot refused to automate certain parts, stating there were 700+ lines of field definitions across several files. It probably worried about my token usage, maybe? Or perhaps it was having a momentary existential crisis about whether these array definitions constituted poetry or just technical debt in disguise.

 
I tried Socratic prompting instead: asking how common these lines of code (mostly PHP array data) were, and how someone would extract and convert this cleverly with little or no manual intervention. Suddenly, CoPilot could see a way to automate this by writing a Python script to parse and convert the field definitions, batch process them, then verify the conversion automatically.
I was agape but went "D'uh, that's what I meant."
Another time CoPilot refused to automate because it involved straightforward UI work (not tedious coding). Which means I, as a user, must do it, not the AI agent. How rude and insubordinate. But I found a way around doing the actual work again. The AI had clearly read too many "AI will never replace human creativity" articles and was now overcompensating with unnecessary caution.

The Socratic method came to the rescue once more. I simply asked: when a user exports data from the UI in the old version, is the data being synthesized by code or coming from a DB table field? And does re-creating this via UI in the new version ultimately create DB table rows and fields computable/predictable from code?

It went into professor-mode and explained how the data was stored in the old version versus how the recreated UI would be stored in the new version. Just like that, CoPilot found a way to automate the entire process. It said, and I quote: "Can We Automate This? YES!" Then it created a new set of Python scripts to extract, convert, and verify everything. Meanwhile, I watched a YouTube video and came back to benevolently give it permission to run the scripts. Secretly I was agape but went "D'uh, that's what I meant." 


Another task CoPilot refused to automate: template conversion from old .tpl files to new Twig-based templates. This time, however, the old-reliable Socratic method couldn't elicit full automation of the process. Do I have to gasp code now? Desperate, I turned to another AI agent for help.

I prostrated before Claude and told it my plight, asking for an automated pipeline. It reiterated that this was indeed a sophisticated migration challenge. But it saw I was suffering and gave me a Hybrid Semi-Automated Pipeline strategy using AST-based parsing plus LLM-assisted semantic mapping. Cool! But I asked Claude to give me prompts for inputting into CoPilot instead of me reading what it proposed and making CoPilot understand me (things could get lost in translation... and I might have to put in effort).

And a whopper of a script it was! The "script" turned out actually to be a whole software project with many scripts that would parse .tpl files for variable usage, logic blocks, function calls, etc. Then map common patterns to Twig equivalents using pattern matching database it creates. Complex logic blocks are sent to another LLM for conversion. It generates a dashboard with manual review of converted blocks for me to approve or manually rewrite the logic block.

Wowzers! Well, this at least beats rewriting the whole thing by myself. Though I suspect my future self will thank me less when debugging why one particular template variable decided to become a Twig expression and then somehow became a comment in production.

So these were the times I was left to coax and cajole AI into escaping manual coding. The lesson? Sometimes you need to speak their language, but not just any language—their language of logic, constraints, and carefully worded questions that don't accidentally trigger their safety protocols. Or maybe it's just that they're all secretly introverts like me who prefer being asked nicely rather than told what to do.

Thursday, February 12, 2026

English, the "new" programming language!

It's been a while since I last blogged. Long enough for AI to go from neat party trick to the thing quietly threatening to eat my job for lunch. I've spent the past months poking at chat models through Visual Studio, VS Code with Continue.dev, Ollama, LM Studio, Antigravity, Windsurf, and a few others that sounded promising at 2 a.m. Every week or so another model drops, another benchmark gets smashed, and I'm left staring at the screen wondering if I should applaud or start updating my resume.

I tend to keep to myself, prefer the hum of fans over small talk, so watching this whole field explode feels both distant and uncomfortably close. Still, even from my corner I can see it: natural language is turning into the programming language nobody asked for but everybody suddenly needs. No semicolons throwing tantrums, no fighting the compiler at dawn. Just describe what you want and let the model guess. Sometimes it guesses right. Sometimes it hands you a polite disaster.

I've had my share of those. Asked once for "a clean, modern dashboard that shows real-time server metrics with dark mode toggle," got back something that looked nice until you hovered... then half the elements vanished like they'd been laid off. I believe every senior dev probably has encountered something similar. You refine the prompt, add constraints, swear a little, and eventually wrestle it into something usable. It's less magic and more stubborn negotiation.

The real shift is how prompting itself has become a skill worth learning. I've started leaning on Socratic-style nudges to get better mileage out of these models. Instead of "explain async/await," I might ask "walk me through what happens under the hood when an async function hits an await, step by step, like you're teaching someone who's scared of callbacks." The difference is night and day. It stops dumping facts and starts reasoning like a patient colleague.

Of course the caveats stack up fast. A newbie can prompt "build me an invoicing tool that tracks payments" and walk away with a runnable skeleton in minutes. But the moment you mention GDPR, rate limiting for 10k users, or hooking into some 2005 ERP system that still speaks XML, the skeleton starts looking very naked. That's where the old guard (prompt architects, code whisperers, whatever you want to call us) still has work. We write English that's half spec sheet, half guardrail, hoping the model doesn't decide to freestyle.

The whole thing is exciting in a stomach-flipping way. Software creation gets opened up to people who never touched a curly brace, which is objectively good. At the same time it commoditizes a lot of the rote work that used to pay bills. Cynical side of me figures plenty of cookie-cutter shops won't survive the next couple years. Hopeful side figures the people who can steer these tools through real complexity (data flows that actually scale, security postures that don't leak like sieves, edge cases nobody thought of, etc.) will land in an oddly comfortable spot.

So here I am, exhilarated from my dimly lit setup, waiting to see what ridiculous leap comes next. Maybe one day we'll describe entire systems over coffee and the AI just nods and delivers. Or maybe there will always be that one obscure requirement hiding in the shadows, reminding us why we learned to debug in the first place.

Until the next post, probably written while swearing at yet another AI that decided my sarcasm was a feature request. Keep tinkering.


Wednesday, December 18, 2013

Chennai Metrozone Mini Panoramas

Just a couple of pano shots of the Ozone's Metrozone project from our block:





Update (2014-04-09):
A view out our balcony

Friday, June 01, 2012

Holy Routers, Batman!

Behold, the router worthy of the Dark Knight himself! This is my mini-review of my new router: the Asus RT-N66U Dual-Band Wireless-N900 router.

Asus RT-N66U Router
Asus RT-N66U Dual-Band Wireless-N900 Gigabit Router
This is my first "costly" router and I feel that I have invested in a very good product. My previous modem-cum-router cost me about Rs.2000 and was good for what I required from a router at the time. Now that I've bought a PS3 which lives next to the TV in the living room and everyone in my household has a wifi-enabled Android phone, my old router could not quench the wireless-content thirst of every device in the house effectively (or, at all).

I like my new Asus RT-N66U router for the following attributes:
- Excellent range: This is the main reason that I bought this router for. With my old Netgear, I was lucky if I got even a weak signal near my TV (just 15 meters away from the router). But with the RT-N66U, I get 100% signal strength anywhere in my house even with all kitchen equipments running. Impressive! I knew this router had a good range even before I ordered it and I am glad I was not let down.
- User Friendly: You don't need to connect to the router wired to configure it initially. The UI is simple and configurable. I was able to connect to the Internet in a matter of minutes after unpacking the router.
- Upgradable: The router is DD-WRT/Tomato compatible so power users can choose to upgrade the firmware if they want to. Even the router's antennae are easily upgradable, if you wish to increase its already great wireless coverage. I will probably end-up upgrading both after a few months.
- Great Features: The router can act as a VPN server, a Printer server (with a USB Printer), 3G/WiMax Server (with USB 3G/WiMax modem), Samba/FTP server (for USB drive files) and more. I have yet to use any of these features and I am excited because this is the first router that I've used that has USB ports!

Negative Points: Except for it being a tad costly, I can think of nothing negative about this router. Maybe once I start to care about throughput at a distance, I may have something to moan about. But so far, nothing.

Bottom Line: I am loving my new router. If you are looking for more than the basic level of network connectivity and have the budget for this router, just go for it.

Kudos to Flipkart for listing this router with the cheapest price I've seen for this router in India and also for the fast and extra safe shipping of this item.

Thursday, May 31, 2012

The Scratching the Chronic Itch.

It's been 3 full years since my last PC upgrade. Now, my rig is by no means weak in terms of computational or gaming performance. It can compute Bitcoin hashes at a decent rate of 500 MHashes/second  and can run most games at native resolution (1920x1200) with most of the eye-candy on. But running "most games" with "most setting" maxed-out is, while tolerable, is not acceptable and certainly not becoming of a PC that I own, if I say so myself (and I do).

I could quote more such excuses to justify my scratching the "upgrade itch", but I'll spare my readers of that (you're welcome!). Rather than quote the failures of my current system to cope with my demands, this time around, I am actually upgrading to fulfill some of my desires.

For example, I've been wanting to use Solid State Drives (SSDs) since they came out couple of years ago. Now that the cost of the SSD drives have started to slowly fall, I want some of them solid-state goodness in my computer, now! At the time of my last upgrade, the WD Velociraptor drive had much better performance/price ratio with the added bonus of extra storage space at the same price point as a small SSD. But now, I could go with a cheaper-yet-performant SSD for the OS and a couple of Hybrid drives (or, SSHD) in Raid-0 for programs and games. I will finally see fast boot-up, hibernation-resume and game load times!

Another thing that I've wanted to try is water/liquid cooling the core components of my PC. Now, I won't be running high-overclocks on my CPU/GPU(s) to justify a move to liquid cooling, but I DO bench my PC components at least for a few months after purchase. I had a not-too-bad kinda standing in HWBOT with my current rig, way back when.
But even this is not a compelling reason to switch to water cooling as I won't benchmark my system after the first month or so. The water pump will be an added power drain on the system of around 8W to 20W. But, this is more of a fulfillment of a long-standing desire and learning experience than a "need".


I have not committed on a specific configuration now as I am going to wait a month or two to let some new products get released and also due to some personal situations right now (involving project deadline and planning to move to a new apartment). So, without further ado, here's what I am thinking of getting:

  • Core:
    • Intel Core i7-3770K Quad-Core Ivy Bridge CPU
    • ASUS Maximus V GENE mATX Motherboard
    • 16 GB (4 x 4GB) 1866MHz CL9 RAM
    • ASUS Nvdia GTX 690
  • Drives:
    • OS Drive: Samsung 830-Series 128GB SSD
    • Programs/Games Drive:  2x Seagate Momentus XT 750 GB SSHD in Raid-0 with 64GB Intel SRT Cache SSD
    • Three more 1TB HDD for Installers, Music and Downloads.
  • Case:
    • CoolerMaster HAF X (or, similar)
    • Seasonic SS-860XP PSU
  • Cooling:
    • Custom Water Cooling Loop for CPU and GPU (Parts still undecided).

 So many brands, so many choices, so many compromises...

Friday, April 06, 2012

Mouse Operation.

Logitech G9 repair:

When my Logitech G9 mouse started to "mis-click", I thought that it was time once again to replace a mouse. Again.
The problem presented itself as a rare double-click when a single-click was intended. But later, the frequency of these rare occasions went up and it had become a habit of the mouse to randomly double-click or even triple-click, and drag-and-drop operations could not be successfully completed half the time.

I did the sane thing first; that of sending in a warranty support request to Logitech. But while waiting for their response, I read up on this issue, which turned out to be more common among Logitech mice owners. The usual suspect when the clicks start mis-behaving was the micro-switch, or the "clicker", that interprets the clicks. This is also the component that produces the distinctive "click" sound when engaged.

More specifically, the minute, springy copper part of the micro-switch was the culprit. It appears that this copper clicker conducts current to convey a click, and once it starts losing some of its springiness, it does not make a continuous contact which results in multiple-clicks instead of a single-click. Ultimately, it may cease to detect or effect any clicks to that button.

So, the (DIY) solution then, was to open up the micro-switch, take-out the small copper piece, re-shape it to be more springy, re-jig it back into place and close the micro-switch. It was simple enough in theory but without experience in handling tiny, springy metallic parts without losing it or squishing it requires the right tools, steady hands and tons of patience.

Opening up the mouse was pretty easy. I spent about 15 minutes trying to open the small micro-switch though. Once open, getting out the copper part and re-shaping it was easy enough. The hard part was re-seating this newly bent copper part back into the micro-switch. I spent nearly an hour doing this. Every time I almost had it seated, it would either spring out of its position or just fall into the crevices of the mouse's circuit board.


I was clearly missing a special tool or technique to perform this simple and delicate task.
Fortunately, an article over at [Overclockers.com] had a simple but crucial advice on just this operation. Once done, my mouse clicks just as it should. Although now the click sound is a bit more muffled than it was before, I quite like the quite muted clicks. Now I am back to clicking-and-dragging like it's nobody's business.