Francois Zaninotto has a recent post looking at something every developer should consider when creating their applications - especially the libraries that might be used by other developers: code usability.
Usability guidelines can sometimes be of use in awkward places. I try to apply them to source code. [...] Of course, coding guidelines are there to make the code easy to read by everyone. But code usability goes somehow beyond. Let's see some of the differences.
He compares good versus bad code in a few different areas:
- Bad Code Comments
- Split Up Code
- Cleanliness
- New Conventions
- Listen To User Feedback
Each item is described, some including code examples to help make them more clear. Be sure to check out the comments for more good suggestions.