Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recursion in Java
#12
Stereo Wrote:I write comments before, during, and after writing code. In order to develop code, I'm thinking about the problem, and I like a record of that, so a multitude of comments. I guess that applies a little less when you're given an algorithm and just have to implement it.

Same here.
Since we rarely do "flowcharts" and "pseudo-code" except in extreme cases, the comments I put in before the code serve that same purpose of keeping a general overview of the algorithm in my mind and view.
Then, every line or chunk of code that required more than a second's thought to write, gets documented as it is written. So I don't have to spend ten times as long, later, trying to understand what I did (or tried to do) there - and anyone else reading it doesn't mistake what it does, how, and why, either.
After the coding and debugging are done, there are usually very few comments that need adding. Mostly stuff like formal headers required by project documentation rules.
Reply


Messages In This Thread
Recursion in Java - by Five Second Pose - 2011-05-03, 06:06 PM
Recursion in Java - by Hazzy - 2011-05-03, 06:07 PM
Recursion in Java - by Five Second Pose - 2011-05-03, 06:20 PM
Recursion in Java - by Fiel - 2011-05-03, 07:10 PM
Recursion in Java - by Cyadd - 2011-05-03, 07:50 PM
Recursion in Java - by Nikkey - 2011-05-03, 08:18 PM
Recursion in Java - by Five Second Pose - 2011-05-03, 08:34 PM
Recursion in Java - by Kalovale - 2011-05-03, 08:52 PM
Recursion in Java - by Five Second Pose - 2011-05-03, 11:10 PM
Recursion in Java - by Kalovale - 2011-05-03, 11:23 PM
Recursion in Java - by Stereo - 2011-05-04, 12:09 AM
Recursion in Java - by SaptaZapta - 2011-05-04, 01:19 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)