A tricky little problem, as it turns out. There is little out in google world to help you, and only a few tools. License issues with almost all I found, especially running on Windows boxes in 64 bit mode.
I finally found Yet Another Java Service Wrapper at yajsw. License is LGPL and it supports 64 bit windows. I was able to get my application running very quickly. Worked perfectly the first time. Getting going was interesting:
1) You download yajsw and extract the zip file.
2) You run your app and lookup its PID.
3) You run the yajsw script generator, and it analyzes your running application to create a script file.
4) You then run the yajsw bat files to install-service, uninstall-service, start-service, stop-service, etc.
The only trick is to run the bat files with administrator permissions. (Right-click on the bat file and select “Run as administrator”.)
Right now the yajsw folder needs to exist on the server as well. Doubtless there are more convenient ways to package the install, but this was a good first step.
Sebago Resort – garage

Sebago Resort – Cabin 3 Interior
Cabin 3 is one of the nicest and largest cabins, plus it is closest to the lake and the stairs going down to the docks.
Sebago Resort – 2011 – morning by the basketball

<iframe width="100%" height="600" allowfullscreen style="border-style:none;" src="http://clevercaboose.com/pannellum/src/standalone/pannellum.htm?config=http://clevercaboose.com/pano2/20110530-9/config.json"></iframe> Sebago Store Interior 2011
Sebago – dock sunset – panorama
A very wide panorama from Sebago Resort, Memorial 2011
Sebago Resort twilight fishing
Moving panorama hosting to 360cities
It has always been annoying that the Microsoft HDView tool relies on silverlight and forces users to install a plugin. Not to mention that I started embedding the panoramas in my page and that led to problems … crashes and lack of 360 deg awareness. So I took another look around at free hosting tools, and gigapan and 360cities emerged as two good options. Gigapan is picky in that they reject panoramas that are too small. They REALLY mean giga. 360cities has some restrictions, but not as severe.
For now, I am moving to 360cities. While my panoramas are not good enough for them to include publicly, they will host them so I can show them here.
My 360cites profile can be found at http://www.360cities.net/profile/richmacd
Sebago – Overlook Panorama – 2000
Sebago Panorama – Entrance – Memorial 1999
Sebago panorama 20110530-1
Sebago Docks at Twilight – David silhouette
Sebago – Cabin 6 – Kitchen – 2011
This is the start of a series of pictures I took of the insides of the cabins at Sebago. I am doing high-resolution (zoomed lens) and HDR in a cramped space, so the limitations of the camera do show, and it is really hard to get it perfectly. So it isn’t perfect.

Kitchen Interior of Cabin 6, Sebago Resort in USABy the way, the HDView panorama is the best way to see the cabin, but if we look at one picture, we have to choose which distortion we least dislike. The above image is hemispherical, and is used for the HDView panorama. Below is the panini projection, which tries to keep straight lines as straight lines. Better in some ways; worse in others.

Java generics and the “Smalltak setter” pattern
Anyone coming from a Smalltalk background recognizes the idea of setters returning “this”. (Smalltalk does it automatically). It can be useful when chaining multiple setters together. (See this) And it is more readable than having a method with several parameters. Which would you prefer?
1) Methods don’t return anything:
myObject.setValue1(value1);
myObject.setValue2(value2);
myObject.setValue3(value3);
myObject.setValues(value1, value2, value3);
myObject.setValue1(value1).setValue2(value2).setValue3(value3);
(1) requires the most typing and the most screen space, so it slows down good programmers.
(2) is the worst option because you (a) wind up with several combinations of all the setters (setValues12, setValues13, etc), and if value1, value2, and value3 are of the same class, then you risk putting the parameters in an incorrect order.
(3) Nothing wrong with (3). It is clear and readable.
Now there could be a style debate: Should we use the Java pojo style, i.e.,
myObject.setValue1(value1).setValue2(value2).setValue3(value3);
myObject.value1(value1).value2(value2).value3(value3);
Parboiled java patterns (Errors inside Optional)
I’ve been using Parboiled Java on a current project and think it is fantastic. Best thing since sliced bread and regexp. But as I was finishing up the edge conditions of the testing, I ran into some fundamental pattern issues which are not obvious and not in the examples. So here are some notes:
My problem domain syntax is essentially OData with some modifications. We’ve kept the basic ideas and added some necessary extensions. A user will create a URL representing a database search, send it to my system, I parse that URL and convert it to a search object, perform the search, then reply with the data from the search.
It was easy to create code for the matching syntax. It was the error conditions and catching the errors that turned easy into hard and ugly. I don’t mind hard but I do mind ugly, so perhaps this post will lead to a better approach. Otoh, error handling and parsing tend to produce really ugly children, so a clean approach may not be possible either.
Here is an example of a URL snippet:
Person($expand=location($current))
Without getting into the meaning much, this is a database query that means Find all Persons and “expand” their “location” property which are “current”. In other words, find all people and return the people and their current locations.
Below is a parboiled parser class that does the trick:
import static org.parboiled.errors.ErrorUtils.printParseErrors;
import org.parboiled.BaseParser;
import org.parboiled.Parboiled;
import org.parboiled.Rule;
import org.parboiled.annotations.BuildParseTree;
import org.parboiled.parserunners.ParseRunner;
import org.parboiled.parserunners.TracingParseRunner;
import org.parboiled.support.ParseTreeUtils;
import org.parboiled.support.ParsingResult;
@BuildParseTree
public class BlogTest extends BaseParser
The problem is all the optionals. The parentheses are optional, and the text inside the parentheses are optional. In other words, the following URLs are all legal:
Person($expand=location($current))
Person($expand=location())
Person($expand=location)
Person()
Person
But if there is text inside the parentheses, then it must be correct. In other words, the following URL is illegal:
Person($expand=location($currents))
When the java class shown above parses the above string, it will succeed because it matched on “$current” and didn’t care that the following letter was a “c”. We need to correct this.
One way to do this is to use the TestNot() rule. (If there are better ways, I’d love to know.) Change the Current() rule to the following:
// This matches the $current and does not match $currents
TestNot(LetterOrDigit()),
currentSucceeded()
);
}
So now we will no longer match on $currents. Problem is, the parser still succeeds because the Current() rule is enclosed by an Optional(). The error inside the Current() rule matching will be ignored.
We want the parsing to fail with a useful error message where the error occurred. How do we do this?
I’ve come up with two approaches, neither of which I am that crazy about:
Option 1 is to throw an Exception when the illegal text is discovered. Something like:
// This matches the $current and does not match $currents
currentSucceeded()
);
}
protected boolean throwError(String msg){
throw new ActionException(msg);
}
Option 2 is drastic: We define our parsing rules to accept “almost anything”, use the match() method to build up intermediate objects (i.e., abstract syntax trees or ASTs), then analyze these objects for correct data.
An argument for option 2 is that the parsing phase should be separate from the validation phase. And one can build up a generic and reusable AST system. I spent a day working this out, but ultimately abandoned it as the parsing rules had become so “unrelated” from the “correct syntax” of my problem domain. I didn’t like the code-smell.
I’m still working through this, but right now Option 1 is forging ahead.
Robyn’s room 2012
Daughter spent the day cleaning and re-arranging her room. The miracle of mess-removal, and once again being able to see the hard wood floors that her Mother and I discovered under crappy carpet and restored. We thought of taking a picture, then I remembered that photosynth is available for her new itouch, so we played with that. Good, but not good enough for Dad, so I spent 2 hrs taking the pictures, and maybe 10 hrs building the panorama with hugin, then the computer did a few hours of cranking as well. This one came out quite nicely. Problems mostly due to the average camera lens.
ICEE Maker Ipod game is a RIPOFF
Rob Gillaspie – Corporate Slave
Back in 1993, I was working an hellacious job at the refinery in El Dorado. (Hell Dorado, as I called it.) Monday through Friday in the plant, home for weekends. Lousy project. One bar in town and these were the days when you needed a “membership” to enter. I wound up eating most of my meals in my motel room.
Anyway, I was back in Lawrence for Art in the Park, and I ran into a very talented kid (high school senior) who was displaying his work. His name was Rob Gillaspie. One image in particular caught my eye: Corporate Slave. Surprise :-)
I told him I wanted to buy it and how much would he sell it for. Nice kid, he was stunned, and eventually came up with “five dollars”. I talked him up to ten dollars with a lecture about how it was going to cost me twice that to have it framed. Anyway, we parted company and I never saw nor heard from him again. Periodically I google and FB his name, but nothing yet. So now at least his name and his art work are in google and perhaps he can find me.
Robin MacDonald newspaper clippings
I’d scanned some of my Dad’s old newspaper clippings, so it was time to commit them for posterity.. Cricket from the sixties…
This is an article from the 1960s. Currie Cup cricket is the South African equivalent of each US state competing against each other. SA had 5 provinces (or “states”).
Golf next. My Dad never got a hole in one but he got an albatross at Royal Durban Golf Club.
RDGC is a unique golf course. Totally flat and wind-swept. Two-shot penalty if you got into the rough. Surrounded by a horse race track. They have actually reversed the front and back nine since our time. Dad was club President a couple of years in the 70s.Fond memories of New Years dinners with party hats and Dad making the speech.
My Dad made the Natal amateur semifinals a couple of times. Natal was one of the South African provinces.
Paradise Cafe enchilada recipe
Paradise Cafe in Lawrence, KS was my favorite restaurant back in the college days. Sadly no longer with us, but I made some great friends there.
(You can find their facebook page at facebook paradise cafe group )
For some reason or another, I got hold of the enchilada recipe, so here it is:
Filling
Bucket List Books
It occurs to me that everyone should maintain a list of “bucket-list” books. Books that are so important that we believe everyone should read. Or maybe this is the wrong term. Maybe this is just a list of books which we found essential to whoever we are today. I’ll get started here.
Zen and the art of motorcycle maintenance / Lila, by Robert Pirsig
Two books actually. Good college age reading, perhaps for advanced high school. This is an engineer’s bible. Foundations of logic and “truth”
College age. Very tough mathematics. Mind-blowing. The art of bootstrapped complexity.
A new kind of Science, by Stephen Wolfram
If it turns out to be true, the most important mathematical work since Godel’s incompleteness theorem.
Narcissus and Goldmund, by Herman Hesse
One of the great writers of all time. The intellectual life vs. the experiential one. If one every plans to spend time debating capitalism vs. socialism, Democrat vs. Republican, etc, etc. one should also read Magister Ludi, in order to remove forever the fantasy that there could exist a perfect system.
Shogun, by James Clavell
Because aliens really do exist on this planet, and by the end of the book you will partially understand how they think. You’ll also never complain about the dropping of the atom bomb to end WWII.
And many more …
World’s greatest eggnog recipe
Picked this up from playboy many years ago.
1 pint of cheap domestic brandy ¼ pint cheap domestic sherry ½ pint of cheap rye whiskey ¼ pint Jamaica or New England rum 12 eggs 12 tablespoon of sugar 1 quart of milk or 1 quart of half & half 1 quart of cream or 1 quart of half & half Nutmeg and cinnamon to flavor ½ gallon of Borden vanilla ice cream (it has condensed milk)
Mix brandy, rye, rum and sherry. Separate egg yolks and whites (keep both) Beat egg yolks well, then add sugar. While mixing egg yolks and sugar, drizzle the liquor. Then drizzle in milk & cream. Set aside.
Beat egg whites stiff. Then fold the egg whites into the mixture. This works best if you start with ¼ to 1/3 of mixture.
Put the brew in the refrigerator and leave for at least 72 hours- prefers 8 days when it peaks. If you drink it to soon it will taste like crap. Serve in a big punch bowl. Add the ½ gallon of ice cream and nutmeg and cinnamon. This will keep in the frig for 4 to 5 weeks.
Update 12/19/2000 And here is an alternative recipe by Charles Mingus.
The True Meaning Of Life or The Laid-Back Country-Club Summer School Approach to the Laws of Thermodynamics
I was rummaging through old files looking for something, and came across this rant I wrote back in 1986 when I was teaching thermodynamics at KU. I decided not to give it to the students for obvious reasons. I am posting this with minimal cleanup.
————-
Thermodynamics is a subject that starts with very simple physical observations of the real world. The whole field is based on two laws (actually four: Two biggies and a couple of backups) and there isn’t a hell of a lot of theoretical background to any of them. The laws just are. If that’s not good enough for you, the Nobel prize is waiting.
The zero’th law says that if A is at the same temperature as B, and B is at the same temperature as C, then A is at the same temperature as C. Pretty profound stuff huh! And this is college? Well, somebody had to start somewhere, and that’s why they call it the zero’th law anyway.
Actually, when you really start looking at it, it gets pretty philosophical. Nobody’s actually proved the zero’th law mathematically, so it has to be a postulate. But it is necessary implicitly for the other laws to have any meaning. Luckily, it is borne out by observation, and nobody’s contradicted it yet. So mankind builds its first thermodynamic foundation on pretty sturdy ground. The stuff after that? Just you wait.
Next is the first law of thermodynamics which is simply the conservation of energy. What goes in must come out. But what makes it a bit more complicated is that nobody really knows for sure what energy is. Oh sure, we can all talk about it: OPEC screws us for it; it flies out the attic if we aren’t in the pink; we run out of it if we weren’t good little boys (sorry, persons) and finished all our porridge for breakfast like mummy told us to, etc. But we can’t hold it in our hands (1) and it’s invisible. But in some way we all know that it exists (I think). It cannot be created or destroyed.(2) The net result of all this crap is that we usually get a pretty circular definition for the first law. The first law defines energy, but the first law is itself defined by energy. Or something like that.
Everybody sneaks around this little problem by arbitrarily defining two other things first: Heat and Work (and let’s not get into that headache just yet). This takes up to Chapter 4 in Van Wylen and Sonntag. Then in Chapter 5 we get this beaut: “The first law of thermodynamics states that during any cycle a system undergoes, the cyclic integral of the heat is proportional to the cyclic integral of the work”(3). Are you kidding me? A much more sensible definition is as follows, but notice that we still really don’t say what the heck energy is:
energy input – energy output = change in stored energy
Anyway, throwing up our hands, we define energy well enough so we can use the concept and go on, keeping quiet along the way so we still get paid by those bean counters.
The second law is a deceptively easy concept but really tough in application. Or maybe it’s simple in application, but a damn difficult concept. I can never remember which. Basically, it says you can’t get something for nothing. Energy isn’t free and it’s a one way street. For instance, cups of coffee don’t sit around getting hotter. Energy in the form of heat flows from the hot cup to the cool surroundings, not vice-versa. Air flows into a vacuum, it doesn’t spontaneously turn around and head back out. The accursed friction is real. Even perfect engines cannot be 100% efficient. All quacks who build perpetual motion machines are full of doggy poo. All this from the immortal words of Clausius:
“Die Entropie der Welt strebt einem Maximum zu”.
To get around this little game, everybody defines entropy. And this little guy can be a monster, until you simply stop questioning it and go with the flow. The most universal application of the second law (or perhaps the starting point) is that the entropy of the universe always is tending toward a maximum. Think of entropy as a state of disorder. The greater the entropy, the more the mess. Yes folks, at last scientific proof that dirty dishes are nature’s way and lost single socks have an afterlife.
The third law of thermodynamics harps back to the fact that we don’t really know what energy is. Nor entropy, dorm food, and Vanna White’s phone number. Actually, the third law is something of an anticlimax when you get to it. It states that at absolute zero degrees, the entropy is zero. This is reasonably logical, and it gives us a point of reference. Once the energy or entropy of something is defined somewhere (zero at zero degrees, for instance), its state is fixed/determined at all other conditions. If all this makes sense, then I hate to spoil the party, but to be perfectly honest, the third law is no use to anybody except for a few mad scientists, and a few even madder philosopher-engineers. For one thing, all engineers are ever really interested in are the differences in energy and entropy, so we can define a reference point as zero anywhere we want. Not to mention that one of the teansy weansy problems is that absolute zero is unattainable, by definition of the actual law which defines it. Now that’s a real circular definition.
All this is enough to pick up a cold sixpack, drive out to Lone Star Lake, blow up the extra large inflatable raft, and set yourself adrift. Or perhaps you might say a few words to the big guy who made all this wonderful stuff possible and ask him why on earth he made it so weird. Actually, civilization hasn’t fallen yet so the whole field of thermodynamics is probably doing ok. The above bullshit won’t help you solve the homework problems or do well on the tests. But I hope it will help you take everything a little less seriously when you don’t understand something, and skeptically when you think you do. Above all, never trust the teacher. He just started studying this stuff a few years before you did, and look how screwed up he is.
Notes:
(1) Actually we can a la the potential energy of the column of air we are supporting, the potential energy of the hands being held off the ground, the chemical metabolic potential of our bodies, etc.
(2) Except for E=mc2, of course, and even then this only states that mass is another form of energy.
(3) To those of you that this is all sounding gibberish, congratulations, you are normal.
The Lennox Taulbee Clan. Recording from 2005/2006
This was a project I worked on a few years back. My friends, the Lennox Taulbee Cla,n decided they wanted to make a record of themselves singing together. Our friend Charlie Lamb built his own studio, called adoruerecords, so we booked a couple of days. The Taulbees sang, Charlie recorded, and I tried to film it. We had two cameras, so I always put one on a tripod and I walked around with the other. Trying to keep quite and out of the way. From the practices and multiple takes, I could get enough footage to mix it later. This youtube playlist was the result.
One technical note is that the light was low, so the video had a lot of noise. Noise reduction filters in the video world are pretty bad so I looked to the graphics tools. The best available had just been released as a PhD project and I could only use it from the command line. So I exported the video as images (30 images per second) and used a batch tool to run each image through the filter. At 30 seconds per image, this wound up taking about 40 days. 40 days when my computer was constantly pegged. It was definitely worth it.
Link to the youtube playlist