This morning I slept late

Now, why is this remarkable?
Because I am at Arisia, and for the last 6 years or so, I’ve been running (or helping to run) registration. This means getting up very early Saturday morning to set up and run CONGO for the days registrations.
This year I’m not running reg. Oh, they’re still using CONGO, but a few weeks of tunning, fiddling, and refining, and the system is now startable by mere mortals. I was still ‘awake’ at 8:45 (registration opened at 9), and I was waiting for the phone to ring with a problem… but it didn’t ring. All went well, and I happily slept in until around 9:30.
In some ways, it’s awfully nice. In others, I’m sort of mystified. What am I supposed to do with my time now?

Zorching Memory Leaks. I Am Teh Stud

Tonight, I am Da Man.

It’s rare I get to sit down and see, so directly, a problem in the code I’m working on. In this case, while running at Ubercon the other weekend, I noticed that CONGO was showing every sign of a memory leak. After a while I’d get sluggish performance, and eventually I’d get an OutOfMemory error from the JVM. Didn’t look good.

This had me in somewhat of a panic, since Arisia is right around the corner, and I need the system stable and useable for the event. With the help of the wonderous tool that is JConsole, I was able to actually see the memory usage going up in the JVM as I worked with the server. There was definately a problem.

It turns out my hastily set up code to handle changes to my JDBC driver was not being handled correctly. Apparently with the old mm.mysql driver, SQL handles were automatically closed at the end of use. With the new Connector/J driver from MySQL, you had to explicitely issue a close() statement on any Statement, or the handle would never be freed. This was probably always the case, it was just my sloppy code and a twitch of the old driver that made it never come up.

Unfortunately, this necessitated changing just about every SQL call in the server, all 10,000 lines of it. It was long, painful, boring work. I had some help from blk, but it still took a good week of off-hour fiddling to finish the changes and do some basic regression tests.

Tonight, I made the last set of changes, did some basic runthroughs, and didn’t have a single crash. With someone trembling fingers, I started up JConsole again, connected to the application server, and started working with CONGO. Registrant lookups, reports, modifications, creations, subscriptions, convention detail editing – throughout it all, JConsole happily continued showing the normal ‘sawtooth’ pattern of memory usage. Things would get allocated, used, and then the garbage collector would come along and reap the memory.

Success! I had successfully searched for, found, and fixed a major memory leak that was persistent throughout the code.

For those insisting on the details, here’s a properly structured, Prepared, and appropriately exception-managed call to get a number from the database. (And, before I get abusive comments all over the place, the Exception handling here is VERY POOR, and will result in a clean result coming back from the method, even though the call may have crashed. I know, thank you, now go away).

private static int calcRegistered(int cid, String typeName) {
PreparedStatement p = null;
ResultSet rset = null;
String sql = "SELECT count(*) AS total FROM reg_state " +
"WHERE state_cid=? AND state_regtype=? " +
"AND state_registered=1";
int value = 0;
try {
p = cserver.Conn.prepareStatement(sql);
rset = p.executeQuery();
if ( {
value = rset.getInt("total");
logger.debug("tcalcRegistered: count for conference '" + cid + "', type '" +
typeName + "' is --: " + value);
catch (Exception e) {
finally {
try { p.close(); }
catch (Exception e) { dumpException(e); }
return value;

I feel all geeklystudly.

Next is to start seriously hammering away at the buglist, and get a test environment set up so other CONGO users can test out the new Merge function against ‘real’ data. If all goes well, we’ll roll this version into production in time to run Arisia.

Deep Breath.

Aaaaand, we’re back.
What an insane couple of days. There’s a whole series of posts brewing in my head right now, but I’ll just touch on probably the one that’s most on my mind.
Last week, I was in mid-preparation for Ubercon, an awesome gaming convention I regularly work down in NJ. CONGO has been pretty idle for the last few months as the summer is not a big time for conventions. With a week to go until Ubercon started, it was time to pull out all the hardware and make sure everything was working.
Well, unsurprisingly, it wasn’t.
The first major issue was coming to the conclusion that endor, the venerable server of dozens of conventions, really wasn’t going to handle Yet Another Apt Upgrade. It was still running on a baseline Debian Sarge install that had been upgraded a dozen times over the years, and finally, after enough apt tweaking had gone on, a dependency just wouldn’t resolve, and the machine would not take new upgrades. It was time to nuke from orbit and reinstall the OS from an Ubuntu baseline.
No problem, sez I. I whip out my Gutsy Gibbon Ubuntu CD, do a quick database dump and backup, install Ubuntu, and restore my home directory and databases. Reinstalled CONGO, loaded the working databases and…
See, CONGO was my first big Java application. And as such, it has some… intriguing ways of doing database work. And by ‘intriguing’ I mean butt-ass stupid. In particular, not using PreparedStatements for SQL commands, not checking for failed transactions, etc etc. While this was okay for a fairly static application, once you replace the entire OS underneath it, things start to get a little squirrely. And, well, we had squirrels aplenty.
So over the space of 3 days I basically had to rewrite every SQL interraction in CONGO, resulting in some fairly major code changes, and all of this 3 days before a con.
Add on top of this the fact that I’m also using a brand new printer from Evolis for the first time under Linux. There’s a whole nother post about this experience, but it did bring yet another variable into play. Oh, and did I mention that I rewrote the print routine in CONGO to generate PDFs on the fly and use them for badge rendering? Yep, also new.
Needless to say, things were a little panicy leading up to the event. Fortunately, by Wednesday afternoon, I had things fairly well stabilized, the code worked, endor was stable and functioning properly, and I could start packing for the event with a clear conscience.

The end result? It all worked. The convention went fine, the printer behaved wonderfully, running badges twice as fast as my old Fargo printers, and we had only minor glitches through the weekend. There’s still some work to do to get endor ready for larger events, but for a week that started out with totally broken software, an unuseable server, and an untested printing system, things went mighty well.

Of Systems and Services, Mame and Madmen…

It’s been a challenging few days here at Chez Geek. In true journal fashion, here are the highlights, because I know my devoted readers are sitting on the edge of their seats, waiting for every geeky installment of my daily encounters with recalcitrant hardware, misconfigured servers, and twitchy environments.
Of Mame
Mame console underneathOn Friday night I finished wiring the console. I’m short a half dozen buttons, so some functionality is missing, but I really wanted coin drop buttons. I picked up a couple small single-throw pushbuttons I had lying around, and wired them in with duct tape, so now I can ‘drop coins’ to get credits just by pushing a button on the console. Looks like ass, but it does work. I’ve ordered the new buttons, and they’ll arrive in a couple days, and I wanted to play games NOW.
There’s a whole post about things I’m learning regarding building a Mame cabinet, but that can wait. For now, I’m using deathstar, my MythTV box, as my ‘mame front end’. MythGame is “okay” as far as interfaces. Mostly it’s “okay” because it’s actually working correctly, and works with the controller. I’m hoping to haul the entire setup to Ubercon this coming weekend, so minimizing fuss is a big win.
Of Stonekeep and Conventions
Next weekend I’ll be down at Ubercon in New Jersey. This of course means I need to get most of the CONGO system up and running to run badges. Unfortunately, endor is not behaving. After almost 4 years of constantly apt-getting and updating packages on it (Starting from a Debian ‘woody’ install), a series of packages failed miserably during an upgrade (I haven’t really worked on it in about a year), and has left it in an unuseable state. I’ve backed the data off it, and reloaded Ubuntu Feisty Fawn on it. There’s a bunch of configuration that still needs to be done, and that’s making me nervous so close to an event. At least the install seems to have completed cleanly.
Those are the two primary things on my mind these days. Oh, and in the background is ongoing Java work and the slow moving ahead of Mosaic Commons, but that’s sort of the ‘steady noise’ bits. I’m just covering the highlights right now.

Head-Slap morning

Boy, nothing like realizing that one of your sites has not been serving up content for almost 2 months. The site is ‘up’, but any queries into it returned nothing. Very useful for a lookup/reference tool. :-/
One of these days I’ll get a monitoring system in place that’s more advanced than “Is the server up?”

Windows as a useable Java development environment?

Recently I had to spend a fair amount of time working on CONGO on a Windows XP platform. Stonekeep is doing doing it’s first event where CONGO will be running entirely on Windows XP, so all the environmental stuff I’m used to having under Linux doesn’t work, naturally. Things needed to be updated. This presented many challenges…

Continue reading “Windows as a useable Java development environment?”

Lo, I am blocked

So I frequently park myself at the local Panera to partake of their free wireless, tasty coffee, and comfy chairs. It’s also convenient that it’s halfway between home and my son’s school.
Yesterday, I stopped by just to get out of the heat. Since I had an hour to kill, I worked up my last blog post, put it together and posted it. So far so good. I traditionally look at the site at it’s base URL ( just to make sure everything is okay. This time, apparently everything was NOT okay.
Apparently access to my blog has been blocked by the infamous Sonicwall ‘content protection’ system. Nice of them, eh?
Further research into this problem, by following their url, showed that I was not blocked for my abysmal spelling, my poor site layout, or my lack of meaningful content, but that I was simply classified as… pornography.
I had no idea geekitude had slipped so far into the internet’s dark underworld.
Naturally, I immediately put in a request to have it reclassified, and demanded an explanation as to WHY my little corner of geekness has been classified as Pornography. Alas, Sonicwall doesn’t provide such information, you may simply ask for a reclassification, and they might get around to it. In 8-10 days. What do you bet that I won’t hear a thing from them in that timeframe?
If you’d like to grease the wheels against this idiocy, please go to Sonicwalls’ ratings page, look up ‘’, and request to have it reclassified as an “Information Technology” website.
I still would very much like to hear from Sonicwall, or from anyone else, who has had their site randomly excluded from anyone who uses their product, with no notification and no recourse except for a ‘request for reclassification’, why this occurs and what can be done about it. I’d also recommend that ANYONE who hosts or runs a website to plug their URL into that page and check to see if they’re being blocked.

JBoss Release Grumpiness

This is a geek gripe. Particularly for Java programmers. If you’re not doing JEE development, this probably won’t make a lot of sense unless you like seeing open source companies being beaten up for version incompatibilities.
Hello, I’m Dave, and I’m a JBoss developer. (Hi Dave…)
Until recently, I was quite content with the series of tools available for JBoss4, and my chosen IDE, Eclipse. JBoss provided a lovely little plugin interface called JBoss IDE. I encourage people to click on that link, because you’ll walk through a series of redirects until you land on a page that, amazingly, has no information on where to get JBoss IDE! How wonderful!
It turns out that JBoss (now wholly owned by Redhat has pulled JBoss IDE in favor of another Eclipse plugin called Exadel. Fantastic, a new IDE plugin that has a lot more functionality than JBoss-IDE ever had. Lets take a look!
An hour later, and Exadel is installed and running and grand. But. Wait a moment, the latest version of the JBoss application server is 4.2-GA. That’s General Availability. Meaning the platform is released and is the recommended system for users.
Exadel has no configuration support for 4.2-GA. Only for 4.0.x releases.
And JBoss-IDE has been pulled completely (and even it’s ‘2.0.0-beta’ version, the most recent version they posted, did not support 4.2).
“Must be coming out shortly.” So I mailed off to Exadel tech support asking if there was 4.2 support in the works, or when it will come out.
I get a direct, and undeniable response from them:

Dave Belfer-Shevett wrote:
> > Exadel Support Team wrote:
>> > > Exadel Studio Pro is going to be re branded as Red Hat Developer Studio in
>> > > later summer. Red Hat Developer Studio will support JBoss 4.2 .
> >
> > So the answer is “no, it does not support 4.2 now, and won’t until late
> > summer” ?
That’s correct.
-The Exadel Team

Excuse me, but WHAT THE F??? We’ve pulled the old IDE toolset. We’ve released a new product. But you CAN’T USE IT WITH OUR IDE TOOLS! Hahahahha! And you won’t for a couple months. Sorry bout that, have a nice day.
There are workarounds. You can run the jboss server externally in a windows shell and deploy to it. This is a painful arrangement, but I guess I have no choice?
Thanks for leaving us all in the lurch, JBoss.

MySQL Geekery du jour. Cannot open file error.

This one is going out to the world in general, because it took me 2 hours of googling to find it, and I want to lessen some poor other slobs pain…

MySQL , in this case on a Debian Etch (stable) install, has a limit set on the number of files that can be opened in the mysqld server. Apparently when you start getting close to this limit, like doing something that opens a LOT of tables at once, you start bumping into it. This article describes how to fix this.

Continue reading “MySQL Geekery du jour. Cannot open file error.”

Getting a release out the door

It feels good when you finally push a release of a product out the door.
The last 2 months I’ve been spending a chunk of time doing updates on Keystone. It’s always fascinating working on code that is pushing 10 years old, seeing things I remember writing during the dotcom boom, and finding other tidbits that make me go “What the HECK was I thinking?”
This release is interesting in that much of the work was pay-for contract updates from a customer who wanted to see some bugs fixed and a few enhancements added in. It’s nice working on something you enjoy, and getting paid for it as well.
The code is just about ready for it’s next major overhaul though. I’m trying to get up the gumption to rip out the entire database back end code and replace it with ADODB. I wrote my own database abstraction layer back in, oh, 1998-ish, but really, the world has moved on a bit since then. It’s time to move with the times.

Good things aligning.

It’s easy to gripe and moan and stone-kick when doing business travel. While it’s become routine for me, it’s really easy to fall into the “man this sucks. I miss my family” mindset. But this trip, I tried to schedule it carefully, work out what I was trying to accomplish, and stay focused on what needed to be done.

So here I am, on my way home, and generally, things worked out okay…

  • In three days, I got an enormous amount of JEE development and design done. Much code was checked in, it works, and the client is happy.
  • Designs I implemented almost two years ago in this project are coming to fruition. This week was the first time we discussed implementing the first application on the framework I designed. Everyone is excited.
  • Clipper continues to be a faithful companion, despite it’s handicap of running Windows.
  • On the way home, I’m able to stop at one of my favorite food establishments, and partake in a beef burger ritual.
  • Double bonus – said restaurant has an open WAP nearby. Thank you whoever you are.
  • From nowhere, a paying client has contracted with Stonekeep to do a series of large updates to Keystone. Wootie!
  • Mosaic is preparing for the final signoff on the design of our homes this Sunday. This is a huge step – it’s where we tell the architects “Go!” and step back to watch the fun.

All in all, a mighty good week. Now all I have to do is drive home in the rain. Fortunately, that’s what XM is for.

Boston and Boston Metro Coffeeshops

As part of my somewhat nomadic working style, I like getting out and about and spending time in local coffeeshops and restaurants. I can do 98% of my business from my laptop, therefore all I need is a comfortable environment, free wireless, and a good supply of coffee.The problem is, trying to actually FIND decent establishments to fill this need can be a real challenge. I’m not talking about Starbucks here – I’d rather support local businesses and encourage free wireless.

So in an effort to help out others with similar pursuits, here’s a list of free wireless coffeeshops and / or businesses that I’ve found comfortable for telecommuting or just ‘out of home’ work.

  • Continental Cafe
    Location / Website: Acton
    Private coffee shop, very comfortable, includes a deli.

  • Diesel Cafe
    Location / Website: Davis Square, Somerville (Warning: annoying flash website with sound :-/ )
    The current mecca point for Somerville / Cambridge area bohemians. Note – Diesel’s wireless is NOT actually free. But it’s a good place nonetheless.

  • Crown Plaza
    Location / Website: Natick, on Rt 9
    In-lobby comfortable seating, and a bar / restaurant along one side. Comfortable for meetings, work, and quietly getting things done.

  • Panera Bread
    Panera has many locations all over Boston, see this page to find one near you. Most have free wireless. I personally use the ones in Natick, Marlborough, and Burlington.

  • Bear Rock Cafe
    Location / Website: Leominster
    I found this place while over visiting my mom’s in Leominster. Interestingly, it was all of 40′ away from a Starbucks, but had free wireless and a full deli, and was doing good business.

  • Cafe Ziba
    Location / Website: Rt 2a in Acton
    I’ve never actually been here, but it was recommended.

  • The Java Room
    Location / Website: Chelmsford
    A nice shop out on 495, comfortable and good coffee.

If you know of others in the area, leave them in comments, and I’ll continue updating the list…