For the most part, I work with the Black Box Theory(tm). I explain the interface and little else. My reasoning is multitiered.
One, I rarely want the programmers working under me to go 'spelunking' in my code. Not because I don't have faith in my code or my coworkers, but being the one whose name is stamped all over it, I'd prefer if 'streamlining' my code was team effort with me on the team.
I document my code religiously (more for my own benefit really - I'm forgetful in my advanced years) so it _should_ be easy enough to change it. *sigh* Getting of topic...
Two, when you work in a project environment with more than one coder, you agree to certain functionality and code to it. I usually add a little more than is asked for, but too much. A little above expectations and you're a hero, too much, and you have too much free time. It's a fine line.
I try to code modules (objects, whatever) for maximum reusability, which usually means KISS.
Just my US$0.02
In reply to Re: How to write library code
by cacharbe
in thread How to write library code
by jorg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |