in reply to Re: Difficult code (Resolutions)
in thread Difficult code (Resolutions)

After i've viewed and made sense of a piece of crappy code i will put comments inline and update/create offline documentation if I have the time.

... but only if I don't have the time to write some tests that demonstrate what the code does and refactor the code into something more comprehensible.

Because if I don't rewrite that code into something more comprehensible I'll regret it six months down the road when a couple of feature requests and bug fixes have caused my comments and offline documentation to become out-of-sync with the code again.

Sure as onions is onions.