April 28th, 2005

Process Throttling for Windows

While I was looking over Beta News the other day, I came across a handy freeware utility called Process Tamer. It implements an idea which I've had for a few years but didn't have the programming skills to implement ;). Essentially, it runs in the tray and keeps watch on the currently running process (your web browser, your word processor, and so on) and if any of them starts becoming greedy and eating up all your CPU cycles, Process Tamer puts the hammer down and lowers that app’s priority until it gets back under control.

“There are many times when a process will hog your cpu, such as when converting audio/video files, or working with compressed archives. Because these processes completely consume the cpu, your system becomes sluggish to respond and using the computer for other tasks becomes impossible while these processes are running.” “Process Tamer solves this problem by identifying such these degenerate conditions and temporarily reducing the priority of the offending processes in order to allow your system to respond to other requests. Stop being a victim to an overloaded cpu — let Process Tamer keep your system responsive no matter what you're doing. […] ”

If all this talk of “processes” and “scheduling” is Greek to you, I’ll try to go over the general idea. As you’re likely aware, modern operating systems can multi-task which allows them to run multiple programs at the same time (such as viewing a web page while your e-mail client runs in the background). But, at the micro-level, your CPU can only pay attention to one application (“process”) at a time. So, it cycles through each application, doing a few calculations for one of them, switching to the next one, doing a few more calculations, and so on.

And, each process can also have a priority assigned to it which means that higher priority processes are given a preference if there’s a mad grab for CPU cycles. One example of priorities is your mouse cursor which, if I recall correctly, has nearly infinite priority — that is, even under heavy load, your mouse cursor is always supposed to remain responsive. So, what happens if two applications have the same priority but one of them becomes greedy? Well, the meek app just loses out.

And that’s where Process Tamer comes in. Say you're ripping some CDs and the ripping application is hogging the CPU, making your e-mail client sluggish; well, Process Tamer notices that and temporarily lowers the ripper’s priority, leveling the playing field for the other applications.

April 24th, 2005

Netflix’ Recommendations Don’t Always Work

I signed up for Netflix earlier in the week and my first set of movies — Hero, Anchorman and Napoleon Dynamite — arrived on Friday. And, I watched them this weekend:

  • Napoleon Dynamite — I hadn’t seen this one yet and felt that I couldn’t hold out for much longer as there were too many pop culture references to it among my friends that were whizzing right by me (not that I was really avoiding it in the first place). And I now know the response in case someone asks “So, you got my back and everything, right?” ;).

  • Anchorman: The Legend of Ron Burgundy — This is a spoof of 70s newscasts which stars Will Ferrell and Christina Applegate. Well, that’s how the studio would bill it — to me, Fred Willard is more of a draw than Applegate these days (and I mean that as a complement to Willard). Oh, if only Willard could have had the starring role — while I think Ferrell can hilarious, he amplified the role from mere parody into caricature. I really wanted to like this one, but I didn’t really.

  • Hero — This is an epic martial arts flick set in pre-unified China. As IMDB puts it, “A series of Rashomon-like flashback accounts shape the story of how one man defeated three assassins who sought to murder the most powerful warlord in pre-unified China.” Now, don’t get me wrong — the movie was beautifully shot and the martial arts were exceptional. And, the sword fight within the falling autumn leaves was stunning and has some fabulous use of color between the adversaries’ red cloaks and the falling yellow leaves. However, I ended up bored by this one; there’s a good dose of martial arts but the non-martial-arts segments just plodded along for me.

I went to the gym this afternoon and, while I was pedaling along on the elliptical machine, it occurred to me that I should check for World Rally documentaries on Netflix.com later this evening. For those who aren’t aware of it, World Rally is a driving sport where drivers don’t race on a track:

Rallying is a form of motorsports that is run over ordinary roads rather than in specialized circuits used in Formula One or off-road environment used in endurance events like Paris-Dakar. In distinction to rallycross in rallying drivers compete against the clock, not directly against the other drivers. And in distinction to rally-sprints, stages used in rallying are much longer (up to 40 to 50 km, average being 10 to 30 km) and special co-drivers are used to call pace notes. […]

Or, put another way, have you ever flipped through the channels and come across a race featuring cars which resemble the Subaru WRX and Mitsubishi Lancer Evo flying along dirt roads? That would be World Rally. In any case, I searched Netflix for “rally” and came across “World’s Greatest Rally Cars”. Well, I was pleased to find that; granted, it was from 2001, but I don’t get Speed Channel on my cable system (the only network which carries World Rally) and I was eager to find anything.

I then clicked through to the category for that disc’s genre (“Motor Sports & Biking”) to see what else I could find. There, I also found Skip Barber’s film “Going Faster”, a film about (you guessed it) how to drive faster. I already have the book by the same name and I found it very useful for improving my times in autocross. I added that to my queue — so far, so good — and Netflix presented me with a list of “Other Movies You Might Enjoy”… one of which was “Kathy Smith’s Pregnancy Workout”. Bwhah?

I suppose that Netflix’ recommendation system tries awfully hard but I guess it has an off-day every now and then ;). I’m not even really sure how it would think those two films are related. I mean, it's not that pregnant women would be autocrossing (as I would imagine that the G-forces could be disruptive to the baby). All I can figure is that a lot of guys that go autocrossing also have pregnant wives… or something?

April 21st, 2005

Pretty URLs in WordPress

If you’re a new WordPress user, you may have noticed that some WordPress blogs have “pretty URLs” with the date and the name of the post in the path. It’s not hard to set it up and you can have URLs such as “yourdomain.com/archives/2005/04/21/post-name/” . (In addition to the aesthetics, this also lends to higher search engines rankings as search engines consider a link’s path relevant.)

So, how does it work? Well, “permalinks” are set up through the options in WordPress and all the magic happen behind-the-scenes through virtual URLs on the server (so don’t worry about having to create all those directories manually). But before setting the options, you’ll first need to prep a file which is called “.htaccess” (yeah, it’s a a filename with only an extension, which probably seems weird if you're running Windows). You’ll need to make sure that it exists on your web host and, if not, you’ll need to create a blank version first…

To do that, log in to your web host (such as with ftp or ssh) and check to see if a file called .htaccess exists in your web root (which is the directory on your web host corresponding to the root directory of your domain). And, if the file is already there, you can skip the next sentence. But, if not, no worries — just create a blank version of the file (such as by opening Notepad or TextEdit and immediately saving it without typing anything) and upload that to your web root. And, with the file in place, you’ll need to set its permissions to 666 (which is probably done through the context menu of your ftp client with an option called “permissions” or “chmod”).

After that, you'll need to load the WordPress admin interface (at www.yourdomain.com/wp-admin/) and go to Options -> Permalinks (or just go directly to the URL www.yourdomain.com/wp-admin/options-permalink.php). There, you’ll need to enter what structure you’d like for your permalinks, which most people set to include the link’s date and post name along with an optional prefix directory such as “archives”. That’s a format that I like and if you’d like to use that, just enter this in the Structure field on that page:

/archives/%year%/%monthnum%/%day%/%postname%/

Then, it's just a matter of clicking the submit button on that screen (which, on my WordPress setup reads “Update Permalinks”, but it might read slightly differently on yours). And, if you're running WordPress 1.5, that should be all there is to it. However, if you’re using WordPress 1.2, you may be presented with a block of text for your .htaccess file; in that case, just copy-n-paste that into the empty .htaccess file on your hard drive and upload that to your web root. Either way, WordPress will let you know if this step is necessary — so, if you hit the submit button and you’re not presented with a block of text, then you don’t need to worry about it.

If this didn’t work out for you, I’d first recommend checking that the permissions on your .htaccess file were set correctly. And, if that looks good, I’d check to make sure that your web host offers mod_rewrite (which is the Apache that provides all this permalink goodness). There’s also a section on permalink troubleshooting in the WordPress wiki. But, don’t let this paragraph scare you — chances are, it’ll work just fine :).

April 18th, 2005

Music: Greetings from Johannesburg

My brother Adrian and his friend David are in a band and they're getting ready to release an EP which they're tentatively calling Greetings from Johannesburg. Adrian has always been into music and I know that he and Dave have been working on some tracks for a couple years now but, I hadn’t heard any of it until this today.

Adrian has released the tracks as mp3s and I downloaded them earlier this evening. I wasn’t really sure what to expect — well I kinda had an idea since Adrian loves indie music (you know, Elephant Six and all that). I piled them into a playlist in Quintessential Player and took a listen. And, I really enjoyed it — I think it’s the kind of music I might buy in a store, if it was for sale.

The part that’s troubling me, as I write this, is that I’m not sure what genre it would fall into. I’m guessing “indie”, somehow, but I would suppose that there’re sub-genres within “indie” much like there’re sub-genres within (say) metal (such as melodic death metal, power metal, and black metal, if you’re curious). But, after some brain wracking, I can see some resemblances to The Postal Service and maybe Barcelona in some ways.

I would have hosted some of the tracks here in order to save Adrian some bandwidth but I didn't see a license specified and I didn’t want to guess wrongly. Perhaps he’d be open to one of the Creative Commons audio licenses; then again, though I could hazard a guess that Adrian might be open to that, I’m not sure how Dave would feel.

April 15th, 2005

Alternate DNS Servers

The other day, my Internet connection went down — well, I didn’t see it go down but, when I got back from work that day, I couldn't browse anywhere. And, what would often help in the past would be to reboot my cable modem; so, I tried that about three or four times (and, really, I should have caught on after the second time). Comcast hasn’t been incredibly reliable for me — they tend to go down every couple months — and I just chalked this up to their usual ineptness.

I then noticed a curiosity — my IM client was still online. And I could still read my mail. But I couldn't browse the web (whaa?). I wondered for a moment whether Firefox was acting up and so I tried loading an ftp client to test my connection. (You thought I might load IE for that? Not if I can help it ;).) Sure enough, FileZilla couldn't connect anywhere either. Then it hit me: my DNS had probably gone wonky. That would explain why I couldn't browse anywhere but my most common Internet apps still held up — those ip addresses were cached by my OS.

At that point, I ran “ipconfig /all” and then pinged the DNS servers to which I was assigned. To no surprise, they both timed out. Then, on a hunch, I tried loading Google and I was actually able to make it there (since I suppose its ip address was one of those in my cache). I then tried searching for “alternate DNS servers”. There were quite a few hits but, of course, I couldn’t see any of them since those sites weren’t in my existing DNS cache (d’oh!). It then dawned on me that I could view the Google Cache of those pages; and, while the pages probably wouldn't look pretty, that would hopefully allow me to get the info I needed.

Indeed, Google Cache worked nicely and I found some alternate DNS servers that I could use. I popped those in my settings and I was up and running again. However, I realize now that I could have made things easier on myself by keeping a few spare DNS servers on hand — before they actually went down. In any case, while there are dozens of DNS servers which are suitable, some that were mentioned consistently were the 4.2.2.x series (4.2.2.1 through 4.2.2.6).

I did an nslookup on those ip addresses and they came back as Genuity.net and GTEI.net servers. Perhaps ironically, I can’t load either of those domains right now, otherwise I’d include a sentence about who each of those companies are ;). But, with such low-numbered ip addresses, I presume they’re of some importance within the InterWeb. In any case, one of the comments on Digg.com [*] offers these instructions for adding DNS servers in case you haven’t done that kind of thing before:

Click on “My Computer”. Click on “My Network Places”. Click on “View Connections”. Right click on the connection that supports your Internet connection and go to “Properties”. Double click on the Internet Protocol TCP/IP option. Make sure “Use the following DNS server address” is selected, and input the above recommended DNS.

To check go to “Start > Run > “cmd” ”. Type in “ipconfig /all” and you should see the DNS you input where it says “DNS”.

[*] On a side note, what is Digg, anyway? Pages within digg.com have been coming up in my search results more frequently recently but I can't quite wrap my head around what the site is about. Something about folksonomies, I’m guessing.

Anyway, before adding those DNS servers, you may as well ping each of them to see which of them are fastest for you. If you go through all six of them, just pick (say) the two with the lowest ping times. Granted, it’s all a matter of milliseconds but every little bit helps ;).

April 13th, 2005

Good One, Mailman!

While I was in England earlier this month, we stopped in a Sainsbury’s to pick up some goodies. I think Adrian wanted some Hobnobs and I wanted to find some more Marmite since I was running low.

I don’t think Adrian found Hobnobs there but he did pick up several packs of Aeros. And, I got some goodies as well. I found the Marmite which I was looking for and I also picked up a couple chocolate bars, one Lindt 85% Chocolate bar and one Nestle Double Chocolate bar (which has “pieces of pure roasted cocoa encased in creamy milk chocolate”). So, I’d say it was a successful trip. However, the unsuccessful (read: bone-headed) part came next — I forgot to pack those when at the end of the trip.

I was flying out before either my brother or my parents and I was hoping that one of them might take my forgotten goodies with them and then mail them to me. As it turns out, I just happened to check my back patio today and I found a package waiting for me. (Sometimes the post office or UPS will drop off packages there, which is usually handy since the patio is enclosed with a fence and any packages there aren’t viewable from the parking lot.) However, I also normally keep the blinds which face the patio closed. So, either the driver would need to leave a delivery slip or I’d just have to check manually.

UPS is good enough to leave a slip on my front door when they leave a package at the back and so does the post office… most of the time. But, they left no slip this time and it was only by chance that I saw the package — I was opening the blinds to let some sun in and I noticed the package there. I opened it and discovered my goodies inside (whee!) but I then took a closer look at the package itself. The postage-sticker in the top-right corner had already become yellowed from sitting out in the sun. And, I then noticed the postmark — April 5th (last Tuesday).

I’m still not sure when the package arrived, but I'm guessing that it could have arrived on Friday (on the early side) or Monday (at the latest). So, the package was sitting outside for two days at least and I had no idea it was out there. Now, were this a package full of books or clothes, that would have been harmless. But, my mind soon turned to the chocolate inside. I gingerly opened the box and pulled out the first bar, the Lindt, which was mostly solid (whew). However, I was not so lucky with the Nestle Double Chocolate bar — as I lifted it from the package, it wilted in my hands.

“Well, it should still taste the same”, I thought to myself. So, I just put both bars in the fridge to reharden. In some ways, this is the same problem as having cookies right out of the oven — they look so tempting but they just need to cool for a little while before they’re ready for eating. And I knew that trying to eat the bars in their current state just wouldn’t help at all. But, I suppose it’s already been over a week since I got back from the trip and I should be able to wait one more day before diving in ;).

April 12th, 2005

Meetup Introduces Fees

Meetups can be great fun but I’ve often wondered how Meetup Inc planned to pay its bills. I mean, surely the cost of bandwidth alone would be significant for them. Well, now we have our answer: monthly group fees. Granted, the fees are only charged to organizers (and not participants) but they’re not exactly cheap — if you’re an existing organizer, you can get a special 2005 rate of “only” $9/month, while new organizers will be stuck with paying $19/month (as will existing organizers after 2005, presumably).

I understand that companies have a right to make a profit, but I’m not sure this is the right way to go about this. That $9/month might be enough to make an organizer think twice about continuing his/her group if his/her group is only puttering along. And, say you have a movie fan that's thinking about organizing a movie fan Meetup. He could either pay the $19/month to get the group started or he could put that money towards a Netflix account instead. One choice has uncertain success while the other offers a stack of DVDs in one’s mailbox every month :-/.

In some ways, this reminds me of the debacle when Six Apart changed the licensing terms for Movable Type last spring. The Six Apart guys probably sought an increase in revenue (which is fine) but they dove in head first which turned a lot of people off. (I still think that Six Apart's move to start charging for non-commercial use of Movable Type was one of the best things to ever happen to WordPress.)

But, getting back to Meetup, they offer a separate FAQ on their decision to add fees where they ask the question I had mind: “Why don’t you increase the advertising on the site?”, to which they reply “If we tried to get most of our revenue from advertising, we'd spend too much time serving advertisers, and not enough time serving you.”. The words sound benign enough but I can't help but wonder how adding fees is “serving” me more than adding some ads to the site. Concerns aside, I hope Meetup Inc pulls through. I’ve rather enjoyed the recent WordPress Meetups in particular and I wouldn’t want those to go away. Perhaps they’ll take a cue from Six Apart and revise their new licensing plans.

(Via: Asymptomatic)

Update 04-14: In a Slashdot story on this subject, several commenters pointed out some free alternatives to Meetup — EventWiki (which looks a bit sparse), My People Connection (which only has 17 cities) and MEETin.org (which looks promising).

April 11th, 2005

Target Can’t Keep Their Shelves Stocked

I stopped by Target this evening to pick up a few things and I figured it would be a routine trip. My shopping list wasn’t terribly out of the ordinary but I wasn’t very successful…

  • Full spectrum light bulbs, 75 watt — I prefer the lighting of full spectrum light bulbs and I was running low on 75 watt bulbs (though I had plenty of 60 watt bulbs). Well, what do you know — Target also had plenty of 60 watt bulbs (and even 100 watt bulbs) but no full spectrum 75 watt bulbs.

  • Natural peanut butter, creamy — I've become somewhat of a peanut butter fiend and I probably go through a jar a week. I often have to pick up one or two more jars when I make a trip to Target. So, I walked over to Aisle One in search of creamy natural peanut butter — no such luck. Sure, they had Natural Peanut Butter with Honey and, as tasty as that sounded, I didn’t really want the extra sugar. And, they even had regular Natural Peanut Butter but it was the crunchy kind.

  • Scrubbie brush for the sink at work — our new office at work now has a sink and I was thinking that I could use it to clean my glass at the end of the day. (I have a glass which I keep filled with water and I just clean it in the bathroom at the moment.) Target let me down here as well. They had a couple scrubbie brushes but they were all cyan and I couldn’t bring myself to buy a cyan scrubbie brush (would black have been too much to ask?).

  • Toothbrush — my old toothbrush was looking a little scraggly and I figured I should opt for a new one. And, as usually is the case, it was mostly a guessing game once I got to the toothbrush aisle — they have about a hundred varieties and all kinds of numbers (what the heck does “soft 40” mean anyway?) and I ended up picking one that kinda resembled my old one.

I had four things on my list and could only buy one of them. Come on Target, get your act together, eh? Among other things, I’ll now have to ration my peanut butter intake as I think I'm on my last jar (and about halfway through it, at that). I have half a mind to take my business elsewhere but it seems that the other major supermarkets have adopted those silly cards and, privacy concerns aside, I don’t want those cluttering my wallet.

April 10th, 2005

Getting strtotime() Errors in WordPress When You Try to Write Pages?

I was getting some odd errors when I tried to write a new Page in WordPress (even though it endedup working). “Pages”, if you aren’t familiar with them, Pages are static pages within your site such as a Contact Me page or an Accessibility Statement. Anyhow, I discovered that if you try to create a new page — and if you're running PHP5 — you get this error:

Warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /home/username/public_html/wordpress/ wp-includes/template-functions-links.php on line 55

There’s a bug report on this issue and it’s already been fixed. Well, it's been fixed in the codebase and it’ll presumably make it into the next release of WordPress (1.51). But if you want the fix now, you can modify edit-page-form.php on your own; it’s just a two-line change and you can copy-n-paste the new lines from the changeset attached to that bug.

April 9th, 2005

The Language of Business Today

I thought some readers might get a chuckle out of this page of some phrases in use within business these days. Some of my favorites:

Core Competencies

  • Context: We need to focus on our core competencies in order to maintain our edge in the marketplace
  • Meaning: What you/your company does well

Quick Win

  • Context: Please come up with a list of quick wins we can look to implement
  • Meaning: Things that are fairly simple (in terms of time and/or cost) and will help improve the situation with regards to a project/product

Touch Base

  • Context — “I need to touch base with Fred on this one.”
  • Meaning — “I need to go a speak to Fred about something”

Are you enjoying this as much as I am? Well, the Interweb offers plenty more of this. (I mean, does anyone actually say “Pour the Kool-Aid”?)