[Update July 25 - Codekana 1.0 has already been released, so you can go to www.codekana.com for the latest release and all the details]
For the past few months, I’ve been working in a new product: Codekana for Visual Studio. It is a Visual Studio add-in which provides enhanced code visualization for C/C++ and C# code in Visual Studio. It enhances the syntax coloring, not for decorative reasons, but in order to provide actual useful information, such as control flow cues; it can draw graphical outlines of the code’s block structure (allowing several One-True-Brace-Styles); it highlights all matches of the last search; it allows you to zoom in and out with control and the mouse wheel; and several other features. Here is a screenshot of how Visual studio looks with Codekana in action (click for a full-size view):
Some details about what you can see in this screenshot:
- Blocks are highlighted and outlined according to their function: green for ‘if’ blocks, brown (dark-red) for ‘else’ blocks, red for loops and loop control structures, etc… The goal of this is not artistic, it allows you to grasp the control flow of your code without even having to read: you will see where the code loops, whether there is another way to exit a loop than by looping to the end, you can see what block a condition controls, and more – ‘return’s are also highlighted in orange to show early exits, multi-way conditions (‘switch’ blocks) are colored in blue, etc. Once you get accustomed to the coloring (of course, you can customize it to your own taste), you’ll be able to understand control flow at a glance.
- Also thanks to the coloring above, when you have several nested blocks and a long list of closing braces, you know which brace closes what construct. If you want to insert some doe right before the end of a loop, you can visually tell where to insert it.
- The name of the function at the top is highlighted too. This is a very quick way of knowing where in the code you are – especially with C-like languages’ brain-dead declaration syntax, the actual defined name can be lost among complex return types, template arguments, and what not. All definitions have the defined name highlighted: function definitions, class/struct/union/enum definitions, etc…
- All matches of the last search are highlighted in yellow. When you are searching, you rarely want to find just the first occurrence. Visual feedback is invaluable in getting information with high bandwidth.
- Mismatched braces and parentheses are conveniently highlighted. Also, thanks to some pretty sophisticated incremental parsing technology, and unlike all other tools out there, Codekana is pretty smart about which brace is the mismatched one. Look at the screenshot above, it’s not obvious that the mismatched brace is the one highlighted, and neither VS’s built-in parse, the compiler, or any other tools gets it right, but Codekana tells you which one is the mismatched one.
Of course, all this smart parsing happens in a background multithreaded processing framework – this way, it won’t slow down your editing even if you have just pasted 1,000 lines of pretty convoluted code.
Codekana has several more features, and I could go on talking about them, but since it’s been over one month in closed but intense beta, it’s very solid, and due out next week, I’ll just you furnish you with a link to the documentation if you want to know more, and with a link to download and install the beta version:
As you might guess, this technology is also part of what will become kodumi, the text editor I’m working on. But, meanwhile, it is already available inside Visual Studio for your development convenience.
I’m now off to getting the web site ready. And BTW, I’m going to release this at a very affordable price-point ($39), to get as many users as possible on board while I prepare great new features.