Man. I guess nearly every dev who also blogs a bit is tempted to make an entry that could be titled "my AI journey so far"
So, the backstory: My sweetie Lynette has a holiday card list of around 180 cards to send, and she asked me to help with getting her spreadsheet onto mailing labels - specifically onto a pack of Avery 5660 Matte Clear. The challenge is you need to carefully align the addresses merged from columns of the spreadsheet onto the 30-per-sheet layout.
So Google sheets has some plugins available, but really they want you to pay $30 or $99 for a lifelong license. But even more troublingly, each plugin asks for SO MANY PERMISSIONS to possibly pwn all your Google docs and sheets. Avery seems to offer some kind of software design product for laying out labels, but besides needing an account, its learning curve was weirdly high.
At Lynette's suggestion I actually asked ChatGPT to take a swing at it, pasting in the PNG template and the raw data, and it got in the ballpark, but not quite enough.
So, right now I feel like there are 3 main dev<=>ai interaction modes: plain old browser window chat (and I've made some successful one off programs there with ChatGPT), VS Code integration which gives the system an easier view of more of your files and better ability to work inline, and then the terminal-based approach of Claude.
I had just recently decided to take a gamble with Pro-level Claude, and this seemed like a good project for it. Short story long, Avery 5660 Spreadsheet => Address Label Generator is the result, a two-page webapp. You copy and paste your whole spreadsheet in, pick the columns for the four lines of each label, and then you can page through each printable page (PROTIP: print these one at a time and grab them from the printer before they smudge!)
Claude did astonishingly well on some parts (especially the CSS for the print media version of the page, and then auto-shrinking font-size for address that were overrunning the labels) but was surprisingly challenged by other pieces. It really reminded me of stories where like, ten years ago, some sneaky go-getter would be overemployed with a few jobs and outsource it to cheap offshore techies - it can be amazingly productive, and may even come up with some parts a regular dev would struggle with, but there's often still a "Junior Engineer" base you have to build on to get to professional quality stuff.
Some specific challenges: my first draft had a hardcoded version of the copy-pasted data as a separate file, and then I asked Claude to run things from a textarea. And the setup page did so, but after a while I realized it was cheating and using the static data for all the other pages.
Also it had the hardest time correcting some hangups because copy and paste from Google Sheets leads to tab delimited data but in a CSV-kinda way, where some content may include line breaks, so long as the field entry is encased in double quotes. I had it iterate several times before finally having to architect the solution (making sure on javascript paste it corrected the content, and then used that content for all subsequent pages)
It could be I'm just naive at working with Claude, and better prompting could have saved me some hassle.
But man, it really changes the equation of what a lone wolf dev has to think about. Over the past decades I developed my own simple, very robust style, and would touch every bit of code, even if I sometimes had to refresh my memory when I came back to it years later. But Claude? It's a bit more like working on a team, and I'm still the PO and QA. (I think the question becomes, how much of an architect I will still have to be as well.) And it really behooves me to up my personal automated testing game; dev testing might not be quite enough because of the shenanigans these bots can get up to.
I think AI slots in pretty well with my "KISS" stack of evergreen, buildless, old school serverside languages and vanilla-ish javascript on a VPN - it's enormously gratifying to be able to popup a new web service without having a new business relationship, and one that will be here a decade from now. But obviously, the landscape for devs is changing greatly, and you have to learn to surf this wave or get swamped.
No comments:
Post a Comment