Dangerous with AJAX

General February 21st, 2008

Warning, I geek out again. If that’s not your thing, ponder this. They tail-gate for the Puppy Bowl. (And they sell DVDs of the Puppy Bowl. Lookout Netflix queue.)

Today I made a newsgroup post about the Computing Habitat Programming Competition inviting students to identify some bug/shortcoming/nuisance in their environment, and propose a programming project to fix it.

That inspired me to finally do some AJAX learning and coding to improve some of the web interfaces I deal with several times a day. While I don’t have a final product yet, I have a small framework and two CGI scripts that work with a simple form to do asynchronous lookups. After about an hour’s worth of experimenting, wow. I can see why sysadmins would like AJAX. It has this dirty, kludgy feel that, when applied properly is extremely effective. I’m scared what to think would happen if I learned YUI.

I’m also seeing, from tailing the logs, why people tend to put AJAX traffic on independent virtualhosts. This could get noisey. This also sounds like a good candidate for FastCGI, or some sort of already-running-process-hand-off because I’m sure the work to build the CGI environment, setup perl and DBI, and do the query is way longer than what I need. Maybe I should be doing this in PHP.

I think I plan on implementing these as greasemonkey scripts, so I have a little more work to do before things are “ready.” The first script, when I’m registering a new system in our DNS/DHCP/system database, does a OUI lookup on the MAC address and tells me (in place) who the vendor of the MAC is. (This is useful for several reasons — such as identifying VMware “machine” requests versus real ones, OR knowing when Professor Soandso just got a new Mac versus a PC, OR knowing ahead of time the MAC the grad student gave me wasn’t Ethernet (for example, I got one today for 02:00:54:…. I’m fairly sure that’s not Ethernet. Maybe Bluetooth.)

The second script searches our existing MAC address database, and tells me right away if I try to register a MAC address that’s already in the system.

I can’t wait to put these to use, and learn more AJAX. I hope the students are as productive with the CHPC as I am!

Redacting a PDF file

General February 21st, 2008

From the “It shouldn’t be this hard” department, today I scanned a document in to send to someone, and realized it had some sensitive identification numbers on it. I opened the PDF to find a way to redact that information. I poked around Acrobat. I searched around the web.

I found, not to my surprise, to do it right you need to export the PDF to a graphic, mark it out in graphics tools, and reimport to PDF. That’s the “cheap” way. The “easy” way is to purchase Acrobat plugins that pretty much do that for you. Ick. Given how much data is in PDFs these days, there’s really nothing we can do to make this process easier?

I wound up rescanning the document with a blacked out post-it over the UIN field. Because walking back to the scanner (which is a good 100 steps or so from my office,) and rescanning was easier than figuring out how to do that in software. (And that too was one of the top recommendations for redacting a PDF, if you have the hardcopy.)

Yay progress. Things like this make me afraid of becoming a digital librarian.