Blog

  • On Blogs

    This is a bit about the blog software I wrote for this site. If you’re into the technical aspects of blogs, or PHP and MySQL, you’ll be interested in this. If not, you can safely skip it and not really miss out on anything.

    I’ve taken to calling my home-grown blog software blognutt (“blog + chuggnutt,” very clever, ha-ha), and I’ve noticed recently that at least one person found this out by viewing the HTML source of the site and searching for “blognutt” to see what they could find out. They didn’t find out much. Not for any reason of secrecy or anything like that; I just haven’t talked about it, no real mystery. It’s written in PHP 4 with MySQL on the backend, and that’s about it.

    I use the Template and DB classes from the immensely helpful PHP Base Library, though I’ve modified them extensively for my own purposes. The reasons I use phplib instead of another package like PEAR, for instance, are simple: I’ve been using phplib forever so I’m very quick and comfortable with it, it’s easier to use with a much lower-overhead code base, and I’ve already hacked the code to do things I want to do. PEAR is a fine project and I hope to contribute some classes (like my Stemmer class) there someday, but for coding purposes I haven’t used it much. Yet.

    Why did I write my own blog software, rather that using one of the many available blogging tools already available? I looked at several PHP blog packages, and looked at what other systems like Movable Type offer, but it boils down to the same approach I take to a lot of programming projects: I wanted to hack it out myself, because that’s the best way to learn. So I did. (Plus, I wanted to have absolute control of the software. I’m anal that way.) I started with what I determined were the core elements of a weblog, and made it work.

    When you get down to it, a weblog is misleadingly simple: it’s a data retrieval and presentation system. Retrieve the top X most recent items and display them; offer the ability to browse and search past entries, and there you are. The trick is in the execution.

    MySQL was the logical choice for the data store. I wanted to be able to sort and group by date, search entries, and make changes to the data structure on the fly. For me, the additional overhead introduced by adding a relational database like MySQL is worth it for the benefits I get, and since I’m doing all the programming I can make it do things that might not be available to users using other packages that they can’t control.

    I can do anything any of the other blog software packages can do. (I think. I may be missing something somewhere.) Here’s a list of some common weblog features, and some commentary:

    • Entries: Full HTML, since I control the format and storage. Each entry is tied back to the user (just me so far), date- and time-stamped, and can be flagged as a draft (and therefore not displayed to the public).
    • names: I just re-implemented these in a bot-friendly and more human-intuition-friendly manner. Now they look like /2003/07/27/name.html rather than the (less friendly but just as workable/legal) /blog_entry.php?content_id=27 style of links.
    • Comments: I’ve got the code in place to handle comments, but I haven’t turned it on yet.
    • Archive: I’ve got archive links, sorted by year and month. I can control the sort and display of archive links by changing a single line of code. You can view the archive by year, month, day, or entry.
    • Search: Another advantage of using MySQL: its fulltext indexing capability, which allows you to do natural language queries against text and returns results by relevance.
    • Categories: Easy. I’ve been thinking about categorizing my entries, but it’ll be a pain in the ass to go back through 90+ entries.
    • Calendar: Just recently implemented the calendar, showing which days have entries.
    • Last X entries: I haven’t implemented this because it seems redundant as I keep the last 10 entries on the front page anyway. It’d be easy to do, though.
    • Blogroll: Fancy name for a list of links to other blog sites. I just put some up last night.
    • Syndication: Using RSS for aggregators. I’ve written the code to produce the XML files for this, which turned out to be extraordinarily easy, but I haven’t turned it on yet largely because I’m nervous about bandwidth issues.
    • Trackback: A way for bloggers to link to other bloggers’ entries such that the blog they’re linking to knows they’re being linked to. Clever. I don’t know if I’ll support it or not, since I’m the only one running blognutt software :-). Plus, I can already find out who’s linking to me from the server log files.

    There’s more issues. One of the selling points of the bigger blogging systems is that you can update your blog from anywhere on the web, using XML-RPC. Well, the admin interface I wrote for my blog let’s me update from “anywhere on the web” too—from any computer connected to the web, no special software required, just a browser. Nothing fancy. Seems to me that XML-RPC will require some tool or client utility to use, or some interface somewhere, and I guess I don’t see the appeal in this, except possibly to save you time from opening your admin in another browser window. It’s entirely possible I’m missing something here. Having an XML-RPC API interface to a system is cool, I admit, but is it necessary? Maybe someone could enlighten me, here.

    (Of course, I’m not developing software for use by a general audience, so my way of doing things may not be appropriate for a large user base, and XML-RPC might make perfect sense in that situation.)

    One thing I am interested in using XML-RPC for is pinging sites like Weblogs.com to notify them when this site is updated. It would be easy to do; just include a checkbox on the entry add/edit screen that lets me decide when any changes should be pinged, and have PHP send the XML-RPC packet when the form is submitted. In fact, that will probably be the next change I make to the system.

    I have done something cool that I haven’t seen elsewhere (on blog/personal sites, at least): if a user comes to a “top-level” page from a search engine, searching for something specific, I helpfully list up to 3 entries that might be related to what they were searching for. For example, a user searches on Google for “dealing with a strong willed child” (this was an actual search on my site) and follows the results to my site. If they don’t get to a specific entry, and instead come to the home page, or to all the listings for 2002 for instance, then that’s too vague— so I search the database and show the top 3 results for what they might be looking for. Hopefully, this leads to the user exploring the site a little more than just hitting the home page, not finding what they searched for, and leaving.

    I’ve considered releasing my blognutt software as open source, but that raises an issue I’m not sure I want to tackle yet: support. The other issue is competition; there’s already a lot of weblogging software out there, some of it very good. Do I really want to play keeping up with the Joneses with everyone else, or should I just keep myself happy tinkering with my own system?

    All the same, I’ve been going through and cleaning up a lot of the code and modularizing it better in anticipation of a possible release, and there’s still more to finish. If you’re interesting in chatting about blogs, or seeing my code, drop me a line and let’s chat.

  • FUD Alert

    There’s this site called Technofile written by some guy named Al Fasoldt that has this article that I thought was pretty FUDish. I found it because my wife sent me a link to online news source Syracuse.com that had picked up this article. It’s about alleged spyware Hotbar, and after reviewing the article, I’ve pretty much come to the conclusion that this Al Fasoldt doesn’t know what he’s talking about.

    Hotbar is apparently similar to the Google Toolbar (which I use at work, and it’s great): a browser plugin that offers information on related sites to ones you are browsing, and additionally allows you to install skins that replace the flat gray on the Internet Explorer toolbar with overlaid graphic images. Okay, no big gotchas here so far.

    But to quote the article:

    But it’s actually monitoring the surfing habits of all users and reporting this information back to a central site so it can be marketed to anyone who wants to buy it.

    Hmmm. Sounds like any other website to me. Then the article mentions a problem with slower browsing and crashing Windows, and that there are problems with popup blockers—Hotbar still lets some popups through, apparently. Interesting, but still doesn’t really raise any red flags.

    Then the article begins spouting off about some “startling admissions” about what Hotbar does, admitted by Hotbar (gasp!) on their own website.

    This is funny: it’s a direct quote from the article again, itself quoting the Hotbar site:

    Here are excerpts from the Hotbar site:

    “For every Web page you view . . . the Hotbar software transmits and stores the following information from your computer to Hotbar: Your IP Address, which may include a domain name; the full URL of the Web page you are visiting; general information about your browser; general information about your computer’s operating system; your Hotbar cookie number . . . and the date and time the above information is logged.”

    Excuse me? This is exactly what every webserver on the internet does! There’s no conspiracy here, no unethical behavior on the part of Hotbar from this excerpt, this is how the web works.

    At this point I pretty much decided this Fasoldt guy has no business writing about technology. All I can see he’s doing is spreading FUD without any real knowledge of how things operate.

    (Out of curiosity, I checked out Hotbar’s privacy policy. It’s pretty standard, and it’s pretty clear that any additional information they collect about you (aside from standard web log data) is something you would know about, since you have to provide it yourself in the registration forms. I know a thing or two about this type of browser application, too, and I’m pretty sure it’s not spyware any more than the Google Toolbar is.)

    Hey Al—you better watch out! I’m collecting your IP address, the pages and files requested, the browser you’re running, and where you came from too! And I track the dates and times! I even track what you search for when you use the search box feature on my site!!

    And oh man, you better avoid any search engine sites, like Google, because not only can they track all those things, they can also track every search term you’ve ever tried, and if they wanted to, they could track what sites you visited from the results list they gave you!!

    Moron.

  • Fire Update

    We’re all safe and sound from the 18 Fire, and we never had to evacuate. All is well.

    Here is a link to the Forest Service’s website on the 18 Fire; they have some really good images of the fire, better than anywhere else I’ve seen online. Pretty amazing.

  • 18 Fire

    18 Fire on Bessie ButteWe were on evacuation alert last night as a 600-acre wildfire burned only 3 miles or so from our house. We didn’t have to evacuate, thankfully, as the fire was moving south, away from any developments, but it sure made for an interesting evening.

    Here’s two links to local stories about the fire: Bend.com and The Bend Bulletin. I even have a couple of pictures I took myself, of Bessie Butte, where the fire was burning; there’s two resolutions: one at 640×480, and another at 1024×768.

    The fire is “officially” known as the “18 Fire” and less-officially also known as the “Bessie Butte Fire”. It was probably started by a lightning strike (though there’s no official word on that yet), and began burning enough to be noticed yesterday (Wednesday) around 1:30 PM. There was a terrific smoke plume; a friend described it as though an atomic bomb had been dropped. It could be seen for miles. Almost immediately they had fire crews fighting it, and the big airtankers were dropping retardant all over the area. I even saw a helicopter with a water bucket lowering to fill up in a pond as I was driving home.

    But all is well. I’ll post updates if there’s any further developments.

  • Zoo

    This weekend we were in Portland, visiting the Zoo and hanging out with our friends Justin and Raegan. It was a good trip, but damn hot; fortunately, we had brought the kids’ wagon along and I pulled them around the Zoo rather than having them walk/run everywhere in the heat. They had a great time.

    And that Saturday night we had barbecued pork chops and cold beer. The perfect end to a good (hot!) day.

  • San Francisco Trip, Day 3

    Ha, fooled you. The third day of the trip was pretty basic: caught the hotel shuttle to the airport, caught the airplane, made it home.

    Okay, well, something happened: when we got to the airport, we found out that the corkscrew we had bought the day before at Viansa Winery would be taken away if we tried to board the plane with it (really!), so we ended up having to check one of our bags and put the corkscrew in it. I mean, really. A corkscrew?

    Oh, and when we got back to Bend, we killed a few extra hours by going to see Charlie’s Angels: Full Throttle. It was fun; not an Academy Award winner certainly, but a lot more fun than a lot of the dreck making it to the big screen these days.

  • San Francisco Trip, Day 2

    Saturday the 12th in Frisco was the busy day; we took the Napa Valley Wine Train, which ate up about 8 hours.

    It was a lot of fun. The tour bus that took us to Napa only had 3 other couples on it, so there were 8 of us total. The driver was a really good tour guide, named Roberto, with an accent that I couldn’t quite peg; I knew it wasn’t Spanish, so I had settled on Italian, but he ultimately revealed himself to be Portugese. On the way to Napa he detoured through Sonoma (he does that on weekends, because the train leaves later and there’s an extra couple of hours to do this kind of stuff. So take the Wine Train on Saturdays) and stopped at the Viansa Winery. We toured the Winery, tasted a lot of really good wine, and bought a few things. We ended up with 3 bottles of wine to take with us, and signed up for 4 months of their Tuscan Club. Very good detour.

    The Wine Train itself was cool; I get a kick out of trains, seeming to me to be very retro and luxurious in a sort of pre-Depression American-decadence way, I don’t know. This train pretty much carves a straight line through Napa and back, covering about 3 hours, and you are served a very nice lunch with wine, dessert, etc. While you’re waiting for your meal (or after the meal; they do it in 2 shifts— we were the second shift), you can wander among the various cars, sit in a lounge car, view the scenery from an observation deck, taste wine, that sort of thing. Like I said, I get a kick out of riding a train, and I think it would be neat sometime to ride cross-country in one, just to do it.

    Roberto drove us back to San Francisco, of course, and on the way back he took us up to a great vantage point overlooking the Golden Gate Bridge in the Golden Gate Recreation Area. Amazing view, only marred by the number of people already there, taking in the view themselves.

    It’s such a charming city; I’d only been there once before, when I was 16, and we were simply passing through on a foggy day. It’s an area I’d consider living in, if I didn’t have other things going on right now that require staying put in Bend.

    The rest of the day after we got back was spent doing some more shopping, unwinding, and having dinner in a nice little Italian place at the hotel, called Cafe Pescatore. I was pretty beat by the end of the day, and during dinner I noticed a funny phenomenon: the day spent riding a train and in a tour van had tricked out my inner ear so that it seemed like solid ground was still rocking like the train—phantom movements, as it were. The same occurence that happens when you’ve been out on a boat in the ocean for a long period and have trouble finding your “land legs” again. Very interesting.

  • San Francisco Trip, Day 1

    Herewith the beginning of several entries detailing our anniversary trip to San Francisco last weekend (the 11th through the 13th).

    It was a good trip! We had to get up too early, though: five in the morning on Friday, so we could be at the airport by 6 or so (our flight was 7:15). I always dread traveling when I have to get up early, but this time it wasn’t too bad.

    It was a good flight though, quick and without incident. We had everything we needed in carry-ons, so we didn’t have to worry about checking luggage. So we were able to go straight from the airport to our hotel, the Tuscan Inn, even though it was too early to check in. We left our bags with the hotel and wandered around the Fisherman’s Wharf area of San Francisco.

    It was cold, too; we had just come from 90+ degree weather in Bend, to 70-ish degree wind and fog. Fortunately, it cleared up later in the day and warmed up.

    Non-sequitous side note: the biggest and most interesting culture shock moment for me was seeing billboards advertising programming languages and platforms, like J2EE, Enterprise JavaBeans, stuff like that; I’m used to the “mainstream” billboards we have around here (you know, real estate, cars, etc.) and forgot that we were visiting one of the most wired cities in the world. What can I say? I’m still a country boy when you get down to it.

    A good part of the afternoon was shopping at Pier 39, which, as I sit here thinking about it, isn’t really all that exciting. So I’ll skip ahead to dinner.

    Friday night we did the Hornblower dinner cruise. It was very, very nice (very similar to the Portland dinner cruise we did last year). It was a three hour cruise of the Bay: you swing by Alcatraz, around Angel Island, skirt Sausalito, pass under the Golden Gate Bridge, cruise back down past the Bay Bridge and finally back to dock. Excellent food, wine, service; an all-around good choice. We had a great time.

    Funny story, too: at the table next to us, a young couple were having dinner and bickering a lot. The girl seemed older than the boy (it was his 25th birthday, as it turned out), and she was pretty, but I can’t guess what their deal was. I said “funny,” it’s getting there. One of the things they were arguing about was the boy quitting smoking—I think. He was “only” smoking a cigarette a day, but he was passionately trying to make the claim that “all” writers smoked, drank, did drugs, etc., were basically messed up in the head.

    All writers? I resisted the temptation to step in and correct him. It was starting to seem obvious by this time the guy was making a play with his girlfriend/spouse/significant other to get permission to party more. Because, of course, he wants to be a writer, and all writers smoke a lot, drink like fish, etc. etc.

    Yeah, I know. But it gets better.

    A little later, we start getting to the root of the problem. This is a direct quote, believe it or not, and I’m emphasizing just as he did: “I’m 25 years old and I write children’s books. Children’s books! Do you have any idea how unsexy that is?”

    Swear to god. He actually used the word “unsexy” like that. I had to fight back laughter; I couldn’t hide my smile, so I had turned away. I think one of the first thoughts that went through my head was something along the lines of, At least he’s not equating “children” with “sexy.”

    Pathetic. So he wants to be a writer, a “serious” writer, one wracked with angst and depression that only nicotine and the bottle can dull long enough to produce brilliant literary prose. You know, like every “serious” writer. But he writes children’s books, which is about as far away from the stereotype he’s so desperately seeking that it’s driving him crazy.

    I hope he’s reading this, because: Get the hell over yourself. Writers don’t sit around whining about how unfair it is that they can’t write what they want, or that their lifestyle doesn’t measure up to their skewed vision of what they should be: they write. And if you really do write children’s books for a living, then you’ve already got a huge step up: you’re a published, professional writer. That’s huge in the publishing world. You’ve got instant cred, instant advantage over every other up-and-comer. So shut the hell up and write, and I don’t want to hear whiny, self-piteous shit about how unfair you think life is being because you won’t take the time to actually write what you want to write.

    One more thing. Don’t knock children’s books. They’re hard to write. I should know. I have children.

    Okay, my rant is over. I feel better.

    So, to recap: Friday in San Francisco was good, cold in the morning, nice later, did shopping, and a dinner cruise. All went well. My next entry should deal with the rest of our trip, so stay tuned.

  • Genius

    According to this article on CNN.com, geniuses and criminals do their best work in their 30s. This is great news for me—since I just turned 30 seven months ago!

    Of course, I guess that begs the question: Genius or criminal?

  • San Francisco

    This weekend my wife and I are going to San Francisco for our (5th) anniversary trip. Leaving early early early Friday morning, coming back Sunday. It should be a fun trip.

    Friday night we’re doing a dinner cruise of the Bay, and all day Saturday we’re taking a train tour through wine country. Ah, le vin.

    Of course, I’d love to be able to stop in at Anchor Brewing, but we don’t have the time. Bummer!