A Look at the Practical Applications of Microformats

Saturday, June 16th, 2007

HTML used to semantically describe what information looks like. HTML is now leaving the styling of information up to Cascading Style Sheets and is becoming more interested in describing what the data is. There are tags to let the browser know what information is a header, paragraph, list, etc. Microformats take the concept of describing data up a notch. Microformats are pieces of semantic data embedded into HTML that uses existing standards to describe what the information is. Once a user agent (such as a web browser) knows what certain pieces of data are, it can export the data to a more appropriate context. In this article we’re going to look at two microformats in particular: hCard, hCalendar.

Both hCard and hCalendar are based off of already existing standards (vCard - RFC#2426 and iCalelndar - RFC#2445 respectively). With some XSLT transformations or Javascript parsing, we can export the microformatted data in a webpage to other pages or into other data formats. For example, sites like upcoming.org mark up events with the hCalendar microformat. If we plan on attending these events, we can add it our Google Calendar, Yahoo Calendar, or 30Boxes to remind us about the event at a later date.

One of, if not the most popular microformat user-agent is the Firefox extension Operator by Michael Kaply. Currently, Michael is working on adding microformat functionality and javascript functions for microformats to Firefox 3. This means we’ll be seeing a lot of these features in the next version of Firefox. Operator supports a wide range of microformats, but as previously mentioned we’re only going to stick to hCard, hCalendar and we’re going to talk a bit about rel-tag. The premise of operator is simple: if it detects any microformatted data, it allows you to take some sort of action. If you find a person or place marked up with hCard, you can export it as a vCard or add to yahoo contacts. Exporting an hCard as a vCard will allow you to save a contact to programs like Address Book, Outlook or any program that supports the vCard standard.

I’ve already mentioned what you can do with information marked up with hCalendar, so let’s look at rel-tag. Rel-tag is simply marking up up the “rel” property of a hyperlink with the value “tag.” Once Operator knows that the link is a tag, it can then look for that same tag at sites like flickr, technorati, and del.icio.us. A common use for tags is looking up additional information about something you’re reading. Blog posts for example are usually tagged, so people can find pictures on flickr, related blog posts on technorati, or related sites on del.icio.us.

Let’s take a moment to recap and see why we like microformats and operator. For one we don’t have to input data ourselves. Since the data is already online we’re simply copying it to our application of choice. With this comes the advantage of actions becoming point and click. If you want to add an event to your Google Calendar, you point and click on the add to Google Calendar option. Pretty simple.

One area that can benefit from microformats is the cell phone market. I’ve already written about the iPhone as a microformat killer-app, but I wanted to expand this idea to include both cellular phones and internet-enabled PDAs. Cell phones and PDAs both have notoriously horrible input interfaces. Don’t you dread typing out a long text message, let alone trying to search for something on a cell phone browser? What about trying to write something out in Graffiti? What if these devices had the point and click ease of use that operator has? With REAL browsers coming to next-gen cell phones such as the iPhone, I see no reason why microformats shouldn’t be a part of this market. Imagine adding a person’s contact information into your cell phone via their hCard. You have all of the information you need about them ready to and be entered into your cell phone at the tap of a stylus. The same can be said about events and adding it to your calendar application on your cell phone or PDA.

With these smaller devices, ease of input usually suffers. In this case microformats make a great alternative to user input and can help overcome these shortcomings. It really can be just as easy as point and click.

Girls like nerds who can cook!

Thursday, May 31st, 2007

Last Saturday Miss Rhead spoiled Gavin and I with her astounding vegetarian cooking: Garden burgers topped with sauteed mushrooms and pepper jack cheese. I have to admit that I now actually like garden burgers MORE than I like meat burgers! Her cooking inspired me to want to learn how to be a better cook myself. As any nerd would, I looked for some recipe RSS feeds. Of course there is the site “simply recipes,” but it appears to only update every other day. I found some other sites, but alas, no RSS feeds (which my primary source of information consumption).

98371.gif

During my search I stumbled upon the site allrecipes.com. Not only do they have RSS feeds for various categories on their site, but you can sign up for an account and create a “recipe box” (Cookbook to the rest of us). Now when I’m checking out their RSS feed, I can add appetizing recipes to my recipe box. I don’t know about you, but when I’m making dinner with friends, the hardest part is finding something to make. The recipe box feature will allow us to browse a pre-chosen list of recipes so that we can skip that annoying step and go straight to the cookin’.

Another notable feature is the shopping list. Let’s say you’re planning a dinner with multiple courses. You still need to go shopping, so you look at the ingredients for each course and determine what you need to buy. The shopping list feature will add the required ingredients to your shopping list and it will sort them by type, which is how stores usually sort their aisles. This is handy for people like me who are easily lost in the grocery store. If you add multiple of the same item (the same item, but from different recipes), it will add them together so you know the total amount of a product you need to buy. Very cool!

Already I have made two meals I found from the site: Gourmet Chicken Sandwich and Pizza Without the Red Sauce; both of which were delicious. Go check it out; if not for the skill of learning to cook, then for the sake of the title of this post.

UPDATE: I just found a really neat feature where you can find recipes given ingredients you want to include/exclude.  This is great if you have extra ingredients from previous meals that you want to get rid of.  The more I use this, the more features I find.

Microsoft reinvents the table.

Wednesday, May 30th, 2007

If you haven’t seen it on digg already, Microsoft has announced “Microsoft Surface” today. If anyone remembers, Gates demoed this technology during the CES keynote. Check out the video at gizmodo demonstrating its features such as picture management and enlargement, the cool water screensaver, and interaction with wireless digital cameras. It looks impressive, but I don’t see myself using this for anything practical.

Podcasts and productivity.

Wednesday, May 30th, 2007

School for the semester is finally done! What a huge sigh of relief that is for me. With last semester now behind me I can now actually concentrate on learning something! Lately I’ve been obsessed with trying to be productive with my time off. For example, while I’m watching a movie, playing a video game, or watching a video podcast, I try to hop on my exercise bike for a few minutes. Whether I’m on it for 20 minutes or an hour, it’s justification enough for me sitting on my ass.

Another thing I’ve been getting into are “books on tape” (or books on mp3?) and podcasts. Everyday one thing is certain: I’m going to be driving to work. Usually during this time I’ll use it to listen to both old and new bands. Instead, what if I could use this time to do something a bit more productive? I started with the audiobook version of “Survivor” by Chuck Palahniuk and then David Allen’s seminar “Getting Things Done” (which I’m sure I’ll dedicate a few posts to).

Podcasts of lectures from UC Berkeley have now caught my attention. If you go into the iTunes store and type in “Berkeley” you will find full lectures of actual classes from UC Berkeley. To be more specific, you’re getting every single lecture of classes that decide to do webcasts. You can find lectures from subjects such as Chemistry, Biology, Computer Science, Economics, History, Physics, Political Science, and Psychology. So now when I’m driving to work I’m listening to the class “CS 61C - Machine Structures” and when I’m at the gym, I’m listening to “CS 162 - Operating Systems and Systems Programming” on my iPod. These podcasts are already mp3s, so they’re ready to be burned onto CD if you have an mp3-cd player in your car. MIT has a similar program called “Open CourseWare,” but I like the convenience of a podcast.

Today I also stumbled upon “TED Talks.” TED is an invite-only conference held in Monterey, CA and feature lectures on a broad range of topics. The one that piqued my interest was a talk by Ken Robinson in which he discusses overhauling our education system. This topic has been of interest to me, so I investigated further. I found out that TED Talks were a podcast featuring nearly 100 (if not more) lectures from people such as Chirs Anderson, Sergey Brin and Larry Paige, Al Gore, and Jimmy Wales. After I load them onto my AppleTV maybe we can make a day of it, similar to Jeff’s Inspirathon.

Update: Just found this story regarding apple announcing iTunes U. iTunes U is an area of the iTunes store featuring lectures from unversities such as Stanford and of course Berkeley.

correlate.us

Wednesday, May 30th, 2007

Joe Stump has just announced correlate.us which is a feed aggregator that consolidates your web2.0 feeds to one source. I already use yahoo pipes for the purpose of checking my Twitter and Flickr feeds. Unlike Yahoo Pipes, correlate.us will also consolidate your tags and adds the social aspect of checking out your friends feeds. Lastly, Joe has taken advantage of Facebook Application support, so you can add it to your facebook account.
Currently correlate.us supports twitter, digg, del.icio.us, and flickr. Although the application is still in its infancy, I love the idea of this application and can’t wait to see the addition of services like ma.gnolia, last.fm, and blog feeds/comments.

Civil Disobedience with 1 Click of a Button

Tuesday, May 1st, 2007

The reason for Digg’s popuulary is the ease of it’s voting system.  If you like a story you click a “Digg It” button and the number of “Diggs” the story has is updated without any page load.  If you haven’t seen or heard, the digg front page is going crazy with stories with regards to a number.  If you wat me to be more specific: 09-F9-11-02-9D-74-E3-5B-D8-41-56-C5-63-56-88-C0.  Why?  Well coincidently that number (Hexadecimal number) just so happens to be the same as the HD-DVD encryption key.  So what does that have to do with civil disobedience?  Well apparently digg is trying to block stories that involve this number.  Censor if you will.  How funny that a number can cause so much trouble.

Due to Digg’s ease of use, people have been fighting back by posting story after story involving this number.  Taking up an entire page as a matter of fact.  Many of these stories have received well over 1000-2000 diggs which is pretty high for any story on digg.  Never  before have I seen so many people banding together  to fight back.

I’m sure there’s a lot to be said here.  About ease of use.  About your community.  About not turning your back on your user base.  About selling out (After all, who was a sponsor of diggnation?).

To be honest the HD-DVD key and everything I said above is really insignificant.  I find it stunning that a number of people will cause so much trouble in regards to a number, yet I see little being done about our political system.  Why?  I mean I hear a lot of people TALK about it, but nothing is done.  We’ve pretty much turned into lazy activists who will only do something if we can make a change with a click of a button.  Perhaps I’m just a hypocrite by not doing much myself, but it really makes you think.  Today our president vetoed a bill that would end the war in Iraq and we’re concerned about a fucking number.  Maybe if we could click something to impeach our president, more people would care.  Of course nothing will ever be that easy.

Good Enough

Saturday, April 14th, 2007

I just saw this inspirational blog post by Paul Buchheit Here’s a quote:

Forget about your lack of talent, skills, knowledge, time, resources, or whatever else you need to be “good enough”. Start an inane blog, take bad photographs, upload boring videos to YouTube, write bad software, create useless products, play bad music, and make ugly art. Forget “good enough”, and then simply indulge in the joy of creation.

He also states he likes xkcd :)

RSS - Creating a Feed (Part 3/3)

Friday, April 6th, 2007

In the final article of this series we’re going to write a script in PHP that will dynamically create an RSS feed from entries in a MySQL database.  If you decide to use this script in your own custom application, you may need to change parts of the script, such as the query.  You can check out the script here.

Let’s take a look at the script to see how it works.

The first part will define some parameters to establish a database connection.  This includes information such as the host, username, password, and the database.

This next part is important.

header(’Content-type: text/xml’);
print “<?xml version=\”1.0\”?>\n”;

This sends the appropriate header information to the client telling it that this is in fact an XML file. Without this line, your feed will show up as plain text and will be read as such.

After the header information, we begin the actual RSS feed. This should look familiar as it was covered in the previous article. Simply fill this information out as it relates to your site or have it retrieve the information from another source, such as your database.

<?php
 // Connection to db
 $mysqldb = new mysqli(HOST, USER, PASS, DB);
 // Query to select posts

 $query = “SELECT * FROM posts”;
 $result = $mysqldb->query($query);
 if($result->num_rows) {
  while($row = $result->fetch_array(MYSQLI_ASSOC)) {
?>

   <item>
    <title><?php echo $row['post_title']; ?></title>
    <link><?php echo $row['post_link']; ?></link>
    <author><?php echo $row['post_author']; ?></author>
    <description><?php echo $row['post_content']; ?></description>
   </item>
<?php 
  }
 }
?>

This is the part of the code that fetches the posts from the database and turns them into the RSS feed. Simply retrieve all of your posts from the databse and use a while loop to print them all out as items of the feed. Once the loop is done, close the channel and RSS tags and you’re done!  You now have an RSS feed that will update itself when you update your MySQL database.

10 Things I Learned From Startup School

Monday, April 2nd, 2007

My notes were pretty much what was said at Startup School, so I want to take this opportunity to put down what I got out of it in my own words. This list is some of the re-occurring themes amongst the speakers as well as some key ideas I took from it.

1. You will probably fail, but you’ll learn something along the way.
I think having a pessimistic view will turn your startup experience into a self-fulfilling prophecy. Will you really put a lot of effort into something you know is going to fail? Why should you?
I think you should expect your startup to succeed, but know that failing is the worse that can happen. This way you will put all of your effort into it and learn more than you would if you half-ass it.

2. Focus on 1 idea.
Don’t scatter your resources among many mediocre ideas. Instead focus on one great idea and do it well. This will put you at a competitive advantage.

3. Get Venture Capitalist Funding or “Smart Money”
When a venture capitalist loans you money, they want you to succeed. Why? If you succeed, they make money as well! Part of the deal is that they’ll help you out by pointing you in the right direction, or will connect you with someone who can help you out. Think of it as buying help.

4. Frugality
When starting out, you want to squeeze every penny for what it’s worth. The Partovi brothers took it to extremes by saving paper clips attached to documents and having people bring in their own cups. In fact, they made frugality part of their company culture. This is also something VCs will look for when you present to them.

5. Make important decisions early on
Who is CEO? Who is on the board of directors? These decisions should be made before the company is worth anything. The CEO should be someone who is well spoken and is a good salesperson. If you make this decision when your company is starting to make money, the person who may not be the best candidate may step up for financial reasons.
As far as who is on the board of directors, choose people who understand the business, such as the founder. Don’t choose people who want to be on the board as part of some sort of hidden agenda; they’re in it for themselves, not the business.

6. Don’t take the company culture for granted
This should be something else that should be established early on. Determine the overall culture for your company early on and set an example. As companies grow bigger, the culture seems to fade away and politics begin to set in. If you establish this at the beginning and enforce it, you will delay the inevitable drama/politics that come with having more employees.

7. Diversity
This is one topic that was actually brought up with two different viewpoints. Mitch Kapor said that a company should have diverse viewpoints, while Mark Zuckerberg said that a startup company should be young and technical.
I tend to agree more with Mitch. Having a variety of people allows for a larger amount of viewpoints. If someone has an idea, another person is bound to find holes in it and patch them up before a release.

8. Hire Great People
Be picky about who you hire. At first your company will be small, which is why it is critical that you have your ideal team. If not, it’ll be more likely that you will fail. Hiring great people is one of the keys to success.

9. Get a co-founder
This is one of the biggest key factors to get VC funding. If no one wants to help you start a business, you should probably look into another idea; It’s that important.

10. Redefine Success
To some success is making lots of money. However, let’s be realistic, are you really going to make a lot of money doing your first start up business? Probably not. Will you learn a lot? This is more likely. Make it a point to learn as much as you can with your experience.

Python on Planes

Sunday, April 1st, 2007

Every year Slashdot redesigns their site for April Fools Day. Last year it was the “omgponies” theme and this year they added the “slashdotit” feature complete with fake stories (which people actually believe and then post to digg). I saw this story and I loled (in the literal sense). I really wish someone would develop it. I wonder what Samuel L. would have to say about it?