I think Ryan Crumley wrote: > <P><FONT SIZE=2 FACE="Arial">I have recently inherited a bit of code that is pretty > complex. So far watch-all has not been able to help me find the problems I am > tracking down. Can anyone suggest other debug methods for jess rulesets? </FONT></P> >
Besides the other excellent suggestions we've seen here, I'd like to add code inspection to the list. "matches" and "view" and "watch" are all dynamic analysis tools; static analysis -- i.e., just checking to see that the code is correct -- is important too. Many problems are caused by a few common coding errors. The most common one comes from not realizing that symbols won't match strings, and vice versa, and integers won't match floats, and vice versa. Give the code a good read. This sounds very obvious, but it's surprising how few people really do it. Even more powerful is trying to explain what the code does to another person, out loud. This works amazingly well, even if the other person is actually an inanimate object (this is sometimes called the "Rubber Duck" effect; try explaining the code to a rubber duck.) To explain it, you've got to express it in words, and this very often exposes problems right there. --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------