Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 5
    Your SVN/git/whatever logs should cover what you changed it from and when, so there's no need for that. It's pretty obvious that you're setting foo to 1; I'd call foo something like "bizRuns" and include a comment such as // biz should only run once [ticket 1234]. Commented Aug 4, 2011 at 21:30
  • good points, Adam. I should have left off with the text and not included a hastily-typed example. <grin> Commented Aug 5, 2011 at 18:50
  • 3
    ok, so a 'better' comment would be /* setting foo to 1 as using 0 makes the MIS system crash with a 0-based data export. */ there are lots of weird reasons that need commenting, like why the unit statuses in the app I worked on couldn't handle the value 17. Commented Jan 16, 2012 at 23:27
  • This is when you want to comment, yes I can see that foo has been set to 1, but if you set it to 137 leaving a note saying why it should be 137 would be helpful. Commented Dec 30, 2013 at 14:22