CodeWizard for Linux
Price: $2495 US (single license)
Reviewer: Ben Crowder
You're working on your latest C++ project, an infinitely cool piece of software that everyone is dying to see. Before you release, however, you want to get rid of as many bugs as possible. You know you have a certain bad habit you learned in C, the one you have to go back and fix time, after time since you keep forgetting you're writing in C++ now.
Enter CodeWizard by ParaSoft, a tool that searches through your code for violations of good C++ coding standards. Based on programming ideas from Scott Meyers' books Effective C++ and More Effective C++, CodeWizard automatically enforces thirty-five descriptive rules or “items” for effective C++ programming—standards that significantly reduce the number of errors in your code. In addition to Meyers' rules, ParaSoft has included a list of thirty-six additional items.
What kind of rules are we talking about? First of all, the items have each been given a rating according to the severity of the rule. The five ratings, from least serious to fatal, are: Informational, Possible Violation, Violation, Possible Severe Violation and Severe Violation (see Figure 1). An example of an Informational rule is item 2 under the Effective C++ list: “Prefer iostream.h to stdio.h.” So, for instance, if you include stdio.h in your code, one of the warnings that will come up will explain that you shouldn't use stdio.h when coding in C++ (see Figure 2). A Possible Violation is rule #17: “Check for assignment to self in operator=.” Item #22 catalogs a Violation: “Pass and return objects by reference instead of by value.” A Possible Severe Violation is something like, “Don't try to return a reference when you must return an object.” Severe violations can prove to be fatal to your program. Rule #10 is a good example: “Write delete if you write new.” Seems obvious, of course, but you may forget it and thus cause ugly memory leaks. The items are divided into different categories, such as “Shifting from C to C++”, “Memory Management” and “Inheritance and Object-Oriented Design”.
CodeWizard came with some instructions on installation and basic usage. The distribution file is a tar file—it's up to you to manually copy it over from the CD and unpack it. A graphical installation program would come in handy for less experienced users (although you probably won't be using the UNIX version of CodeWizard, if you aren't familiar with a UNIX shell and basic commands). You can configure CodeWizard as either root or a regular user—both ways worked fine for me. A license is required, which must be obtained from ParaSoft. The pslic program, the ParaSoft License Manager, will give you a machine ID and a network ID, which you give to ParaSoft. In return, you'll receive an expiration date and a password which will unlock CodeWizard. I'm sure there's an easier way to manage licenses, one that doesn't require contacting ParaSoft, but this method minimizes pirating (which is, of course, a concern only for commercial software vendors—the GPL is beautiful in that it completely shatters software piracy).
You use CodeWizard in place of your compiler on the command line. Instead of typing
g++ project.c -o project
you would use
codewizard project.c -o projectYou can set the compiler for CodeWizard to use in a configuration file. CodeWizard then scans your code for any of the violations in its rule set. On a side note, you can suppress any of the rules (in case some of them make no sense when applied to your particular project), or you can add your own rules using RuleWizard (see Figure 3). There is a Motif GUI program, Insra (see Figure 4), that displays the error messages and allows you to open the source files, make any necessary changes, rebuild the program and retest the code for violations. If you want to keep everything strictly console-based, however, you can do that as well.
All in all, I'd have to say that CodeWizard can be an incredible help in C++ coding. A Java version is available as well, and with the ability to add your own rules, you could foreseeably use it for almost any other language as well. Though it is expensive, if you're serious about your C++, this would be a wise investment.Version 3.0 is due out in September.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Sony Settles in Linux Battle
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Libarchive Security Flaw Discovered
- Profiles and RC Files
- Maru OS Brings Debian to Your Phone
- Understanding Ceph and Its Place in the Market
- Snappy Moves to New Platforms
- The Giant Zero, Part 0.x
- Git 2.9 Released
- Astronomy for KDE
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide