Monday, April 26, 2010

Archived from 19_10_07 - Search for the perfect tool chain...continues

Hi All,
On the subject of my perfect programming tool chain... the never ending search for decent support continues.
In Summary my perfect toolchain is something like...
* Code Editor - Must have all the tasty goodness of a modern IDE (Intellisense, code highlighting, Code folding, file navigation... etc.)
* Compiler/Linker - GUI interface and must have lots of different optimisations and be standards compliant.
* Debugger - Must have a solid GUI and work with whatever I throw at it.
* GUI editor - Create RAD GUI's and dialogs.

Basically Visual C++ 2005 is working for me on all these points... now where it doesnt work for me are:
* Memory leak checking
* Refactoring
* Code formatting
* Unit Testing
* Static Analysis
* UML Design (Not really round trip but with a nod to wizard generated classes etc.)
These are things I am comming to consider as basic tools for any working programmer. Especially a one man show.
So in my recent searching for such tools I have found:
* Leak checker

- Visual C++ contains a basic leak detector. Its primative but will sort of do a crappy job. Its a total pain to use especially with the STL libraries that allocate and don't return memory. (not a leak by the way but shows up anyway)
- Glowcode - This turned out to be a pretty crude tool that doesnt intergrate with Visual C++ so I consider it crap.
- Various free memory checkers which plug into your code and intercept the new/delete malloc/free operators etc. These sort of work but are prone to spew the same STL messages and bury you in false positives that take forever to work through. Basically increasing your workload... yuck but if you are desperate check codeproject or google.
- Parasoft Insure++ - I have given this a short workout and it looks good. The intergration with visual C++ is a bit basic and it has definite Unix tendencies in the GUI but it works well and detects all sorts of issues. Full marks for the detection and its way ahead of the competition. Some rough edges but the winner so far.
* Refactoring

- VC++ Macors. This is an on-going pain. I have written a bunch of crude refactoring macros for my own use, but its a lot of time and effort to keep them working and accessible. Parsing c++ is often painful and I have full respect for anyone who puts together a commmercial package.
- Ref++ this is a nice little package. Its only got a few refactorings and can sometimes miss a few changes but generally works. I recognise that its doing a fairly major job. In the absense of competition this was the only show in town.
- Refactor! for Visual C++. I have just run accross this. A free tool with a whole bunch of refactorings. My whinging has finally been answered. http://msdn2.microsoft.com/en-us/visualc/bb737896.aspx I am going to test this till it bleeds.
* Code Formatting

- VC++ autoformat. This works but its not that configurable. There are things I like and things I don't like about its style. Would it be so hard to provide some access or a style sheet?
- VC++ macros. There is a great little formatter on CodeProject. Its been developed for a couple of years but for some reason if you use it vs2005 it just uses the autoformat. So I modified it to not use the autoformat and now I use it with some tweaking to format code I download or receive from students. Its a life saver.
- Basically, I am looking for a tool that has a couple of style sheets. One that I can set for my personal style and one that I can set for "work" style, so I can work on the code in my prefered layout then click a button, convert to the official layout and submit the code to CVS or whatever. Still have not found a good solution to this problem.
* Unit Testing

- CPPUnit is where I started. Works well, intergrates well with Visual C++ once you set up all the bits manually.

Problem is you have to write all the tests manually. Yuck. I know there is no way to test logic automatically but even so...

- I have written some macros to write stubs for tests automatically but its not saving much time...
- Parasoft C++Test - This works over CPPUnit and has automated test running and test generation. The test generation is the most valuable part. The rest works well but the generation is the gold. Still they cant test logic... damit.
- Other free c++ unit test frameworks... there are a couple. They do about the same as CPPUnit... who cares, its the test generation that is the unsolved problem.
* Static Analysis
- PC-Lint - the old standard. Works well, intergrates with visual C++ crudely or via third party "Visual Lint" from riverblade software.
- Parasoft C++Test has a static checker included. This thing is very nice. Does the same sort of job as PC-Lint. Has about 800 rules. Very good intergration with Visual C++. Very nice.
- Microsoft PREFast - Dont know only found out about it today ... but its looking promising. Sounds like it checks for microsoft specific stuff so will probably be good to do as well as rather than replacing either of the above.

Currently command line but with increasing intergration. To be watched...
* UML Design
- I still have no useful contender for UML in Visual C++. I have looked at Rational Rose and Paragons thing but both have way too much complexity. I am not willing to allocate that much of my time and brain to learning yet another tool package. I only need UML for about 10% of the work, I dont want to spend 50% of the time stuffing with their bloatware.
- I have written a few macros to generate class files of different types but as yet have not written any macros to construct the interface definitions. Its not complex just useless as the interface would be very crappy. It needs a better GUI than just dialog boxes.
- Still looking. There are a few plug-ins that I have checked but nothing that has come close to a solution.

The search continues... parasoft are looking good but the cost is heavy...

No comments:

Post a Comment