Tuesday, June 30, 2009

Agile Programming

Greetings:

Recently I've been thinking that I need another blog - one that I would use just to vent and blow off steam at the stupidity of some of the things that we do as programmers. One of those is something called "Agile Programming" where two programmers work on one computer, both at the same time; one writing, one watching and commenting. This was all hyped up a couple of years ago that, in my own opinion, was to help the "less developed" programmers ramp up quicker by being teamed with a more experienced programmer. (Surely you wouldn't put two of the newbies together, would you?)

Anyway, the sheer though of having to explain everything that I do to a newbie who hasn't taken the time to read the first book on rulebase theory, has forgotten everything that he/she might ever have known about statistics, has never had an accounting course in their life and reads only blogs like this for information (OK, they don't even read blogs any more; they just listen to "tweets" and such) sends me into tremors of sheer terror. Don't get me wrong; there is a place for training. But that place is NOT when you are behind schedule (aren't you always?) and you need to get something "done" by the end of the day/week/month.

So, when do the newbies get training from the old timers? When those things are scheduled for (maybe) an hour or two each day or each week. When the trainer can have time to properly present the complete thought process that goes behind each precept of a programming paradigm. When the logic of a though process is presented in a proper methodology rather than a series of "Why" statements followed by an answer that is intended to just shut the other person up rather than teach. This is because you are trying actually to THINK through a laborious process. When done in this manner, sometimes learning takes place. Hopefully.

At our last Java MUG meeting the speaker was pointing out the time that it took to build an idea or a process in your head and that, if interrupted by various things, how long it would take to get back on track. It was actually very revealing. Without intending to do so, he proved my point. Once you are interrupted you can not just turn around and pick up where you left off. Depending on how long was the interruption time and for what reason, it could easily take 15 or 20 minutes to get back to that level of concentration and/or that step in the workflow process.

Which is why I take the phone off the hook, shut the door to my office and put my headphones on when I am trying to concentrate and work on something that requires that level of focus and thought. BTW, during the meeting I did ask if anyone had ever done Agile Programming. Only two guys raised their hands and only one thought that it was a good idea to do programming in that manner. BUT, he did qualify that it was only effective for about four hours a day. According to him, productivity and quality of programming went (way?) up when Agile programming was used. That tells me that the problem "might" have been way too many newbies who needed to improve their programming skills. But, that's probably just my prejudices talking.

When did I personally use Agile Programming? Only two clients have ever tried to force me to do that. One was for a major insurance company in the USA and the other was in the UK. At the USA company it came down to either I would have to leave or they would have lower their expectations of what I was doing. After my rebellion all of the other senior consultants did the same thing and the whole idea was thrown out.

The client in the UK kept sending me really low-paid technicians hired from 4th-world countries who didn't have the foggiest idea of how to use a rulebase nor what was the thought process. I was working as an emloyee at that time for a major BRMS vendor and, at first, they resisted. But when the 4th-world vendor sent two or three of their techies to school and became a partner, then I was asked to reconsider. I told them the same thing; I could do that but production would suffer if I had to stop and explain every little thing to a newbie. Besides, I was not being paid to train personnel outside of my company. If they needed more training then they could go to the vendor-provided school for more advanced courses. They didn't and neither did I.

So, did I ever try it and have it fail? Nope. My clients wanted me working on rulebase problems 100% of the time and were not willing to pay me my normal rate to train a newbie; not even one of their own employees.

Comments to this blog are always welcome. Even when you believe in something as silly as Agile Programming and how it can improve the quality and quantity of programming code. I would ask only that if you do think Agile Programming is a good thing that you tell us of your personal experience and how it helped the quality and quantity of the programming code. And be specific; not that the programming was "better" but how this "better" was measured with and without Agile Programming. What benchmarks did you or your company use that would help guide the rest of us in measuring the "quality and quantity" of the programming code. And if you believe, as I do, that Agile Programming is for really strange people then tell us why in very specific term and in reference to personal experience. Thanks,

SDG
jco

Thursday, June 18, 2009

More on Benchmarks for 2009

Greetings:

Just another post to TRY and get some discussion started on benchmarks. All I seem to get from the vendors is, "Those old things? Those are not 'real-world' benchmarks!" OK, no argument here... So, does anyone have a "real-world" benchmark? No? Fine, then we will use what we have and hope for the best since they seem to work fine on checking the rule processing performance (using almost "real-world" rules) on most engines.

Checking performance on a modeling tool, such as Corticon, Visual Rules, Rule Burst, VisiRules, any Decision Table or Decision Tree, is absolutely NOT what checking rule processing power is all about. [I'll probably catch some flak on that remark but those just my personal feelings.] If you already have the rules hard-coded using either straight-up Java or some kind of modeling tool that produces Java code (such as sequential rules or something else along those lines) then that SHOULD run faster than a real rulebase engine that is designed from the ground up to be an inferencing engine based on whatever algorithm you like.

However, I would like this year to allow a couple of things that I have not done in the past: (1) Allow a "warm-up" time of maybe three or four code passes through all of the rules using different date each time and then running the rules for 10 consecutive passes using 10 different sets of data and taking the average time for the benchmark time. In years past, rules did not run under EJB/J2EE or similar environments (we had Java for several years before we had J2EE/EJB) and we did not allow such things. However, with the increased overhead of having to have that in the core part of the engine I think that it should be allowed. (2) I'm going to drop the old version of Miss Manners 8, 16, 32, 64, 128 and 256 and substitute Miss Manners 2009 - which is the ORF example for this year. (3) The other two benchmarks from the old days are still good, Waltz-50 and WaltzDB-16. (4) However, we are introducing a new WaltzDB-200 this year just to really get some long lead times. (5) We will run these all on the following systems

a1. Mac Core2Duo, 3GB RAM, OS X Leopard, 64-bit (which is Free BSD Unix with a pretty face)
a2. Mac Dual-Quad Core, 8GB RAM, OS X White Leopard, 64-bit [maybe...]
b. HP Intel, 3GB RAM, Dual Threaded, Windows XP, 32-bit
c. Dell Intel i7, 4-core, 8-threads, 6GB RAM, Windows Vitria 64-bit

I might try to work in some Linux if there seems to be any significant speed differentiation on an Intel running Linux or Windows - but experience teaches that usually the Windows version runs faster. But I will check it anyway just to be sure. (6) The systems that I am hoping to check will be (alphabetical order)

a. Blaze Advisor 6.7
b. Drools Version 5.x
c. CLIPS Version 3.0b
d. Jess 7.0-p2
e. JRules Version 6.7.3 or 7.x (depends...)
f. OPSJ Version 6.0
g. OPSJ-NT Version 1.0

Probably, I will publish the results here, along with the previous years of Performance benchmarks, as well as on the KBSC home page. The comparisons of 32-bit and 64-bit should tell us something about scalability. The comparisons of different OS should tell us something about scalability and transportability.

One more thing: If any of the other vendors can demonstrate a suitable version of the benchmarks I will include them - but NOT the same thing that I did a few years ago when I allowed a "similar" version of the benchmarks to be used by a vendor that could not code straight-up IF - THEN - ELSE rules using a NOT statement in there somewhere.

I do expect cheating on the part of the vendors. Somehow, I must find a benchmark somewhere that will not allow that so I'll probably throw in a one that has lots of NOT statements in it or something really rude like that. I know that the vendors don't really pay attention to benchmarks any more so I'm hoping that the customers of these and other vendors will stress performance benchmarks to their suppliers as another check of good engineering. Layering GUI after GUI after Model after Model is cool EXCEPT when you forget how to perform under the pressure of millions of transactions per day that need complex, real rulebase-type analysis.

SDG
jco

Thursday, June 11, 2009

2009 Benchmarks - Again

Greetings:

Sometimes I wonder how many folks find this subject of intense interest and how many are totally bored with the idea of comparing benchmarks?  Why even have benchmarks?  After all, most vendors seem to think that companies are not interested in them so long as the product will "do the job in the real world."  OK, let's pursue that line of thought for just a moment.  

Let's say that you are buying a car for your company.  Some of the constraints are the mileage, longevity, repair frequency (time and costs), ROI of the auto, etc.  All of these are benchmarks.  Let's say that you are not buying a car for yourself nor for your company but you buying for the military and you want an armored vehicle.  Then the constraints would be how effective is the bullet proofing, what firepower is mounted standard, what is the performance in sand and mud, what is the carrying capacity, etc.  Again, all of this is benchmarking.

Now, let's say that you pick up any car magazine in your local bookstore.  Check the charts and you will find under performance the times for 0 - 60 mph, standing 1/4 mile performance and top speed.  Again, benchmarks.  And, agreed, none of these are real-world benchmarks since very few people take their Corvette or Camero from 0 to 60 more than once or twice and almost none of them would ever take their auto over 150 mph.  BUT, these are benchmarks for automobiles.  This is why we have such things as the Le Mans 24 Hour race - another benchmark to determine the best of breed.

Benchmarks for databases have been here since their advent and no one has ever complained about them.  OK, not very much.  Spec-Int and Spec-fp tell the potential customer how well the database that is being considered for purchase will perform under certain standard, non-real-world conditions and from this they will extrapolate whether a particular product has improved its performance as compared to previous versions or against other products OR how well the product has improved from one date to another, and the client will try to determine whether the product will or will not perform as expected in their particular application(s).  

So why, Oh Why, can't the rulebase / BRMS vendors agree on at least one benchmark for performance of their products.  Mostly it is fear that this will become the only basis for comparison of products.  

This belief is based on past experience when a potential customer would use the published benchmarks of KBSC or other independent consultants to beat them across the head and shoulders so that the vendor would have to lower their price to get an order.  (Actually, the vendor didn't have to lower the price but salesmen are notoriously weak-willed creatures who find it easier to sell on the basis of price alone without any consideration to customer needs and their ability to fulfill those needs.)  

After all, one does not purchase a Corvette on the need for transportation, they purchase the Corvette because they like its looks and its performance.  The same thing can be said for a Mercedes, Cadillac or pickup truck - they are purchased NOT on performance alone but also on a myriad of little factors that make up the overall buying experience.

All of that to say this:  I think I'll have the new benchmarks ready for most rulebase / BRMS systems ready before September 15th this year and ready for publication.  Right now we're going to use Waltz-50, WaltzDB-200 and the Manners128-2009 when loaded on Unix (Mac OS X), Windows XP (32 bit) and Windows 64 bit.  That's a lot of work between now and then but with the help of some friends maybe I'll make it.

Watch this space for more news on benchmarks.   BTW, the BEST benchmark (after reviewing the standard benchmarks) is to put the product on your system, use your data, use your process, use your rules and run your tests.  Only then will you know for sure whether the potential product is suitable for your application(s).

Looking forward to seeing all of you at the October Rules Fest.  Check out http://www.OctoberRulesFest.org for more details on the world class lineup of speakers and activities.

SDG
jco

Wednesday, June 3, 2009

Open Source Leeches

Greetings:

InfoWorld ran an article this week on "Open Source Leeches"  and it got some responses, one from Daniel Selman of IBM/ILOG.  While the article is spot-on about some companies using Open Source software and keeping their own solutions secret in order to "get the jump" on their competition, it is decidedly UNFAIR to broadly paint all companies with the same swath using a really wide brush.   

For example, IBM/ILOG contributes back to Eclipse.  And the mentioned Southwest Airlines continually contributes back to the Drools project.  Mark Proctor (Drools) is always commenting that "There is no such thing as a free lunch."  His way of handling "leeches" is to just quit responding to their questions after a while.  

My own thoughts here are that many companies either (1) don't NEED to make changes to the product and can use it right out of the box or (2) don't feel comfortable making changes to a vendor product.  In the second case, that is  normally the result is decades of using vendor products "as is" and only making suggestions.

So, maybe Dave Rosenberg (and Bill Snyder) need to research the "problem" more thoroughly and give us some facts and statistics.  For example, how many companies are using Drools, Eclipse, JBoss, etc. for free.  And, out of those companies, how many have made NO contributions to improve the product.  I have a feeling that the "NO contributor" companies will be a really small percentage.  

After all, the "spirit of community software" is NOT that you have everyone contributing to the product, but that you have a few really solid professionals leading the way for the newbies.  Personally, I use lots of "free software" (Mark hates that expression) and rarely contribute to the effort - not because I don't want to but I would have to learn a whole new product each time.  And I only have time for one or two "projects" in my life at one time.   So, I use a lot of them and contribute to only a couple of them.  

Again, folks need to get the facts straight before they leap to unsupportable conclusions.

SDG
jco


Tuesday, June 2, 2009

ORF 2009 Super Early Bird Discount Extension

Greetings:

October Rules Fest 2009 has extended the Super Early Bird discount of 20% off of normal registration fees to midnight, June 6th, 2009. Regular registration is $500 so that represents $100 savings. If you have any questions, check out http://www.OctoberRulesFest.org for more info on speakers, agenda, etc. The hotel should be determined not later than Friday of this week, June 5th. Anyway, be SURE to register THIS WEEK to get the best savings. :-)

With parking at ANY hotel in downtown Dallas being astronomical (cheaper than New York, San Francisco, London or Paris though) it might be more economical to park-and-ride. There will be directions on the ORF web page at a later date about how to do that.

SDG
jco

Thursday, May 28, 2009

October Rules Fest 2009

Greetings:

Well, ORF 2009 is ready to rock and roll in downtown Dallas again, only this year the conference will be in the center of the downtown Dallas restaurant district rather than on the outskirts like last year. Just point your Google Earth to 1400 Commerce Street in downtown Dallas and you'll see what I mean. Everything from MacDonald's to The French Room to the "ultra cool" Fuse restaurant. After we check them out, the ORF web site have an ever-expanding list of top (not necessarily expensive) restaurants within a two- or three-block walking radius.

We won't have the same space as last year so, counting the 30+ speakers that we will have, there will be room for only about 170 attendees - first come first served. So, register early and you will still get your 20% discount. There is still no extra charge for tutorials if you are attending the conference and this year's tutorial have a great line up. As a matter of fact, the entire agenda is great. As you can see from the speaker bios those who are returning and the new speakers for this year are strictly "top drawer" - the best of the best.

If your company is interested in becoming a sponsor, contact info@OctoberRulesFest.org and let them know. Again, remember that there is room this year for only 170 attendees. Maybe 180, but that's about it. More on the hotel as it develops but it is down to a choice of only two really great hotels for the same price as last year - but more goodies.

So, register early and ensure that you have a great spot at the Second Annual October Rules Fest. Most of all, like last year, we're going to have FUN and we're going to enjoy ourselves.

SDG
jco


Wednesday, May 13, 2009

MacWorld is now iWorld

Greetings:

Apple is finally showing its true colors:  Green, as in the almighty dollar.  Yes, you have to make money as a corporation otherwise you become a philantrophy and not a commercial organization.  

So, what is the problem?  The latest MacWorld came today.  And there is NOTHING in there about the Mac computers EXCEPT in how to do movies or photos in the back.  The rest is devoted to iPhone, iPod, iShuffle, and all of the other iCrap toys that Apple has foisted on the world of mindless teeny-boppers and drugged-up skateboarders.  

Even the products page failed to mention the latest advance of the Nehalem processors for the Mac Pro - all that they mentioned was the Xeon Quad core that is several months out of date now.  (I guess that the single article from last month on the Nehalem processor failed to catch the attention of the deely-boppers in the game room.)  Ergo, my reasoning for calling it iWorld rather than MacWorld.

OK.  I'm an old dude who just doesn't get it, right?  Probably.  But Apple's foundation is (was) computers, not toys.  They seem to have forgotten who brought them to the party.  If they are going to degenerate into a world of i-R-Us then I'll have to find another Unix hardware provider.  And, no, Linux is not a good substitute.  Linux is for Windows-haters who don't have the bollocks to do real, hard-core Unix.  (You know, I think all of this started when Steve Jobs decided to use Intel consumer junk for the CPU rather than the more advanced, more stable Power PC of the former Mac Pro.)

SDG
jco

Monday, May 4, 2009

Rulebase Benchmarks 2009

Greetings:

It is beginning to look like Miss Manners 2009 might (just might, not will) be a good benchmark for checking rules.  The other will be the WaltzDB-200.  I will be depending on vendors to double check all of my rules for them on that one since the database is generated from WaltzDB.java file that puts it into the "expected" format for the rules.  (Thanks to Dr. Forgy for re-writing the WaltzyDB.c file into Java for OPSJ but it can be extended to any rulebase needed.)  

Georrrey De Smet has made some changes to the original (hastily done) data file and has blogged about it http://blog.athico.com/2009/05/miss-manners-2009-yet-another-drools.html  in case you want to read his blog as well.  

SDG
jco

Tuesday, March 24, 2009

In Memory of Bubba the Rules Cat

Greetings:

For those who knew him, Bubba the Rules Cat (aka, Richard Halsey) was one of the more interesting folks in the rulebase space.  I worked on a couple of projects with him; Ericsson for 18 months and GMAC Insurance for another five or six.  Whatever the subject of conversation during the day, Bubba rarely watched TV and would spend the evening hours researching arkane and little-know facts and technology.  The next morning he had several sites for our consideration.  He was one of the very best researchers that I have had the privilege of knowing.  And he had a low tolerance for fools and bad products.

Bubba was 68 years old.  He was born June 14, 1942 and died "suddenly" on January 17, 2009.  He loved his mother and his wife, Wanda with a deep affection.  He spent six years in the Air Force with tours in Germany and South Africa and attended the University of Central Florida.

In his local community he was called "The Mayor of Vizcaya" - maybe due to his efforts in organizing a home owners association and he was later elected the president of that group.  The HOA put a plaque in his honor at the base of a pear tree that he planted there.

I remember when we were working in St. Louis and staying at the same motel he got up early every morning, ate breakfast, went outside to smoke and feed the birds.  He told me that his mother always wanted to come back as a bird so if she made it he was going to be sure and bring her breakfast every morning.  

Bubba wanted to be cremated and buried next to his mother so when he died Wanda did just that.  They had a memorial service in Pensacola and then his brother, Jim, took his ashes to New Jersey for another service and to be buried there.

Quite a guy.  He lived a full life.  He and I used to chat at least once a month about various and sundry things and I will sorely miss those calls.  I do know that the last few years (he retired for all practical purposes a few years ago) were probably the happiest that I have known him to be.  He quit smoking about the time he retired but he still had his two (or sometimes three) Cuba Libras every day - one at lunch, a nap, a long walk on the beach, and then a couple of more.  He had a specific method for making them using only the best rum and only smooth-skinned limes.  They really were quite good.

So - Bon Voyage Richard.  We'll miss you.  But I'm looking forward to seeing you again one day.  :-)

SDG
jco

Sunday, March 22, 2009

IBM/ILOG in Health Care - NY Times

Greetings:

Well, it had to happen. The Doctor Will B.R.M.S. you now is an article that appeared in the NY Times. It does give a good shot-in-the-arm to the industry as a whole and ILOG in particular.  There's also an article on Google in the health industry that is interesting reading.  I only hope that someone there actually read the MYCIN book before starting out on this project.  What's new is old and what's old is new.

MYCIN was done in the late 70's and early 80's by the uber-geeks at Stanford in CA and CMU in PA.  And it did a good job.  Back then nobody trusted computers so they didn't use it in diagnosis even though it did a better job than did the doctors.  Today, maybe it will have a better chance.  

SDG
jco

Rulebase Benchmarks 2009

Greetings:

In concert with certain other "technical" persons in this field (Dr. Forgy, Gary Riley, et al) I would like to propose a new-and-improved benchmark for rulebased systems. Waltz and WaltzDB are still valid benchmarks but, unfortunately, most folks (read: programmers) have trouble visualizing the lines of logic that would help move lines from a 2D drawing to a 3D drawing. This is elementary for a "normal" engineer because they have had to endure Mechanical Engineering 101, aka Drafting Class.

I was "privileged" to see some recent emails from a "Benchmark" consortium and the vendors (surprise of surprises) did not like the Waltz nor the WaltzDB benchmarks because they were not "real world." First, the vendors have not defined what is a "real world" and second, since when was a benchmark "real world"?? The "real world" of most vendors these days is composed of financial problems that, while they are sometimes quite large, are never complex. (Think Abstract Algebra or Partial Differential Equation level of "complexity.")

WHY would we need a rulebase that can handle both massive numbers of rules and objects as well as very complex rules? Think about Homeland Security where there are thousands of Ports of Entry (POE) as well as perhaps a million travelers every day and millions of cargo boxes being shipped into the USA. The database query alone could take days when you have only a few minutes to determine (1) does a threat exist and (2) what is the level of that threat? An automobile of a specific nature parked too long in one place (think OKC) could be a "clue" on the threat level. A new object of a certain type on a roadway (think IED) is a potential threat in some areas but not in others.

One person from Saudi might not be (most likely is not) a threat. But knowing that he/she is related to another person of the same village entering at another port combined with another person of the same village either already here or entering from another port might quite possibly raise the threat level. (Meaning, what are the odds of three persons from the same, small village in Saudi Arabia entering the USA over a one, two or three day period?) These decisions sometimes have to be done within seconds while a person is standing at the counter - not hours later when that same person has been passed through and disappears into the local population.

Think of what happens in health underwriting when the things that must be considered are many and related. For example, a bad back (or knee or foot or whatever) could lead to declining health and possible heart attack depending on the severity of the injury. A heart attack could lead to even more declining health and death. Family history can and does play a huge part in underwriting. For example, being overweight means a potential increased risk in diabetes. If most everyone in the family has had diabetes (of either type) then the risks escalate. Having a family history of heart problems as well makes the problem even riskier. This is a large and complex problem that needs fast resolution. Assuming, of course, that the data are available in the first place. The reasoning process here is (can be) extremely complex and most times the human underwriter is the only person who can make that kind of determination when a rulebase would be a much better approach.

Fraud detection is a complex issue that is normally addressed from a superficial viewpoint rather than something "in depth" that might be reasonably accurate. Some of the issues of fraud detection (or homeland security or underwriting) could be handled with Rule-Based Forecasting (RBF) system as well as possibly linking the rulebase with Neural Networks to help predict what will happen. It has been shown (back in 1989) that neural net was much better at forecasting a time-dependent series than even the far more popular Box-Jenkins method of analysis and forecasting. It isn't much good at non-temporal situations but that's another story.

Let us return to our primary discussion of what should compose a rulebase benchmark. A rulebase benchmark should be composed of several tests:

Forward Chaining
Backward Chaining
Non-Monotonicity
Complex Rules
Rules with a high level of Specificity
Lots of (maybe 100 or more) "simple" rules that chain between themselves
Stress the conflict resolution strategy
Stress pattern matching

Just having an overwhelming amount of data is not sufficient for a rulebase benchmark - that would be more in line with a test of the database efficiency and/or the available memory. Further, it has been "proven" over time that compiling rules into Java code or into C++ code (something that vendors call "sequential rules") is much faster than using the inference engine. True, and it should be. After all, most inference engines are based in Java or C++ code and the rules are merely an extension, another layer of abstraction, if you will. But sequential rules do not have the flexibility of the engine and, in most cases, have to be "manually" arranged so that they fire in the correct order. An inference engine, being non-monotonic, does not have that restriction.

Simply put, most rulebased systems cannot pass muster on the simple WaltzDB-16 benchmark. We now have a WaltzDB-200 test should they want to try something more massive.

New Benchmarks: Perhaps we should try some of the NP-hard problems - that would eliminate most of the "also ran" tools. Also, perhaps we should be checking on the "flexibility" of a rulebase by processing on multiple platforms (not just Windows) as well as checking performance and scalability on multiple processors; perhaps 4, 8 or 16 (or more) CPU machines. An 8/16 CPU Mac is now available at a reasonable price as is the i7 Intel (basically 4/8 cores) CPU. But these are 64-bit CPUs and some rule engines are not supported for 64-bit platforms. Sad, but true. Some won't even run on Unix but only on LInux. Again, sad, but true.

So, any ideas? I'm thinking that someone, somewhere has a better suggestion than 64-Queens or Sudoku. Hopefully...


SDG
jco

Saturday, March 21, 2009

Benchmarks 2009

Greetings:

In concert with certain other "technical" persons in this field (Dr. Forgy, Gary Riley, et al) I would like to propose a new-and-improved benchmark for rulebased systems. Waltz and WaltzDB are still valid benchmarks but, unfortunately, most folks (read: programmers) have trouble visualizing the lines that would help move from a 2D drawing to a 3D drawing. This is elementary for a real engineer because they have had to endure Mechanical Engineering 101, aka Drafting Class.

I was "privileged" to see some recent emails from a "Benchmark" consortium and the vendors (surprise of surprises) did not like the Waltz nor the WaltzDB benchmarks because they were not "real world." First, they have not defined what is a "real world" and second, since when was a benchmark "real world"?? The "real world" of most vendors these days is composed of financial problems that, while they are sometimes quite large, are never complex. (Think Abstract Algebra or Partial Differential Equation level of "complex.")

WHY would we need a rulebase that can handle both massive and complex? Think about Homeland Security where there are thousands of Ports of Entry (POE) as well as perhaps a million travelers every day and millions of cargo boxes being shipped into the USA. The database query alone could take days when you have only a few minutes to determine (1) does a threat exist and (2) what is the level of that threat? An automobile of a specific nature parked too long in one place could be a "clue" on the threat level. A new object of a certain type on a roadway is a potential threat in some areas but not in others.

One person from Saudi might not be (most likely is not) a threat. But knowing that he/she is related to another person of the same village entering at another port combined with another person of the same village either already here or entering from another port definitely raises the threat level. (Meaning, what are the odds of three persons from the same village entering the USA over a one, two or three day period?) These decisions sometimes have to be done within seconds while a person is standing at the counter - not hours later when that same person has been passed through and disappears into the local population.

Think of what happens in health underwriting when the things that must be considered are many and related. For example, a bad back (or knee or foot or whatever) could lead to declining health and possible heart attack depending on the severity of the injury. A heart attack could lead to even more declining health and death. Family history can and does play a huge part in underwriting. For example, being overweight means a potential increased risk in diabetes. If everyone in the family has had diabetes (of either type) then the risks escalate. Having a family history of heart problems as well makes the problem even riskier. This is a large and complex problem that needs fast resolution. Assuming, of course, that the data are available in the first place. The reasoning process here is (can be) extremely complex and most times the human underwriter is the only person who can make that kind of determination when a rulebase would be a much better approach.

Fraud detection is a complex issue that is normally addressed from a superficial viewpoint rather than something "in depth" that might be reasonably accurate. Some of the issues of fraud detection (or homeland security or underwriting) could be handled with Rule-Based Forecasting (RBF) system as well as possibly linking the rulebase with Neural Networks to help predict what will happen. It has been shown (back in 1989) that neural net was much better at forecasting a time-dependent series than even the far more popular Box-Jenkins method of analysis and forecasting.

But, I digress. Let us return to our primary discussion of what should compose a rulebase benchmark. A rulebase benchmark should be composed of several tests:

Forward Chaining
Backward Chaining
Non-Monotonicity
Complex Rules
Rules with a high level of Specificity
Lots of (maybe 100 or more) "simple" rules that chain between themselves

Just having an overwhelming amount of data is not sufficient for a rulebase benchmark - that would be more in line with a test of the database efficiency and/or the available memory. Further, it has been "proven" over time that compiling rules into Java code or into C++ code (something that vendors call "sequential rules") is much faster than using the inference engine. True, and it should be. After all, most inference engines are based in Java or C++ code and the rules are merely an extension. But sequential rules do not have the flexibility of the engine and, in most cases, have to be "manually" arranged so that they fire in the correct order. An inference engine, being non-monotonic, does not have that restriction.

Simply put, most rulebased systems cannot pass muster on the simple WaltzDB-16 benchmark. We now have a WaltzDB-200 test should they want to try something more massive.

New Benchmarks: Perhaps we should try some of the NP-hard problems - that would eliminate most of the "also ran" tools. Also, perhaps we should be checking on the "flexibility" of a rulebase by processing on multiple platforms (not just Windows) as well as checking performance and scalability on multiple processors; perhaps 4, 8 or 16 (or more) CPU machines. An 8/16 CPU Mac is now available at a reasonable price as is the i7 Intel (basically 4/8 cores) CPU. But these are 64-bit CPUs and some rule engines are not supported for 64-bit platforms. Sad, but true. Some won't even run on Unix but only on Linux or only on Windows.  Again, sad, but true.

Anyway, the next blog on ORF 2009 will be about Ms. Manners - the new version where we don't tell you HOW to solve the problem (we don't give you the rules) but you have to get the right answer.  Probably, in order to get the "right" answer we will have to provide the data.  Unless, of course, some kind vendor would find a college intern to do that.  :-)  


SDG
jco

Monday, March 16, 2009

A Rare Retraction

Greetings:

OK. I was wrong. Visual Rules is NOT a spreadsheet-looking development GUI but rather more of a modeling environment. My upcoming article in InfoWorld (hopefully, next week or the week after) will more than demonstrate that. Their GUI is one of the coolest in the industry eclipsed only by (maybe) Haley Expert Rules (not Haley Office Rules.) There! I reviewed the product in July of 2008 and again in December 2008 but somehow (old age? Nahhh - I've always been like this.) I lumped it in with Corticon and other spreadsheet-looking GUI environments.

OK, I blogged the error. Now I've blogged the retraction. Sorry, David K.

SDG
jco

Sunday, March 15, 2009

Ladder Logic Relays, Computers and MYCIN

Greetings:

If you have a sufficient mass of grey hair (or should that be "gray hair") you might remember "Ladder Logic" that was used for relays (those electro-mechanical monstrosities long, long ago) that were used in order to control machines in the dark ages before solid-state, ladder-logic that came to be called a PLC (Programmable Logic Controller) as popularized by both Square D and Allen-Bradley companies.  A good view of this kind of logic is available on http://en.wikipedia.org/wiki/File:Ladder_diagram.png if you would like to see it.

Today's spreadsheets and decision tables are about as archaic as that particular concept and serve basically the same function.  

IF this is true AND this is true AND this is true 
THEN do that

How simple.  Just like Ladder Logic.  Yet, when many of these IF-THEN rules are strung together, how complex they swiftly seem to become.  (Not really - but the human brain cannot usually do more than four or five things at once.)  So, we bunch them up and put them in groups to make it simpler for the simple minds of humans.   And we are left with simple solutions for simple minds.

But, think about it...  What is happening is not very complex.  To move just ONE STEP toward complexity consider what the group of MYCIN did; they implemented the concept of "probability of belief and disbelief" into the rule as well as some other statistical concepts and nobody has EVER gone back to that concept since it is too complicated for the simple minds of most "computer scientists" - those minions to whom we trust our programming today.  If you can obtain the book by Buchannan and Shorliffe on the MYCIN project, GET IT, READ IT, UNDERSTAND IT !!  

Then, after you read it and understand it, let's move beyond MYCIN.  What if we integrate rulebased systems and neural nets?  What if we integrate digital computers and analog computers?  (Typical response to that one is:  "Tried it.  Failed.  Not possible.")  Cyc (Doug Lenat's huge, monstrous, immensely complicated 'real' KnowledgeBased System to be completed in 2025) may or may not be the answer, but surely we can move toward something in between the brain-dead, incredibly simplistic BRMS that are out there and immensely complex Cyc Project.  Any ideas?  

SDG
jco

Saturday, March 14, 2009

Why Can't The English Teach Their Children How to Speak?

Greetings:

English is the language spoken (usually very poorly) around the world.  But there are some countries where English should be spoken and written properly.  (England, Scotland, Wales, Ireland, USA, Australia, New Zealand and Eastern Canada.)  It's the national language of India and Pakistan but you could not tell this from the language spoken or written there.   While in London and Southampton for long periods I was determined to develop a true British accent.  The problem was that not one person there spoke like the other one.  Finally, I gave up and decided that speaking properly with a decent mid-western-USA accent was far better than ANY of those terrible dialects.  Even if it does have slight Texas twang.  :-)

What set me off this time was the phrase from a fairly popular blog, "Is the data flat?"  Data are plural, Datum is singular.  So the sentence should read, "Are the data flat?"  It could read, "Is the data structure flat?" or "Is the structure of the data flat?"  Agenda (plural) is a list of agendum (singular).  

The other one drives me nuts is when someone says, "Me and Bob are going to lunch.  Want to go?"  It should be, "Bob and I are going to lunch."  What about where someone uses "were" for "we're" going to do something.  Or ending a sentence in a preposition as in, "Where are you going to?"  when  "Where are you going?" is sufficient.  Or the infamous, "What did you do that for?"   The most egregious of all, "You need to get aholt of the data."  OUCH!  Get a hold on the data?  Even that is terrible.  

What about the spoken variety?  Such as using "git" rather than "get."  Or using "caint" (rhymes with paint) for "can't", which rhymes with pant.  Or saying, "O'tel" rather than "Hotel".   I had the ignomious displeasure of listening to a linguist preach today - but she used the most terrible English when I KNOW that she fully knows how to speak properly - she was either heavily influenced by her congregation or her surrounding growing up and just never got out of improper usage of the English language.  (She speaks and writes about 10 or 12 languages fairly  fluently.)

I'm reminded every day of the musical "My Fair Lady" in which Professor Higgins asks the eternal question, "What can't the English teach their children how to speak?"  If you haven't seen it, check it out of your local DVD store and at least watch the opening song by Rex Harrison.  "The way an Englishman speaks absolutely classifies him  From the moment an Englishman speaks he makes some other Englishman despise him."  (Also from the movie and that song.) 

So brush up on your English by reading something of quality.  Shakespeare comes to mind.  Or the bible.  Get out of the code books for a while.  STOP reading all of the infernal, terrible documentation produced by someone in another country - or even in our own English-speaking countries when it was written by some dim-witted, High School Dropouts!

SDG
jco

Corticon and Tibco

Greetings:

There is a link called "The Orange Mile" [takeoff on "The Green Mile" ?] that published a "review" of Corticon as used with Tibco. They were even less impressed than I was when I reviewed Corticon several years ago - about 2006 or so. The link to the Orange Mile article is at http://orangemile.blogspot.com/2008/06/corticon-rule-engine-review.html so you can read it for yourself. I could not find an author's name or homebase link so it must be anonymous or something.  The link to my article is at http://www.infoworld.com/article/06/07/07/28TCcorticon_1.html if you would like to read the original broohaha.

Corticon calls what they do DETI, or Design Time Inferencing. The math that they claim to be part of the optimization process is doubtful since they don't show you what they do. ("Pay no attention to the man behind the curtain." - Wizard of Oz) That being said, what they do is basically static and, to my way of thinking, not a flexible as a true rulebased system.

On the other hand, you must consider that ILOG, FICO, and others now have sequential rules that are nothing more than what Corticon is doing. Even the "Decision Tables" by FICO, ILOG and Drools are extremely similar to Corticon in that each row is a rule that is static as well.  True, the row (rule) is processed by the rule engine BUT it's still pretty much a static process.  FICO has just recently introduced a "gap analysis" tool that Corticon has had for years.

Visual Rules and VisiRules are code generators, Visual Rules from a spreadsheet and VisiRules from a model driven process. They, too, are static processes.  Visual Rules generates plain-jane Java code while VisiRules generates a high-level processor for Prolog. 

Being a purist, I prefer a "real" inference engine that can deal with anomalies and incomplete rules and does have some kind of Conflict Resolution Strategy - as has been mentioned and discussed in other blogs at this link.  This is the BEST way to handle complex logic, incomplete rules and anything that might require thinking.

On the other hand, if ALL that you are doing is processing straight "out of the procedure book" business logic, why would you NEED and inference engine????  The answer is obvious:  You don't.  They may as well use a spreadsheet and get it over with as easily as possible.  And, so long as you don't have over a few hundred rules in each set, it should work quite well.  

All of that being said, why be critical of a company who is doing the same thing to the rulebase industry as the others except they don't have the fall-back position of a real inference engine should they need it? They (ILOG, FICO et al) gave their "stamp of approval" to the bastardization of the rulebase industry when they started down the Decision Table, Decision Tree, Compiled Sequential route a long time ago. Now that somebody is giving them the "come-uppance" that they deserve, they begin to whine like a mule. It makes you want to gag at the gall and hypocrisy of it the "Big Four" vendors.

SDG
jco

Thursday, March 12, 2009

Are Business Users "Dummies?"

Greetings:

In almost every enterprise organization to which I am called for consulting, there is a HUGE rift between the business analysts (who firmly believe that IT is a closed society and that they are keeping everything a secret - AND the Business Analysts want control over their own logic, meaning the rules) and the IT (who are just as firmly convinced that the business analysts are idiots and can not be trusted with writing rules.)  Cooperation seems to be something that only 98-pound weaklings engage in while whining about how the world mistreats them.  Simply put, all of this garbage HAS to stop. 

All of this mistrust is, of course, built on decades of mainframe culture in which "users" were not programmers but pretty much the folks who had to pay the bills for whatever IT decided to do - and IT sure as heck wasn't telling anyone the inner secrets of their domain.  It was all about "empire building" and control.  

And I have seen situations where the business users actually got their grubby little paws on a rule engine (Advisor, JRules, whatever) and were told by the marketeers (ie, sales persons of dubious parentage) that they did not need IT.  And they believed it.

Bottom line:  The company suffers and gets wrapped up into internal "politics" of who gets to do what.  The whole mess is totally disgusting!!  IT needs to let go of the rules of business and let the business folks take control of (and therefore the verification and responsibility for) the business rules.  By doing so this would remove the "impedance mismatch" between the two organizations.   After all, IT has enough on its plate just getting the proper architecture for the rules, setting up the J2EE or EJB part of the project, getting the data straightened out and verified, writing new GUI screens, etc.  

I actually went through the MBA program (a long time ago, admittedly) but even then the business guys knew how to do partial differential equations, abstract algebra, constraint-based programming and they were really, really good at doing spreadsheets and documentation.  FAR better than what IT guys were doing who usually completed introduction to basic calculus and, if pressed, could use the spreadsheet and/or word processor almost as good as their departmental secretary -  meaning, rather poorly.

Before you accuse me of being a business "geek" remember that my degree was in Electrical / Electronic Engineering with a focus on Microwaves and Computers.  Before that I spent 10 years in the trenches as an ET doing long-range radar, S-Band radar, VHS radar, etc. etc.   So, I was trained as a "Dilbert" and grew into the MBA stuff.  

I know both sides of the fence and I know it well and I am saying that both the IT and the Business Departments need to grow up, quit acting like spoiled brats and learn how to share.  Until that happens, neither side wins and both (meaning the company itself) will probably lose considerable resources to their incessant squabbling and whining.  Times are hard and we don't have the luxury to fight among ourselves any longer.

So, like any marriage, IT must learn how to cooperate with the other side.  Even when you don't understand the "why" question answers.  Accept it that the business guys HAVE to think positively and that they really believe that everything will turn out wonderfully well.  And the  business guys must understand the need for structure upon which IT will insist - they have been burned many times by not considering the worst thing that could happen.

Now, go back to work and do something for the company BEFORE you think about your own department or group!!!!

SDG
jco

Monday, March 9, 2009

Greetings:

I have added a new signature to my "normal" quotes from the Bard of Avon.  This one is especially applicable to today.  

"NOW do you believe?"  (Morpheus to Trinity in "The Matrix")
Buy USA FIRST ! Then the manufacturers and congress will follow the lead of those whom there were supposed to be leading!

Maybe, just maybe, this myth of a "World Economy" will be proven to be as false as those who propagated it for their own economic gain.  There is an old expression:  "Charity begins at home."  Well, so does buying and selling.  You can start by frequenting those businesses in your OWN home town.  If you can't get it there, then check out neighboring cities.  The best deal for you, for me, for all of us, is to buy from our neighbors and friends rather than from some unknown in another town or country - even if it is a few dollars (or cents) cheaper.

If WE start, the the manufacturers will follow.  Once they are in like, our own whores, the politicians, will follow like blind sheep.  It has always been thus; the leaders will follow those whom they are  supposed t lead.

SDG
jco

Drools Adds"Command Design Pattern" Calls to Version 5

Greetings:

Well, version 5 isn't even out the door good before Mark begins adding things.  Check out http://rafb.net/p/DTK56i23.html for his latest example code.  What he's is doing is trying to have the same code for statefull or stateless session for system calls to Java.  Also see  http://en.wikipedia.org/wiki/Command_pattern for more info.  Checking out the lines with Mark:

l. 61: This if for doing an insert.  It marshals the XML into a Batch Execution Command.  

l. 88:  This means that it will return the BatchExecutionResults which supports full marshalling back to XML of the results.

l. 519:  Shows how a pipeline works.  it is a Unit Test and the String makes it more readable.  I prefer StringBuffer but Mark says that I'm old and should be using StringBuilder now.  Oh, well.

l. 113 shows how you would insert a set of elements.

l. 293 is what Mark calls "the money part" of the dual state machine

l. 307 is where they created a batch command to insert the four kinds of cheese.  Also, notice that they specify two queries which are viewable on lines 297 and 301.

So, what does that mean for ordinary Joe the plumber?  Well, the queries have an identifier where they can have their results added to the BatchExecutionResults.  Also, when executing a batch (shell script to us Unix geeks) you can get back specific facts or globals via an 'out" attribute.  Also, you can execute queries and have the results as part of the same BatchExecutionResults.  

With a stateless session (because the session is tossed after the execution) you now get a single shot execute that will work with statefull or stateless.

Anyway, most of this is Mark's words via iChat late last night so I hope it's all correct.  But, you might want to check it out anyway.

The link above will probably disappear shortly but here are some more along the same lines that should be more permanent:

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/javadocs/stable/drools-api/org/drools/runtime/help/BatchExecutionHelper.html

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/javadocs/stable/drools-api/org/drools/runtime/pipeline/PipelineFactory.html

https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/javadocs/stable/drools-api/org/drools/command/CommandFactory.html

SDG
jco

Saturday, March 7, 2009

Free PDF of Red Book on WebSphere

Greetings:

A good friend of mine, Colin Renouf (Senior geek/techie at Lloyds Bank in London) has written a few Red Book (IBM stuff) on WebSphere.  You can download them for free at http://www.redbooks.ibm.com/redpieces/abstracts/sg247347.html?Open if you're into that kind of thing.  Personally, Colin is one of the bright spots in the UK and I highly recommend his work to anyone interested.  Enjoy...

SDG
jco