On Mon, Apr 17, 2006 at 02:10:45PM -0400, Tanner Lovelace wrote: > The solution to this is to make code sections small. Make them > do one thing and only one thing. That doesn't mean it can be > done in a clever manner.
I seem to remember Linus saying something in an interview I read to the effect that a function should perform one task, otherwise it is too complicated. While it's not always easy to determine what a single task is, and not wanting to end up with thousands of stupid functions, I think a good programmer should have a reasonably good feel for a balance between the two. Now that you have the functions broken down, it's good to comment at the start what that function does, even if you don't have time to go in and comment on the details. I had the misfortune of spending some time reading through some of the evolution-data-server code. Ugh! No matter whether it works well or not, not one line of comment as to what the functions do. Not for any of the functions I looked at anyway. Almost impossible for someone else to come in and see what is going on. </rant> Owen -- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
