#POCO survey
September 17, 1994
Ed,
thanks for the up date – will try to look at it tonight.
a few suggestions for your article
1. list of reference materials & where to get them.
POCO Programming Language – AutoDesk
The C Programming Language – Kernighan & Ritchie – Prentice Hall
{ANSI C Made Easy – Herbert Schildt – Osborne McGraw Hill
this works ok for me}
…. what's your favorites?
2. some advise on how to structure POCO
– Your style seems very readable –
how /why you name variables, functions etc
Use of Upper_lowercase_Underline
comments – how to make them useful
// comments are easier to locate – one line at time
// quick to type, quick to remove
// difficult for large volumes
vs
/* comments for large amounts text or blocks of code
and
but may be hard to find missing beginning or end */
// I like comments that help me make sense of what I did 5 years ago
// comments are useful testing things -> phrase "commenting out code"
// comments are useful for selecting choices – like you used for new/advanced
users in MPS
//
//
– how to divide things up
I try to keep main() short & sweet
using functions to do the work
I like to use globals vs passing arguments back and forth to/from
functions, unless function is intended to be recycled a lot
3. code that gets used a lot (or should)
– "leaving the playground like you found it"
initializing & remember conditions – brush size, ink etc
exiting program & restoring brush size, ink etc
the way you did this in your MPS looks like good example
4. list of known POCO bugs
5. list of programs in CIS Library and their function
your personal favorites
6. testing & debug strategies that work for you
{ use of printf() & sleep(4) is one I use a lot
like if I'm not sure where I'm getting bounced out of program
I put massages in key places followed by sleep – [so I have chance to
read them]
printf("got to function 1");
sleep(2);
.
.
.
printf("got to function 2");
sleep(2);
.
.
.
or to report values of things that don't seem to be right
printf("the X coordinates: %d, Y coordinates: %d" X_coor,Y_coor);
sleep(8);// I need longer to read data!
7. what editors, tools to use & why
POCO Editor too limited for serious work
{I use Norton Editor – when creating, major modifications
features that make good editor
DOS ASCII editor
block move, copy, delete
search & replace
punctuation matching (more useful for AutoLISP!)
copy blocks between files
simple to use
I'm use to it}
any particular one(s) you recommend?
8. how to get help –
{like send Uncle Ed a CIS note?}
9. programming practice & ethics
– like copyright message
I think that simply adding name and date is legally sufficient.
Stating your intention (shareware, freeware, for a price) with in
code is good
practice, & courteous, I think, but don't know if it is effective in preventing
rip offs.
value of sharing your new code with your poco buddies
like getting beta testing & feed back
10….. {sorry – my brain went dry…}
I'm sure what ever you come up with will be great-
I'm trying to subscribe hope it starts in time to get to read
your article.
best regards
Dave Wright