Beutelevision

by Thomas Beutel

RSS Has Been Replaced By Twitter

I’ve been playing with Flipboard the past few days and a thought occurred to me. RSS has been replaced by Twitter.

Flipboard is a compelling concept… it displays news from your Facebook account and any number of Twitter accounts in a magazine style format. That means large Helvetica headlines, easy to read Times content, and lot’s of photos.

But it doesn’t (yet) support RSS feeds as a source. Flipboard says they will at some point.

I wonder though if it is even necessary. I wanted to create sections for some of my favorite sources… Jay Rosen and Dave Winer for media commentary, Techmeme for tech stuff, and Against Dumb, for variety.

It turns out that they all have Twitter accounts. Those accounts typically link to all the same content that their RSS feeds do. Often more, because they will contain links to content that the authors find interesting, but that don’t appear in their RSS feeds.

And guess what. Twitter accounts are much easier to work with than RSS. Here’s why:

  • Twitter accounts have names that are easy to find, remember and refer to. People can even talk about them.
  • RSS feeds are links. They are technical. No one talks about them in normal discourse.
  • Posting to Twitter is easier than adding to RSS. Even with Wordpress around.
  • Twitter accounts are easy to aggregate into lists.

I understand that Twitter has a different intent than RSS, and that RSS provides much of the foundation of information flow on the internet.

But I just wonder if Twitter is ending up to be a much easier way to say “here’s what’s new… and interesting”. And if it’s easier, then why use RSS?

Why tether? Just build iPad’s data plan into EVERY Apple product!

Now that the iPad 3G will come with the option of a month-by-month no-contract data plan, why not offer all Apple products with that option? I would buy a new MacBook in a heartbeat if it offered the same sort of data plan.

Detecting a click in a checkbox with jQuery

A simple script to detect when a checkbox is clicked. What you do with once you’ve detected the click is up to you.

 <html>
 <head>
 <script src="http://www.google.com/jsapi"></script>
 <script>
 google.load("jquery", "1.3.2");
 google.setOnLoadCallback(function() {
  $('#agree').click( function() {
    if($(this).attr('checked')){
      alert('checked');
    }
    else{
      alert('unchecked');
    }
  });
 });
 </script>
 </head>
 <body>
 <p>
 <input id="agree" type="checkbox" /> I agree
 </p>
 </body></html>

Redirect from within a Wordpress admin page

I was trying to perform a redirect to generate a CSV file from within a Wordpress admin page using the wp_redirect( ) function, but the problem was that I would always get the dreaded “Cannot modify header information – headers already sent” message. This is because admin plugins are simply hooks that are performed within the framework of the admin system.

The solution was to use a Javascript redirect. The Javascript attaches an event listener to listen for the “load” event. When the admin page is finished loading, a page containing the CSV data is loaded. That page has a Content-Type of application/csv, so it downloads immediately, leaving the admin page open (at least in Safari 4).

In my Wordpress admin panel (this is a fragment of a plugin):

   // setup Javascript redirect
     $location='/wp/csv-output/?year='.$year.'&month='.$month;
 ?>
 <script>
 function addListener(element, event, listener, bubble) {
  if(element.addEventListener) {
    if(typeof(bubble) == "undefined") bubble = false;
    element.addEventListener(event, listener, bubble);
  } else if(this.attachEvent) {
    element.attachEvent("on" + event, listener);
  }
 }
 addListener(this, "load", function() { window.location="<?php echo $location ?>" });
 addListener(document, "load", function() { window.location="<?php echo $location ?>" });
 </script>

And in my CSV page (again, just a fragment):

   ob_end_clean();
   header("Content-type: application/csv");
   header("Content-Disposition: attachment; filename=contact_data_$year_$month.csv");
   header("Pragma: no-cache");
   header("Expires: 0");

I found the javascript code here.

Result of expression ‘document.forms[0].submit’ [[object HTMLInputElement]] is not a function.

I was trying to add a small delay into my form submission like so:

<form ... onsubmit="setTimeout('document.forms[0].submit()',2000);return false;">

but everytime I tried it, I got the following error:

Result of expression 'document.forms[0].submit' [[object HTMLInputElement]] is not a function.

This one had me stumped, until I realized what it was telling me… that my submit button was named “submit”.

<input type="submit" name="submit" id="Button1" />

I changed the name of the submit button and the problem went away.

<input type="submit" name="button1" id="Button1" />

Basically, Javascript provides a “convenience” by adding the names of the form inputs as children of the form. But this then clashes with preset function names, like the submit() function.

It’s like deviantART meets the App Store

mayhemJohn Fort over at the Big Tech Fortune blog writes about Tyrese Gibson’s Mayhem which is the first digital book for sale on iTunes 9. This strikes me as something that would interest the deviantART community of digital artists and writers. Imagine selling your artistic creations to millions of iTunes users for $0.99 a pop, just as iPhone app writers have been doing at the App Store. Good for artists. Good for Apple.

John mentions that the tools to create the e-book is based on standard web tech: HTML, CSS, and Javascript. My guess is that some day, not too long from now, we will see something like Pages (or maybe GarageBand) for iTunes where you can create your own digital creations and submit them to the iTunes store. It will probably dwarf the App Store in total volume.

Update: ReadWriteWeb has more to say about this.

iTunes 9: Option-click the green button to get the mini-player

The first thing I noticed when I upgraded to iTunes 9 was that clicking the minimize (green) button no longer selected the mini-player. A quick search revealed the answer: now you have to option-click the green button to get the mini-player. Thanks to Maclife for the answer.

miniplayer

RSSCloud: No need to adjust your firewall

I’ve been following the recent development of RSSCloud with interest… I think it has the potential to replace Twitter in the long term, although I suspect that Twitter might also evolve in the direction of RSSCloud.

One misconception about RSSCloud is the supposed need for the cloud to notify the desktop or mobile reader of an update. This would seem to mean that you would have to adjust your firewall to accept inbound connections to your computer/mobile device.

While the implementor’s guide shows that the cloud does notify the aggregator, the aggregator doesn’t have to be the same as the reader. As the guide suggests, the aggregator can also be in the cloud, with the reader opening an outbound connection to the aggregator, in the same way AIM or Skype or Jabber clients do, using protocols like XMPP. No need to adjust your firewall.

For that matter, Twitter clients do the same thing, using HTTP REST calls. The only difference is Twitter limits the number of API calls per hour (currently 150 requests per hour, or 2.5 requests per min–close enough to realtime for me), while there are no limits with XMPP. The tradeoff is arguably one of simplicity – is your client easier to implement with one or the other?

Hopefully the folks working on RSSCloud are developing an example of a cloud aggregator and an associated protocol. My vote would be for the protocol to be REST-based, but I could be convinced otherwise.

Using jQuery and Prototype together while avoiding the dreaded element.dispatchEvent error

Here is what I do to avoid the dreaded “element.dispatchEvent is not a function” error. I load jQuery first, Prototype second, and then I use jQuery( ) instead of $( ) for all my jQuery calls.

 <!--  Set up jQuery and prototype together  -->
 <script src="http://www.google.com/jsapi"></script>
 <script>
 google.load("jquery", "1.3.2");
 google.load("prototype", "1.6.0.3");
 google.setOnLoadCallback(function() {
  jQuery('#helphide').hide();
  jQuery('#helpbutton').click( function(){
    jQuery('#helphide').toggle();
 });
 });
 </script>

Using Skype to control a model train

Small wireless spy cameras are widely available, and there are even a few available specifically for HO-scale trains.

This got me to thinking about letting my cousin in Germany run a train on my train layout, using Skype. Why not? Connecting the camera receiver to my laptop is easy and Skype allows you to select the camera source for video chats. For controlling the train, I can use the open source JMRI framework.

The only integration problem to solve is how to expose the throttle controls to my cousin. I could hack something together on a web page and have him work the controls there.

But is there a way to build this on top of Skype? After all, Skype supports instant messaging, so throttle commands could travel back and forth over IM. Skype offers an API, but I haven’t yet delved deeply enough to know what kind of applications I can build on top of Skype.

More soon.