Comments
Bruce Badger
bwbadger at gmail.com
Wed Sep 12 17:08:05 UTC 2007
On 12/09/2007, tim Rowledge <tim at rowledge.org> wrote:
> On 11-Sep-07, at 9:57 PM, Jason Johnson wrote:
> > It truly is annoying when you look at classes with no comments.
> > Writers of classes need to remember that the next person looking at
> > the code doesn't have the whole architecture in their head like you do
> > so they may not know where to start.
> And to repeat repeat myself again again, the original writer won't
> have it all in her head after a distraction.
> Or a few weeks. Or a vacation.
Yes indeed. I tend to write a method comment before I write the code.
It helps me to make sure I know what the *intent* of the message is
before I start on the implementation. If I find it hard to explain
what a method should do that's an indicator that all is not well with
my design.
BTW, I don't comment all methods, but I certainly comment most methods.
--
Make the most of your skills - with OpenSkills
http://www.openskills.org/
More information about the Squeak-dev
mailing list
|