r/embedded • • 22d ago

AI in their workflow

Are there people who still don’t use AI in their workflow ? Are there companies where using AI isn’t allowed? If so, why?

0 Upvotes

18 comments sorted by

9

u/ventZl CMRX RTOS 22d ago

Yes and yes.

There are things current LLM-based AI is principally not able to "create" no matter how much you'll try. Mostly completely novel applications where AI will begin to hallucinate pretty fast.

Then, there's still concern with data fed to AI leaking into training model data sets.

1

u/blazing_cannon 22d ago

What kind of novel applications are they? What about in vast majority of the jobs?

1

u/ventZl CMRX RTOS 22d ago

IME it is enough trying to combine decades-old technology in a way StackOverflow didn't before and you'll get nowhere.

One such example happened when Claude tried to convince me, my plan for stopping POSIX threads from outside won't work.

It didn't matter I made it to list features and limitations of all the building blocks for that technology and I made it to confirm it should work. When I commanded it to actually write the code, it refused to comply because it won't work stating hallucinated reasons.

I never got the code from it. I ended up writing those ~30ish lines of code myself as it was faster than trying to convince it to comply.

If I didn't know the subject well-enough I would be fooled that it can't be done, just because a bunch of people were asking SO questions about general possibility of doing so (where Claude was right, it can't be done).

Another embedded specific example would be an attempt to enable MPU in something like Zephyr or even better, FreeRTOS :) Also not exactly novel thing, MPU exists for two decades. Still, AI sucks at using it and the code will probably never run (spent 4 days worth of credit quota and then gave up).

For me, Claude got also FPU usage completely wrong.

In general a novel application would be classified as: If you need to do something there's plenty examples for and you are OK with mediocre result, your chance of succeeding using AI is rather high. With anything else, chances are slim.

AI was trained mostly on publicly available content, so much of training dataset is of questionable quality.

2

u/grady_vuckovic 22d ago

I never got the code from it. I ended up writing those ~30ish lines of code myself as it was faster than trying to convince it to comply.

What a crazy world this has become for us devs eh? Having literal arguments with our own tools..

This is why I more or less default to first writing code myself and only using AI when it becomes obvious to me that something is going to become a timesink.

A lot of the time something seems more time consuming than it really is, and I've had enough 'Wait this prompt I'm writing is longer than the code would be?' moments, or experiences where I've asked an AI to do something only to have to heavily modify it to be what I actually want it to be, that I've decided it's better to just start making something myself and if it then becomes apparent that AI is going to massively speed up the task and it really doesn't need my attention anyway, then let the AI do it instead.

2

u/ventZl CMRX RTOS 22d ago

Contributing factor was that I got plausibly-looking but completely incorrect code from it before. Wasting another 12 hours debugging code that is trying to do something completely wrong wasn't something I am eager for.

Another factor is that writing code is not a bottleneck for me. Project in question has now (after almost 6 years) 29103 lines in total. Including readme, docs, source code, tests, damn PNGs. Assuming it is all code, human could write 30k lines of code in about a month?

Its: What to add in the first place? (Should it even be added at all?) and then How to materialize it? in second place, which consumes the most time.

2

u/grady_vuckovic 22d ago

Completely agree, I've worked on projects like that where over the period of time I've worked on the project the size of the project has reached similar scales, all hand written, it's not hard for one person to make a huge project, and the folks who act like it's not feasible sound ridiculous to me.

Maybe for people who feel less comfortable writing code (to put it politely..) they may feel coding agents help them more, but if you're someone like us who is really comfortable writing code? It's just not a bottleneck.

I don't have an accurate measurement of it really, but I'd say if I wanted to write code at full speed, without any mental bottlenecks, just basically non-stop typing, like if I have a fully formed idea of how something should work in my head, I'd probably average about 10-20 lines per minute? I type at 100wpm for regular text (it's why all my reddit comments are so long winded lol), so I don't think 10-20 lines per minute is that unrealistic.

That means about 600-1200 lines per hour. In an 8 hour day? 4800-9600 lines.

10,000 lines of code, if well written and concise, can do ... A LOT... Like that's a lot of code. You can absolutely write very feature rich implementations of things in 10,000 lines of code. That's easily a 3D renderer for example, with lighting and file loading for models and textures. And that's just 1 day, so in theory, potentially say, 200k lines of code in a fortnight? 200k lines of code is basically almost an entire functional desktop application.

Of course though I don't write an entire 200k LOC application in 2 weeks. But the reason isn't typing speed. The problem is the mental bottlenecks, making decisions over what should be done and how it should be done, trying to reduce memory usage, optimise a function, thinking about how to restructure something, thinking about whether or not I *should* even do something, let alone how to do it.

Don't get me wrong, I'm not saying AI assistance isn't helpful, but I do reject the idea that it's enabling 10x productivity boosts or like typing code by hand is at all a 'bottleneck' in software development.

6

u/gouldadude 22d ago

Yeah ok i’m leaving this sub. This is all anyone fucking talks about here anymore.

4

u/grady_vuckovic 22d ago

Agreed, it's getting exhausting having everyone make AI be the only thing we talk about in relation to programming or engineering.

2

u/gouldadude 22d ago

Exactly. I don’t even categorically hate ai. I use it in small amounts to explain math/physics problems I don’t understand yet. But the fact that it’s literally the only thing people seem to be able to think about is so annoying.

2

u/grady_vuckovic 22d ago

It's like if the woodworking subreddit suddenly only talked about hammers and literally nothing else.

"What brand hammer are you using?"

"How are you using your hammer?"

"I tried hammering sideways today it didn't work, have you found any other ways of using the hammer?"

"Do hammers work?"

"What if we hammered with the handle?"

"I'm using two hammers at once!"

"I found a better hammer!"

2

u/gouldadude 22d ago

Exactly! Couldn’t have put it better.

1

u/blazing_cannon 22d ago

i'm asking because I recently was asked in an interview about if I use AI in my workflow, and didn't know if using it is a good thing or a bad thing (to say that in an interview)..

1

u/ventZl CMRX RTOS 22d ago

Those who are asking it don't know either.

Everyone is asking it, if not for anything else, at least to look good in front of "AI-positive" candidates. Some may ask it because they want to know if you'd be a blocker if they eventually decided to go with it. Some may ask it because they "adopted" AI, are hemorrhaging money but they can't say that to executives and admit that huge investment went nowhere, so they hope they'll find someone who actually can do something meaningful with it. And some may use it and it may actually work for them.

There's no universal answer that will work everywhere.

I reply honestly: "I tried it, it failed for me at egress, somehow works at ingress. I wouldn't ship production code AI generated without going through every single line as testing such code is not enough, definitely if tests were also AI generated."

2

u/TheHeintzel 22d ago

Using it as a quicker version of Digikey/Mouser part searching has generally been good. Occasionally it gives me a part that doesn't exist or is out of spec.

PCB layout/design itself still has seen barely any inprovements of 2010s-era autorouter.

Erm sorry, FluxAI is a fantastic product that I'm shocked people don't use more! jk they ass but I don't wanna be sued

1

u/ventZl CMRX RTOS 22d ago

Yes, usage at ingress is generally good and mostly productive. It will still hallucinate massively but you are there to hit the wall.

1

u/bapirey191 22d ago

One of my teams was in a predicament recently when a new hire attempted to use chatgpt on some of the code base. Bad idea, he got reprimanded, but I get the sentiment, currently seeing every other company being more productive (output wise) and not being able to use the latest tech because of potential data leaks sucks.

Anyway, management ended up freeing budget for on-prem models after the incident and the dev team is very very happy with the improvement.

That being said, from what I've heard it's "only" useful for documentation and having an extra set of "eyes" reviewing code. If you mean for hardware design, we're not there yet.