Ctrl-Alt-F is my opiate of choice — I’m a ReSharper Code-Cleanup junkie.
Ctrl-Alt-F is ReSharper’s shortcut to a magical function that transforms all orphaned variables, non-standard formatting snafus, and unneeded C# using statements into a immaculate tray of chocolate chip cookies.
It’s stupefyingly satisfying.
Thanks to Markus, I am mortally dependent on ReSharper. When I used .Net 3.5 for the first time last year, ReSharper offered several intellisense suggestions that helped me adopt the slightly tweaked C# syntax — namely, var and object instantiation.
We all want to make code that’s
So readable, it comments itself…
That said, such tools create and expose preference and taste issues for agile teams.
Team Manifesto – Code Standards
I like a Team Manifesto – a living document, initiated at team formation, that converges on perfection as the team matures.
All these nit-picky refactoring and reformatting preferences should be discussed, resolved, and adopted in the Team Manifesto — not with disappearing ink, but in stone, with well-deliberated carvings that are readily updated at the pound of a chisel.
All teams should consider discussing the refactoring/formatting tool and agree upon standards.
A few questions for the team that come to mind are:
- Which refactoring/formatting tool to use, if any?
- Should the team establish a template of standard options within the tool that everyone applies uniformly (e.g., naming styles, braces layout, line breaks, type member layouts)?
- Is it okay for team members to invoke a Code-Cleanup (or analogous) on code someone else has written?
Can you think of other questions related to refactoring and coding standards that teams should address? Please post them below. Thanks!