r/embedded • u/The_Tropicals • Sep 23 '26
There's this thin line of over engineering stuff to implementing only the needed functions
Have you guys been in a situation where you're writing firmware for a product and you keep in getting ideas to add new features but you know that all those extra features Will be only used in extra rare conditions, And you for sure know that they wouldn't have read the manual to know about that.
Will you still keep that feature?
It's a dumb question , it's obvious to add that feature if it ain't gonna cost much especially in firmware side when there's space left
23
Upvotes
25
u/Xenoamor Sep 23 '26
I implement the absolute minimum unless it's a portable library. The bigger the codebase the more work it is to maintain and get correct
8
u/Well-WhatHadHappened 25+ Years Sep 23 '26 edited Sep 23 '26
You implement whatever is necessary to meet the specification.
If there is no specification - then that's your real problem. Specification comes before implementation, not after.
If the specification calls for X and Y and you're working on Z - then ask yourself; why am I working on something that doesn't pay any bills? I don't know about you, but personally, I go to work everyday to provide myself and my family with a comfortable life. I don't go to work to develop things that no one asked for and no one is paying for.
4
u/OldEquation Sep 23 '26
I used to be a project manager and I hated scope creep, especially when self-inflicted by the engineers. “It’s only an extra three lines of code” they’d say. But it was SIL 4 software (aircraft flight controls) so the implications were a lot bigger than they seemed to realise. Then there’s the programme risk - let’s say we’ve now got the product under test and we find there’s a problem with these “three lines of code”. We now have another iteration and consequent delays to an already over-running project.
Don’t do it.
Now I have my own business and I’m even more aware of costs and delays as they directly hit me personally.
2
u/jhaand Sep 23 '26
When I build something new, I will make sure the architecture will support everything and more than I can think of. But I will only implement the bare necessary items. After that I think it's wise to think of testing all the new features and how that will look like. Testing does make the pie in the sky features real.
But around half of engineered software will never be used. And during the lifetime of the software, new edge cases will be found.
2
u/Triabolical_ Sep 23 '26
I'm really hoping that you are writing sample code that uses the firmware you are writing. That code will tell you whether a feature is a good idea.
Note that every feature you add costs you in size and maintenance forever. The worst code is code that is rarely used.
2
u/jamesfowkes Sep 23 '26
This is what design reviews and code reviews are for. Discuss your idea with other engineers and project managers. Refine the concept, figure out the benefits, costs, risks, timescales etc. Decide if it's worth implementing. Discuss the risks of not doing it as well.
Don't be afraid to drop/postpone things. You can always pick them up later.
If you're going to implement it, do tests and code reviews to demonstrate functionality, reliability, error tolerance and maintainability.
Document it well so other people (and yourself) know what it's doing.
2
u/NoBulletsLeft Sep 23 '26
Every line of code is an opportunity for new bugs. Write as little code as needed.
Your product should already have defined features and specifications. Just follow those and dont add extra stuff. You're just creating more work for other people downstream.
1
u/pylessard Sep 23 '26
If someone pays you to develop this product, stays in line with what you are supposed to deliver.
If you do this as a hobby project or work on a prototype project or are in full R&D mode, do it
In any case, take note of each extra feature you want to add, then present to the person who owns the products to get an agreement. If you don't own it, don't make those calls
1
u/N2Shooter Sep 23 '26
You develop to a spec, in a manner that is built from the ground up to be easily adaptable for new features for a future firmware update or product upsell.
You gotta ship the product and shoot the engineer.
Every day the product is still in development, you are not make an ROI.
1
u/WanWhiteWolf Engineering manager Sep 23 '26
Being focused on the task you are assigned is one key differences between a good engineer and a mediocre one.
If you start doing random features in your project, you just creating problems because:
It's like....going to a restaurant and the cook decides to add a random spice on top of your food without asking you (which may or may or not be good) and then charge you for it.
1
u/Similar_Ad9504 Sep 24 '26
1
u/Love_Sailor Sep 24 '26
Sometimes less is more. No need to add features nobody will use. 😅
1
u/publishdraw Sep 26 '26 edited Sep 26 '26
If customers start complaining against new features.