Friday, April 30, 2010

Wordcount vs. Percentage

I've decided I like seeing a "% completed" indication more than a wordcount indication while I'm writing. Sure, % completed is just an estimate while the wordcount is exact, but it just seems like I make progress faster. Going from "8% completed" to "9% completed" seems like a solid achievement, while going from 7147 to 8154 words just doesn't mean much.

And maybe I shouldn't be focusing on what I've done, and work on what I still need to do...

Madame Guillotine

A couple months ago I decided to try an experiment: switching from Gillette Mach 3 razor blades ($15 for a 3-pack) to cheap, one-blade Bic razors ($2.50 for a 10-pack).

The results were about what I expected. The three-bladed razor is much nicer on the skin. It shaves better, easier, and quicker. The one-blade razors scrape my skin much more easily, leaving cuts behind. However, the problems seem to be diminishing, perhaps as my skin gets more used to the rougher shave. I was seriously considering switching back for the first few weeks, but now I'm going to try it for a while longer. Over time, it's a pretty significant cost savings, at the expense of a little bit of the environment and a little of my comfort.

Thursday, April 29, 2010

So...who wins?

Recently I was reading a forum thread that was talking about Linux distributions. Three comments in a row went thus (paraphrased):

Person 1: After 10 years of Ubuntu, I'm running Fedora.
Person 2: I gave up on Fedora back in 2003 and went with Gentoo.
Person 3: I used Gentoo for almost 3 years, but personally, I dumped it for Ubuntu.

Tuesday, April 27, 2010


Yesterday, the animal shelter called me. "Our website doesn't work."

Their website is hosted on my server, and I maintain it for them so I went to take a look. The first problem was easy to find: their domain name simply went to a landing page. "Looks like the domain name must have expired or something," I said. I'd seen it a dozen times before. "Just make sure the credit card didn't expire or something like that."

After fixing that, the shelter manager called me back. "It's pointing where it should, but they said it'd take a few minutes to update."

"Great," I said, but that reminded me that I had a second temporary link I could use to view the site if the domain name was down. Just for the heck of it, I checked out the site, and was greeted by flashing images and random text. Oh no! Their site has been hacked! Thousands upon thousands of mostly-empty folders with random names clogged their account. The shelter's own files and folders remained, except for the home page which had been replaced with the hacker's own page.

This was a kick in the pants. As security-conscious as I am, I had failed somewhere. Doing a little research, it wasn't hard to see where. When I set up their FTP account, I had chosen too easy of a password. It was a non-dictionary word that I had appended some numbers on to...but the non-dictonary word was their domain name and I hadn't stopped to think that a brute-force attack might toss that into the mix.

That wasn't the primary problem. Their unique password I could change, but I realized I had a bigger security hole. All the sites on my server that need to use the database use the same username/password to access it. If the hackers cared, they could glance at the database configuration file in the site that they hacked and get into the database, where they'd have access to every site's data. There wasn't anything particularly sensitive in there that wasn't encrypted, but still not a good thing.

The first thing I did was change the password on the account. The second thing was change the database password. The third thing was to give each site a unique password to the database with limited access. That way, if one site was hacked, it couldn't spread to other sites, and it would be easy to cut off that single access.

Fortunately, I keep good backups so it was easy enough to restore the hacked site. The hardest part was wading through the massive number of folders the hackers had created.

I wish I had fixed that particular security hole BEFORE something happened, but at least it's better now.

Sunday, April 25, 2010

Wordcount Widget!

Note the awesome wordcount widget I added to the right sidebar. This widget is awesome because it AUTOMATICALLY tracks the wordcount on my latest work-in-progress, no manual updating needed.

For those who are interested in the technical side of it, here's how it works:

1. My computer automatically backs up all my files to a remote server every night.
2. Since I use OpenOffice, the document in question is in .odt format. I discovered that a nice feature of this format is that the word count of the document is availabe in the raw document code (search for "meta:word-count").
3. The image you see is actually a PHP script on the same remote server. When viewed in a browser, the script extracts the wordcount directly from the document and generates the image on the fly.


Saturday, April 24, 2010


Child thought it was funny, but I'll bet SHE can't kick her pizza off her plate while she's holding it and send it flying behind the bed.

Saturday, April 17, 2010

I build robots, not time-travel machines

Child: "There's a text message on your phone. 'Ultimate Frisbee at the stadium tonight at 6 pm.'"
Me: "That was from yesterday."
Child: "Oh, okay. Are you going?"
Me: ...

Child's defense was that she had just gotten back from a 9.5 mile run, so I can't really blame her. And the Frisbee will have had been fun, after I invent my time travel device.

Sunday, April 04, 2010

Please don't do this

If you're playing a game, and you realize you can't win, don't change your strategy to simply making the frontrunner lose. It's not the game, it's not cool, and it's not fun.