Prev: AVR BASIC COMPILER source code released
Next: ATtiny10
From: Gil Hamilton on 3 Sep 2009 16:09 Grant Edwards <invalid(a)invalid> wrote in news:P46dnYuZVseDvz3XnZ2dnUVZ_qCdnZ2d(a)posted.visi: > On 2009-09-03, Niklas Holsti <niklas.holsti(a)tidorum.invalid> wrote: > >> Some quotes: "Ada cost almost half of what the C code cost, >> and contained significantly fewer defects per 1000 SLOC by 7x >> the C code (700%). Even on the new C++ code, Ada still has >> 440% fewer defects." > > Huh? 440% fewer defects? Doesn't "100% fewer defects" mean > zero defects? What does 440% fewer mean? Dammit, Jim! I'm a computer scientist not a mathematician! :-)
From: Grant Edwards on 3 Sep 2009 16:12 On 2009-09-03, Nobody <nobody(a)nowhere.com> wrote: > On Thu, 03 Sep 2009 11:28:23 +0100, Phil O. Sopher wrote: > >> It is a mystery to me as to how recent graduates of Computer >> Science are vaunted as experts on computers, > > By whom? > >> yet haven't a clue about the actual operation of a computer at >> the assembly language (or even machine code) level. > > Academic CS seems quite happy to accept Dijkstra's maxim: > "computer science is no more the study of computers than > astronomy is the study of telescopes". And there's nothing wrong with that until "academic CS" graduates start accepting jobs that require computer expertise. Not that the people hiring them don't deserver a lion's share of the blame. -- Grant Edwards grante Yow! Where's the Coke at machine? Tell me a joke!! visi.com
From: Grant Edwards on 3 Sep 2009 16:22 On 2009-09-03, Gil Hamilton <gil_hamilton(a)hotmail.com> wrote: > Grant Edwards <invalid(a)invalid> wrote in > news:P46dnYuZVseDvz3XnZ2dnUVZ_qCdnZ2d(a)posted.visi: >> On 2009-09-03, Niklas Holsti <niklas.holsti(a)tidorum.invalid> wrote: >> >>> Some quotes: "Ada cost almost half of what the C code cost, >>> and contained significantly fewer defects per 1000 SLOC by 7x >>> the C code (700%). Even on the new C++ code, Ada still has >>> 440% fewer defects." >> >> Huh? 440% fewer defects? Doesn't "100% fewer defects" mean >> zero defects? What does 440% fewer mean? > > Dammit, Jim! I'm a computer scientist not a mathematician! > >:-) Presuming the "7x" means that Ada code had 1/7 (14%) the defects of C code, that's "86% fewer" not 700% fewer. Or am I completely misreading the sentence? -- Grant Edwards grante Yow! I'm a nuclear at submarine under the visi.com polar ice cap and I need a Kleenex!
From: Niklas Holsti on 3 Sep 2009 16:42 Grant Edwards wrote: > On 2009-09-03, Niklas Holsti <niklas.holsti(a)tidorum.invalid> wrote: > >> Some quotes: "Ada cost almost half of what the C code cost, >> and contained significantly fewer defects per 1000 SLOC by 7x >> the C code (700%). Even on the new C++ code, Ada still has >> 440% fewer defects." > > Huh? 440% fewer defects? Doesn't "100% fewer defects" mean > zero defects? What does 440% fewer mean? Yeah, bad language, ugh and sorry -- but I just quoted. Earlier in the quote, "700%" means the same as "7 times", so no doubt "440%" means that the C++ code had on the average 4.4 times as many errors, per SLOC, as the Ada code. In other words, the error density in Ada code was about 1/4 of that in C++. If we can pass over this question of proper use of per cent, the numbers are pretty impressive, right? So why isn't Ada used more? I suspect that many C/C++ programmers feel a bit offended by statistics like these; sort of thinking "If that's right, then I must be stupid to use C/C++... Are you calling me stupid? No way!" In practice, there are many good reasons for choosing C in many embedded projects -- the compilers are often cheap and always available, there may be example code and legacy code in C, sick with what you know, etc. But for larger projects, perhaps with a long life, these studies suggest that it could be cheaper to pay for Ada tools, perhaps even to select a processor for which an Ada compiler is available. And not to forget that GNU Ada (gnat) is available for many 32-bit targets, and there are Ada compilers that emit C code and so support almost any target processor (or so their vendors claim, unfortunately I haven't had the occasion to try them). -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .
From: Paul Keinanen on 3 Sep 2009 17:11
On Thu, 03 Sep 2009 15:22:08 -0500, Grant Edwards <invalid(a)invalid> wrote: >On 2009-09-03, Gil Hamilton <gil_hamilton(a)hotmail.com> wrote: >> Grant Edwards <invalid(a)invalid> wrote in >> news:P46dnYuZVseDvz3XnZ2dnUVZ_qCdnZ2d(a)posted.visi: >>> On 2009-09-03, Niklas Holsti <niklas.holsti(a)tidorum.invalid> wrote: >>> >>>> Some quotes: "Ada cost almost half of what the C code cost, >>>> and contained significantly fewer defects per 1000 SLOC by 7x >>>> the C code (700%). Even on the new C++ code, Ada still has >>>> 440% fewer defects." >>> >>> Huh? 440% fewer defects? Doesn't "100% fewer defects" mean >>> zero defects? What does 440% fewer mean? >> >> Dammit, Jim! I'm a computer scientist not a mathematician! >> >>:-) > >Presuming the "7x" means that Ada code had 1/7 (14%) the >defects of C code, that's "86% fewer" not 700% fewer. Or am I >completely misreading the sentence? Even then, such claims are ridiculous. While string processing in C is very error prone, because C does not have any real string processing better than Fortran IV, even Fortran 77 is better. In the real time environment, the need for string handling is quite minimal, so if the user interface needs something to display, it shouldn't harm the display of the actual signal. Paul |