Keeping the Enemy Close

Disclaimer:

I don’t think AI is a good thing in many, many ways that have been thoroughly discussed. The people behind it are very bad people. The intellectual theft, climate impacts and concentrations of resources and wealth it is attempting to bring about are enough to disqualify it from the start.

Personally, I don’t want to watch a machine do my work. 

With that out of the way, I spent the past week dipping my toes into the AI waters to at least be familiar with what is possible for app development and Xcode.

I had some away from desk chores that could not be put off so I figured let’s see if this shit can get something done while I’m busy.

I will admit to being only a novice here and my setup is far from optimal. Still, it’s what I am comfortable using as a test. I do not want to pay for a service. I already barely make any money on my work so running a deficit to do so is a non-starter.

Further, I don’t trust any of the providers not to use every line of code I’ve created to feed their machines and spit out in someone else's project. I’m not naive enough to think I write great, never seen before, code but I am opposed to what amounts to theft of intellectual property, regardless of whether you have agreed to the theft in some terms of service you don’t even read.

My number one reason for avoiding AI and agentic coding is I enjoy coding. I want to do it. I love to push the boundaries of my knowledge, learn new things and solve hard problems. I completely understand the thinking of others who don’t know or enjoy development and just want to scratch some personal itch or make some money. I suspect some of that later people are not the sorts I want to have a beer with but (mostly) no judgement.

Process:

To work around some of my trepidations, I installed a local model (the latest Qwen) via Bionic/LMStudio. This is definitely impacting the speed of the results I’m getting but I am willing to live with that for this experiment. At first I just used the Bionic chat interface to query it on my code and how to do things in Swift.

It gave me answers.

They weren’t always correct answers but they were generally a way to answer the question posed. The results often took a hell of a lot longer than a knowledgeable developer would to come up with a solution. Again, I know my setup is less than optimal.

Once I got this much working I wanted to see what Apple’s Xcode integration was like. I began with the chat based interface. Again, I got answers. The things I tried were very small such as allowing it to fix issues the compiler identified. A few solutions were fine. A few solutions were, to my mind, not optimal but even those did show where the problem was and let me tailor my own fixes.  

Even the bad answers did help me reason out a solutions. But many of us know what rubber ducking is so is this more than just thinking/talking it out?

I asked the chat to do code review and it did. It identified some things worth looking into and some things that probably didn’t matter or were a matter of opinion.

All along Xcode was reminding me that the new hotness was agentic coding and I really should use that. Here too, I think my local setup is limited in how “agentic" I can get but if I want to understand the possibilities I figured I should give it a try.

I looked into how to connect my Bionic setup as an ACP (Agent Client Protocol) server. I didn’t see a way to do it directly in Bionic. There may be a way but I missed it. The suggestions I found, remembering I wanted to stay local, were Goose and OpenCode among a few others.

I then configured Goose to act as an intermediary to the Qwen instance in Bionic. Yes Goose and OpenCode could do the Qwen part themselves but I had it running and didn’t want to backtrack.

After a few fits and starts I did get Xcode talking to Goose and able to use the new agentic hotness.

It wasn’t great.

Most tasks would fail and it was taking the seriously long route to answers. It had a hard time accessing shell commands and was not making any use of the Xcode tools Apple provides to assist with agents.

I did more research (did I mention I needed to tend to other, real world, chores?)

My issues were probably not Goose’s fault but still I decided to see how OpenCode handled things. At first it was basically the same. Eventually I did figure out how to configure OpenCode to use Apple agents for Xcode and to more reliably have shell access.

At this point I was having more success with smaller tasks. Usually I got answers. The validity of the answers is a another topic.

However I was still getting a lot of failed responses. I assumed it was the size of the context I was configuring with Qwen. After some trial and error I settled on a context size and a few other tweaks that seemed to allow most requests to work.

For the record ,I’m doing all this on a MacBook Pro M2 max with 64gb of ram.

I was then able to get most things I asked to at least provide a response. 

Observations:

At this point it reminded me a lot of being a kid and seeing what I could make my Commodore 64 do. Yes, I’m that old. It was fun in that geeky way many of us discovered and became our gateway to all things computer. I believe for many it’s this sense of excitement playing with some new technology that is a gateway here.

It is impressive.

But was it useful or helpful?

I asked it to adjust some UI and it did.

I asked it to fix a bug I had found and it did.

I asked it to write unit tests. It did, eventually.

It did not always succeed.

I asked it to add a more complex feature and three days later it’s still working on it.

A few tasks still failed. I don't really know where the problem is. I did discover you can just tell the agent to resume and it does. So that’s helpful.

I did find myself going back to my desk to see if we were still making progress. Usually I could hear the fans as I entered the room to know work was still ongoing. I got tired of checking as the tasks I tried got more complex and longer running. I set up behaviors in Xcode to text me when the process was done, needed input or had errors. This works and is helpful.

If you watch the process in Xcode the output is interesting initially but generally frustrating. The process is understandable, if you think about what is happening with the agents and models, but when you see it all but decompiling binaries to do something you would take 15 seconds to do it can be maddening.

I’ve watched it go into other projects on my drive to figure out how to do something. Fascinating and kind of frightening.

It will make edits to the project file rather than use the scheme editor or to add targets to your project. Makes sense but still a bit unnerving.

The AI won’t switch to a file in Xcode and look for the code it needs. It tends to revert to shell commands to list the files and absorb the contents. It takes time. It’s very deliberate. It has to be. 

Apple has provided what appears to be a decent set of tools for the agents to use. It also provides decent directions to the agents, telling it to look at the docs, use modern conventions and generally try not to fuck things up. I’m not really certain how much of these directions or tools are used/respected. Is there any way of knowing? We’re dealing with a random word generator here. How could we check? Dunno.

Those tools and directions may help in getting better responses but I suspect it also makes things take longer. No doubt better responses are better responses but I find myself looking over the AI's shoulder and wanting to rip the keyboard away and do things myself.

Conclusions:

Lately I’ve heard people label those of us opposed to AI use as non-believers. I think that’s unfair because I doubt anyone doesn’t believe AI is real. Some of us have our reasons to not use it.

I have moral problems with it in general. I also really enjoy my work, I have to as it barely pays right now as everyone is convinced AI can replace us all.

I hear it’s inevitable. That’s complete bullshit and people who should know better should do better rather than parroting that marketing fiction.

What is inevitable are things like climate change, as just one example of a reason to avoid this stuff. I don’t think my grandmother being able to harness a nuclear power plant in order to allow her to ask Siri to create a knitting app is a net positive.

So do I keep on with the experiment? I don’t know. I’m not doing any more major tasks. That much is certain.

I think if you treat it as a search engine or rubber duck it’s mostly harmless.

Is it impressive and interesting? Most definitely. I can see why geeks, I otherwise respect, fall for this completely.

Does it enable otherwise technical people to develop helpful tools, I suppose so. Is that good? Ignoring the downsides, sure that’s good. Those are pretty big downsides. Do your own moral calculations.

I was not joking when I said one task was on its third day of running. 24 hours a day with the exception of when it hung up overnight and I was unable to ask it to resume. I completely understand if I let our AI overlords take my code and my money it would go faster. I don’t care.

I know I am not an expert and many will read this and say I’m a fool for both my attitude and my technical ignorance. I set out to learn some things. I did.

I am happy to discuss this with anyone else who may be trying to get Xcode to work with a similar set of constraints. As usual, the stuff I found on the internets was mostly nonsense, incomplete and just marketing or click bait. 

I don’t want to do something else while I wait for a machine to do my chores. They aren’t chores for me. I enjoy it. I don’t want a machine to go on my bike tours or hikes either.

So there. I’ve tried it. It’s impressive. It does some things as advertised. It’s not a panacea. It’s not inevitable. You don’t need to get on board. You can sit on the sidelines. You can dip your toes. You can ignore it entirely. Make your own decisions for your own reasons.

Ok agent, let me have that keyboard. I have to get back to work.

Patrick McConnell @pmcconnell
🐘 Reply on Mastodon