[PD-dev] Refactoring Pure Data (2 of 2)

Kyle Klipowicz kyleklip at gmail.com
Wed Sep 13 03:13:55 CEST 2006


I agree with this, from a non/novice programmer perspective.  It would
make it a lot easier for me to learn the inner workings of Pd if it
were nicely labeled, and modularized.

It's so hard for me to just pick up and figure it all out!  Even
taking computer science courses cannot prepare a person for learning
how to use/program a specific code base.  It takes care and training
to become acquainted with it, and most of all, time and friendly
guides to help.

Matju, Vincent, and others, please join forces so we can kick
Max/MSP/Jitter's ass!  (Don't hate me Cycling74!)

~Kyle
On 9/12/06, Vincent Lordier <vincent.lordier at gmail.com> wrote:
>
>
> > Even considering the actual implementation instead of the simplified
> > example, I wouldn't consider that renaming p1 to priority_min is
> > really helping anyone, because they already know p1 is the minimum
> > priority by looking two lines above. All uses of p1 lie within 5 lines of
> > code, so using a longer name doesn't do much more than making the name
> > longer to read. In some extreme situations (not this function) this can
> > make the code harder to read, as the longer names clutter the function.
> >
> > >      fprintf(stderr, "priority %d scheduling enabled.\n", priority);
> > >       fprintf(stderr, "couldn't change process priority to %d.\n",
> > > priority);
> > >       fprintf(stderr, "%s (%d)", strerror(error_desc), error_desc);
> >
> > You didn't replace the fprintfs by posts. It should be posts because then
> > it can be routed through the GUI.
>
>
>
> True.
>
> > > - Localization can be done here,
> >
> > No, localization should be done in the GUI. What should be done
> > server-side, is to make error messages easier to process by the GUI.
>
>
>
> Why not ? the engine, if running on a remote machine should also be able to
> send messages to the user in its language...
>
> > > - Safe fprintf can be used to avoid overflow.
> >
> > Which overflow?
>
>
> see snprintf
>
>
> > > An explicit name saves the dev brain power at coding time ;)
> >
> > I assert that often it doesn't. A name shouldn't be more explicit than it
> > needs to be, and it's certainly possible for names to be too explicit, and
> > i don't mean the "parental advisory" sys_defaultfontshit, I mean saying
> > things that are too obvious because they're already in your face 15 times
> > in the same page and cause the code to go on for longer than you should
> > have to read.
>
>
> Quote from Wikipedia on software quality
> "Understandability
>
> Are variable names descriptive of the physical or functional property
> represented? Do uniquely recognizable functions contain adequate comments so
> that their purpose is clear? Are deviations from forward logical flow
> adequately commented? Are all elements of an array functionally related?"+
> => http://www.gnu.org/prep/standards/standards.html#Names
> => http://www.coding-guidelines.com/cbook/sent787.pdf
> =>
> http://www.raytheon.com.au/Files/Achieving%20Software%20Quality%20PDF.pdf#search=%22understandability%20readability%20quality%20C%22
> =>
> http://www.oreillynet.com/onlamp/blog/2004/03/the_worlds_two_worst_variable.html
> =>
> http://www.aivosto.com/project/help/pm-understandability.html
> => http://en.wikipedia.org/wiki/Hrair_limit
>
> etc etc ...
>
> my 2 cents about naming.
>
>
> ++
>
> vincent
>
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
>
>
>


-- 

http://theradioproject.com
http://perhapsidid.blogspot.com

(((())))(()()((((((((()())))()(((((((())()()())())))
(())))))(()))))))))))))(((((((((((()()))))))))((())))
))(((((((((((())))())))))))))))))))__________
_____())))))(((((((((((((()))))))))))_______
((((((())))))))))))((((((((000)))oOOOOOO




More information about the Pd-dev mailing list