Turning Bugs Into Features
Bugs aren't necessarily bad. Instead of squishing those bugs in your code, try turning them into features.
Join the DZone community and get the full member experience.
Join For Freei’m using r# for over a decade now, and it has gotten to the point where i’m actually able to utilize r# bugs to get things working better for me.
in this case, the scenario is using find usages as a refactoring aid. i have a tricky refactoring to do, which requires me to touch several pieces of code. in order to handle this properly, i start by finding usages on the relevant item. in this case, byview.
then i go to each of those code locations and make the required modifications.
so far so good, but on complex scenarios, it is hard to remember which portions i have done and which portions are still left undone. in order to handle this, i ctrl+x, ctrl+z the line i find. r# detects this as a change to the code that invalidates the found usage, and suddenly, i got a nice to-do list with a strikethrough for completed tasks.
Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments