Re: Compulsive use of With



Lets face it, no programmer is happy with the previous programmers code to some degree. The impulse is to rewrite. I'm supervising someone who is very similar to me in style, she likes to rewrite my code, and I have to tell her not too. She says it's so she can 'understand' it.
Always nicer to maintain code that works than code that doesn't.

Rewriting code really can help to understand it and *sometimes* it is necessary. I wouldn't generally rule it out, it really depends on the way the code is written. For example large frameworks like the VCL, Qt, Boost or the STL are mostly cleanly designed albeit they use different paradigms they usually keep that paradigm throughout the framework. The style isn't necessarily yours but once you put some effort into understanding it you will see the pattern.
However there is other code that looks much like it was patched too many times and lacks an overall concept or structure or the initial structure/concept isn't flexible anymore for the new requirements. Ambiguity is not just a style problem but shows also that often the "bigger picture" is missing.
This type of code can break every time you change something since it depends on a myriad of assumptions that are only valid for very restricted scenarios (the ones that were important to implement exactly what was needed, just fix a bug or patch a small thing/feature).
In this case a (partial) rewrite is IMO a good idea.
.



Relevant Pages

  • Re: dbGO for .NET (aka ADOExpress) - dont hold your breath
    ... If I've got to rewrite at all, ... we switched frameworks because we were still using an old ... from ADO to ADO.net that difficult. ... MD Anderson Dept. of Biostatistics & Applied Mathematics ...
    (borland.public.delphi.non-technical)
  • Re: Compulsive use of With
    ... Oliver Townshend wrote: ... The impulse is to rewrite. ... I'm supervising ...
    (borland.public.delphi.non-technical)
  • Re: Compulsive use of With
    ... Ray Marron schrieb: ... The impulse is to rewrite. ... I'm supervising someone who is very similar to me in style, she likes to rewrite my code, and I have to tell her not too. ...
    (borland.public.delphi.non-technical)
  • Re: Compulsive use of With
    ... The impulse is to rewrite. ... I'm supervising someone who ... Ray Marron ...
    (borland.public.delphi.non-technical)