2
votes
1answer
164 views

Why does the tool offer to change the code - just because it can?

Resharper (or is it Visual Studio - it's a yellow light bulb with a tiny red filament in it) offers to "invert if" on this code: if (tItems >= 0) { return tItems; } SetTotalItemsAndTotalAmt(); ...
2
votes
3answers
261 views

What is the Most Expedient Way to Make Legacy Code Conform to 'The Principle of Proximity'?

On page 242 of Code Complete 2, Steve McConnell touts The Principle of Proximity. Put simply, Mr. McConnell advises programmers to keep related actions together. In my case, the applicable emphasis ...