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 https://planet-geek.com/lj2.xml

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(BaseWrapperManagedConnection.java:499)
at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:451)
at net.sf.hibernate.id.TableGenerator.generate(TableGenerator.java:126)

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”

Tech suggestions for a KVM switch?

I posted this to a local tech-chat list, but let me also throw it out to the wider blog world…
I just moved to a Belkin desktop video switch to switch between my
Thinkpad running Linux (my primary work machine), and my Windows XP box
(my game machine).
I’ve noticed an immediate signal degredaton – my monitor is not nearly
as clear as it was. The LCD to switch cable is about 3′, and the switch
to laptop cable is about 5′ long. I suspect these cables are he
culprit, and I’m going to order shorter VGA cables, but would like the
collective wisdom of TF to comment. Before I get new cables, is this a
good step?
Also, I’m noticing the Belkin is dropping keystrokes pretty regularly –
I can’t 100% pin this on the switch but it wasn’t happening before I put
the switch in. Has anyne else seen this?
I’d be willing to invest in a hig end vide switch (particularly one that
could take more than2 channels – this model i an F1DZ102T :
http://www.digitallyunique.com/i157737.html ) if I was guaranteed now
gettin video signal loss when everythng was hooked up.
Any help would be appreciated 🙂

Cedega isn’t there yet.

I’m a gamer. I admit it. I love gaming, I love playing games on the computer, I love getting into a good game for hours on end. Great escapism.
My most recent interest is playing Evil Genius, which I first played at Ubercon about a year ago. This isn’t a new game, and it’s not a darling of all the first person shooter Halo nuts. And there, alas, is it’s downfall in the eyes of the Transgaming folks.
By the way, dont’ get me wrong here. I value highly the work they have done bringing WineX to a commercial product. My problem is that I don’t think it’ll really work. The obstacles are too high to overcome, the number of games too many, and the number of ways Windows is an unstable moving target in application development terms makes their job (the concept of running Windows games on a Linux platform) unwinnable.
The games that get the attention are the darlings of the hard core gamers. We’re talking World of Warcraft, Doom3, Age of Empires, etc etc etc. These are what folks are playing NOW. Transgaming just does’nt have the manpower or resources to go back to games that are ‘yesterdays news’ or uninteresting.
I bought a Cedega license and will continue to support them, but I feel their mission is not going to be winnable. I’d even settle for useable, but even that failed me while trying to get Evil Genius and other games running.
So far, I’ve tried 5 different games. The only one that had a hint of maybe working was Warcraft 3, arguably one of the most successful games in the last 2 years. The others simple failed silently, or locked up entirely. Cedega’s ‘games database’ on their site is worthless, and their website is full of unreferenced information and incomplete details.
My advice is, if you want to run one particular game, and it’s in Cedega’s ‘supported games’ listing, you might get it running, go for it. If you want to use Cedega as a tool to let you run some of those games you’ve been missing from your Windows days, you’re SOL. Get a video switch, spend $150 on a older pentium box, and just run Windows on it. You’ll be a lot happier.

My first political bumper sticker.

I was cleaning out the back of my car today, preparing to install a new antenna and new dual band ham radio, when I came across a bumper sticker I had gotten SOMEWHERE, and never really got around to putting on the car.
I’m not a big fan of bumper stickers. They tend to look trashy. This one however is black with white lettering, and fit on the plastic fascia on my bumper, so in the future if I want to remove it, at the very worst I’d replace that piece of plastic.
I can’t find the graphic online for it, but here’s roughtly what it looks like. On the black car, it’s fine, and it really pushed my political “Yeah, this is EXACTLY what I think…” buttons, so I went ahead and put it on.

I like it.
UpdateRosa has the helpful hat today, and reminded me that those stickers came from her mom. Thanks Rosa’s Mom!

I can feel my mind going, Dave…

My Mom’s new Mini-Mac arrived last week, and this morning I set it up to test it out, get the updates onto it, and start transferring her files over to it.
“Well, maybe I’ll play around with it a little bit.”
Plugged into my nice 1280×1024 LCD monitor, running at 1.25gighz, 512meg, for $550.
Apple may have finally gotten it right.
But, putting Nanosaur 2 and Marble Blast on there were low blows. *stretches after an hour of flying a dinosaur around*.
That wasn’t nice.