Re: Code Comments
Re: Code Comments
- Subject: Re: Code Comments
- From: Q <email@hidden>
- Date: Wed, 16 Aug 2006 14:34:45 +1000
On 16/08/2006, at 1:09 PM, Dov Rosenberg wrote: I am an old fashioned programmer. I usually write comments to describe what I am GOING to do before I actually do the code. Then I just fill in the code. Helps me organize my thoughts better.
I think the term old-school rather than old-fashioned is more appropriate. I do something like: /** This is the documentation of what this thing is supposed to do **/ Public String goDoSomething(){ // initialize my variables // get array of things // cycle thru array and update each item // save changes, build response } Then I actually go back and write the code after I get the sequence of events in the correct order. Most of the time I usually stub out the entire class before I implement it.
I do this also. In addition, for anything that is non trivial I go through another phase before writing code, and that is to write pseudo code that describes how the algorithm should work (usually looks a lot like REXX code), particularly for anything that involves recursion. Ultimately only the comments that aren't describing the blatantly obvious survive the implementation phase.
-- Seeya...Q
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_____ / Quinton Dolan - email@hidden __ __/ / / __/ / / / __ / _/ / / Gold Coast, QLD, Australia __/ __/ __/ ____/ / - / Ph: +61 419 729 806 _______ / _\
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden