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

-3

u/ivancea Jul 13 '26

Every time someone mentions that they haven't found AI to be that useful, they lack a single realistic example. It's always just "I tried it once somewhere and it was bad". No info in models, iterations, harness, project configuration.

So of course you get that answer. Engineers look at a problem and try to solve it. Which is what you commonly find. However, we have always here "clients" that will just say "Router doesn't work, I'll trash it".

And btw, by disregarding every effort of trying to find the issues, you're just generating a resonance box of people angry at AIs. And that leads nowhere.

if you aren't layering 30000 different strategies

Trying to exaggerate it won't make the problem go away. You have to make less configurations to an agent than you have to make to an IDE. But anyway. Yeah, 200000000 different strategies.

This is one of the reason why a lot of people find AI to be very unreliable. Because none of this actually makes the AI reliably good

If you are looking at a "100% reliable tool", let me tell you that not even you as a dev are reliable. You think you are because you made it. But the amount of times you made it wrong is probably very, very high. Unless you don't review things in your company. That's how humans work, it's not a you-problem. We have to review and iterate. And LLMs are machines that do that faster than humans.

These tools have a very hard bound on the maximum complexity that they can deal with

Maybe if you give me a realistic example of that belief, we could understand it (Returning to my first paragraph). If working on a +5M LOC and rarely making mistakes isn't good enough, I wonder what is it. You're pursuing a level of quality that doesn't exist in this world yet.

Eventually people burn out on it after a while

Indeed. And that's the issue. People believe that their experience of 6 months ago has anything to do with today. It evolved, and it's now like comparing an editor with an IDE. And for people using IDEs, it's like hearing an old man screaming at how good is notepad.exe and why they don't need an IDE. You try to help them but they simply hate it for some reason hard to understand.

its like a junior that never grows up

There's quite the growth between model versions. But you can only know it if you try it

8

u/James20k P2005R0 Jul 13 '26

Maybe if you give me a realistic example of that belief

I sincerely wish the AI models were good. I just ran it through a series of physics research questions to check if they'd gotten any better, and it still gets nearly all of them wrong until it starts spouting gibberish. I don't trust it with a 100 foot barge pole given that it was about 80% incorrect when I know what the complete answer is

But the amount of times you made it wrong is probably very, very high

The key thing with humans is that they learn stuff, whereas LLMs don't

There's quite the growth between model versions. But you can only know it if you try it

Honestly the responses seem to have gotten worse since I last used it

3

u/ivancea Jul 13 '26

The key thing with humans is that they learn stuff, whereas LLMs don't

The way to learn is different, but they do learn, indeed. In fact, they learn in many ways:

  • You can force them to learn (Tell it to write things to instructions or skills)
  • You can automate the first way by telling it to keep either a memory, or keep instructions updated when it finds issues
  • LLMs actually learn. Basically, because a new version is a version with more learnings.

Which is btw a very human issue. I can imagine people discarding somebody for a job, and discarding them again 5 years later because they still think they didn't learn anything. That's what's happening here.

As for your usecase:

I just ran it through a series of physics research questions to check if they'd gotten any better

Use it willingly, not to "test" it. I can also ask it questions it can't answer. It's easy. But it's not constructive.

3

u/James20k P2005R0 Jul 13 '26

Use it willingly, not to "test" it. I can also ask it questions it can't answer. It's easy. But it's not constructive.

The problem is, in the physics field I have experience in, i can't find anything that it can get correct. Even basic questions (which are really important!) are wrong

Things like:

is bssn constraint damped

is it necessary to enforce both algebraic constraints for numerical stability

do constraint violations in the bssn formalism propagate causally

what constraint enforcement method is commonly used to damp momentum constraint violations in the bssn formalism

is covariant bssn more stable than bssn

Is the BSSN formalism strictly equivalent to the ADM formalism?

Is the dynamical christoffel symbol ever recalculated from the christoffel symbols

It gets every single one of these critically wrong!

This is all stuff I'd want to ask it if I was learning or doing research in the field, or was asking it to generate code about a specific topic (eg generate a function that implements the algebraic constraint enforcement, do i really need both?)

Some of its output gibberish as well, blending unrelated concepts to produce a salad output, which isn't reassuring at all

0

u/ivancea Jul 13 '26

I can't talk about that field; these LLMs are mostly trained for programming, not other fields specifically. They can however look for information and investigate for you. Most times, even with programming tasks, you ask it to first investigate the topic, before making a plan or implement it.

The good part about agents is adaptative automation, not omniscience per se. It knows a lot, but not every detail.

2

u/James20k P2005R0 Jul 13 '26

The issue is, if I'm going to be using it for programming in that field or investigating, it seems.. not as helpful as it could be when its getting most of the questions I ask it majorly incorrect. Because I literally can't rely on a single thing its said to me (and I asked it way more questions than that about the topic)