Datestamp That Page!

The last few years have seen Google replace many other traditional forms as the de facto standard way of doing research. If a question comes up or a person is doing research, invariably the first thing folks do is ‘google it’.
While working on my current Java project, I’ve had to learn a ton of new technologies. Generally the way I do this is google a term or concept and pick which of the answers best seems to answer my question. This works quite well, and in general I get the information I need.
Many times however I’ll find a paper, a page, a set of answers, etc that -seem- helpful, but the problem is I don’t know when they were written. The person publishing the page simply does not datestamp the page anywhere. This is particularly maddening when dealing with a constantly evolving technology such as Linux or Java. What was ‘best practice’ or ‘the new method for doing [x]’ 5 years ago (or even 2 years ago) is no longer the appropriate process.
Too many people are publishing pages that simply don’t give a time reference.
The most recent one was when I was looking up information on Linux tablet PC drivers for a set of tablet computers I saw on eBay. That took me to LinuxSlate, a page apparently about, well, slate drivers. Duh. 🙂
No where on that page is a hint of a datestamp. When was it last updated? How recent is that information? If it’s old, then I know to continue looking around for more current documents.
So, for the greater good. if you publish documents or pages detailing in particular technical information for the greater good, fer chrissake, DATESTAMP IT. A footer saying “Last updated: 1/2/33” is all that’s needed. Really.
This has been brought to you by the Society for a More Helpful Internet.

New LJ.XML feed.

I’ve just switched my RSS feed into LJ over to the new format I’ve been working on. This may cause a huge update into LJ, but due to how LJ handles feeds, there’s nothing I can do about that.
The new footer has a dynamic counter that shows how many comments have been posted on an article in real time. If you refresh your LJ page, you’ll see the comment counter update.
I’ve also changed the text around a little bit to make it easier to read comments and add new ones.
For those reading via other aggegators, this has replaced the old RSS feed for LJ. If you want to subscribe to it, use
Feel free to let me know if you have any comments or suggestions or just plain criticisms 🙂
[Update : apparently it didn’t cause a huge cascade. I’m relieved :)]

Some comments on the Mac vs PC vs Apple debate

There was an interesting article posted on Slashdot this morning, pointing to a Windows Guru’s impressions of Mac OSX Tiger, the next version of Apple’s OS for Macs.
In the Slashdot posting, the author says:

In the article, he actually confesses that he has ‘been a Mac fan [his] entire life.’ Interesting, considering some of his criticism of Apple’s work in the past.”

I posted a reply, reproduced here for those not willing to wade into Slashdot’s comments forums – a decision I can totally understand 🙂 :

Very few people can dispute that Apple has made some of the sexiest, most interesting systems that have come down the pike. The Mac was a masterful bit of design at introduction, and even though it was looking a bit long in the tooth as MacOS 8 and MacOS 9 were coming along, you couldn’t argue that the environment set the tone for making GUI’s useable as a primary interface.
OSX is a FANTASTIC piece of software, jumping the Mac platform squarely into Unix land (where we all knew desktop systems should have been all along, right?) while also providing a wonderful desktop experience.
On the other hand, Apple the corporation has made truly painful decisions that have alienated a lot of the ‘apple fans’. The one that comes to mind was the decision to cancel the Newton, just when it was showing promise. Apple has a history of driving new technologies through to maturity, and with the Newton 2100, the platform had just gotten to the point of usefulness when it was cancelled. Did this make me less of a Mac fan? No. Did it make me less of an Apple fan? Absolutely.
I have on my desk a Mac Mini (for my mom), an old iMac (to test Safari pages), a Shuttle box running Windows XP, and my primary platform, an IBM T40 running Debian Linux. Of the 4, the most pleasant to work on is the Mac Mini. The most productive is the Linux Laptop. The best for game playing is the XP machine. The iMac is just there to look cool (as cool as purple gumdrops get).
I’m still a fan of Macs. I’m an okay fan of Apple. The OSX decision was masterful. Will I use it as my primary platform? Probably not, the price point on their proprietary hardware is still too high (Thinkpad T40 used: $800. Powerbook of similar power used: $1800, plus OSX licenses).

Insane bicyclists.

Inspired by my bikeride posting yesterday, EJbythesea pointed me at this collection of insane bike videos. I’ve watched a few of them, and in particular the drag race through NYC (linked with the image above) is insane.
On the one hand, I think these people are loopy. On the other hand, I can -totally- see the adrenalin rush from doing this. Predicting all the patterns and knowing that that bus will NOT close the gap narrower than your handlebars, and that person crossing the street WILL stop before you get there, and that car on the crossstreet WILL be gone by the time you get there.
Think I’ll go ride some more.
[Edit: there was some bad markup in this, I fixed it, but LJ may take up to an hour to update. Sorry! -dbs]

Review: Tactics Arena

Game: Tactics Arena
Language: Flash
Category: Board / Tactics
Tested on: Debian Linux + Firefox
Rating: 5 out of 5
Offered by: Tao Games (link)

Back in the good ole’ days, a couple bright lights came up with a new computer board game that was a variant of Chess. The game was called Archon and became a huge success not only due to its novelty, but also because of it’s excellent gameplay and presentation. Many folks have fond memories of playing this game for hours on end on Apple and Commodore computers.

While stumbling around looking for tonights entertainment, I found Tactics Arena. This is a Flash based game that comes in as one of the most polished and well done games I’ve seen seen in a while.

The game consists of playing pieces on a board. The pieces can move, attack, and turn, and when and what they can do depends on their piece type and when they last moved. For instance, a Cleric can cast a healing spell on all your pieces, but can’t move again for 4 turns after that. Assassins can attack everything within reach of their space, but can’t move for 2 turns afterwards. Sorceresses have a nice area-effect fireball that can be delivered at a distance, etc etc.

The gameplay is very well balanced. It becomes immediately apparent that the key to winning is understanding the full capabilities of your pieces, including their strengths and their weaknesses. An assassin does enormous damage at close range, but has very little defense. A knight can do enormous damage, but doesn’t move too fast. You get the idea.

There’s not a lot of ‘plot’ or anything. Basically the gameserver environment consists of ‘lobbies’ where folks can gather together and challenge each other to games. Players are ranked on a points system similar to Chess (a basic player starts out with 750 points). This just a layer to make the whole system more competitive. Don’t let it fool you though. The game is a great head to head, “Lets go play Tactics” with a friend game. The in-game chat is great for snarky commentary (‘I knew you were going to do that.’), but doesn’t get in the way of the game play.

The chat room(s) are about what you’d expect on an online ‘head to head’ gaming room with a distinct fantasy bent. A lot of 3l337 yammering, but don’t let that fool you. Find a set of players, pick up a table, and go play.

If you like playing chess, and like playing fantasy-oriented tactical games, then this is one you should definately take a look at.

Booyah day!

Holy cats what a day.
Zach and I just got back from a great bike ride. This was the first chance I had to pull the ‘bent out of storage and get it prepped for riding. It was a little recalcitrant about getting up and working, but liberal application of chain lube and minor rerouting of cables, and things came together nicely.
We took the bikes over to the Assabet River Rail Trail and biked in a sort of see-saw ‘start in the middle’ pattern up and down and back on the trail. We went through the great tunnel under Rt 290, and made it all the way to Rt 85 just south of Hudson where it looks like the paving has ended.
I do know the paving goes the entire other direction all the way to the center of Marlborough, but Zach wasn’t up for that long a ride.
All told we did about 4 1/2 miles on an absolutely beyootiful spring day. It was cool enough that I didn’t even notice the heat I was generating, and warm enough that I didn’t get chilled, though I did have a sweatshirt on.
I’m thinking of some changes I want to do to the bike as the season ramps up. I think getting a real live functioning computer is going to be required (the first one I had was a Bikebrain (a great idea, btw, but a little pricy and as far as I can tell, no longer supported). The second was a wireless hand-me-down from a friend that really never worked well. I got a wired el cheapo one for my Giant Bike ($17. Whee!) which works fine, but I think I’ll need something El Geeko for the ‘bent.
Anyone know of folks doing the bike computer thing on a palm still? The only other one I can find is Bikini which seems pretty dated. If I can get something to run on my Kyocera 7135 that’s be great (since I’m carrying it anyway). Any pointers?
This was after a very intense 5 hour coding window today, where I really make some great progress on the project for my client. I got very into working some things that I had figured out together, and things just plain worked.
Tonight I think is going to be a relaxing evening, perhaps with an hour or two of Evil Genius.

The video switch issue, how it turned out

Remember way back when when I was having problems with the KVM and signal loss?
Well, we’re a week and a half later now, and I’ve changed over to a Zonet KVM3112 purchased from NewEgg for a mere $31.00.
This is a nice little KVM. It’s a simple 3″ square box that dangles from the cables that comes with cables already attached to the unit The cables are bound with USB connectors as well, so there’s only one cable going to each switchable device, and the USB connector breaks out at the end.
At the moment I have it between the Mac Mini and my IBM T40 laptop. I’ve tried it also between the laptop and the Shuttle PC I use for Windows stuff, and between the Laptop and the Mac, and in every case, the laptop image has a slight shadow to it, while the other machine is crystal clear.
My guess is that the laptop has a weak-ish video signal on the external port (heck, it was never relaly meant to be a desktop machine like this). I’ve ordered a docking station for it, we’ll see if that has a better signal on it. Even without that, though, this is quite useable.
So, the short answer is “When doing KVM work, get a decent unit, don’t scrounge. They’re not that expensive.” I can pretty well recommend the Zonet 2 port switch – very inexpensive, works exactly as planned, and has the benefit of NOT require an external power supply. It switches VGA and USB signals without a glitch, using a keyboard macro (scroll-lock scroll-lock arrow).
I’m using a Microsoft natural keyboard (these things are getting hard to find – 2 stores I went to didn’t have them – just flat keyboards), and a Logitech USB mouse. Both of these are patched directly into the KVM, and they’re being switched between the laptop and the other system.
Now I just wish I had a 3 port unit 🙂

The Rokulabs Soundbridge

Wow is this thing cool.
I won one of these in a listener giveaway at THE BEST ONLINE RADIO STATION EVUH! (that would be RadioParadise, if you hadn’t guessed). It just arrived today, and I had it up and running in literally 30 seconds.
The model I have is a Roku 500 (the ‘bottom tier’ version). It’s basically an embedded linux media player with a nice VFD display on the front. It came with a CF 802.11 wireless card, which socketed right into the side of it. I plugged that in, plugged it into the stereo, and powered it up.
First thing it did was basically go “Hmm. Okay… Homeport, right?” (that being our wireless network name). I hit [Enter] on the remote, and it continued setting itself up. Next prompt was “No music player found. Would you like to listen to online radio? [Ok]” Hmm, well “Ok” [Enter].
Pick a music station *scroll scroll scroll* Oh! Radio Paradise. Sure. [enter]. And voila, I was listening to RP on my stereo.
It’s a sexy little unit. It has an automatic updateprocess that let me upgrade the firmware in it in about a minute. I found the whole experience quite surreal, but couldn’t help grinning all the way through it.
Chances are we won’t get around to setting up the Windows or Mac only ‘music server’ for quite some time. I suspect the primary use for this thing will be up in our house in Maine so we can listen to DECENT radio stations on the house stereo (can’t get much up there in the woods).
If you like your online music library, and you really want living-room-access to online radio stations, this is a great looking and capable unit.

Modified RSS feed.

I’ve been annoyed with a problem with RSS feeds lately, particularly when it comes to Livejournal

The problem is that if I post an article to my blog, it gets posted, and then is made available in an RSS feed. The biggest user of this feed is Livejournal, but I have a fair number of folks who read the feed via Bloglines and Sage and the like.

So anyway, folks read the article, but to actually see if anyone has commented on it, they have to click through to the article, and navigate the comments. This is tedious and unwieldy.

There are some hacks that put comments posted on articles into feeds, but then you have to subscribe to the comments feed to see them. Ick.

So over the last few days I whipped up a tool I’m tentatively calling “mtcc” for Movable Type Comment Counter (since it’s quite specific to Movable Type) which can generate a graphic image on the fly representing the number of comments on a specific blog post.

Since RSS feeds are not generated dynamically, but -will- render images as soon as the feed is read by the user, the image is pulled from the MT host of the blog with the correct counter embedded in the image. If someone adds a comment, and someone else reading the article via a feed refreshes, they’ll see an updated count in the image.

This feed is still in testing, and I’d appreciate hearing comments (and tests!) from people. It’s active now, but not available to Livejournal (due to the braindead way LJ handles feeds). I’ll publish it as my LJ feed once I get the final version up.

If you’d like to preview it, and you’re using an RSS reader already, the feed is located at

Which ten commandments?

In a time when there are judges demanding the 10 commandments be displayed in public venues of justice, it’s interesting to ask the question “WHICH 10 commandments?”
Oh, didn’t know there were several? Each branch of judeo-christian theology has a slightly different set (some are dramatically different).
This page has a great summary of the various versions.

The Unitarian Jihad speaks!

Jon Carroll, of the SF Chronicle posted an ‘anonymous mail’ he purportedly received from the Unitarian Jihad.
These guys mean business. Check out some of the choice quotes:

Greetings to the Imprisoned Citizens of the United States. We are Unitarian Jihad. There is only God, unless there is more than one God. The vote of our God subcommittee is 10-8 in favor of one God, with two abstentions. Brother Flaming Sword of Moderation noted the possibility of there being no God at all, and his objection was noted with love by the secretary.

Note – no Unitarians were harmed in the creation of this blog posting.

Go go gadget ham radio.

This weekend I finally replaced my aging Yaesu 2meter radio in my car with a much nicer Alinco DR-605 I picked up used off the local MMRA mailing list.
The radio came with a nice dual-band antenna, so I needed to rewire the cable ‘snake’ that runs down the middle of the car from the dash to the mounting hardware in the trunk. Not a big deal, took about an hour.
It’s nice being back on the repeaters. There’s a great crew of folks that talk every morning and afternoon, and I can usually join in in the afternoon on the way to Zach’s school.
Feel free to drop in. The repeater I’m using is the one located on top of the ‘rocketship’ in West Marlborough. I’m usually on the 2meter side, 147.270 (see here for the entire repeater listing.)
The 147.270 repeater has ENORMOUS range, and can easily be chatted with from downtown all the way to Worcester, due to it’s outstanding location (check out the views from the tower in the above link 🙂
Anyway, 73’s! … KB1FWR.

The proposal for the DST changes

This made the rounds on IRC this morning, and I’m glad to see other forums have picked it up. The gist is there is a plan in place to extend daylight savings time an extra 2 months. The rational behind this is it would decrease usage of oil by 10,000 barrels a day.
I think there are some horrific fallacies and misleading suggestions in this presentation. First, the only rational for this change is energy savings. There’s no other argument.
Okay, so we save 10,000 barrels. That estimate came from the Transportation Department (no cites have been given for this). It doesn’t take into account other factors, such as increased air conditioning usage in the summer, etc.
Even still, this change would result in a decrease of only 0.05% in daily oil usage. (The US is stated as using 20 million barrels of oil a day.)
This article was posted in Slashdot, and the resulting forum commentary has (oddly enough) brought up some fantastic commentary about the goods and the bads of this proposal. The short answer is, there’s almost nothing good about it.
One great suggestion is, if this change is in place, clocks would change within 3 1/2 months of each other. That’s 15 weeks between an hour change back and an hour change forward. That’s a very tight time schedule.
Why not make the change permanent? Replace the whole process and fix the clocks on Daylight Savings Time and we’ll just call it quits there. The folks in Indiana sure would like that (there are sections of Indiana that have no time-shifting at all. Neither does Arizona.)
Here’s some choice comments from the forums:

From Wikipedia
There is also a question whether the savings in lighting costs (people just home from work don’t turn on the electric lights because there is enough sunlight through the windows) justifies the increase in summertime air conditioning costs (people home from work do turn up the air conditioning during the late-afternoon peak load times, because it’s still warm outside). When air conditioning was not widely available, the change did save energy; however, air conditioning is much more widespread now than it was several decades ago.

SeanDuggan sez:

I can’t remember where I saw the statistic, but I remember reading that the number of accidents involving motor vehicles sharply increases the week after either DST change. Basically, on the day that people “spring forward,” drivers and pedestrians are more exhausted and less likely to be reacting quickly enough. *shrug* And honestly, doesn’t the “10,000 barrels of oil” sound like an exact rehash, right down to the amount, of the original DST proposal?

There’s a great commentary over at the National Review about this as well. A choice quote from it:

“We’re also informed that DST helps conserve energy, apparently because people arriving home when the sun is still up don’t switch on their lights. Didn’t it occur to anybody that maybe they compensate by switching them on earlier in the morning? Moreover, people who arrive home from work an hour earlier during the hot summer months are probably more prone to turning up their air conditioners. According to Downing, the petroleum industry once was “an ardent and generous supporter” of DST because it believed people would hop in their cars and drive for pleasure — and guzzle more gas.
But the very worst thing about DST is that it’s bad for your health. According to Stanley Coren, a sleep expert at the University of British Columbia, the number of traffic accidents and fatal industrial mishaps increase on the Monday after we spring forward. The reason, presumably, is because losing even a single hour of sleep over the weekend makes a lot of people a bit drowsier on what we might usefully call Black Monday. Unfortunately, there’s no compensating effect of a super-safe Monday as we go off DST and “fall back” in the autumn.”

And Supernova87a states it succinctly and to the point:

why doesn’t congress stop tapdancing around the real issue, and instead pass some well-thought out legislation to reduce wasteful energy use, implement a rational gasoline use tax, and other things that would actually address the real problem? Hm?

So what is the reasoning behind this thing? Oh right. It’s politics.

Java+Jboss+Hibernate rant

Warning. This is a rant. This is the result of several weeks clawing up the learning cliff on this environment, and it’s really wearing me down. You have been warned.
I’m have a Hard Time [tm] [reg us pat off] implementing stuff in this environment. The complexity level is enormous, and no one really has a good clue on how to do it properly. The level of knowledge needed to implement even a basic application is astronomical, and the number of ways it can possibly go wrong are mind boggling.
The simple thing is, this shouldn’t be that hard. I have a JBoss J2EE server. That’s an application server environment, you’re suposed to be able to deploy your applications into it, and they’re in a managed, hosted mechanism. Sounds simple, right?
Well Jboss (as well as other J2EE containers) provide various hooks and services for the applications they host. The problem is, those hooks and services are not well documented, and are so generic trying to fix a specific problem is maddening.
In this case, I’m using the persistent object engine that JBoss supports (Hibernate), and I can’t even get a a simple “Create this row in that table” working. Why? Because here’s what has to happen to run an application that creates One. Count ’em. One row in a SQL table managed by hibernate.

  1. The sessionbean needs to be created
  2. The Hibernate mappings definitions need to be written
  3. The baseline object for the row needs to be written
  4. The Hibernate configuration XML file needs to be put in place.
  5. The MySQL JDBC connection has be implemented
  6. Jboss needs to be told to provide that JDBC session as a service, and mapped into JNDI
  7. The application archive (EAR) file needs to contain all components of the application, including the deployment descriptors, the servlet definitions for client access, and all the EJB pieces, which are plentiful in their own right
  8. The database has to have the schema configured
  9. The app has to be deployed and you PRAY that that all works when it’s dropped into the appserver. Watch the logs for all the errors.

Once that’s all deployed, you try it. The servlet is the ‘easiest’ way to access an EJB, so hit the servlet. The servlet has to call the EJB, which in this case is a Stateless Sessionbean, by far the EASIEST (COUGH) type of J2EE object to work with. The bean in turn is supposed to ask Hibernate for configuation information, session details, and talk to the managed datasource connection in JBoss.
But lo! There’s a problem! This is a MANAGED environment. That means it must have transactions. JBoss has it’s own transaction manager (JTA), which has to manage all commit/rollback actions. But, since JTA is acting as the manager between Hibernate and the database, certain things can’t work. Like, oh, the basic “auto-increment the primary key” id that every database on the planet uses. Hibernate keys data based on a unique key. It comes iwht a simple ‘hilo’ mechanism that will generate those keys whenever you create a new instance of the persistent object, but THESE DONT WORK IN JBOSS. You have to MANUALLY write your own key generator for every type of object you need to instantiate.
This is INSANE. Now I have to deploy a whole new EJB just to manage the persistent object keys in Hibernate.
“Gosh Dave. That sounds silly. Why doesn’t someone write that into the system?”
Why? Because every webpage I find either says “oh, this is easy, just whip up XYZ to manage it.” or says “Use XDoclet to create this” (yet another system I’d have to learn just to generate the code to manage the objects i’m creating).
While I understand that huge flexibility in Java is a good thing, this level of abstraction and complexity really is driving me absolutely batshit. I just want to settle down and write my code, but finally, after getting Hibernate to actually CONNECT to the database and show that things are ready, I’m faced with the unhelpful error that looks like this:

12:36:50,522 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name: java:comp/env/hibernate/SessionFactory
12:36:50,522 WARN  [SessionFactoryObjectFactory] InitialContext did not implement EventContext
12:36:50,532 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
12:36:50,533 ERROR [JDBCExceptionReporter] You cannot commit during a managed transaction!
12:36:50,534 ERROR [JDBCExceptionReporter] Could not save object
java.sql.SQLException: You cannot commit during a managed transaction!
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(
at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(

It’s enough to make you cry.
Update, 1/2 hour later – there’s a little-documented function in the Hibernate XML spec. Click through for details.

Continue reading “Java+Jboss+Hibernate rant”