Domain: parasoft.com
Stories and comments across the archive that link to parasoft.com.
Comments · 12
-
Use a testing framework
Use a testing framework like Parasoft's CPP stuff http://www.parasoft.com/jsp/products/home.jsp?pro
d uct=CppTest -
Re:Perhaps....Well, when you combine enough of your small functions/methods together into one big monolith of a program problems tend to surface. What then?
You write tests to encompass these larger pieces of functionality. In general, debuggers are usually used at the lowest levels: checking variables and references, and sometimes as far as processor registers. At higher levels of abstraction, the debugger becomes less useful, as you're generally not looking for null pointers and the like.
When unit testing, once you identify a bug, you write a test case that fails, that you would otherwise expect would pass. Fix the bug such that the test passes, and repeat. This works pretty well in the real world, and the proliferation of unit testing tools (both free (JUnit, CppUnit) and commercial (Parasoft)) is a testament to the usefulness of this technique. Many professional developers I work with haven't dusted off the debugger in years...
[I] have yet to see a reason to abandon debugger use.
I'm not advocating abandoning debugger use, if you find it truly productive. However, over the course of a project I spend less time writing unit tests than I would if I had to fiddle with a debugger.
Sometimes you need to see the cogs in motion.
And this is where configurable logging comes in. It's an automatic process. It's also a lot less painstaking than remembering what watchpoints and breakpoints you had to use when you saw this bug happen last week while fixing somethig else.
-
Insure ++
How does it compare with Insure++? This has been available for Linux for some time.
-
Re:Valgrid is not as complete as Purify
Especially since purify doesn't run on linux...
Excellent point. It's also another reason why I've found Parasoft's Insure++ to be superior to Purify.
I'm sincerely looking forward to checking out Valgrind. Can someone post a feature comparison of these three?
-
Re:Valgrid is not as complete as Purify
And, btw, Purify (never used it under Linux so maybe it is different there) can also work on executables (and DLLs/SOs, etc) without a relinking.
You wanna know why you've never used Purify under Linux? Cuz it's not available. AFAIK, no Rational tools are available for Linux. When I was looking for Linux tools at my previous job, the only memory checker available for Linux was insure++. I also found that there were no commercial profilers available for Linux. gprof just doesn't cut the mustard, especially in multithreaded apps, and Rational's Quantify wasn't available for Linux. When I called Rational to ask if they planned on supporting Linux, they said "Maybe sometime in the future", but when I continued questioning them, they said they had no immediate plans to start working on Linux versions of any of their software.
So, while Valgrind may not be as complete as Purify (I don't know if it is or not), it's a helluva lot cheaper than insure++ (~$4K license -- well worth it if it's not your money), and better than any other Free software I've seen. -
Re:Interesting
Try Insure++ from ParaSoft. It catches more memory leaks, memory corruption and other kinds of errors than Purify, and is available for Linux.
I've been an Insure (was Insight) user for 5-6 years now, and it is a wonderful tool. It will save you many person-hours of painful debugging, especially if you use C (like we do). -
Re:Dumb security question
Insure (was Insight) does a tremendous job of this. I've been using Insure (used to be called Insight) for many years, and it can find all sorts of runtime problems. Of course, doing all the runtime checks is slow and takes time, but the savings in development time are awesome.
I am just a satisfied customer, and have no relationship with the company. -
Use Insure++
We have been using Insure++ from ParaSoft, and it works wonders. In my experience, it catches far more bugs than Purify, the other such product. The only catch is that the execution is a lot slower, since every memory access is monitored. But, what would you rather waste: CPU cycles or your own time?
:-) -
More helpful tips for youWhile I was out for a while I thought of a few more things to post that should have been included in the above.
While I don't think either of them were really overtly trying to mentor me, I owe a lot of credit for what I know and what I can do to a couple of brilliant programmers that I've had the privilege to work with. Both of these fellows are very kind, pleasant people and went out of their way to help me. They also both go out of their way to write correct code, as opposed to, say, just screwing around with it until it sort of works.
I met Haim Zamir at Live Picture (now MGI Software) in 1997 where I really began my C++ effort in a serious way (I tried it in 1990 to write test tools at Apple but didn't really enjoy the experience). Have a look at Haim's Resume, particularly under "Skills" where he lists:
Well grounded in disciplines of software engineering for correctness, robustness, performance, and longevity
Haim can write the most difficult code, and it doesn't just work right, it is unquestionable.Another brilliant programmer is my friend Andrew Green. Andy spares no amount of effort to get his code just right - he devoted nine years to developing the ZooLib cross-platform application framework before releasing under the MIT License. (Not five years as I say on the page.)
If you think being correct, as opposed to merely working ok isn't important, imagine trying to get platform-independent reference counted smart pointers to work in a multithreaded application framework. Andy did.
For an archive of anecdotes of interesting, funny and sometimes tragic technology quality problems, please read:
-
The Forum on Risks to the Public in Computers and Related Systems,
with such anecdotes as:
- The Sinking of the USS Gitarro (because of either poor training, poor UI, or both)
- The scary MSWord residue feature - exchange Word documents during legal negotiations?
- Also see the book Computer Related Risks by Risks moderator Peter Neumann
If you write software, another good investment (more important than your hardware investment), is buying and reading good books. As a software consultant I keep the canceled checks and receipts for my technical book purchases; in 1999 I deducted about $750 worth of technical books from my taxes and about $250 in 1998.
But there are a lot of bad software books out there; much as there was a gold rush due to the Internet, there was a smaller-scale gold rush for technical book authors over the last couple years. A really good source of straight-talking book reviews by people who have good reason to know what they're talking about is maintainted by the Association of C and C++ Users at:
The ACCU is interested in more than just C and C++ these days, if you program in those languages, Java or (dare I say it) C-sharp you should join. The mailing lists is pretty low traffic and has some of the best signal-to-noise ratio of any list I've seen (except Risks). The ACCU's technical journals, with articles written by the members, are a valuable source of information on such things as how to write exception-safe code.(Note to CowboyNeal - writing C-sharp with the pound sign set off the lameness filter, driving me damn near out of my skull. How about adding something to the preview to let us know which characters are lame, exactly?).
And good news for those of you across the pond (but bad news for me), it's a British organization and holds regular technical conferences. I believe they also send observers to the ISO standards bodies.
If you program in C++ you should read these two books by Scott Meyers and put them to practice in your code. Read each item one at a time and then go through your code from beginning to end to see how you can apply it:
- Effective C++ - ACCU Review - be sure to get the 2nd Edition
- More Effective C++ - ACCU Review
-Weffc++ (C++ only)
Importantly, in any language, make sure your code compiles cleanly without warnings with all the warnings enabled in the compiler - use the -pedantic option in gcc.Warn about violations of various style guidelines from Scott Meyers' Effective C++ books. If you use this option, you should be aware that the standard library headers do not obey all of these guidelines; you can use `grep -v' to filter out those warnings.
C++ is not the problem language it's often said to be if you follow Meyers' advice, but if you prefer C you certainly can have problems there too - and note that the preferred language for Gnome is C (while KDE is an extended C++), for C programmers you should read:
People who write in any programming language, from assembler on through C and way out to prolog, really should go back to our roots and read the early book: Sadly, this book is out of print, but see the "E" Titles Section at ACCU for other Elements of Style books.Back to the topic of compiler warnings, remember reading about lint in Kernighan and Ritchey's The C Programming Language? When I started out in my first real programming job, doing Sun system administration and writing image processing software back in the late '80's, I learned to write "lint" targets in my Makefiles, and I'd type "make lint" after editing but before compiling to actual machine code. This made my code much easier to debug and quicker to develop.
Much of lint's function is now available in the warnings of GCC (but I don't think all of it), but there are some proprietary products that will do extremely rigorous statis analysis of your source code. I haven't yet used either (although I plan to) but the two I know about are:
Looks like I missed one when I spoke about Bounded Pointers for GCC, Spotlight, etc. in my previous post. Parasoft offers: But note that these products use patented algorithms - number 5,581,696 and 5,860,011.You can search by patent number here.
And speaking of web programming, many Slashdot readers write web applications (Linux being a "server OS" as they say). How many of you validate the HTML that's generated by the web applications you write?
Your HTML should work well in any browser and it should be well designed for easy usability. I don't mean attractive graphics. I mean it shouldn't suck. Two links on design:
Finally, to make sure your HTML is valid, test it with the W3C HTML validation service. You have two choices of how to get your documents processed:- By uploading static files from your browser - most convenient during hand composition
- By entering its URL in a form - best for dynamic pages and final tuning of static pages
-
The Forum on Risks to the Public in Computers and Related Systems,
with such anecdotes as:
-
More helpful tips for youWhile I was out for a while I thought of a few more things to post that should have been included in the above.
While I don't think either of them were really overtly trying to mentor me, I owe a lot of credit for what I know and what I can do to a couple of brilliant programmers that I've had the privilege to work with. Both of these fellows are very kind, pleasant people and went out of their way to help me. They also both go out of their way to write correct code, as opposed to, say, just screwing around with it until it sort of works.
I met Haim Zamir at Live Picture (now MGI Software) in 1997 where I really began my C++ effort in a serious way (I tried it in 1990 to write test tools at Apple but didn't really enjoy the experience). Have a look at Haim's Resume, particularly under "Skills" where he lists:
Well grounded in disciplines of software engineering for correctness, robustness, performance, and longevity
Haim can write the most difficult code, and it doesn't just work right, it is unquestionable.Another brilliant programmer is my friend Andrew Green. Andy spares no amount of effort to get his code just right - he devoted nine years to developing the ZooLib cross-platform application framework before releasing under the MIT License. (Not five years as I say on the page.)
If you think being correct, as opposed to merely working ok isn't important, imagine trying to get platform-independent reference counted smart pointers to work in a multithreaded application framework. Andy did.
For an archive of anecdotes of interesting, funny and sometimes tragic technology quality problems, please read:
-
The Forum on Risks to the Public in Computers and Related Systems,
with such anecdotes as:
- The Sinking of the USS Gitarro (because of either poor training, poor UI, or both)
- The scary MSWord residue feature - exchange Word documents during legal negotiations?
- Also see the book Computer Related Risks by Risks moderator Peter Neumann
If you write software, another good investment (more important than your hardware investment), is buying and reading good books. As a software consultant I keep the canceled checks and receipts for my technical book purchases; in 1999 I deducted about $750 worth of technical books from my taxes and about $250 in 1998.
But there are a lot of bad software books out there; much as there was a gold rush due to the Internet, there was a smaller-scale gold rush for technical book authors over the last couple years. A really good source of straight-talking book reviews by people who have good reason to know what they're talking about is maintainted by the Association of C and C++ Users at:
The ACCU is interested in more than just C and C++ these days, if you program in those languages, Java or (dare I say it) C-sharp you should join. The mailing lists is pretty low traffic and has some of the best signal-to-noise ratio of any list I've seen (except Risks). The ACCU's technical journals, with articles written by the members, are a valuable source of information on such things as how to write exception-safe code.(Note to CowboyNeal - writing C-sharp with the pound sign set off the lameness filter, driving me damn near out of my skull. How about adding something to the preview to let us know which characters are lame, exactly?).
And good news for those of you across the pond (but bad news for me), it's a British organization and holds regular technical conferences. I believe they also send observers to the ISO standards bodies.
If you program in C++ you should read these two books by Scott Meyers and put them to practice in your code. Read each item one at a time and then go through your code from beginning to end to see how you can apply it:
- Effective C++ - ACCU Review - be sure to get the 2nd Edition
- More Effective C++ - ACCU Review
-Weffc++ (C++ only)
Importantly, in any language, make sure your code compiles cleanly without warnings with all the warnings enabled in the compiler - use the -pedantic option in gcc.Warn about violations of various style guidelines from Scott Meyers' Effective C++ books. If you use this option, you should be aware that the standard library headers do not obey all of these guidelines; you can use `grep -v' to filter out those warnings.
C++ is not the problem language it's often said to be if you follow Meyers' advice, but if you prefer C you certainly can have problems there too - and note that the preferred language for Gnome is C (while KDE is an extended C++), for C programmers you should read:
People who write in any programming language, from assembler on through C and way out to prolog, really should go back to our roots and read the early book: Sadly, this book is out of print, but see the "E" Titles Section at ACCU for other Elements of Style books.Back to the topic of compiler warnings, remember reading about lint in Kernighan and Ritchey's The C Programming Language? When I started out in my first real programming job, doing Sun system administration and writing image processing software back in the late '80's, I learned to write "lint" targets in my Makefiles, and I'd type "make lint" after editing but before compiling to actual machine code. This made my code much easier to debug and quicker to develop.
Much of lint's function is now available in the warnings of GCC (but I don't think all of it), but there are some proprietary products that will do extremely rigorous statis analysis of your source code. I haven't yet used either (although I plan to) but the two I know about are:
Looks like I missed one when I spoke about Bounded Pointers for GCC, Spotlight, etc. in my previous post. Parasoft offers: But note that these products use patented algorithms - number 5,581,696 and 5,860,011.You can search by patent number here.
And speaking of web programming, many Slashdot readers write web applications (Linux being a "server OS" as they say). How many of you validate the HTML that's generated by the web applications you write?
Your HTML should work well in any browser and it should be well designed for easy usability. I don't mean attractive graphics. I mean it shouldn't suck. Two links on design:
Finally, to make sure your HTML is valid, test it with the W3C HTML validation service. You have two choices of how to get your documents processed:- By uploading static files from your browser - most convenient during hand composition
- By entering its URL in a form - best for dynamic pages and final tuning of static pages
-
The Forum on Risks to the Public in Computers and Related Systems,
with such anecdotes as:
-
Re:If you can afford it, move to Java
If you're trying to track down memory leaks/overruns/general corruption in C or C++, even in multi-threaded apps, I've found Insure++ from Parasoft extremely helpful. It even tracks corruption on your stack (something I couldn't find in any other piece of software for x86/Linux)
-
POS from Linux expo
Parasoft demoed their Magnate POS application and it looked very good and complete. It is a web server that allows an instant e-commerce solution too. The old url is still available at http://www.parasoft.com/products/magnate/ , but the new site format dosen't mention the product as far as I could find. They have clients worldwide using magnate, so surely they still sell it.
It had support for cash drawers, and most common barcode scanners, etc... IIRC.