Tuesday, November 30, 2004

Hypnerotomachia Poliphili

I just finished reading the novel Rule of Four, a story about some Princeton students researching the mysterious book Hypnerotomachia Poliphili. I have mixed feeling on the novel but the stuff on the Hypnerotomachia Poliphili was fascinating. MIT Press has the entire book online here. Unless you can read Italian and Latin you won’t be able to read it but the woodcuts and typography are interesting to see. You can also see the binding here.

As for the novel, it was OK but I didn’t think it was great. The story line seemed conflicted. It tried to be both suspense novel and a more literary study of youthful aspirations and expectations. If they had just stuck with the suspense novel theme and pacing and saved the details and emotions of leaving school and growing up to another book I think it would have been better.

Monday, November 29, 2004

Moon Energy

No, I'm not talking about tidal forces, but rather a wild idea to mine the moon for Helium 3.

"When compared to the earth the moon has a tremendous amount of helium 3," said Lawrence Taylor, a director of the US Planetary Geosciences Institute, Department of Earth and Planetary Sciences.

"When helium 3 combines with deuterium (an isotope of hydrogen) the fusion reaction proceeds at a very high temperature and it can produce awesome amounts of energy," Taylor told AFP.

"Just 25 tonnes of helium, which can be transported on a space shuttle, is enough to provide electricity for the US for one full year," said Taylor....

Ok, so the article doesn't deal with the real technical problems or saftey issues of shipping all that ore or energy back to earth, but it's interesting in theory. I can see this being used as a premise for some future science fiction movie.

Sunday, November 28, 2004

NetBeans 4.0

After my recent experience with Eclipse VE I decided to give NetBeans a try. I had heard it had a nice visual editing environment and it's true. Again, I've only used it for a short while, but my first impression is that it's both very crisp and easy to understand, a hell of a lot better than VE for helping layout dialogs and such. The coding environment looks nice too. Swing has come a long long way.

Saturday, November 27, 2004

Roadside History

While out riding my bike near my house I came across this granite marker on the side of the road. If you can't make out the words in the picture, the inscription reads:







When I read it I figured it must be related to King Philips War, the only Indian war I know much about. It wasn't. King Philips War occurred some 70 years earlier. This account from the Groton historical society tells a tale that sounds like something from a bad movie.

The three year's (or Lovewell') War, closed in the winter or spring of
1726. From this time there was a general peace till 1744 when hostilities
between England and France and the frontier towns of New
England were once more in jeopardy from savage incursions. But the
settlements at this period had extended further northward and westward;
Groton was no longer a frontier town, and it is not supposed to have
suffered to any considerable extent, during this war. One man, however
by the name of Jacob Ames is said to have been killed about this time,
in the following manner.

An Indian had been seen for several days, lurking about the town, it
was conjectured, upon some ill design. Jacob Adams who lived on the
intervals on the west side of Nashua River, now owned (1848) by John
Boynton, Esq., went into his pasture to catch his horse. Discovering
the Indian he ran for his house; the Indian pursued and shot him as he
entered his gate. The dead body prevented the gate's closing as it
would otherwise have done (closed) of itself and the Indian pressed it
to enter the house where Ames had a son and daughter. The son seized
his gun, and shot at him as he entered the gate. The ball, striking
the latch of the door, split and one part of it wounded the Indian but
not severely. As the son attempted to close the door against the
enemy, afther the shot, the Indian thrust his foot in and prevented.
The son called to his sister to bring his father's gun from the bed-
side and at the same time striking the Indian's foot with the breach
of his gun, compelled him to withdraw it and closed the door. While
the Indian was in the act of reloading his gun, the young man found
means to shoot through a crevice and killed him. Two men, at work
about a mile distant in a mill, Ezra and Benjamin Farnsworth, hearing
the reports of the guns and suspecting the cause thereof, were soon
at the place and found the bodies of Jacob Ames and the Indian both
weltering in their blood. This is the last man killed by an Indian
within the bounds of Groton.

Other historians debate the validity of this account. Dr. Samual Green writing in 1893 claims There is now no evidence to show that after
this date (1724) any white person was ever killed by the Indians in the neigh-
borhood of Groton. Certainly there was none killed in the year 1744*

Regardless, it's an interesting piece of New England history.

If you want to see the marker, it's in Pepperell MA on River Rd. From 495 in Littleton MA, take Route 119 West through Groton MA until you cross over the Nashua River into Pepperell MA. At the next blinking light take a right onto River Rd. The marker is less than a mile down on the right hand side.

Note: my source for the historical information was this entry from rootsweb.com

Eclipse VE

I installed and played with the Eclipse Visual Editor project yesterday. Sorry to report but I seems like a half-baked version of every other layout tools I've seen. The bad impression started last week when I initially downloaded and installed it and nothing appeared. The extension just silently didn't work. At that point I wasn't interested enough to figure out why so I just gave up. This long weekend as I was working on SaD and starting to build some dialog boxes I figured I would give VE another chance. The reason VE didn't load was because I had not installed the prerequisite project GEF and EMF. It would have been nice if there was a readme or some install instructions that called that out. Given that VE has reached a full version 1 you would expect this sort of thing to be flushed out.

Once I got VE running I was disappointed I had bothered. All I wanted to do was a simple About dialog: a couple of text labels, maybe a picture and an OK button. After twenty minutes of fumbling around I gave up. It's laudable that they want to support layouts instead of direct positioning but there was very little visual support for working with the layouts and the default choice of a BorderLayout for the dialog box just seems stupid. Granted I've yet to meet a visual editor for Java that I do like, but this wasn't even as slick as the last version of Visual Cafe I used two or three years ago. Someday it may be cool but it has a long way to go.

Friday, November 26, 2004

Side effects of Half-Life 2

CNET is reporting some players of Half-Life 2 are complaining of motion sickness and headaches. Given how good everyone says the game is I'm sure some players are reporting cases of the flu and other short term illnesses in order to stay home and play it. I know someone at work who extended their vacation so they could finish it.

If Half-Life 2 actually makes some people sick, I wouldn't be surprised. Many years ago when I played the demo of the game Descent, in which you navigate a spaceship through a web of tunnels, it totally made me queasy.

Thursday, November 25, 2004

Happy Thanksgiving

As always, this year I'm thankful for my wife Jayne, my dog Cori and all my good friends. Other things I'm thankful for the year in no particular order:

  • The Red Sox: A great season, an ALCS series against the Yankees that will go down in history and the World Series. What more could a fan ask for.
  • Dr. Atkins: Anyone who comes up with a diet that lets you eat steak, cheese and bacon and still loose weight is a genius.
  • My iPod: Still loving my iPod.
  • Dan Brown, Alastair Reynolds, John Gardner, Yann Martel and the other authors who have entertained me this year.
  • Westford 6: Without it I would have lost my sanity.

Have a great Holiday everyone.

Tuesday, November 23, 2004

Where does Scott Adams get his ideas?

I know Dilbert's an old joke in most hi-tech firms but this one really struck home. If you can't laugh at yourself....

Monday, November 22, 2004

Pete 0, Flying Squirrels 3

I have an annual battle with flying squirrels that live in my attic. As cold weather approaches they move in and rattle around in the eaves and walls. I have a good idea how they get in but not the means (or will) to scale the pitched roof to block the hole. That leaves me to wage war in the inside. I set three nice big rat traps last night all baited with peanut butter. The bait worked - it was licked clean - but none of the traps sprung. Dang varmints!

Sunday, November 21, 2004

Encyclopedia Astronautica

I stumbled across Encyclopedia Astronautica today. I haven't had time to dig deep but it looks like it contains a wealth of interesting space related information. I initially hit on a history of super guns. Interesting stuff.

Friday, November 19, 2004

Plastic Army Men

While looking for a model for SaD's army unit I came across this site loaded with info and pictures of plastic army men. I spent many hours of my youth playing with these little dudes. On rainy days I would attempt to paint them, on nice days my friends and I would hold giant battles with them in the woods behind our houses.

Thursday, November 18, 2004


If you've listened to much Grateful Dead music you've probably heard of Fennario. It's a prominent place in the song Dire Wolf:

In the timbers of Fennario the wolves are running round

The winter was so hard and cold, froze ten feet 'neath the ground

I came across the name again while listening to Gov't Mule's Lay Of The Sunflower:

I must leave you for a season

Go out logging that hardwood timber

Hardwood timber that grows so low

In the forest of Fennario.

It turns out Robert Hunter, the famous Grateful Dead lyricist wrote both these songs.

This got me curious where Fennario actually is. After a lot of searching and false hits on David Fennario, the famous Canadian author that I had never heard of before, I came across this Grateful Dead Hour interview with author Alan Trist. According to Trist:

Gans: Maybe you can tell us if there's a place called Fennario - and if so,
where and what?

Trist: Well, David, I was able to find the answer the question to that ques-
tion. If you're a songwriter and you need a word, you might refer to Alan
Lomax's Song Archivist, and there he suggests that "Fennario" is a perfect
place name, if you need a generic name for an indeterminate place, because it
has four syllables: Fen-na-ri-o. If you a need a three-syllable place name,
you might use "Fidio." So Fennario is a place in the imagination. The syl-
labic imagination, perhaps.

Gans: I was hoping there was some history to it....

Trist: [Laughs] You were hoping it was a real place that had a lot attached
to it. Well, I think you can attach those things to it yourself. It's a very
evocative name.

Like Gans, I was hoping for more.

Tuesday, November 16, 2004

Tailoring Java Applications for Mac OS X

I've been pleasantly surprised by the way SaD has just run on the three platforms I've tested it on (XP, Suse, OSX). There are some minor issues but nothing major. The biggest problem so far has been my reliance on the availability of a two button mouse; certainly not something you can assume on a Mac. I figured this must be a well documented issue and sure enough Apple has produced a good document on how to tailor apps for the Mac.

JNLP files and WebStart

I don't know how some memes get started but somewhere along the line I picked up the meme that Web Start JNLP files are hard to build. Up until this weekend I had never sat down and created a JNLP file so I had no data one way or the other. Well I can now categorically reject that meme. For a basic Java application it's a piece of cake.

If you've ever describe something via XML: RSS, FOAF, etc..., it's just like that. There's probably some more richness and complexiy in the spec that I don't know about, but that's OK, whatever it is I currently don't need it. This is the entire file I needed to get my game working via Web Start.

<?xml version="1.0" encoding="utf-8"?>
# @(#)sad.jnlp 0.1 11/15/04
# JNLP File for Search and Destory
<jnlp spec="0.2 1.0"
href="sad.jnlp" >
<title>Search And Destroy</title>
<vendor>Pete Lyons, www.developingstorm.com</vendor>
<homepage href="http://www.developingstorm.com/sad/sad.html"/>
<description>A strategic game of exploration and conquest.
The player who controls all of the cities wins</description>
<description kind="short">A game of exploration
and conquest</description>
<icon href="http://www.developingstorm.com/sad/sad.gif"/>
<j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se"/>
<j2se version="1.3+"/>
<jar href="sad.jar" main="true" download="eager"/>
<application-desc main-class="SAD"/>

The game is not close to being done, but you can now load it and move the units around some; enough to see where it's heading. If you want to see the JNLP file in action look here and click on the ship icon on the bottom of the page.

Sunday, November 14, 2004

Coffee and Cigarettes

I finally got a chance to see Jim Jarmusch's latest film Coffee and Cigarettes. It's a great film. As the title suggests, the movie contains a lot of coffee drinking and cigarette smoking, but it's really a film about communication and conversation. The film is a set of vignettes of people talking. Sometimes the people are friends, some are family, others are professional contemporaries. This films captures these people in a quite moment between the rest of their lives as they attempt to communicate and or not communicate with each other.

Most of the vignettes are quite funny, some are touching, but not all are uniformly great. I was disappointed with Bill Murrey's appearance. I don't think his performance fit the film. If he had toned it down some and showed us some of the same understated emotion he displayed in Lost in Translation, his scene would have been a lot better.

Wednesday, November 10, 2004

Hexes, Squares and other Concerns

When starting off on a new programming project you are always faced with decisions that will determine the course and shape the final product. In building a strategic war game, one such decision I've encounter is the question of whether to use a square grid or hex grid.

I started out building my game using square tiles because the game that inspired me, Walter Bright's Empire, used them and frankly because they are simpler to work with. But about a week ago, after getting a chance to see how the game felt with squares, I've decided to switch over to hexes.

Why hexes? For me it's simply an aesthetic choice. The game doesn't really need the consistent multiple axes of movement offered by hexes, but that won’t hurt either. I grew up playing Avalon Hill games like Tobruk, Stallingrad and Squad Leader and just have a fondness for the hexes those boards had. I also think the jaggy edges of the hexes make more 'realistic' borders between terrain types; the square edges and straight lines of the square tile based board just look too artificial.

Never having worked on any code that used hex space before, I of course turned to the web for some guidance. The amount of information out there never ceases to amaze me.
For getting jump started with hexes I relied on Clark Verbrugge’s sample code from his article: Computing Field of View on a Hexagonal Grid. I don’t need the field of view calculation but reading his code was a big help. For more general game programming information I’ve found Amit's Game Programming Information to be the best. Amit’s page has links to all sorts of topics.

Axis, Axes, Axii?

While writing another post (it will probably follow this one) I needed to pluralize axis. None of the guesses I came up with passed the spell checker so I Googled it. The first hit I got was from a drafting company. (Interesting aside: word order matters in Google more than I realized - searching for "plural axis" didn't get the same dictionary oriented results as "axis plural") According to these folks the answer is:

Grammatical Note :

The plural of axis is axes. Some radical etymologists insist that the plural form of axis is axii, but that is only if there are three or more;

One axis, two axes, three axii.

The word axii, however, still doesn’t pass the spell checker, so perhaps getting grammar lessons from a drafting company isn’t such a great idea. More legitimate authorities simply list axes as the plural.

If you do visit the above link to drafing company, can you answer me a question, what the heck are those diagrams depicting. It looks like some weird condom construction set.

Saturday, November 06, 2004

What file extension are you?


src="http://www.bbspot.com/Images/News_Features/2004/10/file_extensions/swf.jpg" width="300" height="90"
border="0" alt="You are .swf You are flashy, but lack substance. You like playing, but often you are annoying. Grow up.">
Which File Extension are You?

(via Ted Neward)

Me and version control

Ned Batchelder's recent posts on Darcs and SCM Systems got me thinking about my own side project code management. So far I've just been zipping my files at intervals and emailing them to myself and or importing them into my personal Notes Journal. It works as a safety net, but it's not as easy as it could be and therefore not as granular as is should be.

At various times I've setup my own CVS or Subversion server to play with but I've never made them part of my routine. After reading Ned's post of Darcs I gave that a try and it's very simple to use but I don't like the idea of the repository being on the development machine and I'm not sure how I could take advantage of the peer-to-peer capabilities given the number of firewalls between the systems I'm likely to be doing development on.

The solution that seems most appealing to me (at this point in time anyway) is something like a CVS or Subversion account on cvsdude.org. This would give me the security of having the source be off site, and at the same time being ubiquitously accessible via the internet.

Cvsdude offers a free account that give you 2megs of space and access for one developer. If you need extra space or want to have multiple developer accounts the upgrade price for 20Megs and 3 users is only $57.00 for a full year or $15.00 a quarter. I think I'll give them a try. My biggest decision left is whether to go with the more familier CVS or the more modern Subversion.

Thursday, November 04, 2004

A* Visualization

I've continued to make good progress on my game. One area that's been pretty fun is getting pieces to find a navigable path across the map. The algorithm I've used is called the A* algorithm .

A* is recursive and backtracking and as such it can be a bit tricky to debug. When I first implemented my version I made a small mistake that caused certain complex paths to be unresolved. The depth of the search and the number of backtracks made it very hard to analyze what was really going on. To help out I animated the search. As the search proceeded I drew the path being tested on the map (I added some sleep time to make it more watchable.) The results is that you can see the algorithm probing the nooks and crannies of the terrain trying to find a path from point A to B and from watching this behavior I was able to pinpoint the problem.

I'm certainly not the first to think of this, there are other examples of A* animation out there. But I like the effect so much I think I'll make it a configurable part of the game.

Tuesday, November 02, 2004

Comic Code

Geez, is it just too much to ask a cartoonist to include properly formed code statements in their work?

Actually I'm pretty psyched about the release of Half-Life 2 too, though I may be in a similar boat to Jason. I doubt my 2 year old 2Ghz machine with 512 MB will do it justice. I was reading a preview review of it in PC Gamer and they lauded it:

It’s not just a videogame, it's not just a shooter - Half-Life 2 is history in the making. It raises the bar for interactive entertainment, and then uses that bar to club all other games into submission....While some games have eye-dropping visuals, or amazing gameplay, or maybe a cinematic story with good voice-acting, not one has ever delivered the complete package. Half-Life 2 nails it.

Monday, November 01, 2004

Learning a GUI API

I've been playing around with Java UI and Swing some over the past week trying to get some traction on a little strategy game I've started working on. The last time I did any significant Java UI was on Java 1.1 with the simple awt classes. This time I figured I'd give Swing a try.

So far learning what I need to know has been both fun and a bit annoying. I really want the game to paint very cleanly so I've been doing a lot of experimentation in order to see what helps and what doesn't. The Javadoc is pretty good but sometimes it only tells you things in very narrow terms and you need to really experiment with it to grasp the hidden deeper reality. I wont go so far as to say this is unique to GUI apis but it does seem to be characteristic of them. I remember doing a lot of the same experiments when I started developing for Windows.

I think some of this extra effort can be explained by the extra feedback loop a GUI has. With a GUI it's not just about getting it working, it's getting it working crisply. When working on backend code it's so much easier to live with good enough.

The Out Campaign: Scarlet Letter of Atheism