Phil 3.29.12

8:00 – 4:00 CSIP

  • Drools JBoss Rules 5.0 Developer’s Guide
    • It is not only difficult to represent business logic in a imperative programming style language, but also hard to differentiate between code that represents the business logic and the infrastructure code that supports it.
    • We declare rules in pretty much the same way as the business analyst does the requirements—as a group of if-then statements. The rule engine can then take these rules and execute them over our data in the most efficient way. Rules, which have all of their conditions true, have their then part evaluated. This is different from imperative style programming languages where the developer has to specify how it needs to be done explicitly (with a sequence of conditionals and loops).
    • rule represents one requirement. This is more readable and maps to business requirements more naturally.
    • Well, having the right resource makes a difference. I have compiled and run a simple set of rules against multiple objects!
    • eval is a catch-all solution. It allows execution of any Java/MVEL code (according to the selected dialect) that returns true or false. It should be used only as a last resort when all other options have failed. This is because the rule engine cannot optimize eval. The expression is evaluated every time there is a change in the current rule’s condition (a fact is added, modified, or removed). They don’t have to return time-constant values. Writing eval as the last condition in a rule is a good practice.
    • How to get a reference to the current class being evaluated: $a:Account ( balance < 100, name != “Ted”). The ‘$’ is convention and not required

Lunch meeting to go over Noveta changes

Tom DeVito 3.28.2011

Start: 8:00

  • Helped Phil solve a problem regarding deployment of his 3d applications on a machine that did not have Visual Studio 2010.
  • A couple things were learned in the process.
  1. Dropping in the DLLs did not work.  I suspect this is because of the debug version not being compatible without proper registry entries, as well as, the difference between 64bit and 32 bit distributions between two of the machines.
  2. The required DLLs are available in the redistribution pack found here: http://www.microsoft.com/download/en/details.aspx?id=5555
  3. This distribution can be silently blocked by some anti-malware programs if auto-protect is on.
  4. Always build dependent libraries as Release before using them with your programs if not already in a binary form.  It seems the real issue was not with the application itself but with the dependent libraries.  Also check in c++/code generation project properties, that it is not set to a debug mode.
  5. Always test on a machine that does not have visual studio before going into a demo.
  • Played with the simulation a bit.  Looks good and now I have a better idea of what is needed.
  • Finished fixing the controller base class
  • Started figuring out the logic for the audio controller.
  • Hopefully we can start integrating the simulation with the electronics by Friday.

End: 6:00

Mike 3.28.2012

  • Backups this morning, no DB changes but tool is up
  • No word from Tangie regarding my inquiries a few days, she said she would have an answer to me yesterday
  • No word from the help center, the production server is still not reachable via 443
  • Working on PPM PKI integration, log in is working but permissions aren’t making it to the client, need to redo the query to add in permissions or add a new method

Phil 3.28.12

8:00 – 4:30 CSIP

  • Visualizing Drools (Visualizing Inference Process of a Rule Engine – VINCI’11, August 4–5, 2011, Hong Kong, China.)
  • Onward with chapter 2
    • When there is one or more Activations on the Agenda they are said to be in conflict, and a conflict resolver strategy is used to determine the order of execution. At the simplest level the default strategy uses salience to determine rule priority. Each rule has a default value of 0, the higher the value the higher the priority.
  • Sheesh, had a whole slew of computer problems this morning. I was missing dlls, Some projects were pointing to debug libraries so they couldn’t distribute properly, and then my TortoiseSVN  just… evaporated. Had to reboot, reinstall, and reboot again. Everything appears to be working now though.
  • Wish I could find where this tool (RuleFlow?) is hidden in eclipse
  • Chapter 3: Advanced Concepts and Theory
    • After regular inserts you have to retract facts explicitly. With logical assertions, the fact that was asserted will be automatically retracted when the conditions that asserted it in the first place are no longer true
    • It is important to note that for Truth Maintenance (and logical assertions) to work at all, your Fact objects (which may be JavaBeans) must override equals and hashCode methods (from java.lang.Object) correctly. As the truth maintenance system needs to know when two different physical objects are equal in value, both equals and hashCode must be overridden correctly, as per the Java standard.
  • Chapter 4: User Guide
  • ‘Hello world’ setup”
    • KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
      // Check the builder for errors
      if( kbuilder.hasErrors() ) {
          System.out.println( kbuilder.getErrors() );
          return;
      }
      
      // Resources of any type can be added iteratively
      kbuilder.add( ResourceFactory.newFileResource( "/project/myrules1.drl" ), ResourceType.DRL);
      kbuilder.add( ResourceFactory.newFileResource( "/project/myrules2.drl" ), ResourceType.DRL);
      
      if( kbuilder.hasErrors() ) {
          System.out.println( kbuilder.getErrors() );
          return;
      }
      
      Collection<KnowledgePackage> kpkgs = kbuilder.getKnowledgePackages();
  • Ok, this is a nice introduction to concepts, but I’m not really getting the opportunity to build something in an kind of understandable way. There’s not much documentation, and only one book that appears to provide the overview – That’s the “Drools JBoss Rules 5.0 Developer’s Guide”. The reviews on Amazon are mixed, leaning to bad, but it’s the only game in town. I’ve bought and downloaded the Kindle edition and will try that tomorrow.

Tom DeVito 3.27.2012

Start: 8:00

  • After my recent issues with the IDE I decided to upgraded Visual Micro.  The new version was for Arduino 1.0 and although the old would probably work I decided now would be a good time to upgrade
  • Some methods and classes have changed names and parameters, most notable, Newsoftserial in now softwareserial, and wire.send (BYTE) is now wire.write(byte(0x00)).  BYTE is no longer a data type but the is a byte(0x00) function which may be necessary.  I remember needing to use this when my friend was doing his project with the I2C compass but do not remember which type he was using in the first place.  It may not matter since I was using char in the first place.
  • Fixed some problems with outdated code that was not changed to reflect the new parameters of data elements or the current way of storing data in the Data Dictionary.
  • Fixing the recently imported Controller base class to work with the various changes that were made when testing the data dictionary.
  • Found out the real source to what I thought were IDE problems were actually that arduino extended classes need to be included in the main .pde file or they will not include properly.  This includes wire.h and softwareserial.h.

End: 6:00

Mike 3.27.2012

  • Backups this morning, still no DB changes
  • The help desk finally got back to me and I now have access to our production machine
  • I started loading software on it:
    • JRE 7u3
    • Xampp 1.7.4?
    • Tomcat 7.0.23
    • Configured tomcat for 2-way SSL on 443, it worked locally but there seem to be some outside firewall issue, I submitted a ticket
  • Back at the mill working on PKI stuff
  • Auto-login is now working for PPA.  Working on updating PPM but it was written in Flex 3 and has differently log in procedures so it be a straight copy/paste.

Phil 3.27.12

8:00 – 8:30 FP

  • Tried running the hand code on my laptop but ran into DLL problems. It was the debug version, so I recompiled the release version today. Let’s see if that makes it easier.
  • A useful page explaining all this, including that debug dlls are not redistributable.

8:30 – 4:30 CSIP

  • Ok, now that I’ve got the examples compiled and running (In Swing! How quaint), let’s see how to use this thing.
  • Chapter 2. Use cases and examples
  • Sent Ed a status update
  • Ok, I got the Drools Developer’s Cookbook, and it looks like I was doing this in the wrong order. Going to start over with the rules engine (Expert)
  • Chapter 1. The Rule Engine
    • An object type constraint plus its zero or more field constraints is referred to as a pattern. When an inserted instance satisfies both the object type constraint and all the field constraints, it is said to be matched.
    • Downloaded drools-distribution-5.3.0.Final, which contains example code. Some problems compiling, but the HelloWorld works, so we won’t worry for now…
    • This process is called inference, and it’s essential for the working of a Stateful Session. Stateless Sessions typically do not use inference, so the engine does not need to be aware of changes to data. Inference can also be turned off explicitly by using the sequential mode.

Mike 3.26.2012

  • Usual backups, the server is running well but the database isn’t changing
  • Contacted Jim Griffe regarding several things:
    • Dong’s VR – it got refreshed within hours and is good through 4/26 now
    • COGNOS data that needs to be integrated but hasn’t been given to us yet
    • Progress regarding deployment, the tool is up and running but unfortunately I can’t make anyone use it
  • Jim got the VR and assigned Tangie the rest
  • The help desk got back to me about connecting to our other VM, my remote desktop session are still timing out.  I replied essentially asking “Have you tried connecting to this machine? Is it plugged in and turned on?”  He didn’t reply before I left…
  • Working on auto-login PKI integration

Phil 3.26.12

8:00 – 10:00 CSIP

  • Starting to dig into Drools.
    • Starting documentation
    • Attempting to install the Drools Eclipse Plugins from the amazingly sullen JBoss update site
      • Well, at least it’s started updating. Heading off to class with high hopes of progress upon my return!
      • Yay – downloaded and installed
  • I came across this over the weekend that looks like an eclipse-based graphical rules engine that could be used as a reference case. It’s from Repast, a system that I did quite a bit of work with back when I was consulting for UMD/ONR. Looks like they’ve been doing quite a bit of work on the system.

10:00 – 1:00 FP

1:00 – 4:00 CSIP

  • Onward with Drools
  • Planner (http://docs.jboss.org/drools/release/5.3.0.Final/drools-planner-docs/html/ch01.html, and http://www.jboss.org/drools/drools-planner.html)
    • Huh, Drools uses fitness tests, but doesn’t have a genetic algorithm/programming component. Interesting.
    • Downloaded the drools-planner-distribution-5.3.0.Final
      • Added as a preexisting project. All kinds of Java errors, which were fixed by running Maven on the POM file followed by mvn eclipse:eclipse. Then all the .drl files were being flagged as errors. While flailing generally, I noticed that I could set the project as a drools project (which it wasn’t yet apparently). That seems to have fixed all the errors, though there are a bunch of “Java raw type” warnings
      • Got the following message: The directory dataDir (C:Droolsdrools-planner-distribution-5.3.0.Finalexamplessourcesdatanqueens) does not exist. The working directory should be set to the directory that contains the data directory. This is different in a git clone (drools-planner/drools-planner-examples) and the release zip (examples).
        • Fixed by copying the data directory from the examples level to the sources level.
      • Everything is running. Tomorrow, we figure out what it means!

Phil 3.25.12

10:00 –  2:00 FP

  • What a soggy weekend.
  • Integrating collision detection and response into the hand.
  • Checked out from SVN – still working!
  • Firngertips are now being calculated in world space.
  • Spent a good deal of time getting the global to local (CollisionCube) transformations working. They still haven’t been tested through the rotations, but are working for translation and scaling.
  • Wired up the volume components. At this point the simulation is pretty much ready to hook up to the Arduino.

Mike 3.23.2012

  • Database backup this morning
  • The server still was not responding to remote calls on 443 so I put in a ticket.
  • A few hours later the support team responded saying someone had closed the port on the firewall and they reopened it.  No explanation regarding who closed it or why…
  • Starting to implement the distinguished name PKI thing in PPA

Phil 3.23.12

8:00 – 12:30 FP

  • It’s going to be an abbreviated day. I’ve got to be over at my parent’s old house in the early afternoon to let in the GB&E guy, and since the weather’s * phenomenal* I’m going to go for a longer and early bike ride. Given all the rain in the forecast for the weekend, I’ll be here to make up the hours, probably more likely on Sunday.
  • Adding in CollisionCube. It’s drawing, and I’m getting fingertip position info for collisions. More on Sunday
  • Checked into SVN

Tom DeVito 3.23.2012

Start: 10:00

  • Ordered the boards.  The company said to ignore the warnings on the PJ-202A port
  • Looked up the necessary components.  Need to double check our inventory to make sure we aren’t buying stuff we already have.  Will finish this tomorrow and compile the list of things that need to be ordered.
  • Still having some IDE problems with Visual Micro.  Decided to just move the classes into a new project.  This seemed to fix the issue.
  • Did some more testing of the Data dictionary and communication classes to make sure it will work when we try to put it together tomorrow.
  • There are a few issues, I fixed most of them.  I should be good to go by the time you are done with your bike ride tomorrow.

End: 6:00

Mike 3.22.2012

  • Back ups a little later than usual this morning due to a doctor appointment
  • The server is extremely slow via https.  Remote desktop to the server works fine, pinging it works fine and quick, local https requests on the server are quick but accessing it via https from my desk is very slow.  I figure I will give it a day since it is not an issue with our server itself.
  • Finally heard something back from the server help desk.  A guy emailed me asking for more information.  I replied and got his out of office message.  He will be back Monday…
  • Back to working on PKI security stuff.  The interface classes are done and now I am writing a test implementation that will pull user IP addresses off the session and use them instead of userDNs to try and auto log in users.

Phil 3.22.12

8:00 – 4:00 FP

  • Looks like I’ll have the CSIP project to charge to soon. Woohoo!
  • debugging RightHand::drawPrimitive() – fixed. Passing by value rather than by reference. D’oh.
  • Shiny hand model! Now I need to wire the graphics to the FingerIO classes – partly done, waiting on putting in the CollisionCube.
  • Tried adding the FingerIO classes directly to RightHand, but the class isn’t instanced by the time show() gets called in KF_GUI. So the FingerIO classes went back to the KF_Hand_window class, and I added pointers to the RightHand class. Not really happy with this, but it will do for now as I get all the other pieces working. And better than the alternative of grabbing the parent of the window class while still reaching into the RightHand class.
  • Next, put all the changed code back into the fluid code – done
  • Adding CollisionCube drawableObject – most pieces are in and I need to test.

4:00 – 5:00 CSIP

  • Spent about 45 min talking CSIP with Ed.
  • Start figuring out drools, with particular emphasis on creating xml that can be ingested and used to create running rule sets. Note that RulePoint could be a starting point for look-and-feel, as this may be the basis for the request for the system.