AI Coding Tips Thread

Soldato
Joined
20 Dec 2004
Posts
17,455
There's a few AI threads knocking about now, but thought one just focused on coding tools would be good.

The state of the art is moving so rapidly at the moment, and new tools and tech appearing so fast, it's hard to stay on top. Share your best tips here!

Today I've been configuring a couple of Sub Agents in Claude. One is a miserable C++ programmer like me that is an old school guy that insists on clean, well engineering code, with minimal dependencies. One is a Fintech specific reviewer that ensures certain domain specific stuff is adhered to.

I've added a pre-commit hook to Claude to make sure any changes are run past both these sub agents. Works really well, it now addresses all teh stuff that I was having to nag Claude about before.

Second thing today, I've added the Playwright MCP server, which is a web automation system (that we also use for E2E testing). What this means is that Claude can inspect the debug browser window (web app I'm developing), and instead of guessing it's got things right, it can now capture screenshots and inspect the images, click through the app, and make sure it actually works as expected. Pretty cool stuff.
 
I haven't really been making full use of AI when coding. I have Github Copilot which I use in the Jetbrains IDEs, Visual Studio Code and Xcode. I basically just have the chat screen open and ask it questions about my code. For more detailed answers I have Google Gemini Pro through my Google Workspace account which is very good for detailed replies.

I should look into optimising my usage though or look at all the available alternatives. Any hints and tips gratefully received :D.
 
I haven't really been making full use of AI when coding. I have Github Copilot which I use in the Jetbrains IDEs, Visual Studio Code and Xcode. I basically just have the chat screen open and ask it questions about my code. For more detailed answers I have Google Gemini Pro through my Google Workspace account which is very good for detailed replies.

I should look into optimising my usage though or look at all the available alternatives. Any hints and tips gratefully received :D.
I don't type code anymore, full stop.

My workflow revolves entirely around directing Claude to do the typing for me, it's much faster than I could hope to be. Lots of tips and tricks involved to get things to work efficiently though.

My first pro tip though, is to use Claude rather than CoPilot.

Anthropic are the leaders in practical implementations of LLM tools, they are leading the way with things like MCP, and I think their Sub Agent architecture is so much simpler and easier to work with than LangGraph.
 
I don't type code anymore, full stop.

My workflow revolves entirely around directing Claude to do the typing for me, it's much faster than I could hope to be. Lots of tips and tricks involved to get things to work efficiently though.

My first pro tip though, is to use Claude rather than CoPilot.

Anthropic are the leaders in practical implementations of LLM tools, they are leading the way with things like MCP, and I think their Sub Agent architecture is so much simpler and easier to work with than LangGraph.
Hmm. Seems like Copilot lets you pick Claude 4.0 as one of the backend options. It is a premium service though so you only get a limited number of premium requests.
 
Last edited:
I mostly use chatgpt to figure out the design, approach, what are good library choices. Then write a prompt in cursor to write that code, often but scaffolding myself, and having cursor fill in the rest, especially if it is really simple, e.g implementing a new provider for storing data. I typically write the first test, then have cursor write more tests based on my approach. I mostly write Golang, so adding new test cases in table tests is pretty easy
 
Been refining my workflow a bit yesterday and this morning. Getting to the point now with this Playwright MCP, sub agent tester and reviewer, that I can pretty reliably just give Claude a ticket ID, and then set it off working for a while, and come back to review the change after it's been properly E2E tested for me.
 
Not really allowed to use it beyond some basic stuff at my work yet but it's being adopted at least.
 
I'm not a programmer by trade but can get things to do what I want, e.g. Macros to formulate data or automated things that would annoy me doing them manually.

I wrote a macro to pull an export from our OT environment into a usable import format for another system. Someone in our dev team ran it through ChatGPT and turned it into a sheet that opened the file from Excel and output into another file in another folder. It put my messed up code into an array (I just get code working, optimising is not my thing) :D tidied up my crazy if not if statements and spat out something that looked really good. All by just typing things like "now make the code write to a file in an output folder" or "now append the date to the output file" etc.

Got to say I was impressed!
 
I’ve been super impressed with AMP in recent months but have found myself gravitating towards Cursor for day to day. I tend to use AMP when I spec a big job and want to leave it to do its thing.
 
I've been evaluating Codex versus Claude Code for a bit now, have max subs for both. I'm doing full stack work at the moment so have several VS code instances going with different agents working on different parts of the system simultaneously.

Codex with GPT 5.1 I quite like in terms of the quality of its code and analysis.....but it's glacially slow. It's ok if I kick it off with something and then go and do something else while it works....needs workflows building around that.

Claude Code is still my preference, although its quality varies as they upgrade and tinker with it. Still the best developer experience for me, and much, much faster than Codex. Maybe it's just familiarity, but I know how to talk to Claude, when to plan more in depth, when it can ad-hoc things. If I was buying my own sub I'd go for Claude, no questions.

I just prefer the CLI tools like Claude Code and Codex, over the integrated IDEs. I just open a terminal window inside Visual Studio 2026 and launch Claude in there for my game projects.

Being able to SSH into AWS services and launch Claude/codex over the terminal is v helpful at times too.
 
Last edited:
I'm finding the Claude is getting a bit stale in terms of up-to-date knowledge so hopefully v5 is on the horizon.

Anthropic are definitely in the lead in terms of agent quality and tooling but others are improving. Sub-agents are decent, have added some extra config for organisation-specific knowledge to stop it from doing weird things. Adds a lot of value but I still review every little bit of work it does - unless you have a really simple project, it still needs a lot of hand-holding.
 
I'm finding the Claude is getting a bit stale in terms of up-to-date knowledge so hopefully v5 is on the horizon.

Anthropic are definitely in the lead in terms of agent quality and tooling but others are improving. Sub-agents are decent, have added some extra config for organisation-specific knowledge to stop it from doing weird things. Adds a lot of value but I still review every little bit of work it does - unless you have a really simple project, it still needs a lot of hand-holding.
Oh for sure, they aren't a replacement for experienced programmers, but amazing productivity tools at the moment.

We did evaluate a tool from a startup under the same VC as us. It was pretty impressive, basically it was a number of agents orchestrated adversarially, and deliberately made use of various different models, Anthropic, OpenAI, Mistral etc.....it just batted the work back and forth between the agents repeatedly reviewing each other's work. My boss spent a long time hammering out a spec document for a new system....fed it to this system and left it running. Did a pretty good job.

But....it does need to run for like 8+ hours and it absolutely chews through credits. The developers had it rewrite Redis in Rust as a demo....used a 5 figure GBP sum of credits apparently :)
 
Oh for sure, they aren't a replacement for experienced programmers, but amazing productivity tools at the moment.

We did evaluate a tool from a startup under the same VC as us. It was pretty impressive, basically it was a number of agents orchestrated adversarially, and deliberately made use of various different models, Anthropic, OpenAI, Mistral etc.....it just batted the work back and forth between the agents repeatedly reviewing each other's work. My boss spent a long time hammering out a spec document for a new system....fed it to this system and left it running. Did a pretty good job.

But....it does need to run for like 8+ hours and it absolutely chews through credits. The developers had it rewrite Redis in Rust as a demo....used a 5 figure GBP sum of credits apparently :)
Yea that's a very tricky thing to get right, and probably not realistic given that the models are largely trained on the same data and can easily go down a rabbit hole either based on stale knowledge or a self-validating loop. I tend to use sub-agents for very simple things and review the primary workloads, but we have a large codebase with complex integrations so an agent is going to struggle to keep that in mind.

Similar to something you mentioned, I write a lot less code now purely because there's no value in me writing classes or scripts manually over several hours or whatever when Claude does it in minutes so it's a huge boost in that respect. I also like using it as a pair programmer to validate ideas.
 
Oh yeah I barely write any code directly now, only if it's a one liner or something.

Using Claude/Codex/etc as an interface into your code is the way forward, the LLMs are way, way faster at navigating and reading and updating files than a human ever could be.

Just don't have it making the architectural decisions.....tell it explicitly what you want it to do, get it done. Also just put it in plan mode and tell Claude to ultrathink gnarly bugs and stuff, pretty good at investigating and coming up with ideas, but you need to know what it's coming up with because some of it will be nonsense. But often it will spot the right issue and you can design a fix from that.
 
Been playing around with this and I'm shocked at how good it is. My only real concern is that it would be easy to integrate security issues when large amounts of code gets generated at a single time. In terms of models I'll try GPT 5.1 Codex next I think even though it is in preview.
 
Been playing around with this and I'm shocked at how good it is. My only real concern is that it would be easy to integrate security issues when large amounts of code gets generated at a single time. In terms of models I'll try GPT 5.1 Codex next I think even though it is in preview.
Answer : Have agents that are specifically prompted to search for security issues, and operate independently of the code generation.

LLMs aren't great at considering lots of things at once....but they are very good at delivering with fairly narrow guardrails. If you tell an LLM to create a system and make sure it's secure......it's not going to be very reliable. Instead you have one agent that is tasked with creating the system. It's work is then passed to the security agent, which reviews it for security issues, and then passes it back to the coding agent to implement the fixes, and repeat until they're both happy.

It kinda is that simple, but it also a lot more complex in practice....but multiple agents orchestrated to do discrete tasks is the way to deal with complex problems. Same as any software engineering problem.
 
Answer : Have agents that are specifically prompted to search for security issues, and operate independently of the code generation.

LLMs aren't great at considering lots of things at once....but they are very good at delivering with fairly narrow guardrails. If you tell an LLM to create a system and make sure it's secure......it's not going to be very reliable. Instead you have one agent that is tasked with creating the system. It's work is then passed to the security agent, which reviews it for security issues, and then passes it back to the coding agent to implement the fixes, and repeat until they're both happy.

It kinda is that simple, but it also a lot more complex in practice....but multiple agents orchestrated to do discrete tasks is the way to deal with complex problems. Same as any software engineering problem.
Thank you. I'll keep playing around with things on a test project to learn decent techniques.
 
Back
Top Bottom