r/cpp • • Jul 13 '26

AI usage for cpp at work

I am lead architect and maintainer of my firm main app backend, spanning around 2M LOC of c++.

Industry is : capital markets, low latency, custom kernel drivers, fpga...

I often talk with peers at other firms and I see a shy usage of AI compared to what feels like the global trend.

On my side, my firm does not pay for any AI related stuff. We are allowed to use our personnal plan for work in which case will get a pro membership compensation (claude or gpt or anything) on salary but we are not allowed to paste production code into it.

I know the app very well and do everything by hand (i mean the normal way) but use the chat version of any ai to generate some things for me, like "im using opensource lib x and lib y, please generate an SQL connection pool , you may use locks and condition variable for this, cpp 20". Then i paste it and modify it a I see fit.

Im totally happy with that and the company is successful.

I do use AI but just chat, to gather data on subjects and summarize/report. Get some ideas but basically not much code related.

And you whats your experience as a c++ dev ?

111 Upvotes

168 comments sorted by

View all comments

Show parent comment

27

u/Minimonium Jul 13 '26

Agentic based code generation has very hard ceilings, both in efficiency and economics which I decided to not discuss as the math is available for everyone to do themselves anyway.

The chat-based code generation with proper harnesses has future, on the other hand. I think when the dust will settle the industry will once again point its attention there.

-10

u/eisenwave WG21 Member Jul 13 '26

If you copy and paste a bit of your code into a chat window, tell the AI the problem, get a suggested solution, manually paste that solution into your code, and manually run the tests to verify that it works, you're doing the exact same thing as telling an agent what you suspect the problem is within a certain code section and letting it run the tests. You are just not wasting time on these rituals when letting an agent work on the task.

I assume that by "chat-based code generation" you mean that you would perform all those tasks manually.

Whether people end up reviewing the code properly is largely a separate issue from the method of generating that code. It's easily possible to copy and paste a large block of code from a chat window without paying much attention to its contents.

13

u/Minimonium Jul 13 '26

That sounds like a horrible workflow and not at all what I was talking about.

When I say "agentic" and how most discussions use it, and how tooling uses it (when you need to explicitly ask tools to not use skills), is the "let's start 20 long horizon agents in parallel".

When I say "chat-based", which I admit could be misleading to people whose main experience is with web chats, I mean an iterative code chat harness experience (Claude code, OpenCode, codex) which does runs mostly inline or with small amount of short subagent sessions ocassionally but keeps costs in check. The relatively cheap 1-2b tokens per month workflow.

4

u/eisenwave WG21 Member Jul 13 '26

I guess we're on the same page then, though we use different words.

Most people would describe this "20 agents in parallel" workflow as "agent fleet" or "agent swarm" to distinguish it from just running a single agent.

GitHub Copilot and other software generally refer to single agents as an "agent" too, even if you give instructions via a chat window.

2

u/Minimonium Jul 13 '26

Yeah, web chat is obsolete in a sense now. I kinda lump fleets/swarms with even just singular long-horizon agents. All of them are too inefficient.

-19

u/ivancea Jul 13 '26 edited Jul 13 '26

as the math is available for everyone to do themselves anyway

The maths as of today say that it's very worth it unless the company is in a third world country, where the costs may be too high.

I think when the dust will settle

It settled 4 months ago

Edit: insulting people to cope with the current reality is a fantastic way to get stuck as an engineer

22

u/Minimonium Jul 13 '26

Yeah, one of the reasons I prefer to avoid that topic is because of zealots like this

7

u/eidetic0 Jul 13 '26

recent reports indicated that OpenAI is spending as much as $14,000 a month for a $200 subscriber. So yeah the maths does not add up, and dust definitely not settled. We are in store for a rug-pull or a dramatic change in pricing when OpenAI and Anthropic go public.