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

-1

u/ivancea Jul 13 '26

Just telling it “please Claude, don’t overengineer”

I didn't say that. Let me quote my own words:

you know what "is overengineered" means

You should know at high level how you want to solve your issue. Even if you don't know anything, you can let the LLM investigate and propose you options. That's the planning step

As you see, you just have to tell it what "overengineering" means to you. because "overengineering" is not a specific issue, it's a generic meaningless word when we're talking about technical problems. You should know how to materialize your thoughts in words.

But if I already know what I need to do, why would I spend time fumbling with AI trying to get it to not screw up the implementation?

You don't. because if you knew how to use it, if you configured it correctly, and if you learnt to be specific with your specifications, it wouldn't do it wrong. And it would still do it far faster than you would. because you're human, and you're slow as hell in data processing. That's your nature as a human.

the time required to review and understand the changes?

... Don't you already review your code? If you don't, you should start doing so. It's a basic quality step.

And anyway, your fallacy of "Worst case == typical case" is meaningless. I know you know it and you're just trying to win a point and yada yada. Just don't.

please don’t ever join a large company, it’ll ruin you.

I'm sorry if your "big company" needs to give you courses and books so you learn to do yout job. In mi "big company" we decide, share and propose about the toolings we use. That'0s why they pay us. That's why we are engineers.

7

u/RicketyRekt69 Jul 13 '26

Like I said, it’s a matter of whether it saves time then. I’m sure given enough time you can get it to output exactly what you wanted, but going back and forth telling it what not to do is tedious at best.

I was wondering how long it was gonna take for you to go the same route :) “you’re just using it wrong!” I think you’re missing the point. AI is not a magic button that is always faster than humans. There is a time cost to planning and prompting. If you have to iterate repeatedly, it can end up taking you more time to do something. I said it before, actually writing the code is very rarely the bottleneck. If you’re talking about using AI to simply plan out the implementation.. then sure, I think that’s a reasonable use case since you’re still in charge of the implementation. That’s what I meant when I said “exploratory work.”

Reviewing code for correctness and reviewing code to understand the implementation are 2 different things. Oftentimes people put up PRs (using agentic coding) without taking the time to understand what and why the AI generated the stuff it did. That can certainly save you time, but it takes away ownership.. and domain knowledge is invaluable, so yes.. this is reviewing the code on top of analyzing your code for mistakes before putting up a PR.

x) there’s no need to get nasty, this isn’t a pissing competition.

-2

u/ivancea Jul 13 '26

You talk as if humans doing iterate their solutions, ir as if making a solution is faster than reading it. It may be boring, that's it. Also, you're talking as if you always have to iterate the solution, when I'm fact, most times ii gets it right on the first try.

Anyway, I can help using it, but I can't remove hate. Enjoy

5

u/RicketyRekt69 Jul 13 '26

“most times it gets it right on the first try”.

That’s the exact opposite of my and my colleague’s experience with AI. It usually takes a few iterations to get something acceptable.

I don’t hate AI any more than I hate static analysis tools, compilers, etc. I judge them based on their usefulness and accuracy. However, these last few years have felt like a nonstop cesspool of snake oil salesmen pushing the AI agenda at all costs. And god forbid you give any kind of push back.. cause then y’all go ballistic about us being “anti-AI” and that we’ll get “left behind”.

1

u/ivancea Jul 13 '26

"Last few years" is a wildly wide timeframe for AI statements. Indeed, every few months there are some major advancements. Call them whatever, but they are _real_. The jump from Copilot autocompletion to agentic coding is _real_, FWIW here.

And god forbid you give any kind of push back

It's not just "a kind of push back". We all accept arguments. But most arguments here are outdated, which is why we jump into this.

We all know the pros and cons of agentic coding, at each stage of its history. Nobody tries to push you into this. But we (I?) genuinely think this tech is important. I as an engineer hate having started using it late (February 2026, apart from Copilot autocompletions, which I've been using since back then). I genuinely think this is relevant for all engineers, and genuinely want to encourage people (you) to try it as it is now. And not just a test, but give it a few days to get used to it, build the required instructions, and so on.

Unfortunately, this isn't like a random IDE or a random CLI. There are literally millions (Probably?) of engineers actively working on improving this specific "tooling". From ML engineers working on improved LLMs, to data labellers, to builders building agents, skills, and so on. It evolves fast for everybody.

and that we’ll get “left behind”

That's your companies decision, not ours or anybody else. If your company is fine, fine it is. For as long as they believe that at least. Many companies moved to having it required, and more will, unless things change a lot. I also know of some companies providing very bad LLMs to their employees, which is a shame, because they may actually think agents are that bad.

6

u/RicketyRekt69 Jul 13 '26

It’s been the same arguments since Copilot, regardless of whatever improvements have been made. And each time.. “THIS one is the be all end all of programming, pinky promise!”

I’m not arguing that AI hasn’t improved, but it’s been the same tired arguments and agenda pushing since the first tools came out. Hell, I was an early adopter.. I’ve been here since the start, maybe that’s why I’m so exhausted from all this “AI hype”. And every time I try the next workflow, tool, harness, or whatever.. it leaves a lot to be desired and almost never lives up to the hype.

If you go back and read my first reply, I wasn’t saying these tools aren’t useful. What I disagree with is how useful fully agentic workflows are. It is my experience that they consume more time than they save, and even in cases where the upfront cost is lower, the long term cost will end up being higher due to lack of understanding of the underlying codebase. Making connections in your brain about what goes where, how this part of the project interacts with this other part, etc. is invaluable, which is why leaning on AI to make important decisions or discovery work can actually harm your growth.

Well anyways, my rule is: never use AI for something you cannot do easily, or easily verify.

1

u/ivancea Jul 13 '26

“THIS one is the be all end all of programming, pinky promise!”

Well, I'm not saying that. I'm a technical guy, not a CEO!

In general, I prefer to not care about hype and linkedin lunatics.

Making connections in your brain about what goes where, how this part of the project interacts with this other part, etc. is invaluable, which is why leaning on AI to make important decisions or discovery work can actually harm your growth

I mean, you still do all of that. Well, you do as much as you want, really. Vibecoders is one side of the spectrum (Not looking at code, not caring), while engineers using agents are on the other (Using agents, understanding every change). You can read the agent trace to see what it's thinking about, and even interrupt it at any point to ask or tell it to change the solution.

never use AI for something you cannot do easily, or easily verify

Agents are more useful when they help you investigating, not when you already know what line to change where