intertwingly

It’s just data

RESTful Web APIs

Mike Amundsen: I have the even greater privilege of working with Leonard and Sam on a new book - “RESTful Web APIs”. It’s scheduled for completion by the end of Q1 2013 and should be available soon after.

While I’m formally on this project, I’m not planning on doing any writing beyond possibly an introduction.  As Mike put it, this book isn’t merely a 2nd edition, but rather more of a “follow-up” seven years on.  I’m very much looking forward to seeing where Mike can help Leonard take this work.


Feedvalidator.org Hacked?

Google has reported feedvalidator.org as being hacked, and people are tweeting and emailing me.

I’ve looked at the markup being returned and it looks clean to me.  The .htaccess file looks fine.  A git status command shows that none of the files on the server have been modified.

Can somebody identify what is causing Google to be concerned?


Changing the TAG

Peter Linss: I really want to see the TAG be more involved with the rest of the working groups at the W3C

I’ll come out and say it.  I’m a skeptic.  I’ll note that the three out of the four of the “TAG reformists” statements do NOT list getting involved with the rest of the working groups at the W3C as a goal.  What am I missing?

...


Time Warner Cable’s idea of “service”

It started with two notifications we received via postal mail.  First Time Warner was going to start charging us rent for an outdated cable modem.  Second they were going to drop a number of cable channels, but if I acted now, I could request a digital adapter which would allow me to watch these channels on exactly one TV.

This process has turned a fairly complacent Time Warner customer into one that is actively seeking alternatives.  In looking around, I see plenty of promo offers of more service than I have (basic cable and basic internet) for considerably less than I am currently paying.  I am OK with waiting an hour or more for an answer, but I am not OK with having to be on hold for that entire time.  And I’m definitely not OK with renting a separate box per device simply to get access.

This process has turned a fairly complacent Time Warner customer into one that is actively seeking alternatives.  So I am beginning my research: starting with looking for alternatives to cable TV.  What I want is a single plan that allows me to watch whatever I want wherever I want.  I am OK with upgrading my devices as long as we are talking about a purchase not a lease.

Any pointers people might leave in comments would be appreciated.

...


In defence of Polyglot

I see that Henri Sivonen is once again being snarky without backing his position.  I’ll state my position, namely that something like the polyglot specification needs to exist, and why I believe that to be the case.

It makes sense for authors who may produce a handful of pages to be processed by an uncountable number of imperfect tools to agree on restrictions that may go well behond the minimal logical consequences from normative text elsewhere if those restrictions increase the odds of the document produced being correctly processed.

Such restrictions are not a bad thing.  In fact, such restrictions are very much a good thing.

...


Web Platform Docs

Doug Sheppers: WebPlatform.org will have accurate, up-to-date, comprehensive references and tutorials for every part of client-side development and design, with quirks and bugs revealed and explained. It will have in-depth indicators of browser support and interoperability, with links to tests for specific features. It will feature discussions and script libraries for cutting-edge features at various states of implementation or standardization, with the opportunity to give feedback into the process before the features are locked down. It will have features to let you experiment with and share code snippets, examples, and solutions. It will have an API to access the structured information for easy reuse. It will have resources for teachers to help them train their students with critical skills. It will have information you just can’t get anywhere else, and it will have it all in one place.

But it doesn’t. Not yet.


The Flowing Standard

Robin Berjon: Looking at it in terms of rebounds, plot twists, nurtured healing and abandonment, love and betrayal, strife, toil, stunning victories, dispersions and last minute rallies the only thing that distinguishes HTML’s history from a charts-topping teenage fantasy saga seems to be the lack of vampires. And even then, were vampires around I’m not sure we’d notice them for all the action.


Taming the wild, wild web

Bill McCoy: EPUB in effect takes the Wild, Wild Web and tames it. EPUB for example requires use of the XML serialization of HTML5 (XHTML5), rather than “Tag Soup” aka “Street” HTML. This means that EPUB content, unlike arbitrary web pages, can be reliably created and manipulated with XML tool chains. EPUB defined Reading System conformance more tightly than HTML5 defines for browser User Agents, pinning down things that are under-specified in the union of W3C standards. [via Patrick Mueller]


Inhibiting Suspend

The interface is a bit low level, but workable:

require 'dbus' # gem install ruby-dbus
bus = DBus::SessionBus.instance
sm = bus.service('org.gnome.SessionManager').object('/org/gnome/SessionManager')
sm.introspect
sm.default_iface = 'org.gnome.SessionManager'
cookie = sm.Inhibit($0, 0, 'inhibiting', 4).first
at_exit { cookie = sm.Uninhibit(cookie) if sm.IsInhibited(4).first }

Note: the call to Uninhibit is optional — it will occur on process exit anyway.

Hat tip to JanuZ.


utf8mb4

Jacques Distler: Remarkably, even after a decade of such pain, Unicode is, in 2012, still “cutting edge.”

Ouch.


Ubuntu 12.04 and Ruby 1.9.3

I previously had installed Ubuntu 12.04 on a NetBook, and my overall impression was simply that it was more stable than its predecessor — particularly for Unity.

For the first time I tried it on a desktop, and to my surprise the following worked:

sudo apt-get install ruby1.9.3

And by worked, I mean not only did it install Ruby 1.9.3, but it made it (and gem, and irc) the default ruby.

For those that still use rvm, (many of the ‘cool kids’ have moved on to rbenv, I noticed a few niggles

...


Prefixed no more

Firefox 13 for developers: Support for -moz-border-radius*  and -moz-box-shadow has been removed. Authors should use unprefixed border-radius or box-shadow instead. See bug 693510

+1


Twitter -= #!

Dan Webb: The first thing that you might notice is that permalink URLs are now simpler: they no longer use the hashbang (#!). While hashbang-style URLs have a handful of limitations, our primary reason for this change is to improve initial page-load performance.


WebSocket Demos

W

chat implements a shared textarea field across multiple clients.  Demonstrates bi-directional communication.

diskusage is more typical of my usage.  The du command produces tabular output that the user may want to sort different ways and yet is may take considerable time to complete.


Wunderbar on Rails

W

Usage: add wunderbar and nokogiri to your Gemfile and run bundle install.  Template extensions supported are _html and _json.  Examples: view, layout, json.

Note that as Rails layouts and views are predicated on the assumption that output is produced by concatenating text, one must use _ yield instead of simply yield.  On the plus side, Wunderbar will note when the first argument to a call which creates an element is html_safe? and will treat it as markup.

...


Wunderbar now does Sinatra

W

Demo

The result is a lot like Markaby, except you get to be/have to be explicit when you are creating a tag.  In this demo, there is no logic, so the benefits of doing so are less clear, but include you being able to use tags that aren’t known to Markaby, like the ones that were added in HTML5.  Both inline and views are supported, but support for layouts has yet to be added.

Future plans include Rails.

...


Hacked

This site was hacked.  A reader of the site noted that Google’s index of this site had been co-opted by dubious pharmaceutical offerings.  I’ll gladly thank that individual publicly if they give me permission to do so; but my email reply got bounced as spam.

The immediate culprit was the addition of the following lines to a number of .htaccess files

...


Improved Wunderbar JSON support

W

I’ve integrated jbuilder like functionality into Wunderbar.  Key differences?  A DSL that doesn’t suck, and output that isn’t ugly.

To harsh?  You be the judge.  Compare jbuilder ("json dot bar json bar json dot child bang") vs Wunderbar ("underbar underbar underbar underbar").

As to the output?  Don’t be fooled by the jbuilder readme.  In actuality is no unnecessary whitespace in the output.  That’s good if you are bandwidth limited.  Not so good when viewing the XHR traffic via firebug...


Keeping it on the Rails

It is increasingly becoming the case that Agile Web Development with Rails is being actively co-developed with Rails itself.

While my tests have been an official part of the release process for a long time now, yesterday’s release of 3.2.3RC1 provides a number of examples that illustrate this.

The intent is to prove an updated to the eBook free of charge which incorporates the necessary changes, either concurrent with the final release of 3.2.3 or shortly thereafter.

...


Hearing Aid

I now have an open fit hearing aid device for my left ear.  That ear has experienced tinnitus for approximately 10 years.  An ABR test given at that time found nothing.  My hearing loss is primarily in the 2000 Hz and above.

Last night, I went to dinner with my wife in a noisy restaurant and I could hear every word she said.


Your Next Desktop Could be a Phone

Henri Sivonen: This getting interesting: Using an Android phone as an Ubuntu desktop when docked

Definitely Want.

Especially love the idea of sending and receiving texts from my desktop.  Would prefer a dock the size of a mac mini with a hard drive, USB and ethernet ports.


Mulligan

Dan Webb: I’m in charge of undoing twitters hashbang URLs

+1


OpenID upgrades

As a part of my server move, I’ve upgraded my consumer logic to Python openid-2.2.5 and provider from phpMyID to SimpleId 0.8.1.  In theory, I should now support OpenID 2.0.

The one small API change I noted in this process is in the consumer.  server.complete now needs an additional returnto parameter.


WunderWiki

W

I added a simple wiki as a demo for WunderBar.  It demonstrates shelling out to handing multiple URIs, handing get/post, dealing with both unescaped text and markup, shelling out to commands, AJAX, CSS, jQuery.

The demo relies on git and rDiscount to do the version control and markup processing.  It also doesn’t have all the features that you would expect from a wiki, such as conflict detection and resolution.


Twelve Steps

Jeni Tennison: it became clear that there were several places where having some kind of standard method for building a tree from non-well-formed XML would be beneficial...So the XML Error Recovery Community Group has been set up for this purpose.


On The Move...

Intertwingly.net is moving to DreamHost.  I’m sure that every one of my scripts has hard coded paths or depend on the server being in EST/EDT or will otherwise break for unanticipated (but in retrospect entirely obvious) reasons.  I don’t believe that I will lose any email in the process, but you never know.

My @apache.org email address will not be affected by this move.


Dominoes

Alex Russell: @glazou being entirely reasonable in the face of vendor-driven CRAZY (implementing other people’s prefixes): glazman.org/weblog/dotclea… Via @phae.

Alex, I think you need to move up the food chain a little.

The root-cause is vendor-driven advocacy directed at content producers which encourages them to produce compelling content using experimental features.  Everything else is consequences.  If you believe that those consequences are CRAZY, then you must conclude that the root-cause is CRAZY.


Default to Incognito

Patch for /usr/share/applications/google-chrome.desktop:

108c108
< Exec=/opt/google/chrome/google-chrome %U
---
> Exec=/opt/google/chrome/google-chrome %U --incognito
114c114
< X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
---
> X-Ayatana-Desktop-Shortcuts=NewIncognito;NewWindow

Wunderbar

W

Clearly if you want to develop a real web application, you need a router, a templating language, ability to separate out your model, view, and controller, scalability, and much more.

However, at times this is both too much, and yet not enough.  I find that I write a lot of scripts that do report generation, execution of shell commands, and the like, and in many cases would like to present a richer output than plain text: things like tables, fonts, and most importantly hypertext links.  I’ve been extracting some of the common logic from these scripts out into a library, and recently have started refactoring that library.

...


Port Forwarding

Problem: I’m not always at the machine that is VPN’ed into work.

Solution: place the following into /etc/network/if-up.d/sametime-forwarder:

#!/bin/sh
#
# redirect Sametime's port 1533 to messaging.ibm.com
#
echo 1 > /proc/sys/net/ipv4/ip_forward # turns on forwarding
iptables -F -t nat # Flush existing translation tables
iptables -t nat -A PREROUTING -p tcp --dport 1533 -j DNAT --to 9.17.136.77:1533
iptables -t nat -A POSTROUTING -j MASQUERADE

AWDwR updated for Rails 3.2

P P

David Heinemeier Hansson: there’s a brand new 3.2-compatible version of Agile Web Development with Rails.

This time, the release of Rails 3.2 and the release of the eBook were coordinated.


The President’s challenge

SOPA

Nat Torkington: Don’t wait for the time machine, because we’re never going to invent something that returns you to 1965 when copying was hard and you could treat the customer’s convenience with contempt.

Take action.


Bootstrapping Debian Unstable

It turns out that the following is all it takes to install Debian Unstable in a chroot jail under Ubuntu, and then to log into that jail as root:

apt-get install debootstrap schroot
mkdir /tmp/unstable
debootstrap unstable /tmp/unstable
chroot /tmp/unstable

...