EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Software Reuse In Embedded code

Started by steve June 15, 2011
What percentage would you say your current project consists of
software reuseable items?

By software reusable items I mean something that you acquired
(purchased, freeware, shareware, licensed etc) which you had no
responsibility in the development, construction, or testing. You
reused them because the documentation was sufficient to convince you
of its quality.
On 15/06/2011 16:03, steve wrote:
> What percentage would you say your current project consists of > software reuseable items? > > By software reusable items I mean something that you acquired > (purchased, freeware, shareware, licensed etc) which you had no > responsibility in the development, construction, or testing. You > reused them because the documentation was sufficient to convince you > of its quality.
0 percent. If you use software from a third party, then /you/ are responsible for testing and otherwise qualifying it for use in /your/ system. Getting the software parts from somewhere you consider reliable will certainly /reduce/ the level of testing you need to do to be happy with its quality, but it does not eliminate it. If you buy your chips from a reliable supplier, and they come with good datasheets qualifying temperature ranges, power requirements, etc., does that mean you don't have to test your boards when you use them? It might mean you don't have to test over a wide temperature or voltage range, but you still have to test the boards. The same thing applies to software components.
Hi David,

On 6/15/2011 8:20 AM, David Brown wrote:
> On 15/06/2011 16:03, steve wrote: >> What percentage would you say your current project consists of >> software reuseable items? >> >> By software reusable items I mean something that you acquired >> (purchased, freeware, shareware, licensed etc) which you had no >> responsibility in the development, construction, or testing. You >> reused them because the documentation was sufficient to convince you >> of its quality.
If the documentation is *that* good, then the vendor should be GLAD to *warrant* it's performance! Hey, *he* wrote the spec, right? Shirley, he'd be glad to put his money/reputation behind his product if he's *that* confident in its quality -- since you are adopting it "because the documentation was sufficient to convince you of its quality". (Isn't it sufficient to convince *him*?)
> 0 percent.
+42 [1]
> If you use software from a third party, then /you/ are responsible for > testing and otherwise qualifying it for use in /your/ system. > > Getting the software parts from somewhere you consider reliable will > certainly /reduce/ the level of testing you need to do to be happy with > its quality, but it does not eliminate it. > > If you buy your chips from a reliable supplier, and they come with good > datasheets qualifying temperature ranges, power requirements, etc., does > that mean you don't have to test your boards when you use them? It might > mean you don't have to test over a wide temperature or voltage range, > but you still have to test the boards. > > The same thing applies to software components.
Early on in my freelance career, I tried leveraging other folks' work "off the shelf". The quality of the products I encountered was just laughable. The (ahem) "documentation" was little more than sales brochures. To truly quantify (and qualify) the performance meant pouring over the code, line by line, to see what it *thinks* it's doing, and how. [2][3] I think much of this is attributable to the fact that these things aren't, often, *designed* as "products" but, rather, someone says (after-the-fact), "Now that this seems to work, why don't we sell this as a product?". Would you buy an automobile from some guys who, tinkering, put one together in their garage, and (sort of) got it working? "Um, what weight motor oil does the engine *need*?" "Well, we used 10W40" "Yes, but is that what the engine *needs* or just what you happened to HAVE ON HAND?" If I'm going to buy (rely upon) a "product", I'd like to *see* that it was "thought out" and designed in a systematic fashion. That should include formal specifications of how it is *intended* to work plus *proof* that it does, in fact, work as intended. If you are expecting *me* to deduce the specifications from "educated guesses and empirical observation" AND then have to prepare a test suite to convince myself that this is, indeed, the case, then what *value* are you adding? ("Oh, we wrote the *code*!" "Pshaw. Big deal.") IME, when it comes to "reuse", the biggest bang comes from *design* reuse rather than actual *code* reuse. I worked at a firm in the early 80's that pushed the concept of code reuse aggressively (all of our software had "part numbers" and was treated as "Standard Product"). But, it was a joke because you *never* reused a piece of code "as is" (even though you *owned* it) because each project was slightly different [granted, in that timeframe, we were squeezing lots of performance into very small packages so it was actually worthwhile to trim a few bytes here and there] -------------------- [1] That's changing in some of the projects I have ahead of me that incorporate *large* pieces of OSS. But, I have actively watched the development and maintenance of those projects for many years, now, and am confident in the quality of the code produced as well as the goals of the "primary players". [2] I had a reasonably pleasant experience with a (text) display system produced by "The Aspen Codeworks" (apologies if I have misremembered this). There was no "test suite" but, rather, some simple examples (all of which, I think, worked). And, the author was helpful enough to get me going in the right direction to modify it to better suit my needs. [3] I also evaluated some library products from <nameescapesme> that seemed quite professionally done. But, they didn't fit my needs. :<
steve wrote:

> What percentage would you say your current project consists of > software reuseable items? > > By software reusable items I mean something that you acquired > (purchased, freeware, shareware, licensed etc) which you had no > responsibility in the development, construction, or testing. You > reused them because the documentation was sufficient to convince you > of its quality.
Many of us would have problems recognising that as a definition of re-use. Your definition is more like COTS* usage to me. If you really want to talk about re-use then perhaps you can look to a better definition first and then ask the question again. By my notion of re-use I would put the percentage in my projects at somewhere between 30% and 60% depending on the project being undertaken. *Commercial Off-the-shelf -- ******************************************************************** Paul E. Bennett...............<email://Paul_E.Bennett@topmail.co.uk> Forth based HIDECS Consultancy Mob: +44 (0)7811-639972 Tel: +44 (0)1235-510979 Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ********************************************************************
Don Y wrote:
> Hi David, > > On 6/15/2011 8:20 AM, David Brown wrote: >> On 15/06/2011 16:03, steve wrote: >>> What percentage would you say your current project consists of >>> software reuseable items? >>> >>> By software reusable items I mean something that you acquired >>> (purchased, freeware, shareware, licensed etc) which you had no >>> responsibility in the development, construction, or testing. You >>> reused them because the documentation was sufficient to convince you >>> of its quality. > > If the documentation is *that* good, then the vendor should be > GLAD to *warrant* it's performance! Hey, *he* wrote the spec, > right? Shirley, he'd be glad to put his money/reputation behind > his product if he's *that* confident in its quality -- since you > are adopting it "because the documentation was sufficient to > convince you of its quality". (Isn't it sufficient to convince *him*?)
I'm trying to remember the last time I bought software that was warrantied. I think the answer is never. And stop calling me Shirley. (:
Hi Jim,

On 6/15/2011 11:14 AM, Jim Stewart wrote:
> Don Y wrote: >> Hi David, >> >> On 6/15/2011 8:20 AM, David Brown wrote: >>> On 15/06/2011 16:03, steve wrote: >>>> What percentage would you say your current project consists of >>>> software reuseable items? >>>> >>>> By software reusable items I mean something that you acquired >>>> (purchased, freeware, shareware, licensed etc) which you had no >>>> responsibility in the development, construction, or testing. You >>>> reused them because the documentation was sufficient to convince you >>>> of its quality. >> >> If the documentation is *that* good, then the vendor should be >> GLAD to *warrant* it's performance! Hey, *he* wrote the spec, >> right? Shirley, he'd be glad to put his money/reputation behind >> his product if he's *that* confident in its quality -- since you >> are adopting it "because the documentation was sufficient to >> convince you of its quality". (Isn't it sufficient to convince *him*?) > > I'm trying to remember the last time I bought > software that was warrantied.
That's my point. The OP is asking us to be "confident" enough from the *documentation* (alone) that we are "assured" that the product is worth incorporating into SOMETHING THAT *WE* WILL END UP WARRANTYING (at some level) and/or risking our income or reputation on... yet, the vendor himself doesn't have that same level of confidence in something that he *defined* (specified) and has intimate knowledge of its implementation? "Yes, we have no bananas"
> I think the answer is never. And stop calling me Shirley. (:
"Paul E. Bennett" wrote:
>steve wrote: > >> What percentage would you say your current project consists of >> software reuseable items? >> >> By software reusable items I mean something that you acquired >> (purchased, freeware, shareware, licensed etc) which you had no >> responsibility in the development, construction, or testing. You >> reused them because the documentation was sufficient to convince you >> of its quality. > >Many of us would have problems recognising that as a definition of re-use. >Your definition is more like COTS* usage to me.
Agree.
>If you really want to talk about re-use then perhaps you can look to a >better definition first and then ask the question again. > >By my notion of re-use I would put the percentage in my projects at >somewhere between 30% and 60% depending on the project being undertaken. > >*Commercial Off-the-shelf
Same for me - In my current project I would say 70% of the code is reused. Most of it is in common libraries developed in-house for other projects in the same product line. -- Roberto Waltman [ Please reply to the group. Return address is invalid ]
On 06/15/2011 08:20 AM, David Brown wrote:
> On 15/06/2011 16:03, steve wrote: >> What percentage would you say your current project consists of >> software reuseable items? >> >> By software reusable items I mean something that you acquired >> (purchased, freeware, shareware, licensed etc) which you had no >> responsibility in the development, construction, or testing. You >> reused them because the documentation was sufficient to convince you >> of its quality. > > 0 percent. > > If you use software from a third party, then /you/ are responsible for > testing and otherwise qualifying it for use in /your/ system. > > Getting the software parts from somewhere you consider reliable will > certainly /reduce/ the level of testing you need to do to be happy with > its quality, but it does not eliminate it. > > If you buy your chips from a reliable supplier, and they come with good > datasheets qualifying temperature ranges, power requirements, etc., does > that mean you don't have to test your boards when you use them? It might > mean you don't have to test over a wide temperature or voltage range, > but you still have to test the boards. > > The same thing applies to software components.
You write your libraries from scratch, or do all your work in assembly? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
On 06/15/2011 07:03 AM, steve wrote:
> What percentage would you say your current project consists of > software reuseable items? > > By software reusable items I mean something that you acquired > (purchased, freeware, shareware, licensed etc) which you had no > responsibility in the development, construction, or testing. You > reused them because the documentation was sufficient to convince you > of its quality.
I'm currently reusing software that I've written. I'd like to say that I'm not modifying it, but it is getting tweaked a bit. Beyond that I'm coding in C++ and using the libraries that come with the gcc ARM compiler. In the past, when I worked at a medium-large company that had big projects with product life that pushed a decade, I was part of a team that did a considerable amount of reusable library code. It then got successfully re-used, so we must have done something right. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
On 15/06/11 21:39, Tim Wescott wrote:
> On 06/15/2011 08:20 AM, David Brown wrote: >> On 15/06/2011 16:03, steve wrote: >>> What percentage would you say your current project consists of >>> software reuseable items? >>> >>> By software reusable items I mean something that you acquired >>> (purchased, freeware, shareware, licensed etc) which you had no >>> responsibility in the development, construction, or testing. You >>> reused them because the documentation was sufficient to convince you >>> of its quality. >> >> 0 percent. >> >> If you use software from a third party, then /you/ are responsible for >> testing and otherwise qualifying it for use in /your/ system. >> >> Getting the software parts from somewhere you consider reliable will >> certainly /reduce/ the level of testing you need to do to be happy with >> its quality, but it does not eliminate it. >> >> If you buy your chips from a reliable supplier, and they come with good >> datasheets qualifying temperature ranges, power requirements, etc., does >> that mean you don't have to test your boards when you use them? It might >> mean you don't have to test over a wide temperature or voltage range, >> but you still have to test the boards. >> >> The same thing applies to software components. > > You write your libraries from scratch, or do all your work in assembly? >
I don't use much third-party code (for small systems - the balance is different for larger systems). Obviously there is some library code with the compiler (especially language support code), though I don't tend to make much use of the standard C library. But my point is not that I or anyone else doesn't use third-party code - just that if I use third-party code in my project, then /I/ have a responsibility for testing, and making sure it is suitable for the job. The OP seems to think it is appropriate to take other people's code and use it, and let /them/ be responsible for any failures. Obviously the amount of testing and qualification you do with the third-party code depends on its source, and the type and quality of the code. You can generally rely on your compiler's integer division routines to give the correct result - but you would want to be a lot more careful about some code you found lying around on the internet or bought from a vendor you are not sure about (price is no indication of quality).

The 2024 Embedded Online Conference