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.

Required fields*

14
  • 50
    +1, especially for the last paragraph/sentence. So true... Commented Feb 16, 2012 at 8:20
  • 11
    "If the required changes are small then follow the original coding style, that way someone picking up the code after you only needs to get used to one set idiosyncrasies. " This is the best advice on this thread. Commented Feb 16, 2012 at 16:18
  • 3
    +1 I would add, do try to get the code under test before you change it. Commented Feb 16, 2012 at 18:58
  • 4
    @MarkJ -- I agree, getting a decent set of unit tests helps tremendously. This can be more difficult than it sounds as after a series of incremental changes and quick fixes there is probably no accurate function spec other than "do what the old version did". Commented Feb 17, 2012 at 2:03
  • 6
    @MarkJ : And exactly how do you know what every edge case is that needs to be tested to be certain that you have complete coverage by "running it". For a trivial program or one with simple inputs, I accept that the approach might work. For a real program, I have grave doubts. Commented Mar 22, 2012 at 1:53