Dave’s MP3 jukebox of his dreams–almost

Edna is a very easy-to-setup up MP3 jukebox written in Python and licensed under the GPL. I think a radio-like mode can be added to it pretty easily. Here’s the routine that selects songs to play:


def make_list(self, fullpath, url, recursive, shuffle, songs=None):
# This routine takes a string for 'fullpath' and 'url', a list for
# 'songs' and a boolean for 'recursive' and 'shuffle'. If recursive is
# false make_list will return a list of every file ending in '.mp3' in
# fullpath. If recursive is true make_list will return a list of every
# file ending in '.mp3' in fullpath and in every directory beneath
# fullpath.
#

if songs is None:
songs = []
for name in sort_dir(fullpath):
base, ext = os.path.splitext(name)
if extensions.has_key(string.lower(ext)):
# add the song's URL to the list we're building
songs.append(self.build_url(url, name) + '\n')

# recurse down into subdirectories looking for more MP3s.
if recursive and os.path.isdir(fullpath + '/' + name):
songs = self.make_list(fullpath + '/' + name,
url + '/' + urllib.quote(name),
recursive, 0, # don't shuffle subdir results
songs)

# The user asked us to mix up the results.
if shuffle:
count = len(songs)
for i in xrange(count):
j = random.randrange(count)
songs[i], songs[j] = songs[j], songs[i]
return songs

A question for Python programmers: I added a few lines to the shuffle routine, right after the line count=len(songs).


# radio mode -- DLF, 9/7
blacklist = open('blacklist', 'rb').readlines()
overplay = open('overplay', 'rb').readlines()
countb = len(blacklist)
counto = len(overplay)
for i in xrange(count):
for j in xrange(countb):
if songs[i] = blacklist[j]:
k = random.randrange(counto)
songs[i] = overplay[k] # end radio mode hack

What it’s supposed to do is load a blacklist and overplay list and, when shuffling, compare the current element against the blacklist, and if it finds a match, randomly substitutes a song from the overplay list.

What it actually does is nothing. Anyone have any ideas?

Hacking Mozilla Firebird

Nothing frustrates me more than unfulfilled potential. And that’s why Mozilla Firebird, in spite of its amazing strengths–great speed and small footprint, aside from the things it inherited from Mozilla like good standards compliance, tabbed browsing, popup blocking–well, it bugs me. Why settle for being great when you can be the best there ever was and make people wonder if there ever will be anything better?
Every other modern browser I’ve seen lets you turn off GIF animation. I always do. Still ads very rarely bother me. Moving ads do about 99.999% of the time. As it turns out, Firebird still has the capability, the control panel option is just gone now, in order to make the browser less confusing.

To get it back, locate the file prefs.js inside your profile. In Linux, search your home directory; in Windows, use the Find File option and remember that every Mozilla-derived browser you have installed will have one. Once you find it, open it in a text editor and add the following line:

user_pref(“image.animation_mode”, “none”);

Another good option, if you like movement but don’t like looping distraction, is to replace the word “none” with “once”. Then the animation cycles once and terminates.

Shut down your browser if it’s open, then save the file. Close the file, then reopen your browser. You’ll now be able to browse in peace.

There are bunches of other good tips at this page. Here are my favorites:

Disable blinking text by creating the file user.js in the same directory as your prefs.js file if it doesn’t exist (it doesn’t by default), and insert the following text:

// Put an end to blinking text!
user_pref(“browser.blink_allowed”, false);

Disable the marquee tag by creating the file usercontent.css in the same directory as your prefs.js file if it doesn’t exist (it doesn’t by default), and insert the following text:

/* Stop those marquee tags! */
marquee {
-moz-binding : none !important;
display : block;
height : auto !important;
}

Speed up browsing on fast machines by creating the file user.js in the same directory as your prefs.js fileif it doesn’t exist (it doesn’t by default), and insert the following text, which removes a quarter-second delay before starting to render the page:

// This one makes a huge difference. Last value in milliseconds (default is 250)
user_pref(“nglayout.initialpaint.delay”, 0);

Turn on pipelining to speed things up some more by creating the file user.js in the same directory as your prefs.js file if it doesn’t exist (it doesn’t by default), and insert the following text:

// Enable pipelining:
user_pref(“network.http.pipelining”, true);
user_pref(“network.http.proxy.pipelining”, true);
user_pref(“network.http.pipelining.maxrequests”, 100);

Hey, I almost forgot: New David Crowder

Somehow I missed this. The new David Crowder Band release is Sept. 16. And the band’s site is streaming a track a day until the album’s release.
Today’s track, “Revolutionary Love” is what it sounds like–it owes a lot to a certain Beatles song. In the tradition of the songs like “You Alone” and “Our Love is Loud” that gave the band its reputation, the song’s pretty heavy, and it also mixes in synthesizers and other sounds that are all too infrequently heard in alternative music these days. Elements of pop, punk, New Wave, and even hip-hop. The lyrics don’t sound terribly profound at first, but there’s more depth to them than first appears.

Now I wonder if they’ll catch flak for not mentioning God. Because I don’t think He ever gets mentioned, although with words like “Never changing” it’s pretty obvious he’s not talking about his wife or any other human being. And so do, I think, the opening words of the first verse: “Desperation leads us here.” Assuming anyone catches those.

If I don’t quit talking soon, you’ll run out of time to go listen.

Who wants to build an MP3 jukebox when you can go shopping?

I was going to cannibalize a computer to turn into a Linux-based MP3 jukebox–I figure get the OS up and going on it and figure out later what software to run on it. It’ll take me a while to get the sound card and wireless NIC working in it, I’m sure. Especially in Debian. If it turns out to be too much of a struggle, I can cave and run Red Hat or SuSE on it since they’re likely to just autodetect the stuff. And then I’ll be a Linux wimp, yeah, but hey, I’ll be a Linux wimp with a really cool sound system.
I ended up going to the store. A couple of stores. I needed vitamins and shampoo and fabric softener. It was really weird hearing “A Letter to Elise” by The Cure as background muzak in Kmart. Not that I was complaining.

I also wanted that Plumb CD I asked about yesterday. I could have saved some money by ordering it online, but I was impatient. It had a once-in-a-lifetime song on it and I wanted it. It was a longshot but I looked. Nope, no Plumb at Kmart. Just Newsboys and DC Talk–the kind of stuff my post-college girlfriend Rachel tried to get me into in 1997. I know a lot of people like them but I just couldn’t get into them.

I guess for me it was a good sign. As far as secular music goes, if it’s sold at Kmart I probably don’t like it. So I should probably expect the same for contemporary Christian music too.

Best Bait-n-Switch had it. So I got it, hopped in the car, put it in the CD player, and turned the volume up a bit. Maybe it’s just how my brain is wired, or what’s been on my mind lately, but “Real” just resonates. To me, it’s an instant classic, like “Day After Day” by Badfinger or “If You Leave” by OMD or “Love Will Tear Us Apart” by Joy Division.

I’d tell you about the rest of the album but I’ve had that one song on repeat play for most of the night. I think the last time I did that was six years ago with “Want” by The Cure–which turned out to be a smart move, since there wasn’t much else listenable on that particular record.

Time for me to ask the questions for once

OK, I’ve got some questions for once.
I heard a song that held my attention for about four blissful minutes tonight. Of course the DJ didn’t tell me the artist or song title. I grabbed a pen and transcribed a couple of lines:

I am hungry for something that will make me real/ Can you see me and/ Do you love me cause/ I am desperately searching for something real

Google tells me the artist’s name is Plumb, and the song is, appropriately, titled “Real” and it’s off an album called Beautiful Lumps of Coal. The song is supposed to be a protest of our sex-crazed/centered society.

Question #1: Anyone familiar with Plumb? Is this one of her best songs? The lyrics for the rest of her stuff look promising, but I figure I might as well ask for other opinions.

Now for my other question… I finally put in some wireless networking equipment, which makes connecting a computer to my stereo practical. I can control it over the network so I don’t have to have a keyboard and monitor there, and I can make it play MP3s through the stereo, or make it broadcast them over the LAN with Icecast or something similar so I can listen when I’m in the office or somewhere else. I’ve found a few Linux-based MP3 jukeboxes, several of them with nice web-browser interfaces that include a “Never play this song again” button–perfect for when a song like “Where the Birds Always Sing” by The Cure comes on–but I haven’t found one with a function that emulates a radio station’s “heavy rotation” orders.

So, Question #2: Has anyone out there messed with LAN-based MP3 jukebox software? Anyone have any recommendations? The one I’ve found that looks most promising is Gronk, by the legendary jwz, but there’s no heavy rotation option.

Some baseball players entertain; Dave Dravecky changed my life

This evening I looked at the list of short biographies I’ve written. Some were requests. A number of them were people I found fascinating. And in the case of Lyman Bostock and George Brett, they were men who changed the way I lived life.
I asked myself who was missing. And I came up with some names.

Dave Dravecky.

Dave Dravecky. Man, what can I tell you about Dave Dravecky? He happened to be pitching on one of the worst days of my life. I won’t go into details–it wasn’t his fault. The day would have been a little bit better if he hadn’t pitched those two shutout innings, but not much.

Three years later, my dad scored tickets to Game 2 of the 1987 National League Playoffs at Busch Stadium. Dad and I made a career of living in eastern Missouri and hating the Cardinals; we donned our Royals gear and watched Dravecky pitch the best baseball game I ever saw in person, tossing a sparkling two-hitter. Amazing. I remember thinking that must have been what it was like to watch Lefty Grove or Sandy Koufax pitch.

The next season, Dravecky started feeling sick. Doctors found cancer in his pitching arm. They took half his deltoid muscle and froze the humerus bone. The doctors’ goal was to kill the cancer and leave enough arm for him to be able to do things like tie his shoes. Dravecky’s goal was to pitch in the majors again.

You can probably guess what’s next, since the story’s not over yet. He pitched two games for the San Francisco Giants in August 1989. The first game was a drama. Not a masterpiece like the game I saw at Busch, but a solid 8-inning performance that he won 4-3. The second game, he felt his arm start to tingle in the fifth inning. In the sixth inning, it broke as he threw a fastball to Tim Raines. The Giants were headed to the World Series that year and everybody knew it, and Dravecky wasn’t going to be able to contribute any further. It was heartbreaking. It was heartbreaking because he’d been through so much. And it was heartbreaking because the Giants lost that World Series, and Dravecky’s left arm probably could have won it for them, and what a story that would have been.

Dravecky’s arm broke in a second place during the celebration as the Giants won the last game of the playoffs. Dravecky was asking God some questions after that. Not “Why me?” but rather, “Why was I so stupid?”

Well, some good came of it. A doctor was examining the x-rays to make sure the two breaks were lining up. The good news was, they were. The bad news wasn’t that he’d never pitch again. The bad news was what else he saw.

The lump was back.

Two surgeries later, the cancer was gone, but Dravecky’s once strong arm was a dead limb. He had no range of motion and he was in pain and it was constantly infected. Two years after his aborted comeback, he had to have the arm amputated. Now he really wasn’t going to pitch again.

So now Dravecky is a former baseball player, as well as an author and evangelist. His 1992 book, When You Can’t Come Back, is inspiring. I read it in high school. Flipping through it to find details for his bio, I decided I really need to read it again.

There are other names that came to mind. Ron Hassey. I’ll never forget a game in 1984, after he’d been traded to the Chicago Cubs. He went from the starting catcher for the cellar-dwelling Indians to a little-used backup for a contender. One day, out of the blue, he was playing first base. Not his usual position. And at one point in the game, he stretched to make a catch, and pulled a muscle. He made the catch, then he collapsed, grimacing in pain. Players surrounded him. And you know what Hassey did? He rolled, squirmed, stretched, somehow made his way over to first base, tagged the base, and made the out. Then they carried him off the field on a stretcher and it was two months before you saw him again.

How he noticed that he could take advantage of the situation and get a cheap out, I have no earthly idea. I admire people like that.

I like people like that. People who give 100%. Even when their 100% is a mere 1% of what it would be on any other day, people who still give whatever it is they’ve got. I don’t know how many people remember Ron Hassey, but I’ll never forget him.

And I know I’ll never forget Dave Dravecky. Dravecky lost everything. For as long as he could remember, his left arm was the reason people were interested in him. Then, one day, it was gone. He learned what he could do with what he had left. He could give people courage. Hope. It took him some time. But he’s afffected thousands of people in a powerful way. Not bad for a guy who wondered what he had left.

There are people who give momentary thrills, and there are people who change your life.

I know which one I’d rather be.

Dave’s formula for winning a pennant

I’ll lead off with my best, like the Royals need to be doing, but more on that later. New Wikipedia entries for the day: Rick Sutcliffe (I couldn’t resist) and Chris von der Ahe. I wrote up Rick, well, because he’s family, and von der Ahe, well, let me tell you about him.
Christian Frederick Wilhelm von der Ahe was the George Steinbrenner of the 1880s. Actually, take George Steinbrenner, Charlie Finley, and Ted Turner all wrapped up in one, and you’re not far off. The eccentric von der Ahe was the clown plince of baseball, and if you called him that to his face, his English was so bad, he’d probably take it as a compliment.

After winning the World Series in 1885, von der Ha Ha, who liked to run around calling himself “der boss president”, celebrated by erecting a large statue outside of Sportsman’s Park in St. Louis. But the statue wasn’t of any of his star players. It was a statue of himself. How totally aristocratic.

By 1898 his micromismanaged team was a consistent cellar dweller and literally was a side attraction to an amusement park and a circus. Late in the season, a fire broke out in the stands causing numerous injuries but, remarkably, only one death. He lost the team in the resulting lawsuit. He ended up tending bar in a grubby little saloon. When he died in 1913, the statue got moved to his grave.

Von der Ahe’s team got sold to two brothers named Robison, the owners of a really bad team called the Cleveland Spiders. The owners pretty quickly figured out that the solution to the problem of owning two really bad teams is to shuffle all the best players to one of the teams and make one good team and one incredibly bad team. The 1899 Cleveland Spiders made the 1962 Mets look like the 1927 Yankees by comparison, and the league voted on contraction the next year, killing off the Spiders and leaving the Robisons with one good team. They changed their name the next year, to the St. Louis Cardinals.

Note to David Glass: Buy the Detroit Tigers! Then, after you win the World Series, build a large statue of yourself… outside Yankee Stadium!

It’s probably a good thing I don’t own a baseball team.

So, what’s new? An awful lot.

The Royals’ problems with young pitchers continue… They’ve burned out Dan Reichert, Chad Durbin, and numerous others in recent years, and now their opening-day starter, Runelvys Hernandez, needs Tommy John surgery. I don’t get it. I think the Royals need a new team doctor. Terry Weiss, D.O., where are you?

But the Royals, to their credit, have made two trades this week. Yesterday they acquired veteran left-handed pitcher Brian Anderson from Cleveland, which gives them two dependable left-handed pitchers. In their glory days, they had two lefties named Gura and Splitorff, who fared well against the Yankees in the playoffs. I sure hope history repeats itself. Then I hope the Yankees end up in the cellar. There’s historical precedent for that–and George Steinbrenner looks a little like Chris von der Ahe.

The Royals didn’t land the best impact bat on the market, but they picked up a decent bat in Rondell White. I sure would have preferred Pittsburgh’s Brian Giles, but it was San Diego’s acquisition of Giles who made White available, and supposedly the Royals have been after White for some time. If they’re smart, White will go into left field and Raul Ibañez will move to first base. I could also see them putting White in right field in place of Aaron Guiel, and Carlos Beltran taking Guiel’s leadoff spot. It would be a bold move, but I kind of like starting things off with a bang. He leads the team in home runs, but Beltran’s the ideal leadoff hitter with his blinding speed and high on-base percentage.

Why not combine the two ideas? How’s this look?

Carlos Beltran, cf
Joe Randa, 3b
Mike Sweeney, dh
Raul Ibañez, 1b
Rondell White, lf
Desi Relaford, 2b
Angel Berroa, ss
Dee Brown, rf
Brent Mayne, c

That looks like a lineup that could score some runs to me. It’s better by a longshot than the lineup the Royals used in 1984 and 1985, and both of those teams won plenty. Ibañez is a little uncomfortable at first base, but Ken Harvey can’t hit right-handed pitching and he’s not exactly agile. Brown’s been disappointing but he’s been more consistent, has some pop, and he has good speed so he won’t clog up the bases. Harvey’s better defensively at first than Ibañez, so in late innings he can come in as a defensive replacement and earn his keep. I think Harvey still can be a good player, but winter ball is the place to learn to hit. We’ve got a pennant to win.

Question of the day: The Yankees released 46-year-old Jesse Orosco today. Does he have anything left? Are the Royals interested in taking a chance on another situational lefty who spent his glory years in New York? I’d be tempted to sign him, if only to mentor the few young pitchers the Royals still have on the roster who aren’t hurt. He certainly knows how to stay healthy; the guy’s been on the DL once in his life.

And I see the Yankees sent disappointing Jeff Weaver to the minors. Steinbrenner’s obviously not happy with him; he didn’t send him to AAA, which would be the most normal thing to do (you generally don’t send pitchers with five years’ experience to the minors), but he sent him to A ball. Three steps down. Weaver can’t be happy. Not that I’ll cry for him–he’s the pitcher who picked a fight with Mike Sweeney two seasons ago. But it’s nice to see Steinbrenner regain his old form. Or something.

Time for a core dump

I’ve been keeping a low profile lately. That’s for a lot of reasons. I’ve been doing mostly routine sysadmin work lately, which is mind-numbingly boring to write about, and possibly just a little bit less mind-numbingly boring to read about. While a numb mind might not necessarily be a bad thing, there are other reasons not to write about it.
During my college career, I felt like I had less of a private life than most of my classmates because of my weekly newspaper column. I wrote some pretty intensely personal stuff in there, and frankly, it seemed like a lot of the people I hung out with learned more about me from those columns than they did from hanging out with me. Plus, with my picture being attached, I’d get recognized when I went places. I remember many a Friday night, going to Rally’s for a hamburger and having people roll down their windows at stoplights and talk to me. That was pretty cool. But it also made me self-conscious. College towns have some seedy places, you know, and I worried sometimes about whether I’d be seen in the vicinity of some of those places and what people might think.

Looking back now, I should have wondered what they would be doing in the vicinity of those places and why it was OK for them to be nearby and not me. But that’s the difference between how I think now and how I thought when I was 20.

Plus, I know now a lot fewer people read that newspaper than its circulation and advertising departments wanted anyone to think. So I could have had a lot more fun in college and no one would have known.

I’m kidding, of course. And I’m going off on tangent after tangent here.

In the fall of 1999, I willingly gave up having a private life. The upside to that is that writing about things helps me to understand them a lot better. And sometimes I get stunningly brilliant advice. The downside? Well, not everyone knows how to handle being involved in a relationship with a writer. Things are going to come up in writing that you wish wouldn’t have. I know now that’s something you have to talk about, fairly early. Writing about past girlfriends didn’t in and of itself cost me those relationships but I can think of one case where it certainly didn’t help anything. The advice I got might have been able to save that relationship; now it’s going to improve some as-yet-to-be-determined relationship.

There’s another downside too. When you meet a girl and then she punches your name into a search engine, if you’re a guy like me who has four years’ worth of introspective revelations out on the Web, it kind of puts you at a disadvantage in the relationship. She knows a whole lot more about you than you do about her. It kind of throws off the getting-to-know-you process. I’d really rather not say how many times that’s happened in the past year. Maybe those relationships/prospective relationships were doomed anyway. I don’t have any way of knowing. One of them really hurt a lot and I really don’t want to go through it again.

So I’ve been trying to figure out for the past few weeks what to do about all this. Closing up shop isn’t an option. Writing strictly about the newest Linux trick I’ve discovered and nothing else isn’t an option. Writing blather about the same things everyone else is blathering about is a waste of time and worthless. Yes, I’ve been saying since March that much, if not all, of the SCO Unix code duplicated in Linux is probably BSD code that both of them ripped off at different points in time. And now it’s pretty much been proven that I was right. So what? How many hundreds of other people speculated the same thing? How could some of us be more right than others?

I’m going to write what I want, but I’m having a hard time deciding what I want to write. I know I have to learn how to hold something back. Dave Farquhar needs a private life again.

For a while, this may just turn into a log of Wikipedia entries I made that day. Yes, I’m back over there again, toiling in obscurity this time. For a while I was specializing in entries about 1980s home computing. For some reason when I get to thinking about that stuff I remember a lot, and I still have a pile of old books and magazines so I can check my facts. Plus a lot of those old texts are showing up online now. So now the Wikipedia has entries on things like the Coleco Adam and the Texas Instruments TI-99/4A. Hey, I find it interesting to go back and look at why these products were failures, OK? TI should have owned the market. It didn’t. Coleco should have owned the market, and they didn’t. Atari really should have owned the market and they crashed almost as hard as Worldcom. So how did a Canadian typewriter company end up owning the home computer market? And why is it that probably four people reading this know who on earth I’m talking about now, in 2003? Call me weird, but I think that’s interesting.

And baseball, well, Darrell Porter and Dick Howser didn’t have entries. They were good men who died way too young, long before they’d given everything they had to offer to this world. Roger Maris didn’t have an entry. There was more to Roger Maris than his 61 home runs.

The entries are chronicled here, if you’re interested in what I’ve been writing lately while I’ve been ignoring this place.

A worthwhile link for Christians wanting to stay in touch with the rest of the world

One of the seminarians from my church pointed me to a Christian pop-culture magazine this past week: Relevant.
For a Christian Gen-X type like me, it seems like a good mag. Christians need to be different from the rest of the world, a point Pastor brought home in his sermon this morning, but if we totally cut ourselves off from it, we’re not doing what God told us to do. You can’t reach the world if you can’t relate at all to it. So you have to walk the line between understanding and immersion.

It talks about and reviews both contemporary Christian and secular music, and its recommended movies list hit home.

It’s no substitute for going to church or other resources for living the Christian life; I think of it as a Details-like magazine that’s more sensitive to my beliefs. But that’s certainly welcome.

At the request of a friend: Your thoughts on feeding tubes?

A longtime friend asked me (along with a couple of other friends) for an opinion on the ethics of using feeding tubes as life support.
I have a lot more problem with taking a tube away than I do with giving one in the first place, personally. If a person is, as my dad used to say, “that warm blob over there, which shows no brain activity and no response to stimulus,” then it’s a non-issue. Pull the tube, let go, and let the person go. To me, that’s not a gray area.

Whether you give the tube in the first place is another question. The answer, for me, if it’s me, is yes, but I’m a fighter. If something has a one in a million chance of working, I take it, so I don’t ever regret not having taken that chance. So in my case, give me what I need in order to be able to fight.

I have a lot less problem with not giving the tube in the first place than I do with giving the tube and then taking it away later. Unless the person stops being a viable life form.

But that’s just me.

She’s looking for other opinions. Anyone else have any?

Don’t argue amongst yourselves; if this turns into an all-out war, I close the thread and I post absolutely nothing to the site for the rest of the month. Just post your opinions. I hope I made that clear.