[PD] interface/pd-based standalone applications question

Mathieu Bouchard matju at artengine.ca
Mon Jul 5 15:58:24 CEST 2010


On Sun, 4 Jul 2010, chrism wrote:

> I have no idea. I just meant that if anyone deserves to be cooked meals 
> because of Pd related things, then it's Miller. That is a lot of lines 
> of source code (only 25,000 of them are portaudio/portmidi).

First of all, if you consider portaudio and portmidi like the separate 
projects that they are and that Miller didn't write and that is not really 
part of Pd in any way, the total SLOC drops to 68000.

Next, Miller is not completely alone in writing Pd. You probably know that 
already. It's not even a very small or neglectible amount. In SLOC count, 
Thomas Musil contributed 10% of the source code alone, as the original 
author of the IEMGUI library.

Then you probably know what is copy-paste. IIRC, about 1300 lines of code 
of IEMGUI can be explained by a one-liner sed | diff | wc command. Then 
there is other copy-paste in places like d_math.c and x_arithmetic.c for 
which I made the demonstration that they can be shrunk to less than 20% of 
their size using macros *while* keeping all optimisations in. (not sure I 
posted on the lists about it, though).

Then the "basic COCOMO model" does not take copy-paste into account, 
therefore it's naïve at best, a fraud at worst. It's also highly dependent 
on many other things it shouldn't be dependent on, thus it's most 
certainly unlikely to be accurate at all.

Braces change the SLOC. The 72-character maximum that comes from IBM 
punchcards) changes the SLOC. Statement size changes the SLOC (say 
something short as two statements, you have two lines, but say it as one, 
you have one line). Think about it, you even charge for the blank lines 
and all the lines that say /********/ , no matter how many a given 
programmer decides to put.

All the Basic COCOMO model ever does correctly is punish any people who 
try to save on the number of lines of code.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801


More information about the Pd-list mailing list