Peat’s Reader on Twitter

June 19th, 2009 - Comment »

I’m posting articles from my daily reading to the @peatsreader account on Twitter.  The pieces are culled from my daily reading of several hundred news feeds, covering photography, architecture, economics, street art, software development, comics, and other odd topics that tickle my fancy or get me thinking.

It’s pretty low flow — 10 to 15 articles per day, and throttled at one tweet per hour to keep things fresh.

This is an experiment in combining three of my favorite activities:  I read voraciously, I enjoy sharing my interests with other people, and I tinkering with software and the Internet for a living.  Between my career and my family, I don’t always have time to blog or tweet or comment on the specific articles I enjoy, so I’ve written a tool that scrapes my reading list and publishes the notable articles for me.

For those of a technical persuasion, here’s how it fits together:

I use Google Reader to consume and organize hundreds of news feeds.  When I see an article I like, I share it on my public feed.  The tool checks the feed for new articles, and every hour one of the shared articles is published to the @peatsreader account.  Hooray for automation!

I’ll be happy to share the Ruby source on GitHub if there’s any interest.  In the meantime, follow @peatsreader and let me know what you think.

Speaking at WebVisions 2009

February 5th, 2009 - Comment »

I’m very happy to announce that I’m speaking at WebVisions 2009.

Serving the Next Billion” is an hour long session about the perspective that people from developing nations bring to the Internet, and how web nerds can help improve the parts of the world that need it most.

Empowering the forgotten people of the world is one of the greatest challenges to humanity, and one I’ve struggled to reconcile with my profession as a software developer.  But I have hope:  the Internet is converging with billions of people, and it’s an unprecedented opportunity for people like me (and you) to connect with and learn from the rest of the world.

I also excited about being featured on a web page in close proximity to Mark Frauenfelder.

So, put it in your calendar:  WebVisions runs from May 20th to 22nd here in Portland.  I’ll be doing my thing on Friday morning at 9:00, and I hope to see you there!

Gamblin’ Man

February 4th, 2009 - 4 Comments »

This is one of the finest jokes I’ve read in a long time.  I wonder what this says about me.

Alvin is working in his store when he hears a booming voice from above that says, “Alvin, sell your business!”  He ignores it.  The voice goes on for days saying, “Alvin, sell your business for three million dollars!”  After weeks of this, he relents and sells his store.

The voice says, “Alvin, go to Las Vegas!”

Alvin asks why.

“Alvin, just take the three million dollars and go to Las Vegas.”

Alvin obeys, goes to Las Vegas, and visits a casino.

The voice says, “Alvin, go to the blackjack table and put it all down on one hand!”

Alvin hesitates but gives in.  He’s dealt an eighteen.  The dealer has a six showing.

“Alvin, take a card!”

“What?  The dealer has …”

“Take a card!”

Alvin tells the dealer to hit him, and gets an ace.  Nineteen.  He breathes easy.

“Alvin, take another card.”

“What?”

“TAKE ANOTHER CARD!”

Alvin asks for another card.  It’s another ace.  He has twenty.

“Alvin, take another card!” the voice commands.

I have twenty!” Alvin shouts.

“TAKE ANOTHER CARD!” booms the voice.

Hit me!” Alvin says.  He gets another ace.  Twenty-one!

And the booming voice says, “Un-fucking-believable!”

It’s from a little book with a big name, “Plato and a Platypus Walk into a Bar: Understanding Philosophy Through Jokes.

Highly recommended.  Go get it.

RPX in Action

December 5th, 2008 - 8 Comments »

RPX is a service from JanRain that makes it easy to accept OpenIDs for your web app.

Why is RPX useful?  Aren’t there a bunch of OpenID plugins out there for [favorite language] or [preferred web development framework]?

There are a lot of libraries and plugins for a lot of platforms, but most of them have three problems: complexity, incompatibility, and poor usability.

The Old Way

Complexity:  Most of the existing tools require you to build database tables and maintain extra libraries on your production systems. I like to avoid tools and libraries that step on my schema and cause extra maintenance work, and I expect you do too.

Incompatibility:  Most current tools don’t fully support OpenID 2.0, which is a deal buster when you’re trying to build a site for anyone who wants to accept i-names or directed identities.

Usability:  Existing plugins don’t usually provide a user friendly interface for the vast majority of people on the web. User experience matters, and it’s nice to get a helping hand when it’s available.

RPX solves these issues in one swoop — it’s mercifully simple, feature rich, and user friendly.

Did I mention free? That’s nice, too.

Seeking Simplicity

Here’s what it takes to get RPX running with your app:

  • A free account on rpxnow.com (premium accounts are available if you need extra features).
  • A dab of Javascript on your login page (provided by rpxnow.com, example below).
  • A few lines of code on your server side application (example below).

It took me less than half an hour to get it running the first time.

Feature Rich

Full support for OpenID 2.0 is a great thing — and not having to worry about future OpenID enhancements is even better. But wait, there’s more: RPX provides authentication statistics, a testing tool, and a well documented API. It also lets users authenticate with their Facebook and MySpace profiles. It’s the gift that keeps on giving.

User Friendly

RPX provides your visitors with a an attractive dialog that ushers them through the OpenID authentication process. Even if they don’t know what OpenID is, there are big friendly buttons that will help them use their accounts at Yahoo, AOL, Google, Facebook, or MySpace. As more providers come online, RPX will update that interface on your behalf.

How Does It Work?

In a nutshell, RPX is a hosted service that handles the nitty gritty of the OpenID authentication process for you. The only work for you is fetching the authentication information from the RPX server.

The flow looks something like this:

  • I come to your web app and click the link to login.
  • The RPX interface pops up and prompts me for my OpenID.
  • After I authenticate with my OpenID provider, the RPX server directs me back to your app with a unique token.
  • Your app queries the RPX server with that token, and gets my authentication information in return.

Pretty straight forward. What’s that look like in code?

A specific example (with Rails) looks something like this:

The view (HTML + JS):


<a class="rpxnow" onclick="return false;" href="https://your-com.rpxnow.com/openid/v2/signin?token_url=http://your.com/rpx">Sign In</a>

<script src="https://rpxnow.com/openid/v2/widget" type="text/javascript"></script>
<script type="text/javascript">
  RPXNOW.token_url = 'http://your.com/rpx';
  RPXNOW.realm = "mysite.com";
  RPXNOW.overlay = true;
</script>

The token_url in the link and the javascript points to a URL on your site, and the RPXNOW.realm is your OpenID authentication realm (typically the root URL for your site).

Rails handler at http://your.com/rpx:


rpx_token = params[:token]

rpx = Net::HTTP.new('rpxnow.com', 443)
rpx.use_ssl = true
path = "/api/v2/auth_info"
args = "apiKey=#{RPX_API_KEY}&token=#{rpx_token}"
http_resp, response_data = rpx.post( path, args )

rpx_data = JSON.parse( response_data )

Briefly stated, this code:

  • Collects the token parameter from the user’s request after they authenticate.
  • Performs an HTTPS POST against the RPX server containing that token and a secret API key.
  • Parses the JSON response into a usable format — in this case, a hash named rpx_data.

This isn’t limited to Rails, of course. Every major development language and web framework can set up an HTTPS connection and parse JSON … and if JSON isn’t your style, you can get an XML response instead.

Real World Use

This morning I converted the OpenID Foundation’s membership website to use RPX, and ditched the old plugin I hacked up to support the OpenID 2.0 features. If you’re interested in seeing it in action head on over to their site: https://openid.net/foundation/members

I also encourage anyone who’s interested in the future of OpenID to become a member. Individual memberships are cheap, and the pay off is big — you can participate directly in the election of board members, review and ratify specifications, and participate in working groups.

Feedback

Still confused? Know of a better solution? Leave a comment, let me know!

Criterion, Netflix, The Auteurs, Film Nerdery

November 26th, 2008 - 2 Comments »

I came up for a gasp of recreational Internet surfing this afternoon, and found myself on the Criterion Collection site. Criterion puts a ton of money and effort into restoring and releasing classic films on DVD (and Blu-Ray soon enough) — including two of my favorites, Seven Samurai and Hard Boiled. Basically, if you’re a film nerd, you should buy everything Criterion produces, and if you know a film nerd, Christmas is right around the corner.

Two things got me excited on their site. First, they’re opening an online cinema. For $5 you can watch a movie as often as you like over the course of a week, and those greenbacks get credited to your account if you want to purchase the real deal to play on your home entertainment system. I’m a little skeptical of the quality of the streamed video — if it’s anything like Netflix, it’ll be chunky and pause to rebuffer right when you wish it really wouldn’t — but bandwidth keeps getting better so I’m sure it’ll be fast and fluid in the near future.

Which gets me to Netflix. I think I pay $9/mo. for the basic unlimited package, but I still get to stream as many movies as I like. Great for casual movie nights. I’m looking forward to when The Sopranos become available. The only downside is the above mentioned streaming quality. When it’s running, it’s pretty darned good … but after 15 minutes the network will crap out and I’ll have to grab a drink while the buffers refill. My inside man at Netflix swears up and down it’s a problem with Comcast and their throttling policies. Boo.

Anyhow, back to my original story of clicking around on the Criterion site. I’m super excited to see them working with The Auteurs, a social networking site for film aficionados that has been in the works for over a year. Hats off to Efe Cakarel for seeing it through. The world desperately needs an alternative to the eye-gougingly terrible IMDB forums.

Alright. Back to work for me. Gotta tie up some loose ends before Turkeyfest 2008.

Sharing News With Google Reader

November 4th, 2008 - Comment »

Last month I (finally) switched from NetNewsWire to Google Reader. It works great from the desktop or the phone, but the feature that really motivated me to switch is sharing articles that are particularly entertaining or enlightening.

Here’s Peat’s shared items. You’ll probably notice I’m a fan of Boing Boing, Make Magazine, and a heap of odd nerdly things.

Feedburner says most of the people who read my blog are also using Google Reader, so if you’re sharing articles, I’d love to read ‘em!

My Bailout Contribution

September 29th, 2008 - 1 Comment »

100 Billion Dollars

Long Now Foundation

September 29th, 2008 - Comment »

If you’re interested in listening to some really fascinating lectures, check out the Long Now Foundation podcast. The goal of the Long Now Foundation is to promote long term thinking — where long term is on the order of 10,000 years. They’ve rounded up some really fascinating people, including Peter Diamandis (the X-Prize founder), Brian Eno, the Dyson siblings, Bruce Sterling, Ray Kurzweil, and dozens of others.

There’s around 50 lectures currently available. Definitely worth checking out.

Who’s Bailing What?

September 26th, 2008 - 8 Comments »

I’m starting to think that that the greedy assholes who got us into this financial crisis are the same ones who are saying “trust us, we know how to fix this, all you have to do is give us your money.”

I’ve been trying to sort out a pretty simple question:  when the government starts cutting fat checks to financial institutions … who is getting the money, and why?

Seriously.  I don’t want to hear “it protects the integrity of the financial system” because that explains nothing.  I haven’t seen any clear explanations of how this bail out works.  The media is worthless on the topic.  Every time I read an “analysis” I end up with the same question:  who’s getting my money, and why?

The only concrete facts I’ve found are in the bailout proposal. Simply put, it authorizes the Secretary of the Treasury to buy mortgages with no strings attached and no oversight, while protecting him against any legal or administrative review. Not particularly confidence inspiring. [update: thankfully, the proposal has been amended to provide some teeth and oversight]

Following the dollars doesn’t get me anywhere either. First, I pay my taxes. Second, a guy who demonstrably sucks at at fiscal policy uses his best judgement to buy bad debt from a herd of banks. Then what?

I really hope I’m missing something here, because it looks like the people who caused this entire crisis are still in the pilot’s seat, are still making a grip of cash, and are being relieved of the problems they created, all at my expense. I don’t see any incentive for reform in the private sector, and I don’t see any incentive for the government decision makers to behave responsibly.

To be clear, I’m not trying to be a negative nelly, and I really don’t have a problem with paying the money.  If my share of the $700B helps prevent us from returning to a financial stone age and a banking monopoly, I’m all for it.  I just want to have some confidence that there are sound economic principals behind the actions, that there is a reasonable system of checks and balances to help protect against further abuse, and that the dickheads who got us into this mess aren’t buying new yachts.

I hope my economic angst can be soothed by the collective intelligence of the Internet. Or, more likely, one of my friends who works in the financial sector and has an educated opinion on the matter.

Who’s getting the money, and why?

250,000

September 24th, 2008 - Comment »

Yesterday, a quarter million people in Africa joined the global communication network when they bought their first mobile phone.

The number of new mobile phone accounts has been growing at a rock solid 10% per quarter for the last five years — an exponential growth curve. If the trend continues, 80% of Africans could have a mobile phone within the next three years. That’s half a billion new people gaining the ability to instantly communicate beyond their immediate surroundings, to share news, to conduct businesses, to connect with people anywhere in the world — not just through voice, but also through data: SMS, e-mail, and the web.

Of course there are political, cultural, and technical issues to be overcome to maintain this phenomenal growth rate. The curve will inevitably flatten and slow as the market saturates.

Never the less, another quarter million people will become connected today.

And tomorrow.

And the day after.

What is this leading to?