Hello,

I am thinking of writing a small package for directional statistics in
Octave.  These are the statistics of angles and vectors/directions.

My question is, can anyone point me to an example of a well-written package
that could serve as a good template?  The questions I have are about best
practices (see questions below).  I've read the "Contributing Code"
guide and the GNU Octave core coding guidelines, but my questions are:

(a)  Do users prefer function inputs with the (..."keyword", value) style,
or the traditional ordered list of values?

(b)  Should all functions validate user-supplied inputs?  For example, if
two vectors need to be the same length, should the package code check that,
or just try adding them and let the user see the Octave error?

(c)  In the cases of other errors, e.g. a function can't find a minimum
value it needs, should the function print an error message with printf() or
error(),  throw exceptions, or do something else?

(d)  For functions that generate plots, is there an example of a function
that does this well?  My question, how much should a package alter "look
and feel" parameters like titles, axis labels, minor ticks, pointsize,
etc.?  Should I try to let users pass plot arguments through my function,
or let them modify plots later?

The reason I'm asking my question this way is that pointing to a package
and saying "This is an example of best practices" might be a quicker
response that discussing the four questions above.

Thanks and I'm looking forward to contributing!

Nick Musolino
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to