Back to class again. This time it is only twice a week but for 4.5 hours. The majority of the evening was spent taking the rack of carbs apart. Not much to screw up here, but I always find a way. Most of the screws were stuck and/or stripped out, so Brian helped me with the last one using just a pliers. Arriving late to class, that is all I got done.
Most of these photos are for my reference later. In particular the spring locations are important.
For directions I’m using the Honda service manual, Mike Nixon’s guide, MacGregor Carb Cleaning Services guide, and Randakk’s rebuild kit.
Continue reading “CB750F: Day 10”
Category: Article
IntelliFest Favorite Presentations: 2010-2012
Part of my path to knowledge engineering mastering has been to read everything available out there today about the modern knowledge engineering landscape. IntelliFest graciously posted all of their presentations from 2010-2012, and all of them are helpful. The following, though, were particularly helpful to me, and I wanted to share which ones and why, they follow:
Continue reading “IntelliFest Favorite Presentations: 2010-2012”
Sharing your Passion
What seems to be universally fun is spending time with people who are sharing their passion. Teachers do this, so do really good presenters, friends, and leaders.
It is the experience of people sharing with you the song that their heart sings.
On Computing
Computing is very poorly understood. Case in point here is the litmus test I would argue to you that:
In North America you can pull any 18 year old randomly off the street and ask them to do something and it would go like this:
1. Can you build a basic bridge between a 3ft span given some materials?
2. Can you build a basic drainage system given some materials?
3. Can you organize a group of 5 people to perform a non trivial but paralleled task?
4. Can you prepare a soup like chili given materials?
5. Can you write down the computational logic to show the fibonacci sequence (given an explanation of the sequence itself)?
What percentage would you say that we pull 1000 people and given them this test? What percentage could successfully do each?
You know where I am going with this.
100% can do 1-4 and 0.01% could do 5.
There is a deep, deep lack of awareness about computation.
The problem with computation and titles around it are that very people ever think about what it is that we truly do, and often times the ones that do are relegated to the backroom. Case in point. SICP is no longer part of MIT entry program because it is too far “out there”. Kind of sad, that is part of the mystery, and the fun, what we are doing and what we can do specifically on computers, is, something that no one in history has been able to do before. We can execute things now that people have only dreamed of, computers are truly without limit. I found this special:
https://www.wisdomandwonder.com/link/979/computers-are-a-metamedium
Calling functions with optional arguments from the mini-buffer
Surely one of the first things VIers want to know as do the rest of us is how to move forward N characters (or backward or whatever) from the mini-buffer in EMACS. Here is how it is done, using the universal argument. So to move forward 100 chars:
C:u 100, C:f
ADDENDUM:01/13/13
Thanks FUCO for providing a better solution:
There’s also a faster way. Just hold down control key (or meta key, by default the binding is on both) and type the number, then execute the command or invoke minibuffer with M-x
So, C-2 C-0 C-f will move you 20 characters. It’s neat because you don’t have to release control, you just hit the rest of the keys in sequence.
More Basic Setup
Custom JESS REPL
If you want to use a custom JESS REPL with Emacs then set up a shell script
jsjs-repl like this:
#!/bin/bash
mvn --file /home/gcr/git/jess-sample-java-setup/jsjs/pom.xml compile -Pjess-repl
And then make this call in EMACS before calling run-jess
:
(setq inferior-jess-program "/home/gcr/git/jess-sample-java-setup/jsjs/jsjs-repl")
More Background
My background is custom software development in a consulting and stuff sup role. My work has been primarily in insurance, manufacturing, and the financial industries with clients ranging from large to small. Tech/training wise I studied mscs, computing, and computational sciences at MU; and have practiced software engineering at my day job for the past eleven years, and I mean practice, it is something I am constantly trying to get better at. Tech wise I am a pretty typical GNU/Linux & Windows person more or less, doing Java, .NET, Lisp, and recently Python.
A commonality among nearly every project I’ve worked on is the eventual occurrence of if statements 5-levels deep repeated across multiple call-sites (40+ typically) through no want/action/desire of my own. When I look at stuff like this, I feel like in addition to refactoring (regardless of the system type) there might be a better way. From what I’ve learned so far, rules engines seem like they might be a good fit.
Part of my goal here was to find a tool that not only provided a rules engine, but also helps the user to understand and debug what is happening, when, how, and why, with the intent that the developer implementing the rules can do it in a non-arcane manner and also share the behavior of the engine with business-related users to help them down the path of thinking in that manner.
jess-mode Cheat Sheet
Before tackling the CLIPS literature I felt like I ought to ramp up on the key-bindings for jess-mode in EMACS. Here are some good ones, you will find that they are basically what you would expect in the grouping that I view them in order to help the development process:
Comprehension:
-
\C-c,f
‘inf-jess-get-facts: Retrieve the fact list from the inferior Jess process. -
\C-c,r
‘inf-jess-get-rules: Retrieve the rule list from the inferior Jess process. -
\C-c,a
‘inf-jess-get-agenda: Retrieve the agenda from the inferior Jess process. -
\C-c,v
‘inf-jess-get-view: The view command displays a live snapshot of the Rete network in a graphical window. I added this one myself.
Management:
-
\C-c,g
‘inf-jess-run-engine: Run the inference engine in the inferior Jess process. -
\C-c,i
‘inf-jess-reset-engine: Reset the inference engine running in the inferior Jess process.
Evaluation:
-
\C-x\C-e
‘inf-jess-eval-last-sexp: Send the previous sexp to the inferior Jess process. Prefix argument means switch to the Jess buffer afterwards. -
\C-c,e
‘inf-jess-eval-region: Send the current region to the inferior Jess process. Prefix argument forces switch to Jess buffer afterwards. -
\C-c,b
‘inf-jess-eval-buffer: Send the entire buffer to the Inferior Jess process. Prefix argument means switch to the Jess buffer afterwards. -
\C-c,t
‘inf-jess-eval-deftemplate: Send the current deftemplate to the inferior Jess process. Prefix argument means switch to the Jess buffer afterwards. -
\M-\C-x
‘inf-jess-eval-deffunction: Send the current deffunction to the inferior Jess process. Prefix argument means switch to the Jess buffer afterwards.
I bound ‘inf-jess-val-buffer to , that is what I do for all lisp modes, but that is a personal preference thing.
To set the JESS interpreter command (make sure it is a shell scrip):
(setq inferior-jess-program "foo")
To start JESS in EMACS run:
run-jess
CLIPS Notes
For fun I worked through the CLIPS 6.30 beta literature specifically the user’s guide and basic programming guide. These are so, so helpful; they are aimed and programmers who have never worked in an expert system before. It goes in a lot more depth what you may do in CLIPS, and consequently JESS, than JESS does.
A Bit about CLIPS
JESS is a superset of CLIPS. On Linux it is a little less obvious how to get the install because CLIPS seems to come with a powerful IDE, but not on Linux. Oh well, on Ubuntu you can install it with:
sudo apt-get install clips clips-common clips-doc
Installing it provides
- the interpreter
- a nice man page
- a help file accessible within the interpreter via ‘(help)
- /usr/share/doc/clips-common/CLIPS-FAQ a compressed FAQ file readable with zcat or zless or zless to read it.
- /usr/share/doc/clips-common/html/ Local copy of the main website with links out to stuff like documentation
- /usr/share/doc/clips-common/examples/ “A number of examples of CLIPS program are available so you can test the interpreter and learn how it works. You can, for example, load one of them with (load “/usr/share/doc/clips-common/examples/wordgame.clp”) and run it using (reset) and (run).”
CLIPS seems like a great place to start with learning at least parts of JESS. I’m guessing that there is a lot of good material between the docs and examples.
Jess Sample Java Setup Project: Minimal Setup
This project will start out with a typical Java development setup:
- Ubuntu 12.04 LTS GNU/Linux: http://www.ubuntu.com/
- IntelliJ Idea, the most pleasant development environment out there (Eclipse
usually copies the good features within 3-9 months, but it is still pretty
unpleasant): https://www.jetbrains.com/idea/ - jprofiler: http://www.ej-technologies.com/products/jprofiler/overview.html
- GNU Emacs 24, for everything that Idea doesn’t do well: https://www.gnu.org/software/emacs/
- Oracle’s JDK 1.7, it is the newest out there: http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
- Apache Maven, dependency management at its best: https://maven.apache.org/
- Jess 7.1p2, you need to obtain it directly from the source, and it is free for
most of us. READ THE LICENSE AGREEMENT and you may download it immediately: http://www.jessrules.com/jess/download.shtml - Graphviz, for state diagrams: http://www.graphviz.org/
Continue reading “Jess Sample Java Setup Project: Minimal Setup”
Jess Sample Java Setup Project: Mission Statement
For a couple of months I have thought about how fun it would be to set up a real simple Java+Jess project to help myself out with the basics of dependency management and logistics of interaction between Java and Jess. Recently it made sense to start using GitHub. With the hope that lowering the barriers to anyone interested in using Jess, I decided to throw the project out here. More so, because I will be working on it piecemeal, I decided to log progress in this diary and also on the blog I’m hoping it will serve as a resource for anyone interested in the project. My particular interest in Jess is for where a rules engine might fit in a 3 month to 2 year long Java project with a team of 3-12.
Here are some of my goals:
- Provide a preconfigured project setup using Maven
- Demonstrate some sample projects
- Learn and cover interesting aspects of how Java and Jess work together
- Learn or create nice ways of testing the system
Here are some of the options for sample projects to drive it:
- Porting CLIPS samples
- Logic puzzles
- Video games
- HVAC system
- Form data validation
- Data conversion
Here are some of ways to test it:
- TestNG
- Fitnesse
My preparation so far has been to read virtually everything available on Jess ( http://herzberg.ca.sandia.gov/), twice, and additionally read whatever I can find about CLIPS (http://clipsrules.sourceforge.net/), rules engines, and expert systems in books and on the Internet.
Getting started with Git meant reading the official docs (http://git-scm.com/documentation) and man pages, and GitHub itself has excellent documentation (https://help.github.com/). One helpful page was for the basic Markdown syntax which I had never learned officially (http://daringfireball.net/projects/markdown/basics) (except for using it in various wikis).
Admittedly, the Jess wiki cites a project like the above to be outside the sweet-spot of Jess. My worldview right now, though, is that the rules engine way-of-thinking has a lot to offer beyond mega-million enterprise-style projects, and that anyone who masters it will have a very valuable and powerful tool in his kit when he is done!
First Impressions Of Why You May Like To Look At Jess
Reasons to learn Jess:
Continue reading “First Impressions Of Why You May Like To Look At Jess”