Several years ago, I discovered a great developer tool called CodeSMART. It filled in all the gaps I could think of (and many that I hadn't!) which weren't incorporated into the Visual Studio IDE at the time. When the next version of Visual Studio rolled out, I remember thinking at the time that (a) it was nice to see many of the CodeSMART ideas incorporated into the IDE but (b) what a pity it was that CodeSMART would probably disappear out of sight now that it no longer had a unique set of tools.
How wrong I was! CodeSMART is still here and still as innovative as ever. This year CodeSMART 2009 for .NET was released and it too is filled with really useful tools that help you flit around your code.
For me, the major tools in CodeSMART fall into two distinct categories - those that help me write code and those that help me navigate around my code.
The Code Explorer bridges both these areas. Take a look at it in its plainest version:
When you first look at this, you probably think that it doesn't look much different from the IDE's Solution Explorer. How wrong you would be! Watch what happens when I expand, just for example, Form 4:-
OK - useful list of what is in the class, but as the saying goes "Is that all you've got?". Nope. Right click on any item and you will get a context menu that gives you various choices, including
- Go To Start Point (of the code block)
- Got to End Point
- Select the code
- Cut the code
- Copy the code
- Remove the code
Quick and easy navigation, with a range of choices.
Even more useful to me though is what happens when you do visit a block of code (either from Code Explorer or just by navigating around the project as normal). Code Explorer remembers where you have been and adds the location to the History pane:
And of course I can go directly to any location in that History list by double-clicking its name or can again right-click for other options.
Code Explorer has two more panes
- Node Search, which is a quick and handy search tool. Once all matches are found, you can right click or double click as with the other tools.
- Workbench, which you can use to store links and details of code blocks that you want to return to later. Unlike the History pane, which will drop items off the end once you reach the storage limit, items you place on the Workbench will stay there until you decide to remove them.
Finally in Code Explorer I just wanted to show you the Code Flow feature. If you click on any of these Code Flow items, you will get a snapshot of, well, your code flow, of course!
By this stage, you won't need me to tell you what happens if you click on any of those Code Flow sub items.
AutoText is a kind of snippet/shortcut feature that can be very useful too. You can view, create, edit and manage the AutoText items:
And you can insert them by typing the key letters followed by Shift-Tab.
Actually Try-Catch wasn't a very good example, because if you check out the CodeSMART main context menu it has a set of Try-Catch features built in there. These enable you to select any block of code and automatically have it wrapped in Try Catch blocks.
There is however a good sized collection of Auto Text items that you can use. And of course you can create and add your own as and when you need to.
Because I like to group different kinds of code blocks together, I used to manually cut and paste them around the code file. CodeSMART has a feature that saves me this effort now - the "Sort Procedures" tool.
As with almost everything in CodeSMART, this is entirely configurable.
Review and Analysis Tools
We all do our best to write good code, but let's face it, most of us have developed a lot of bad habits too. The Review and Analysis tools will help you identify and rectify many of these.
The Code Analyzer will do things like identify empty procedures, dead (i.e. unused) variables and code, non-standard names, etc.
The Designer Analyzer has configurable settings that can help you achieve consistency of your layout, e.g. identifying inconsistent layouts in terms of alignments, Forms whose caption hasn't been changed from the default, and so on.
Also worth a mention for those of us who consistently use our fingers too quickly for our brains to keep up - there is a useful Spell Checker that you can run, find errors and choose corrections in the usual way.
There are many more features than the ones I have covered here. These are just my personal favorites. CodeSMART continues to be a valuable third party tool - one that I suspect will still be around in new, improved and bang up to date forms for many years to come. Well worth the money for the time and effort it will save you once you get in the habit of using its many features.
You can download a fully working demo sample from their website.