I’m losing it

Are the basic concepts of boolean logic that foreign to people? And I’m not just talking about normal people – I’m talking about computer programmers, managers of computer programmers (former programmers themselves), and quality assurance testers.

Ok, this is a train wreck that I saw coming when they first announced that we’d have to add boolean logic to our product. I should explain that “our product” is a Digital Cinema System. I work on the part of the product that sits in the theatre and takes the shows that are scheduled and attaches the advertising playlists (sorry, the “pre show entertainment” as NCN calls it) to the front. There is another section that works on the “services” portion where the advertising provider decides what ad playlists they want on what movies, and there is a guy on the same team as me who takes what the services organization gives him and shoves it into the database so that I (or rather my code) can do the all-important “association” of ad playlists to movies.

Now a previous release, the advertiser could either choose to put an ad playlist on specific features, or on specific screens. And they had to choose one or the other – for instance they could do all of their “repeating play” (like the old slideshows that movies have had playing as people are filing in) done by screen, and all their “single play” (like the moving ads and trailers that play after the house lights go down) by feature. The train wreck started with a request to be able to put the ad playlist on features based on their rating (“PG-13”, “R”, etc) or genre (“Horror”, “Comedy”, etc) instead of listing every possible feature. Ok, not a horrendous thing, very managable really. But the train really got rolling at high speed when they said that they wanted to be able to use a combination of these rules, with a set of precendence rules that determine whether, for example, the ad playlist that matches a movie’s genre gets taken instead of the one that matches its rating. And then they said they wanted to be able to combine these rules with boolean logic (“AND”, “OR”, and “NOT”). That’s when a picture of a train plunging over a cliff flashed in front of my eyes.

The first disaster was that the services people produced a user interface that doesn’t really allow the customer to specify the boolean rules, so I guess their interface is supposed to guess. And their guesses, and evidenced by the XML that they send to our system, are TOTALLY wrong. The programmers of that system don’t seem to understand that “AND” means both – that if you say you want to match “rating = ‘PG-13′” AND “rating = ‘R'” that you’re never going to match anything because it’s impossible for a feature to have both PG-13 and R ratings.

My boss is having similar problems, although not so much with AND and OR as with “NOT”. We go over this same ground over and over and over, and part of the problem is that every time he tries to understand a concept like “rating NOT EQUAL ‘PG-13′”, he starts going on about this makes this a default association with all features, and then something else that is associated with features that have a rating of PG-13. No, I explain as patiently as I can to the guy with the power of hiring or firing, all it means is that this playlist examines the rating, and if it’s not PG-13, it attaches itself. It doesn’t do anything to any other playlist. Ok, he’ll agree, but then two sentences later he’s using the words “default feature association” again and it’s clear that he doesn’t understand what the fuck is going on. Ok, Dave is a busy guy and he has to keep the big picture in his head, so I can forgive his confusion about my little corner of it.

The real problem is that Dave’s talk about “default feature association” seems to have infected the QA manager and her testers. And so today I was dealing with somebody who was all confused about her “rating NOT EQUAL ‘PG-13′” association, and why it wasn’t overruling an association to a specific feature that had been delivered some days ago. I explained that while normally the newer delivery takes precedence over the older one, that’s only true if they are the same type of association (i.e. association by rating, association by genre, etc). But, she complained, this is a “NOT” association, so it has “a default association to all features, so it should take precedence over the other feature association”. I’m afraid that that point I just lost it. I fired back an email saying something very close to:

NO NO NO NO. There is no “default feature association” just because you’re using the “NOT” option. All “NOT” means is that if it would have matched without the not, now it doesn’t, and if it wouldn’t have matched without, now it does. “rating NOT EQUALS “PG-13″‘ is still a rating association, and so it has the same precedence as other rating associations (ie lower than feature associations). All this talk of “default feature associations” that people are saying when they are trying to understand this is poisoning their minds and acting as a huge obstacle to understanding what is basically a very simple concept.

And so on. After that point I probably got even less friendly.

Oh well. I can’t wait to see what’s going to happen to my blood pressure when the CUSTOMERS try to understand boolean logic. Good thing I don’t talk directly to them.

3 thoughts on “I’m losing it”

  1. We had a similar problem recently. Our locally-written system configuration management system (manages system configs, not CM) uses boolean foo for selecting which hosts a given chunk of code operates on.

    It turns out that the documentation (written by the same guy who wrote the code) was wrong. He’d documented that using NOT implied AND (OR is implied otherwise), but it turns out that the code actually uses OR when there’s a NOT without anything else, so…

    While fixing this he went around and talked to the 8 or so people in our group who use this system, and got about 5 or 6 different and conflicting answers to “how do you think this works?”.

    Seems that discrete math isn’t as common an area of study as I’d understood it to be in CS degrees.

  2. Matt – it was a required course at my old school. Dunno about my new one.

    Maybe they do something at convocation to remove all vestiges of logic from brains?

    Of course, given the apparent logic of some of the profs I work with, maybe it’s the teachers, not the lack of teaching.

  3. I’ve read that three times, and I cannot figure out what your boss is talking about. That’s not even at a “taking a discrete math” course level–that’s just basic thinking. If the rating is G, PG, R, or (heaven forbid!) NC-17, then the rating does not equal PG-13. But that’s the same problem you’re having, so I’m not helping.

    As an aside, PSU has a whopping two courses in discrete math. I’ve taken one, and it was horribly taught.

Comments are closed.