Wednesday, November 30, 2005

Disjointed thoughts in the Larry King Column Vein

Web sites and magazines are always talking about the 10 best albums ever, or the worst album covers, and these articles always stir up arguments. But there's no dispute as to who the worst rock band ever is: Aerosmith after 1980.

There's a really happening audio installation about the famous Amen break right here. You know the Amen break even if you don't know it by name.

The Super Furry Animals have a new album out, and I didn't even know that. It's true - after you turn 30 you really can't keep up with music to save your life.

Here's a tasty treat - put mustard and swiss cheese on an onion bagel, and put it in the microwave for 20 seconds. It even tastes great on those O-rings Lender's sells in the freezer section.

One of the design goals of .NET was to enable rapid development. One of the design goals of J2EE was to take a decent language and throw so much doo-hickery on top of it that the simplest project takes years.

Every time I see Dick Cheney trying to smile, I wonder whose heat he had turned off.

Saturday, November 26, 2005

Diving into Greasemonkey, or Roll Your Own Bozofilter

I read about greasemonkey in Wired, and it sounded pretty cool. What it is is a plugin for the Mozilla browser (which is vastly superior to Internet Explorer, kind of like a 2005 Toyota Camry is better than a 1973 Pinto), and what it does is allow you to write javascript snippets that enable you to change the structure of websites you visit in whatever manner you wish (common mods include adding in links to other sites, stripping out ads, or changing ugly color schemes).

This has ramifications for Web advertising and 'brand purity' that probably nobody cares about at this time, because it's only geeks who want to fuck around with writing their own Javascript and CSS and figuring out what XPath expressions are and why you'd want to use them who will be using it. There ARE plenty of pre-written scripts out there, however.

At this point the cautious will rightfully ask whether it's a good idea to install code that hasn't been vetted on your machine, and they'd be right to do so. After all, with companies like Sony trying to get all '1337' on our asses and putting rootkit software on My Morning Jacket CD's so they can 'own' our 'boxen', we really can't be too careful. There was in fact as Security Advisory involving Greasemonkey in July of 2005, discovered by Mark Pilgrim, who we'll talk about more soon. It has since been addressed.

Let's get back on topic. All you really need to do to get started is install Mozilla, and if you do plan to be writing any scripts, you need to choose the Custom Install w/ the developer extensions. You then install the greasemonkey plugin.

There are numerous sites discussing Greasemonkey. The one I ended up bookmarking and going back to was the unappealingly titled 'Dive Into Greasemonkey' by 'Dive Into' Mark Pilgrim (you have to admit, though, having a 'Dive Into' book on the shelf is infinitely better than something from the 'For Dummies' series). Mark's guide is thorough and, here's the really great part: concise. As in brief. As in not full of a lot of useless fluff (you will soon see a 900 page book with a Red Cover and pictures of several nerds on the cover from Wrox publishing if Greasemonkey catches on, though).

Anyhow, for a simple Greasemonkey experiment, I wondered how easy would it be to write a bozo-filter for my favorite running forum, It was pretty easy. I am sure there are a million other ways to do it, anyhow here is one (standard disclaimers about for entertainment purposes only, no guarantee of blah blah blah, don't come crying to me if this causes your machine to melt through the floor, etc, apply):

// This is a Greasemonkey user script.
// To install, you need Greasemonkey:
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to
// "Install User Script".
// Accept the default configuration and install.
// To uninstall, go to Tools/Manage User Scripts,
// select "CoolerRunning", and click Uninstall.
// -------------------------------------------------
// ==UserScript==
// @name CoolerRunning
// @namespace SDC
// @description remove wack fuckas
// @include*
// @exclude
// @exclude
// ==/UserScript==

// give us a quickie list of miscreants
// (replace with real usernames before using)
var jerkoffs = new Array("attention ho",
"subliterate cretin",

// alt approach: use XPath expression
// note - this is it, zeroes in on 3rd cols
// (user on thread list)
// on comment list it's 1st col.
var xpathMatch;

var allEle = document.evaluate("//TABLE/TBODY/TR/TD/H2",

GM_log("Got " + allEle.snapshotLength + " with the H2 in TD.");

if (allEle.snapshotLength > 0 &&
(allEle.snapshotItem(0).innerHTML.indexOf("Clubhouse")>=0)) {
xpathMatch = "//TABLE[@width]/TBODY/TR/TD[3]"; // topics
GM_log("Using topics match");
} else {
xpathMatch = "//TABLE[@width]/TBODY/TR/TD[1]/FONT";
// subject page
GM_log("Using Listing match");

allEle = document.evaluate(

GM_log("XPath got:" + allEle.snapshotLength + " items.");


function wipeJerky(theElements) {
var thisEle;
var whereIndex;
var jerkoff;
for (var idex = 0; idex < theElements.snapshotLength;
idex++) {
thisEle = allEle.snapshotItem(idex);
GM_log("Inside: >" + thisEle.innerHTML + "<");
for (var jdex = 0; jdex < jerkoffs.length; jdex++) {
jerkoff = jerkoffs[jdex];
whereIndex = thisEle.innerHTML.indexOf(jerkoff);
if ( whereIndex >= 0) {
GM_log('Looks like ' + jerkoff + ' is here.');
GM_log(' at index:' + whereIndex + ' in the contained html.');
container = thisEle.parentNode;
// may have to back up.
if (!(container.nodeName.toUpperCase() == 'TR')) {
container = container.parentNode;
GM_log('Removed ' + jerkoff + '.');
} // found a-hole
} // jerks
} // elements

Wednesday, November 16, 2005

The Answer's to Last Week's Quiz

  1. This was kind of a trick question. In this particular case, it was a corporate, private industry job, but there was a guy that slept on the government job, too.
  2. This one was a government job. There is a street in my town with the same name as the guy, which always reminds me of this scarily intense individual.
  3. This one was a private industry job. Consulting companies love to find suckers to milk for all they're worth, public or private. The application violated software engineering principles like not putting more than 256 fields on a screen. (note of clarification - I didn't write the story I linked too, but it illustrates my point pretty well)
  4. This one was private, too. Corporations, driven by market forces and the invisible hand, can make innovations in stifling, soul-crushing bureaucracy that make legendary government inefficiency look pretty candy ass.
  5. Government job. Eerily smart people sometimes are motivated by non-monetary factors like the job being the only thing in any way technical near their home town. And no, I wasn't talking about myself here. This guy lived in Bloomfield, and I've never even been there.
  6. Corporate job. Like Wally from Dilbert, I was not overly vigilant about making sure the thing had good batteries.
  7. Corporate job. Some plucky individuals inside the company started a Wiki to try to make sense of all the acronyms.
  8. Government job. He did have the sense to abandon the necklace thing when it got too small for his neck.
  9. Government job. I have since gone on to higher levels of flunkydom.

Friday, November 11, 2005

This Week's Quiz: Government or Mega-Corporation Job?

Each item below describes something I observed either while working for the Government or while working for an extremely large corporation. Answers will appear in a future posting.

  1. A guy I worked with fell asleep in his cubicle at least a couple of times a month. It eventually became a game for the rest of us to try to get pictures of him sleeping. Nobody tipped off management, because the game was kind of fun.

  2. A type-A engineer rumored to have a massive home porno collection often worked weekends and usually put in 10 hour days (at least).

  3. Software projects were tracked by a bloated monstrosity of VB crapware that some sheisty consulting company put together for about a billion dollars.

  4. The organizational structure had 23 levels. People in the middle 21 levels mainly forwarded emails coming from higher levels down, and did their best to prevent their underlings from communicating with people at higher levels.

  5. There were eerily smart people working there who knew how to change software in strange and wonderful ways by twiddling just the right bytes.

  6. We were provided beepers which people actually sometimes used to try to contact us.

  7. The language of the organization consisted mostly of Acronyms. Any one person knew what 10% of the acronyms meant, maybe, if they had been there for ten years.

  8. A guy wore a necklace he made out of paperclips. (The number of paperclips) = (The number of days 'till retirement)

  9. A guy volunteered for the daily task of 'getting supplies for people'. Getting supplies usually killed a whole morning, until a manager got wise and gave the job to a summer student flunky.

Monday, November 07, 2005

Testing on Knoppix

The piece of crap computer I bought from Micro-X-press in Indy finally gave up trying to run XP. Or XP gave up. One of these. Apparently Micro-X-Press went out of business or changed names or got swallowed up by another company.

I had a Knoppix CD handy, so here we are. I mainly just use the computer at home as a dumb terminal to get on the Web anyway. Who am I kidding?