As part of fixing old legacy code (written ~5 years ago and being maintained ever since) I asked one of my programmers to search all try-catch clauses in the application and make sure log4net is logging them. What I found was that people use try-catch a lot as part of their debugging procedure or "let's cover up our failures" and as part of the application logic. All of them are WRONG uses of the try-catch mechanism! Some examples: Example #1 - "LET'S PLAY CATCH!" try { ... } catch (Exception ex...
" Each Tuesday, beginning tomorrow, Nov. 13, a VS 2005 project will be provided which contains one or more specified "smells." The project may be a Windows App, a Console App, an ASP.NET Web App or even a simple Class Library; but it will always be in C# 2.0. Refactorings may range from simply introducing new methods to applying design patterns. The project will have one or more unit tests, verified with NUnit 2.0, to verify that the project is in working order." Billy McCafferty started a new challenge...