Made my first attempt at importing my Blosxom data into b2evolution this morning. Looks like it will be doable with just a bit of fussing. The basic strategy is to use this handy Blosxom flavor to convert the Blosxom data to Movable Type export format, then use b2evolution’s MT import utility to bring the data in. I tried this on a couple of entries, and it works, but I’ll need to do a bit of data munging. First off, the Blosxom flavor leaves an <h3> markup tag at the beginning of each post, which the importer doesn’t like. And, the importer seems to insist on sticking <br> tags at the end of every line, which makes for some ugly line breaks in the final product. There may be a way to control this behavior from the importer, but I think it’ll be just as easy to massage the import file with a Perl script. Next step is to do that, and try a few more test imports, before bringing in the whole enchilada.
Author: lpaulriddle
-
Started the Pool Pump
After a winter of freedom from the big money-sucking hole in the back yard, I bit the bullet and fired up the pool pump today. Now, in the Mid-Atlantic, swimming season runs from roughly the beginning of June through Labor Day. If you’re lucky, you’ll get a couple extra weeks on either end, but for the most part, that’s what you get. For the past few years, my routine has been to start the equipment up around now, and uncover the pool around Memorial Day. I’ve found that starting the equipment early saves work, because it allows me to chlorinate the water before it gets too warm and algae starts taking hold. And with pools, anything that saves work is a bonus.
Anyways, the pump primed right up using the main drain for suction. The water level is still too low to use the skimmers. And the water temperature is (drumroll please) a balmy 56°F. Another 25 degrees and we’ll be swimming.
Now I need to start thinking about my spring pool project, repairing some loose coping and recaulking the expansion joint between the pool and the deck.
-
Amended returns..
I filled out amended 2005 tax returns yesterday, to report income from my wife’s investment club. I’m not terribly impressed with how TaxCut handles amended returns.. For federal, you basically save your existing return under a new filename, then update the return to include the changes, and then tell it you want to fill out form 1040X. But then after you fill out the 1040X, you’re kind of on your own as far as figuring out what you need to print, where to mail it etc. The program’s filing logic isn’t smart enough to know you’re doing an amended return, and it just keeps telling you that the return has already been successfully filed (assuming the return was previously filed electronically). As far as state goes, I couldn’t find anything at all for doing an amended state return. It turns out that for Maryland, it’s all done via the online iFile system (assuming that’s how the original return was filed). Doing it this way was a snap, and I continue to be impressed with the iFile setup. As far as TaxCut goes, I guess you get what you pay for… it was considerably less expensive that Intuit’s TurboTax, and I’m curious if TurboTax has better support for doing amended returns. Hopefully I won’t have to do this terribly often (my wife’s defunct-but-not-disbanded investment club is a topic for another rant)…
Totally different topic — I’m going to try out another blogging engine. I’ve been really happy with Blosxom, but it’s very bare-bones and I’d like to try out something a little more full-featured. My goal was to find something that’ll run on my server which is equipped with php4, mysql and apache. I’d also like something with a relatively small footprint (Movable Type is kinda overkill for my purposes). I found b2evolution which looks promising and is available as a Debian package. Just working on an issue with the database config, and I’ll be able to give it a try.
-
What a week
Timeline for last week:
Monday, April 3: Our second child, Andrew Charles, is born via c-section. Birth weight is 8 lbs, 4 ounces. Length 21″.
Tuesday, April 4, really early A.M.: Our older boy, Michael, comes down with the “Stomach Bug Of Death” (hereafter referred to as “SBOD”). Frequent projectile vomiting, diarrhea, malaise, and general unhappiness ensue.
Tuesday, April 4, late A.M.: our newborn has successful surgery to repair a minor abdominal wall defect. Much relief ensues.
Wednesday, April 5, A.M.: I take our still-ailing 3 year old to the doctor. SBOD diagnosis is confirmed. Treatment plan: Just give him fluids and wait it out. Fun fun.
Wednesday, April 5, Evening: Yours truly catches the SBOD.
Thursday, April 6, Morning: Grandma picks up Michael (who is slightly improved, as in, no longer puking his guts out) for the day, so that I can lie around all day groaning and hurling.
Thursday, April 6, Evening: I finally stop throwing up. Hurray. Michael spends the night at Grandma’s.
Friday, April 7, Morning: Feeling a bit better, finally up and about. Still not much appetite. I work a bit on getting the place ready for Mom and Baby, who are coming home the next day.
Saturday, April 8, Morning: Mom and Baby come home.
Saturday, April 8, Evening: Grandma’s turn to get the SBOD.
Sunday, April 9: I’m finally back to a normal diet and off the Immodium. Michael still has the runs. Mom and Baby doing great.
The fun never ends…
-
Mower blade
I took a first look at my push lawnmower today while my 3 year old rode his tricycle around outside. I reinstalled the blade (which I sharpened over the winter) and looked into a problem I had been having with the deck. Last summer I hit a big chunk of wood (or something similar) and ever since that, when I make certain maneuvers, the blade will graze the deck and make a loud, unhappy clattering noise. At first I thought the deck was dented, and banged on it a few times with my ball-peen hammer to try to get it back in shape. But, it looks like the real problem is that a weld has partially broken loose, causing part of the deck to stick out too close to the blade. If my peening attempts didn’t do the trick, it looks like I might be able to reattach the loose piece with a sheet metal screw.
Based on the engine date code, this mower is 16 years old this year (I bought it used in 1996). The engine is still good, and I’ve been nursing it along for a while now and it keeps on going. Hopefully it’ll last me another 16…
Followup 4/15.. I fired the mower up today. After about 5 minutes of mowing, the blade started scraping the deck again. Shut it off, drilled hole, inserted screw to hold deck together, problem solved (for now at least). Looks like the mower will live to see another season..
-
First Mow of the Season
Today was the big day — the beginning of the annual mowing routine. Of course, if it stays this dry, I’m not sure how much mowing I’m going to need to do this year. Today was fairly typical as far as the first mow of the season goes — serving mainly to whack down the onion grass and make sure the tractor is running OK. In that regard, it was a resounding success. As usual, the very front of the lawn didn’t need mowing yet. This year, as parched as it looks, I’m wondering if it ever will. The moles have been hard at work too, which wouldn’t really bother me, but they are making it bumpier and bumpier, which makes it a major pain to mow. This season, I may pick up a lawn roller and try to flatten it down a bit. Of course, that means we’ll need some rain at some point to soften up the ground…
Tomorrow, I’ll see about getting the trimmer going and whacking down some weeds.
-
XML myUMBC
The new era has begun…
Today I hacked our legacy myUMBC portal code to generate XML output
for the registration eligibility function. The goal is to eventually
get away from the big, monolithic app and separate the business logic
from the presentation. Registration eligibility was a good place to
start, because (1) it’s a simple function with simple output; (2)
we’ve gotten a request to display registration eligibility within MAP,
so we needed to figure out a way to share the code; and (3)
registration eligibility still talks directly to the HP3000 mainframe,
which makes it impractical to do code sharing via Perl modules,
libraries, etc. So, this is what we came up with. It’s the first
step in coming up with a web-services type API for our back-end SIS
business logic.The first thing I needed to deal with was the Perl code itself. The
legacy myUMBC code, while nice and modular, is very HTML-centric.
The business logic stuff is all mixed up with the code for HTML
generation. The code works by building data structures to represent
HTML objects, and the business logic bits are all built into those
data structures. Separating this stuff out is not really major
surgery, but it does require some work. I’ve managed to do this for
the registration eligibility code, but I still need to put a run-time
flag into the code to toggle XML vs. HTML output. Also, there will be
the ongoing challenge of dealing with error conditions and generating
valid XML in these cases, but we’re getting there.On the actual XML front, the main challenge is defining what exactly
you want to output, coming up with a spec (DTD), and sticking to it.
This can require quite a bit of thought, and needs to be done before
any actual code is written. For registration eligibility, the DTD I
came up with is pretty simple:
<?xml version="1.0"?>
<!ELEMENT registration (eligibility)>
<!ELEMENT eligibility (status*)>
<!ATTLIST eligibility status (eligible|ineligible|registered|error) #REQUIRED>
<!ELEMENT status (description,extra?>
<!ELEMENT description (#CDATA)>
<!ELEMENT extra (#CDATA)>
And some sample XML…
<registration>
<eligibility status="ineligible">
<status type="academic">
You are academically ineligible to register.
</status>
<extra>
Your GPA is too sucky for you to continue
attending the university.
Please go away.
</extra>
<status type="financial">
You are financially ineligibile to register.
</status>
<extra>
Your parents didn't send us any money this
semester. Please go away.
</extra>
</eligibility>
</registration>
Coupla notes here.. I used the generic tag name “registration” with
the idea that down the road, the object will contain other
registration related stuff besides eligibility. We’ll see if that
actually happens. And, although I do include text-based descriptions
of eligibility status, these are only intended to be guidelines.
Applications can use the descriptions as-is, or key off the “type”
attribute in the “status” tag, and display their own messages.The code generates this XML using the same Perl objects I wrote to
construct HTML. It seems to work OK for generalized markup, and
guarantees that the output will be “clean”.Next up is to see how this works when we pull it in as a uPortal
channel. To do this, we’ll need an XSLT stylesheet and we’ll need to
set up a “Generic XML/XSLT Transformation” type channel (rather than a
web proxy). We’ll need to use our custom local connection context
code to connect, and it remains to see how that will work with a
non-web proxy channel. Should be fun.. -
mp3act
Totally OT… I got my Maryland state tax refund today — 48 hours after I filed with iFile. Can’t beat that turnaround time.
And, I’ve found a promising app for cataloguing and streaming my MP3 collection: mp3act. It’s a web based app that uses PHP, MySQL and Ajax. Setup was pretty straightforward. When I started out I had Apache, mod_php and MySQL already installed and running. It went kinda like this:
- Download mp3act and untar under my Apache document tree
- Create
mp3act
MySQL database:
mysql> create database mp3act
- Create
mp3act
MySQL user by adding appropriate entry to “users” table - Edit mp3act config file to tell it how to connect to the new database.
- Point browser to mp3act config URL
- Wonder why it doesn’t work. Scratch head.
- Install PHP4 MySQL module (debian package php4-mysql). Works now.
- Configure app and import my music library.
Initial impressions: Seems nice, Ajax interface is quite slick. It has a few quirks; for example, if an album has multiple artists (for example, a tribute album), mp3act doesn’t display it as a single album. It breaks everything out separately by artist and album, so if the album has 10 different artists, mp3act displays it as 10 albums with 1 track each. I wonder if there’s a workaround for this; will have to investigate. Also, it won’t import a file without an album tag. This causes some problems with singles, which don’t necessarily have albums associated with them.
Quirks aside, this looks like a great tool and I’m going to continue to play around with it. Supposedly it can use the Amazon.com web services API to download album art too. I’ve signed up for an Amazon.com web services ID so I can try that out. Stay tuned (pun intended)..
Followup: Still playing around with this. It definitely works better when all of the MP3s are tagged properly and consistently, so I’ve been slowly working through the collection doing this. It has another quirk which affects multi-CD sets; if you rip each CD into its own directory, say “Beatles White Album/disc1” and “Beatles White Album/disc2”, and number the tracks separately for each disc, mp3act intermingles the tracks when it displays the album. So, you see disc 1 track 1 first, followed by disc 2 track 1, then disc 1 track 2, disc 2 track 2, etc. One way to fix this would be to just eliminate the separate directories for each disc, comingle all of the tracks, and number them all sequentially. However, I’m wondering how hard it would be to hack the mp3act code to improve its handling of these kinds of albums as well as albums with varying artists. I may take a peek at the code to see how much trouble it would be.
-
Maryland’s iFile
Well, I filed the taxes this morning, and for the second year I filed the fed taxes electronically with TaxCut, and for the Maryland state taxes I used TaxCut to prepare the return and then filed online with Maryland’s free iFile system. Net cost: $15.95 fed eFile fee – $15.95 H&R Block eFile rebate, + free Maryland iFile, = $0. The iFile system works very well, and the numbers I get from it match the numbers I get from TaxCut, which I find comforting. There are a couple little niggling problems with it; namely, you have to pick a password and then remember it from year to year, for an app that you only use once a year (so of course, I couldn’t remember the password I chose last year, and had to reset it); and the PDF form download they provide doesn’t work with my Mac or my Linux boxes. But aside from that, I’m happy with it, and they claim that using it saves taxpayer dollars. I’m all for that.
On another note, I’m fresh off attending the most exciting college basketball game of my life yesterday, the D.C. Regional final where George Mason upset UConn to reach the Final Four. This is what college basketball is all about, it’s why we buy the tickets, and I’m already lining up to get tickets for next year. And the game had quite a local angle to it, with 70% of the starting 10 players from Maryland. It’s too bad all this talent has to go to out-of-state teams. There are a lot of Division I teams in Maryland (UMBC is one of them), none of them much to write home about. Don’t get me wrong, I love the Terps, but it’d be nice to see some other strong local teams.
-
IE and XML miscellany
Well, I learned something new about IE today. If you use an empty-element tag in a
<script>
declaration, for example:<script language="javascript" src="/foo/bar.js"/>
It breaks IE. Apparently, IE doesn’t treat the trailing slash as a close tag, and treats the rest of the page as an inline script. Firefox, as expected, has no problems with this. The workaround for IE is:
<script language="javascript" src="/foo/bar.js">
</script>This affects IE 6; don’t know about other versions.
Like everything else around here, we learned this the hard way, after I made some mods to the Student Parking Registration app and it broke for IE users. Fun fun..
On another front.. we’ve got something new coming down the pike. If I can ever get away from all my various menial maintenance chores (FAR, Parking, PlacePro, etc. etc. etc.) we’re going to attempt to do a pseudo-quasi-web services app. It’s not “real” web services, but I’m going to mangle the legacy myUMBC portal code so that various functions can return XML for consumption by other apps. Background: We’ve been asked to display registration eligibility status inside MAP (UMBC’s homegrown kitchen-sink retention-aid-transcript-displaying-advising-scheduling-coffee-making web app). Now, the hitch here is that we currently pull eligibility info directly from the HP3000. It’s all there in the Oracle SIS, but no one has coded up the SQL to fetch it, and our development resources are spread too thin (doing crap like FAR, PlacePro, etc.) to do it right now. And even if we did it, the code would have to be duplicated between myUMBC and MAP, which is just a bad idea anyhow. So, I’m going to hack myUMBC so that MAP can call it, pass some magic params, and read back an XML stream of registration eligibility info (which can be parsed, transformed, etc. as desired). To make this happen, we need to do a few things..
- Move MAP off its current SGI hardware and onto a more modern platform, where we have the LWP::UserAgent and Crypt::SSLeay Perl modules installed
- Figure out a workable DTD for the XML data, and stick to it
- Modify the legacy myUMBC code so it can output XML (via a custom URL, custom CGI parameter, etc.
- Modify MAP to call this routine using LWP::UserAgent, parse the results, and display them
Like I said, not really “web services” in the official sense, but the same kinda thing. This seems like an easier, and possibly better, way to do code sharing without having to do major surgery on the legacy code. As with everything else, we’ll see how it works in practice.