Simple intro to syndication

August 12, 2007

Several members of my family have gotten involved in blogging. I thought a simple tutorial for working with syndication / feeds would be helpful.

Push vs Pull

Email works on a ‘push’ model: you write your message, then push (send) it out to some list. When you write a new blog entry and want others to know about it, you may think to ‘push’ that to them by sending an email: “Hey, check out my new blog entry…”

The ‘push’ model works well in many cases, but it has one major problem: how to manage the list of poeple to send to? What if someone new wants to read your blog? What if 50 new people want to read your blog? Or 20 people decide your daily adventures really aren’t that interesting? That’s a lot of work for you to manage all those changes.

The ‘pull’ model allows the individual reader to choose which blogs or other sites he wants to view. When you think about it, that’s the way the whole internet works, actually — I decide when to go read my mom’s blog, or my sister’s, or my brother’s, or my cousin’s, or my other cousin, oh, and then there’s my aunt, and my brother-in-law, and the daily Dilbert cartoon, and the personal finance blogs, and the various geek sites… man, that’s a lot of work for me to visit all those sites to see what’s new.

Feed Me

Fortunately, some very smart (and lazy) people invented ‘feeds’ to help me and you — both the person publishing a blog, and the person trying to stay on top of 50 different blogs every day. A feed is just a feature built into a website (such as a blog) that helps to automate the ‘pull’ model.

Let’s look at an example. This blog’s address is When you point your browser there, the server sends back the content of the blog, formatted for your reading pleasure. This blog has another address as well: If you were to point your browser there you’d get something different — an index of the articles available in the blog, with some information about each one, such as the date it was published and a snippet of the article.

That second link is the feed for this blog, and it automatically updates anytime I publish something new on my blog. That feed feature is built in to pretty much every blog you might run into across the Internet, and many other sites use them as well — such as online newspapers or news organizations.

The real trick happens when you pair a feed link such as that with a piece of software that knows how to do something with it. That would be a program called a feed reader, and all it does it continuously monitor the feeds you tell it you’re interested in, looking for new content. When it sees that the feed is updated with a new article, it will typically download it and notify you there’s something new to read.

There are a few different names and flavors of feeds, but they all do pretty much the same thing. The names you are likely to see are RSS and Atom. On a website, a feed is often indentified with an orange button or one of these symbols: RSS

Okay, now you know what a feed is, and you want one. Here’s a bit on how to actually use it.

For Blog Writers

This is the easy part: if you write a blog, you can pretty well count on the fact that your blog already has a feed that automatically updates for every change you make. It’s built into all blogging software.

Usually all you have to do is invite people to subscribe to your feed so you can stop sending those emails out 🙂 The hardest part about that is likely to be educating those who don’t know what you’re talking about. Feel free to direct them to this little tutorial…

For Blog Readers

I mentioned feed readers above. Well, there are gazillions to choose from. I’m going to simplify your life and just point you to my favorite: Google Reader. In this case, it’s an online service, provided for free by Google.

As an example, here’s all you need to do to subscribe to my personal (non-tech) blog:

  • Find the link for my RSS feed – it’s labeled as ‘Entries (RSS)‘ at the bottom of the page. Copy the link (right click –> Copy link location)
  • Visit
  • Click the ‘Add subscription’ link in the left-hand sidebar.
  • Paste the feed link address into the entry field and click the Add button.

Now you’re subscribed, and anytime you come back to Google Reader it will tell you if there are new articles to read on any of your subscribed feeds. You can unsubscribe at any time. Note — subscribe / unsubscribe has nothing to do with paying for the feeds.

If you use Firefox — and you should: Firefox has some built-in features to help with subscribing to feeds. It can be set to add new feeds to your Google Reader account with just a click or two. Very cool.

But I Really Prefer Email

If you’d rather do all your blog reading via email, there’s an option for that as well. There are services such as FeedBurner that provide an RSS-to-email gateway service. Typically a blog writer/publisher will register his feed with FeedBurner, and then FeedBurner monitors that feed for new content. Anyone else can go to FeedBurner and register to receive email (how quaint) when the feed is updated. It’s another avenue to explore if you’re interested.

Password Protected Blogs

Unfortunately, password-protected blogs are a problem for syndication / feeds. I’m not aware of feed readers that are able to support password authentication in conjunction with the feed. So at least for now, email blast-o-grams are probably still the best bet to advertise your new posts. Yes, it’s a hassle, but it’s the trade-off for privacy. I’m sure some more smart (and lazy) people will have a solution to that problem before too much longer.

More Information

What is RSS?

How to: Read RSS Feeds

Wikipedia: RSS


14 rules for fast web pages

June 5, 2007

Very informative presentation on speeding up page load and rendering times.

I read through the slides, and I’m looking forward to reading the whole book on safari.

Internet Explorer Developer Toolbar

March 7, 2007

Firefox performance problems with Firebug

February 22, 2007

I use the firebug extension in firefox very frequently, and I really recommend it. However, it does appear to cause some problems, at least when running firefox on Linux.

When firebug is running, firefox seems to freeze up for a second or more, and the cpu load spikes up. In a new firefox session, everything seems to work fine. But over time, the problem gets worse, and I usually end up having to restart firefox at least once daily. Really a bummer for productivity.

I think I found at least a partial workaround: by disabling firebug when I’m not actively using it, the problem is much less severe. I can’t say that it goes away completely, but at least firefox is still usable.

On the firefox menu: Tools -> Firebug -> Disable Firebug

Rails: reset devel db migrations

January 16, 2007

Doh! I figured this should be easy to do, now I finally found the right method – these two steps completely reload the migrations from scratch in the development environment:

% rake db:migrate VERSION=0 && rake db:migrate

Content filtering with DansGuardian

January 3, 2007

I finally got content filtering fully configured for my home network. I’m using DansGuardian + squid for the filtering, and the setup process was extremely smooth and easy (ubuntu breezy badger):

% apt-get install dansguardian

I already had squid running and tested, and DansGuardian just plugs right in. I had to change my WPAD proxy config (/wpad.dat) from this:

return "PROXY; DIRECT";

to this:


And it just worked — all the other machines in the network automatically got the new filtering. I also customized the ‘access denied’ html template a bit, in /etc/dansguardian/languages/template.html

December 30, 2006

I just used a free online service for creating diagrams a la Visio —  It’s a flash-based app, supports export to image formats as well as SVG.  My first diagram was very easy to do.

There are probably other such online services — want to recommend another?

dnsmasq for local DNS service

December 27, 2006

I need to implement proxy filtering in my home network, to protect my family as my kids start to use the internet more. The first thing I need to make this work is local DNS service within my LAN, since all the other hosts on the network will be blocked from direct access through the router.

Easy solution: dnsmasq on my debian(ubuntu)-based server. Very easy to install:

% sudo apt-get install dnsmasq

This installs and configures the local DNS server, and sets it up to always run on the machine as a system service. A little bit of manual configuration is required as well: /etc/resolv.conf has the real nameserver addresses


And then I also put all the aliases for local machines into /etc/hosts diener doingo dad velum vellum gulliver boys

That way, all of the local network machines can resolve each other via this local DNS, and I don’t have to maintain /etc/hosts on each one.

Once the server (diener) is setup, all the other hosts on the network have to be configured to point to diener for DNS.  Currently everything is configured with static IP & DNS; dnsmasq also supports DHCP, and I need to still investigate using that for some hosts.

Upgrading to MySQL 4.1 with Rails

November 29, 2006

In a Rails app, I’m using ActiveRecord::Extensions to get faster load times of a large set of records. This requires a new feature in MySQL 4.1, supporting the ‘ON DUPLICATE KEY UPDATE …’ statement. I previously had MySQL 4.0 installed (ubuntu breezy badger). Here’s what I did to update:

sudo apt-get install mysql-server-4.1 mysql-client-4.1

After that, tried to do some operation in rails, and it failed:

Mysql::Error: Lost connection to MySQL server during query: ....

That problem had a simple fix:

 sudo gem install mysql

The ruby mysql gem had to be rebuilt with the new mysql libs, then everything was peachy!

Cross-browser JavaScript

November 18, 2006

Working on a web application, dealing with some cross-browser JavaScript issues. My main development platform is Firefox + FireBug extension, and I had everything working there just great. It took a while to get it working on other browsers — recording lessons learned here.

Lesson 1: Firefox – Opera – IE

After getting things working in Firefox, I found the next best platform for testing is Opera. Opera’s JavaScript engine seems a bit stricter on some things that Firefox, so it generates errors on things that Firefox handles fine. While not nearly as nice has FireBug, Opera does have an Error Console feature that is pretty clear on both the location and the meaning of the errors.

Finally it comes to testing Internet Explorer — IE6 to be precise. The tools for JavaScript debugging in IE6 are awful, it is a painful experience. So do all your testing on other platforms first.

Lesson 2: The real issues

Once I figured out a good debugging strategy, it wasn’t too hard to fix my problems. It came down to a few syntactic constructs that I now know to avoid in the future:

  • Don’t use assignment in an if() statement
    • Okay in Firefox and Opera:
      if ( foo = something() ) { ... }
    • Alternative that works in IE6 as well:
      var foo = something(); if ( foo ) { ... }
  • In hash / object construct, don’t leave dangling ‘,’ after last pair
    • Okay in Firefox:
      { a: 1, b: 2, c: 3, }
    • Alternative for Opera and IE6:
      { a: 1, b: 2, c: 3 }