Bear with me. This will piss some tech folks off. It'll likely be seen as god damn coder heresy, to many.
AI dev tools are fucking impressive.
For context: I've been a software engineer for just shy over 30 years now (yes, ok, I'm including my 5 year stint as a manager in there as well). I'm not to claim that I'm an "S" tier developer—though I've had the fortune to get to know several and work with a small handful over the years. These people helped me to get to what is maybe an "A" class.
I say this to attempt to establish my bonafides before I go further.
I've been test driving Cursor, a VS Code-based editor + SaaS that taps into several different LLMs across many different vendors.
As of about a month ago, I'd never touched Swift in my life.
Over the past several weeks, working only with ChatGPT XCode integration, one file at a time, I slowly built out a prototype of an iOS app that works. It wasn't built according to Apple HID guidelines and tips. And ChatGPT XCode integration is only able to see and edit a single file at a time (a massive limitation). I have a deep background in imperative languages both strongly (C, Java back when it was so painful to work in—'96 through '04) and loosely typed (so very very much Ruby).
And then, late last week, I started trying Cusor.
Today, I had Cursor modify the UI to adhere to Apple's design tips (https://developer.apple.com/design/tips/).
Holy. Fucking. Shit.
My app went from looking serviceable to something resembling a real
iOS app in the period of a few minutes.
Sometimes, AI's code factoring leaves something to be desired, certainly. It'll do some squirrelly shit.
That's fine. I treat it like it's a junior developer. I ask it to do the tasks that I would either bore me to tears or would cause this ADHD brain to introduce all sorts of stupid bugs by way of typos and the low dopamine of necessary tedium.
**And then code review the F out of its work**
I ask for specific refactors. And the refactors look pretty damn good.
Even still being a Swift nooblet (I'll freely admit it), I know plenty about programming languages in general (and am learning Swift by example here quickly enough) that I can see opportunities to DRY, to reduce ceremony, and to express intent more clearly.
For instance, today, I saw 3 structs that were being used similarly and with essentially duplicative code. Blech. In Java, I would've used a shared Interface and passed the objects around that way. I forgot my Objective-C, learned over a decade ago, from writing a Pivotal Tracker iPad app. What I needed was a Protocol. I told Cursor what I wanted, to treat the structs in a polymorphic-ish way, so that I could DRY the code, have my One Method to handle them (thankfully, no special casing to care about here so nice and cleanly too). It immediately said, "Oh, I need a Protocol", wrote one, wrote the method, modified the UI accordingly and wham, bam, thank you, ma'am, refactored UI code that deleted lines.
Yes, the AI did this. Yes, I guided it from a place of experience.
Bitch about how clueless LLMs are about our work. Sure, unlike Junior Devs, you can't teach an LLM more than its already capable of (and that is part of the fun of working with Juniors—watching those lightbulbs turn on and having them rock your world when they see something that you can't because of all of your earned biases). However, the LLMs out now? They make pretty darn good pair programmers, if you give them half a chance.
And Cursor is pretty f'ing impressive. And it is one of the earliest arrivals.
We live in interesting times...