Code refactoring is defined as the act of changing code without changing what it does. The actual work involved in refactoring—extracting methods from oversized modules, tidying up and unifying variable names, identifying unhandled exceptions, and all the other cleanup, simplification, and standardization chores—can be daunting, indeed, and risky too. But when code gets too complex or when you plan to move your code to a new architecture, you really should consider refactoring.
C# Refactory by Xtreme Simplicity is a set of must-have code-refining tools for your C# solutions. C# Refactory has its own parsing engine and analysis, so it's not limited to the information available in Visual Studio® .NET. C# Refactory parses your entire solution, not just the current file. It's written in C# and fully integrated into Visual Studio .NET so that the appropriate refactory functions are always available to you in the right-click menu no matter what you're doing.
C# Refactory metrics show you statistics at the file, project, and solution level. You can explore individual file metrics, classes, and methods just by right-clicking on any line of source code in the editor. You can sort by any of the metrics and identify methods and classes that have become too complicated. Class metrics show all your classes along with the number of lines of code, comments, cyclomatic complexity, and so on.
Once you have found those long, complex methods, you can use the Extract Method feature to pull out individual methods—just highlight a section of code and extract it. C# Refactory creates a new method along with the required input and output parameters. It also accounts for looping and early exits.
Price: $99 per single license.
DotNetBar Suite 5.0 by DevComponents.com is a set of 12 integrated components that let you create unique user interfaces in Visual Studio .NET. One of the most interesting additions in this version of DotNetBar is a BubbleBar control that solves the problem of small, unreadable, hard-to-click toolbar buttons. BubbleBar creates a UI experience similar to the one provided by the Mac OS X interface. When the mouse hovers over the toolbar, the image under the mouse will expand smoothly to a predefined size, so users can see the button and have a larger area to click on. Improved designers and other unique controls, like Dockable auto-hide and windows with Diamond Docking Hints guides, make the job of creating your interface easier. There are lots of helpful tutorials on the site to get you started.
Price: $199 per single license. www.devcomponents.com
The Internet Macros Image Recognition Plugin by iOpus is a new add-on for both the iOpus PRO Edition and Scripting Edition products—two solutions for Web automation and testing.
The Image Recognition Plugin uses machine vision technology for testing Web sites by comparing actual images instead of X/Y coordinates. It recognizes and compares images rendered in the browser, regardless of the technology that created them.
The plug-in gives you a new image search function, a command-line interface, batch file support, and the ability to perform Web site response time measurements. The plug-in can switch between different Web pages automatically with its tabbed browser interface.
The Scripting Edition is designed for use by Web professionals and people responsible for Web site testing. It includes all of the functionality of the PRO Edition, plus an easy-to-use scripting interface that extends the popular Windows® Scripting Host with the ability to replay Internet Macros and extract Web page data. You can also use Visual Basic®, Microsoft Excel®, Access, Visual Basic .NET, C#, and Perl to access this interface.
Price: Image Recognition Plugin for PRO and Scripting Editions is $998.
UML 2.0 in a Nutshell by Dan Pilone and Neil Pitman, (O'Reilly Media, Inc.) is a comprehensive guide to the syntax and semantics of the Unified Modeling Language version 2.0. It covers the major diagram types, including class diagrams, use case diagrams, composite structures, and interaction diagrams. Each chapter has detailed explanations of all the symbols, notations, and line types.
On the surface, UML is a visual language for capturing software designs and patterns, but if you dig a little deeper you'll find that UML can be applied to quite a few different areas and can capture and communicate everything from company organization to business processes all the way to distributed enterprise software.
For that reason, the book is aimed at a wide audience. Pilone and Pitman discuss modeling business organizations, real-time systems, and databases, as well as the customary software development modeling techniques.
Price: $34.95, 240 pages.
Data Structures and Algorithms Using Visual Basic.NET, by Michael McMillan (Cambridge University Press), is a dedicated reference for Visual Basic .NET. It gives you a comprehensive discussion of the major data structures and algorithms in Visual Basic, without having to translate them from C++ or the Java language. The book covers arrays, linked lists, hash tables, dictionaries, trees, graphs, sorting, and searching, as well as more advanced algorithms, such as probabilistic algorithms and dynamic programming— all in an object-oriented fashion.
The book includes a tutorial on how to use data structures and algorithms and a reference for implementation using Visual Basic .NET for data structures and algorithms from the .NET Framework Class Library, as well as those that you will need to write for yourself.
The author's approach is very practical. For example, he uses timing tests rather than Big O analysis to compare the performance of data structures and algorithms. This book can be used in both beginning and advanced computer programming courses that use the Visual Basic .NET language, but it is also useful for the practitioner.
Price: $45, 412 pages.
.NET Gotchas (O'Reilly Media, Inc.), by Venkat Subramaniam, is a valuable resource for programmers. Each pitfall is fully explained in the book, using Visual Basic .NET and C# examples to show you how the unsuspecting programmer can inadvertently fall victim to these code demons, and how these problems manifest. There are comparisons between C++ and C#, and Visual Basic 6.0 and Visual Basic .NET throughout the book that are really helpful if you are migrating.
The main topics include snags and pitfalls when working with types, important compiler warnings, and other areas of concern. The section on garbage collection goes a long way to explaining how some mysterious performance glitches can happen if you rely on finalizers, and how inheritance and polymorphism signature mismatches can lead to method hiding. The multithreading section shows you how exceptions thrown from threads in the pool in the .NET Framework 1.x are lost, and the section on COM interop and enterprise services discusses inconsistencies across languages.
Price:$39.95, 396 pages.
Send your New Stuff to newstuff@microsoft.com.
All prices were confirmed at press time and are subject to change.