Categories
Uncategorized

Blogware and Categories, Part 2

(You might want to read Part 1 if you haven’t read it already.)

Finding categories on a Blogware blog if you’re a human

Navigating through categories

If you’re a human, you would typically find the list of categories for a Blogware blog by looking at the page and keeping an eye for a list called “Categories”, “Topics”, or whatever the blog’s author has decided to call them. The default templates for Blogware blog designs tend to put the list of categories in a sidebar, usually on the left side.

Let’s use Boss Ross’ blog, Random Bytes, as an example. His category list, under the design that’s in use as I write this article, appears in the left sidebar near the top of the page. It looks like this:

Screen capture: Ross' category list.

You select a category by clicking on its name, which takes you to the page for that category. You will then see articles that were classified as being under that category. For example, if you were to visit Ross’ blog and then select the Random Bytes category from his category list by clicking on it, you would see a page filled with articles that fall under that category.

The Random Bytes category contains a set of categories, and these appear in the sidebar:

Screen capture: Ross' further-down category list.

Ross enabled category “bubbling up” (see the last entry on categories for a full explanation), which means that any given category will display articles that have been classified under that category and any of its subcategories. In the case of Ross’ blog, what that means is that if you’re looking at the Random Bytes category, you’re looking at articles that have been filed under the category Random Bytes as well as under its subcategories (Stream of thoughtlessness, Code, Pop Trivia, Blathering, The Changeblog, CycleLog).

Where am I?

As a navigational aid, Blogware blogs default to showing where you are by providing a handy set of category links near the top of each page. In Ross’ blog, these links look like this:

Screen capture: Category navigation aid.

In the example above, the links indicate that you are in the Code category, which is contained within the Random Bytes category, which in turn is contained within the Main Page, the master category that contains all categories.

/You/are/here

Programmers will feel very comfortable with the concept of hierarchical categories, as they’ve been taught to organize things in terms of hierarchies. If you’ve spent any time navigating through the folders or directories in your hard drive or the directories in a web site, you’ll find the hierarchical system of categories familar. Since categories in a blog follow an organizational scheme similar to files and folders on a hard drive or pages on a web site, you might find that some people tend to use the same notation for describing them. For example:

The Code category, which is contained within the Random Bytes category, which is contained within the Main Page category

could be notated as

/Random Bytes/Code

Finding categories on a Blogware blog if you’re a computer

Screen scraping

We humans are very good at abstracting information from the medium used to deliver it. For example, if I were to change the the “look and feel” of my blog — perhaps move my blogroll over to the left side, change the logo, put the byline and posting time at the end of each article rather than at the beginning or switch from the current three-column design to two columns — you’d still be able to be read it because you can abstract that information from the layout. We humans are pretty clever that way.

On the other hand, computers are complete morons. Their strength is that although they can perform only simple tasks, they’re capable of doing them much more than we can.

Let’s first look at “screen scraping”, a term which refers to having a program “look” at the contents of a screen or web page and extract information from it. One of my first attempts are writing programs that made use of information off the Web was something that went to the local weather page, grabbed it contents, extracted the temperature data and then displayed it in a little window. The weather web page that it consulted displayed temperature like this:

Current temperature: 15 C

I wrote my program so that it looked for a block of text that began with “Current temperature:” and ended with “C”. It would grab the text between those two phrases, shave off any leading and trailing spaces, and use whatever was left as the temperature. For the first few weeks, it worked well, displaying a window that loked something like this:

Screen capture: Window of functioning weather program.

(Ignore for the moment that this window looks like one from Windows XP. It was 1997, so imagine that this is a Windows 95 window.)

This worked well, for as long as they didn’t change the phrases that I used as guides to find the temperature data. Of course, this was during that period of time when “web designer” was a hot career and you often saw them drinking Chivas out of glass slippers and lighting cigars with hundred-dollar bills. That meant that the site was redesigned often. One day, a web designer gave the weather page a brand new layout and put the temperature in a table. As far as the program was concerned, the temperature was displayed this way:

<td>Current temperature:</td><td>15 C / 59 F</td>

My program ended up displaying this:

Screen capture: Window of non-functioning weather program.

The problem was that the information on the page was attached to the way it was presented. When the web designer changed the layout of the page, s/he changed the cues that my program used to find the information I wanted — the current temperature. If she’d gone even farther and changed the wording of “Current temperature:” to “The temperature right now is:”, my program would like show either a blank or perhaps crash, depending on how I wrote it.

If the people who ran the weather page could somehow provide the temperature in a standardized form that was somehow removed from all those presentation niceties like “look and feel” and layout, and if they promised to stick to that form, I could then write a program to access that information secure in the knowledge that changes in the layout of the weather page will not “break” my program.

Enter XML

XML is short for eXtensible Markup Language, and its purpose is to mark information so that programs like my weather program can grab that information without having to worry about looking for “cues” or changes in “look and feel”. The wetaher web page could provide an URL that would hold some XML data about the current weather, perhaps something that looked like this:

<temperature>15</temperature>

(This, of course, is an incredibly simplified version of what the weather web page would probably provide.)

If XML looks sort of like HTML, it’s because both have the same parent, SGML (Structured General Markup Language), a system for marking up information. There are a number of “introduction to XML” articles on the web; this one is a pretty gentle introduction.)

RSS

Most blogs and all Blogware blogs have what is called an RSS feed. RSS, depending on whom you ask is short for either Really Simple Syndication or RDF Site Summary, but what both really mean “a standard way for marking up the content of an oft-updated web page like a blog or news site, independently of the presentation”. RSS comes in a few flavours, but it boils down to a way to present the content of a blog in XML form.

Consider the example article below (it’ll make more sense if you’ve seen any one of the Matrix movies):

Screen capture: Blog article.

For each entry, Blogware creates matching RSS data, which a program can read without having to worry about possible changes in the format of the blog. The RSS for the article shown above would look like this:

<item>

  <title>We need a new captain</title>

  <link>http://example.blogware.com/blog/_archives/2003/11/2/5518.html</link>

  <guid>http://example.blogware.com/blog/_archives/2003/11/2/5518.html</guid>

  <pubDate>Sun, 02 Nov 2003 13:40:52 -0500</pubDate>

  <description>Morpheus is really getting on my nerves. <br> <br>

  He has this annoying habit, where we'd be in a meeting going over

  some very crucial detail of the plans, and he'll suddenly break all of

  Robert's Rules of Order and launch into some prophetic monologue

  about Neo (again!) and how he's "The One" (as if the doofus didn't

  already have some kind of messiah complex) and that tonight could

  be "the battle that wins the war against the Matrix".

  That guff got old a long time ago, fatboy. <br> <br>

  And speaking of fat, how'd he get so tubby eating that pink goo

  that they feed us, anyway? It tastes like wallpaper paste.

  I eat only enough to keep the hunger pangs at bay.

  I'll bet the twerp has a secret donut making machine

  stashed away somewhere. I hate him.</description>

  <category domain="http://example.blogware.com/blog">Main Page</category>

  </item>

As I mentioned earlier, all Blogware blogs have RSS feeds. You’ll find the RSS feed for any given Blogware blog at the URL:

http://{blog url}/blog/index.xml

For instance, you’ll find the RSS feed for this blog at http://accordionguy.blogware.com/blog/index.xml. Click on the link; it’ll look much prettier if you’re viewing it in Internet Explorer or any browser that knows how to render XML.

Blogware’s RSS feeds go even farther: there’s a separate RSS feed for each category in a blogware blog — just add index.xml to the end of any category URL to get it. For instance, if you wanted to read the page for my Yeah…Girls…Geez category, you’d either click on the link for it or point your browser to http://accordionguy.blogware.com/blog/Life/Girls/. If you wanted the RSS feed for that category, you’d go to http://accordionguy.blogware.com/blog/Life/Girls/index.xml

With RSS, Blogware provides a way for software to find articles. This is useful for all sorts of applications, such as:

  • Aggregators. Aggregators are essentially programs that gather up blog content from a set of blogs that you specify into one place. If you’re a heavy blog reader or doing research, an aggregator is a time-saver.
  • Services like Technorati. Technorati is one of a new set of blog-realted services appearing on the web. It reads the RSS feeds of over a million blogs and produces reports such as who links to whom, what the most popular stories in the “blogosphere” are, which blogs are the most popular, and so on.
  • Custom applications. With blogs exposing their content in a format that’s relatively easy for computers to understand, there are all kinds of applications that can be built that collect this data and crunch it for all kinds of purposes.

OCS

With a main RSS feed, a program can find the latest articles posted to a Blogware blog. With per-category RSS, a program can drill down further and narrow its information gathering to specific categories within a blog.

The natural question is: how does a program know what categories are in a given Blogware blog?

Unfortunately, the RSS specification does not provide for a way to do this. However, since XML is a language for marking up any kind of information, it’s possible to use it to create a list of categories. We’re also lucky that someone’s already created a specific XML language for marking up content called OCS (Open Content Syndication). I won’t go into detail about it right now, but you can find more information about it here. We use it to list Blogware categories.

Consider the categories in this blog, shown is the diagram below:

As with RSS, each Blogware blog comes with a feed listing all categories. For any Blogware blog, you’ll find it at the URL:

http://{blog url}/blog/ocs.xml

For this blog, you’ll find the category listing at http://accordionguy.blogware.com/blog/ocs.xml.

Here’s the part of the ocs.xml for this blog — this part is the list of all categories. I’ve formatted it a little bit to make it easier to read:


  <directory rdf:about="http://accordionguy.blogware.com/blog">

  <dc:title>The Adventures of Accordion Guy in the 21st Century - RSS Feeds</dc:title>

  <dc:description />

  <channels>

  <rdf:Bag>

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/Python" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/Gadgets" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/Blogosphere" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/Internet" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/Interface" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/apple" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/Wireless" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/Ruby" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/OfficeSpace" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/TheOffice" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/HOTELMIT" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Geek/Blogware" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Accordion" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Accordion/KickassKaraoke" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Accordion/KickassKaraoke/20031012" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Announcements" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Girls" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Happened" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Happened/TheBig35" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Happened/Thirtysexy" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Happened/Thirtysexy2" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/HighHorse" />

  <rdf:li

  rdf:resource="http://accordionguy.blogware.com/blog/Life/Toronto" />

  </rdf:Bag>

  </channels>

  </directory>

Immediately following this section is a section in which each channel is listed in a litte more detail. Here’s the information for the main page:

<channel rdf:about="http://accordionguy.blogware.com/blog">

  <dc:title>The Adventures of Accordion Guy in the 21st Century - Main Page</dc:title>

  <dc:description />

  <image />

  <formats>

  <rdf:Alt>

  <rdf:li>

  <rdf:Description rdf:about="http://accordionguy.blogware.com/blog/index.xml">

  <dc:language>en</dc:language>

  <format rdf:resource="http://purl.org/ocs/formats/#rss20" />

  <schedule rdf:resource="http://purl.org/ocs/schedules/#daily" />

  </rdf:Description>

  </rdf:li>

  </rdf:Alt>

  </formats>

  </channel>

Here’s the information for the Geek category:

<channel rdf:about="http://accordionguy.blogware.com/blog/Geek">

  <dc:title>The Adventures of Accordion Guy in the 21st Century - Geek</dc:title>

  <dc:description />

  <image />

  <formats>

  <rdf:Alt>

  <rdf:li>

  <rdf:Description rdf:about="http://accordionguy.blogware.com/blog/Geek/index.xml">

  <dc:language>en</dc:language>

  <format rdf:resource="http://purl.org/ocs/formats/#rss20" />

  <schedule rdf:resource="http://purl.org/ocs/schedules/#daily" />

  </rdf:Description>

  </rdf:li>

  </rdf:Alt>

  </formats>

  </channel>

And here’s the information for the Geek/Python category:

<channel rdf:about="http://accordionguy.blogware.com/blog/Geek/Python">

  <dc:title>The Adventures of Accordion Guy in the 21st Century - Python</dc:title>

  <dc:description />

  <image />

  <formats>

  <rdf:Alt>

  <rdf:li>

  <rdf:Description rdf:about="http://accordionguy.blogware.com/blog/Geek/Python/index.xml">

  <dc:language>en</dc:language>

  <format rdf:resource="http://purl.org/ocs/formats/#rss20" />

  <schedule rdf:resource="http://purl.org/ocs/schedules/#daily" />

  </rdf:Description>

  </rdf:li>

  </rdf:Alt>

  </formats>

  </channel>

Next: Some questions, including issues of compatibility.

Categories
It Happened to Me

And you thought it was windy *outside*!

Updated Thursday, November 13th 2003 at 14:51 EST: The original title was The Return Salvo, but then I thought up a cleverer one.

Kathy “Relapsed Catholic” Shaidle has a hilarious response to my “J. Jonah Jameson” post which in turn was in response to her “What ash-heap of history?” post.

My favourite line:

Anyway: I can now retire from blogging,having been called ‘over the top’ by a guy who sticks giant illegal hot tubs on wheels in his yard.

C’mon. Kathy, you were invited. David, tell her how much fun you had at the party.

Because of that “illegal hot tub”, I effectively employed a ne’er-do-well from Mississauga (without this hot tub business, I’m sure HotTubMobile Neil would be robbing gas stations in Bramalea), a couple of guys at the Upper Canada Brewery, a handful of people at Loblaws, the entire second shift at the Frito-Lay Coporation, Ontario Power Generation, the people who extract and bottle Natural Gas, two police officers, and maybe — I will neither confirm nor deny this — some employee at Zig Zag Inc. I made people happy and I contributed to the economy; what could be more conservative than that? If hot tubs are wrong, I don’t wanna be right!

Thanks, Kathy, and I’ll cobble together a worthy response later, once I’ve gotten some work done.

Categories
It Happened to Me

Photos from last night’s WiFi Meetup

Last night’s WiFi meetup at SpaHa was pretty cool, and Boss Ross got some photos too!

The venue, SpaHa, is two-storey restaurant and lounge that located in the most unlikely-semming place: inside the new graduate residence at the University of Toronto. It’s far too stylish and comfortable to be a campus pub, and the food and drinks are pretty good. They had Stella Artois on tap, and they made a pretty decent burger.

Their WiFi was provided by Spotnik. I didn’t have a Spotnik account, and Spotnik Girl, Accordion City’s local Spotnik marketing person wasn’t around to hand out those free cards that entitled you to one hour of free Spotnik WiFi. I didn’t have any pressing need to get online anyway, as the company was so good.

In attendance were:

We discussed a lot of tech, but managed to get some WiFi talk in too, thanks to Brent Ashley, who reigned supreme with the cool gadgets. He showed us his Zaurus, which had a WiFi card plugged into its PCMCIA adapter, which hangs from a hinge, sort of like the cover to Captain Kirk’s communicator on the old Star Trek. The Zaurus runs Linux, and he had a VNC window showing his home machine’s screen, as well as several terminal windows, one of which was running good old Midnight Commander. His laptop also had WiFi by way of a USB WiFi box not much larger than a box of matches. He got it for CDN$35.

I’d like to send an extra-special thanks to Brent for the birthday present he got me: a “Tank Fighter + Brick Game” handheld toy, which “plays 9999 games”. It would appear that it actually plays ten games, most of which have 100 skill levels (one must have shortchanged, having only 99). However, it does play a very challenging game of Tetris and costs a mere CDN$3. We wondered what kind of processor it held, and how much it would’ve cost back in the good old days when Brent was working at my favourite Queen Street hangout back then, Arkon Electronics, when the RCA 1802 microprocessor sold for a hundred or so dollars. You can see photos of the handheld game at Ross’ blog.

Categories
It Happened to Me

More party photos

My housemate, Paul “Peekabooty” Baranowski, has posted his photos from the party, featuring spanking, general bad behaviour, Deenster getting all Posh Spice, and this gem:

Photo: Joey behind Meryle, as she reveals the string bikini underneath her bathrobe for the first time that evening.

(Yeah, I’ve been getting a lot of email and instant messages about Meryle.)

Categories
Uncategorized

Blogware and Categories, Part 1

In the beginning…

When I first started blogging, I was using Blogger, which doesn’t have categories. As you may or may not know, I write about all sorts of things, but what I write could probably be sorted into two large “bins”:

  • The slice-of-life stuff for which The Adventures of AccordionGuy in the 21st Century is best known, and
  • Articles about programming and technology.

I started getting emails from readers asking if there was a way that I could set up my blog so that they could skip the entries about programming. They weren’t programmers or techies, and they weren’t interested in that sort of article. With a blogging tool that didn’t support categories but did allow a single user to create any number of blogs, the solution was to create another blog. And thus I became the owner of two blogs:

For a time, this solution was good.

Soon, I wanted to be able to further subdivide these individual blogs. For example, I wanted to subdivide The Happiest Geek on Earth into categories such as Python, network programming, user interface, and so on. I didn’t want to split the blog into smaller, topic-specific blogs as I’d done earlier because:

  • I’ve got the time and energy to maintain two blogs at the very most, and I don’t want to have to create a new blog every time I want a new category for articles.
  • In many cases, some articles fit under more than one category. What if I wanted to post an article about network programming using Python? Do I post it under the “Python” blog, the “Network Programming” blog, or both?

I needed another approach.

Enter categories

Many other blogging tools, such as Movable Type, Radio Userland and Blogware support categories. Categories allow you to classify your blog articles and in turn display only those articles that fall under a certain category. For instance, consider the categorization scheme for this blog, as shown in the figure below:

Graphic: Category tree for 'Accordion Guy' blog all nodes collapsed.

This is a picture of a portion of the Blogware control panel page that displays the category structure of this blog. The Main Page rerpesents the blog, and the two folders represent the two main categories of articles in this particular blog:

  • Geek for the programmer/techie related articles
  • Life for the slice-of-life articles

The category structure is similar to the file/folder system of a disk directory in that it is a hierarchy. Categories can contain categories, which allows you to structure your information in a hierarchical fashion if you desire (there’s nothing stopping you from creating a “flat” structure, where all folders are at the same level in the hierachy). If you were to show this blog’s categories, subcategories, sub-subcategories and so on — in Blogware you do this by clicking on the “show all subcategories” link — you’d get this:

Graphic: Category tree for 'Accordion Guy' blog all nodes expanded.

Note that there are two kinds of folders:

  • Icon: Article folder. Article folders, which just contain plain old articles
  • Icon: Photo folder. Photo albums, which are folders that contain photos, which in a special class of article that contains a photo with an article attached to it

(For the moment, let’s not worry about how appallingly I’ve arranged my categories. I’m not a library scientist, and I’m sure that those of you who are — especially my friends Stacy and Liz — are holding holy librarian talismans to the screen in an attempt to protect yourselves from the evil. The point of this exercise is to show the mechanics of categories.)

If I were to write a general “slice-of-life” article, I could classify it under the Life category. If I wish, I can be more specific in my categorization. For example, I file any article covering something I did or something that happened to me under the It Happened to Me category. Under that category, I’ve got further subcategorizations — all photo albums — dedicated to specific events, such as my recent birthday party. Note that clicking on any of the links for the categories mentioned in this paragraph cause this blog to display only those entries for that category.

Bubbling up

In Blogware, you have the option of having categories “bubble up” to higher categories.:

  • If bubbling up is turned on, a category will display all articles filed under that category and all its subcategories.
  • If bubbling up is not turned on, a category will display only those articles filed under that category

In this blog, bubbling up is turned on, so selecting the Life category displays not only those articles filed under “Life”, but also those filed under It Happened to Me as well as any other subcategory of “Life” or any of its subcategories.

One article, one or more categories

Note that although it’s easy to think of categories as being analogous to real-world folders on the kind on your disk drive, there is a very crucial difference: unlike like files and folders, where a file can be in only one article at a time, an article can be in more than one category. For example, this article, which involves my accordion, the dating scene and a recounting of what happened to me one night, falls under three categories:

You might want to think of categories as “tags” rather than “folders” if it’ll help.

Restricted categories

In Blogware, you can also restrict access to categories to specified users. To access a restricted category, a reader would have to log in and have an account with permission to access that category. This allows you to use categories to separate articles and information that you want to share openly from those you want to share with a specific group to even those articles that you want nobody else but you to see.

Consider the example below:

Graphic: Category tree with a restricted category.

The lock beside “The Juicy Details” indicates that it is a restricted category and that any articles and categories contained within arer accessible only to those who are logged in and have permission.

Next: Categories, RSS and OCS.

Categories
It Happened to Me

Don’t call the movers just yet

The real estate market here in Accordion City has been described as “soft”, and the daily stream of real estate agents and their gaudy brooches (is that some kind of dress code requirement?) coming into my house has dried into a trickle. The “FOR SALE” sign remains on our front lawn and our landlord still clings to the vain hope that he can sell the house for CDN$200,000 more than the next-most-expensive (but equally nice) house on the block.

Don’t get me wrong: I love the house. It’s a nice place in a location that for my needs is pretty sweet, but let’s face it: the price is just too damned steep for a place that breaks the Cardinal Rule of Real Estate — it’s the best house on a bad street. (By “bad street”, I mean that half the houses are one bad fuse away from going up in a puff of smoke.)

If you’re a sucker adventurous real estate speculator, you can go take a peek at the online listing for the house, complete with photos.

Categories
Toronto (a.k.a. Accordion City)

Kickass Karaoke tonight

It’s the Wednesday closest to the middle of the month, which means once again it’s time for Kickass Karaoke! All sorts of people — suits, geeks, goths, punkers, rockers, Roxette fans, and yes, Meryle the Hot Tub Girl — will be there.

(Check out this sliced-up picture from the last Kickass Karaoke, featuring Meryle, me and Peter.)

Kickass Karaoke starts tonight at about 9:30 at the Bovine Sex Club (542 Queen Street West, about half a block east of Bathurst) and runs until after last call.