• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Code Comments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Code Comments


  • Subject: Re: Code Comments
  • From: Ian Joyner <email@hidden>
  • Date: Wed, 16 Aug 2006 13:55:27 +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.

Doesn't look old fashioned to me, just good practice. (Or maybe I should go with the new trendy way of writing the really bad code I see around the place.)


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 agree, good practice to have an overall class design before implementing it, but I'd probably remove the working comments from the final code, since most programmers can see I am initializing variables, or that the call 'save ()', is actually saving changes. I guess this kind of working comment comes from the fact that of course we can think faster than we code (now who was it who said 'I think, therefore I code').

Ian



 _______________________________________________
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

References: 
 >Re: Code Comments (From: Dov Rosenberg <email@hidden>)

  • Prev by Date: Re: Code Comments
  • Next by Date: Open source as the way some important software is developed now [Re: WebObjects Foundation]
  • Previous by thread: Re: Code Comments
  • Next by thread: Re: Code Comments
  • Index(es):
    • Date
    • Thread