Singpolyma

's Profile

Author Archive

Web Actions or Browser Actions?

Posted on

Tantek Çelik recently blogged about the growing popularity of “Web Actions” or “Web Intents” or “social media action button logo things”, whatever you prefer to call it. His article is great summary of some history and the current landscape. What interested me most, however, was when he got to listing the common action types he’s discovered: later, save, props, share, follow.

I got to thinking about that last one because it’s been around for so long. Follow. How do we implement the follow button in an IndieWeb way? Well, we’ve been doing it for years. If you link to a feed, sane web browsers (or Chrome with an extension) will go “ooh, a feed! Do you want to follow this?” Better yet, with the right metadata you don’t even need a follow button in your web UI, the browser will make one for you. Awesome.

What about the other actions? What about save/readlater? Oh… that’s bookmarking. We’ve had that in our browsers even longer than feed buttons. Someone is going to argue that they want to save their stuff at some web service instead of in their browser, but integrating the browser’s bookmark function/UI with alternate services is a practice as old as del.icio.us. Awesome.

Two left: props and share. If you want a pretty good argument on why these should always been the same action, talk to Ilya Grigorik. Browsers (at least Firefox) currently have a sort of old and weak share function: “Send Link”, which sends a page by email. Is there some sort of good solution for these actions that takes place in the UA (where it belongs, and has access to the user’s preferences for UI and service) instead of in-web-page hacks?

PS. you’ll note that this in-UA strategy saves us from the NASCAR problem of having a seperate button for every action on every service 🙂

Distributed Comment UI

Posted on

I’ve been thinking today about distributed commenting. Better known as @replies. This is the idea where the comment author can have the option to own their comments on a blog post by having them syndicated through a provider of their choosing. They may show up on the target site as well, but the comment author owns the permalink.

Of course, we’ve deployed the technology to solve this. Salmon. I haven’t quite got this blog enabled yet (any day now), but when I do you’ll be able to comment here from your own site or a StatusNet or RStatus instance. It’ll show up here, and I’ll be notified, but you own the permalink.

This was possible before Salmon, using Trackbacks, but Salmon is much more robust and delivers the full content of the comment to the target site so that it can be properly syndicated.

You may not want all your comments on other sites showing up in your “main stream”, depending on the services you use and how they’re configured. That’s fine. That’s a UI problem on your provider’s end, and there are many ways to solve it (allowing a post to be marked “do not publish to main stream” seems the easiest).

Now for the hard part: UI. You don’t want to flip over to another site or app to comment. So unless you’re using one of the super aggregators that does not yet exist with built-in Salmon magic, what do you do? The site author needs some way to let you comment with UI here, but authenticated as yourself and with content owned by your provider.

Thankfully, we have OAuth, AtomPub, and discovery protocols. They’re a bit of a mess (everything that evolves over time is), but it’s slowly stabalizing and I can already reccomend some best practices. Ask the user for their WebFinger ID (use a nicer way of asking, ofc 🙂 ) — this could be singpolyma@identi.ca, or http://identi.ca/singpolyma, for example. If WebFinger discovery fails and you can interpret the ID as a URL (you probably can), then hit that. If it succeeds, check for a type=”application/atomsvc+xml” link. That’s your AtomPub endpoint. OAuth does not yet have a WebFinger-compatible discovery mechanism, so attempt OAuth discovery on the URL you have, the AtomPub endpoint, and the rel=http://webfinger.net/rel/profile-page link in the WebFinger result.

You now have an AtomPub endpoint and an associated OAuth endpoint. Unfortunately you may need to be set up to do OAuth with this particular provider, so we may be stuck (though you can always try a blank consumer token/secret pair, since more and more sites are supporting that). If you can get authorization, then you’re done.

While this seems complicated on a technical level, the UI is all very simple. You ask them where they blog, they tell you, you find out if they are set up to handle this and if so, you send them through an OAuth loop. You store the OAuth result in a cookie (maybe only if they checked “remember me”) so that you don’t have to do it a lot. When they post a comment using your comment forms, instead of saving the data you send it off to their site via AtomPub with an in-reply-to value set as your post. Poof.

A Small Extension

Assuming you followed all that, there’s one more thing you might want to do. You as a publisher might want to host all your comment data on some other site (say, identi.ca). With the above setup you can (just set in-reply-to correctly and you can do anything), but what about users who don’t have their own blog/microblog somewhere? For these users it should be fairly simple to set up a dummy/anonymous Salmon service, that gives OAuth automatically to anyone who asks and then sends Salmon slaps of content it receives over AtomPub. An AtomPub-to-Salmon proxy, if you will. Users who comment and don’t have an ID just have their content pumped through there, and you don’t even have to host anything! Awesome!

µsearch: Search ALL the Microblogs!

Posted on

It’s really great that we’re slowly seeing multiple microblogging platforms crop up. One of the problems with federating all our data across the web, however, is that there’s no way to really track what’s going on. No way to search. If all you care about is Twitter you can use search.twitter.com, and identi.ca and others similarly have their own search for one site, but where is the central search option?

Well, it turns out that it’s really not that hard to build one. Using the powerful libre Xapian full text index solution and PubSubHubBub, a microblog search engine doesn’t even need a crawler.

I’ve launched an early version of this over at µsearch.singpolyma.net or the easier to type musearch.singpolyma.net. To seed content there is a script polling identi.ca and rstat.us periodically, until they implement a PSHB firehose, but any microblog site can get itself added by just adding PSHB feeds with the box on the homepage.

I make no promises at this point about the quality or longevity of the data in the search engine. Please report any issues or features you would like to see.

Of course the source is available under the ISC license. Feel free to submit patches!

Query Syntax

Just typing words will search all the metadata and content of posts for those words. Searching in quotes will search for a phrase. You can also prefix words or phrases with a field name to search only one bit of metadata. The currently indexed fields are:

  • content
  • category (like hashtags)
  • in_reply_to
  • bookmark (permalink)
  • author
  • to (mentioned users)

Dystoparx — Part 12

Posted on

“Bill.”

His name is echoing somewhere outside his head. Someone is talking to him. Maybe. He is somewhere, yes? In a meeting? He’s been taking calls from the lobbyists again. Seems the lobby is quite interested in some recent action in Parliament.

“Bill.”

Oh. Yes. The meeting. Wake up, answer the man.

Uh… which man? Oh, just speak to the room. “Yes.”

“Looks like we lost you there for a second.”

Bill is right out of it. The sounds are making sense to his brain now though. Someone is talking to him. He can do this. Focus. “Sorry, I’ve just had a lot on my mind recently.”

A smile comes back in the voice, “That’s understandable. You’ve been busy.”

Bill can see now. He’s in the board room. Meeting with his bosses and the lobbyists. Oh. So they know about each other. Yes, he knew that. That’s why this meeting has been called. He determined that the moment he stepped into the room. He has been busy. Sleep. Sleep is good. He should get some of that. Why are they using his first name? Condescension. They think they can just—

“Do you know why we’ve asked for this meeting?” One of the lobbyists is talking now.

Bill swallows slowly. “I would guess because you want to run our relationship through more formal channels?”

The room laughs.

His supervisor, now, “Your relationship with the lobbyists has been rather unconventional thus far. Don’t worry, we’re going to take the politics right out of your hands.”

Bill isn’t entirely sure this is good. Does this mean the lobby is back in or still out? They’ve been waffling since the activity in Parliament. The—

“The public is going to hate this bill. The so-called ‘technorati’ are already mobilising to ‘inform’ them, and we need them to know how necessary it is. Our clients depend on us for that.”

Oh! They hadn’t been using his first name. They’d been jabbering on about the contents of the bill. Of course. That’s why he had drifted off. A whole load of technical mumbo-jumbo and legalese. As long as it meant he could stop more crime. He understands better now, but what does this all mean for him? “What does that have to do with me?”

“Surely you see how our department benefits from this bill.” His supervisor, again.

“Of course,” which is code for ‘not really, but sure’.

“The public needs to know how much of the sorts of crime we want to stop there is. If they think the problem is small they won’t want to see drastic measures taken to stop it. That’s why, effective immediately, we’re giving you full authority to follow up any lead on any activity, no matter how small. Use as many resources as you need and catch as many as you can. Make a media show of it. Get the numbers up.”

Wait, what? They’re going to grant his request to go after small actors? Wait, no. “What was that about the media?”

“We want you to do your job. The job you’ve been asking us to do since you got here.”

He considers that. No, it’s too easy. There must be something political. “What changed your mind? Politics? What about everything you’ve said about going after producers and victimisers instead of consumers and victims? All of that benefit of the doubt going to citizens goes away if it’s politically convenient?”

Now it’s his supervisor’s boss’ turn to make a comment. “I can’t figure you out. First you want us to let you go after the small actors. Now we say you can and you push back? Stopping crime. That’s your goal isn’t it?”

Bill knows that it is. That is his goal. Who cares why they want him to do it? He should take it while it’s on the table. And he should find someone who can explain this bill to him. “You’re right. Of course. That’s very much what I want. I’ll get to it.”

Nicnus is catching up on news. He’s peripherally aware of what’s going on in the world, of course. The constant stream of tidbits from microblogs and other sources that he reads all day make sure of that. He hasn’t been clicking through to actual articles for at least a week, though.

A bill has been tabled in the Canadian Parliament. He knew that. Reading further: about privacy and the RCMP use of MusicBox data streams. He knew that. In another article: about allowing them to use other data streams. What? Now he’s interested.

He pulls up the text of the bill and scrolls past the preamble information. The first interesting paragraph reads:

In section 3, at the end of paragraph 2, add “, digital.”

Uhh… ok? What does the next paragraph say?

Repeal section 5. Replace the last paragraph of section 4 with, “Due process shall be followed in accordance with policies set by the office of the Commissioner of the RCMP in consultation with Industry Canada.”

What? How does anyone read these? He tries to pull up the relevant Act and see what sections are being changed, but the whole thing is pretty hard to navigate. He keeps looking through the backlog of news stories and finds one about some guy who turned the bill into a readable diff.

For those who don’t know, a diff is a file that specifies in a very simple way what changes should be made to some piece of text. It is the primary tool computer programmers use to propose changes to software.

The relevant parts of this version of the bill looked like the following:

 In accordance with this Act, Canadian law enforcement agencies may only
 gather information from the following types of sources: telecommunications,
-telegram, mail system.
+telegram, mail system, digital.
 
@@
 
-Law enforcement officials shall, after establishing the necessity of
-collecting the information, obtain an order from a court of appropriate
-authority to be presented to the holder of the information.
+Due process shall be followed in accordance with policies set by the
+office of the Commissioner of the RCMP in consultation with Industry
+Canada.
 
@@
 
Section 5
-The parties about whom any information is to be gathered in accordance
-with this Act, shall be notified of the investigation. Any parties
-materially involved in the information, but who are not under investigation,
-shall be given full disclosure.
+[Section 5 repealed]

“Oh…” Nicnus stares for a moment. Then he stares for another moment. He sends sends the link with the diff on to Acklas, then after some thought creates a page highlighting just these sections and sends it on to all his microblog followers.

Moments pass. Nicnus is thinking. Hard. This cannot pass. Must not pass. The proposed change could not possibly be legal, though. Could it? Full digital and non-digital wiretapping without notifying the suspect that they were even under investigation? He wished he knew a lawyer.

16:30 <acklas> Woah. I’d heard the law was crazy, but those sections are the craziest.

16:31 <nicnus> …

16:33 <nicnus> Yeah, I can’t see how this can pass as-is.

16:35 <acklas> Well, we’ll see. Certainly I’m on board for fighting this now.

16:36 <nicnus> Sure, but you know how much good that does.

16:38 <acklas> I hear you, but that doesn’t mean we don’t try.

16:39 <acklas> Maybe someone should actually set up a face-to-face with our MP.

16:39 <nicnus> Could do.

** jjdavis has joined

16:39 <jjdavis> And you thought it was bad living in the US!

16:40 <acklas> shut up

16:40 <nicnus> It’s not law yet.

16:40 <jjdavis> Fair

16:41 <jjdavis> We’ll probably get something similar cropping up here soon anyway.

16:41 <acklas> Don’t certain US laws already allow this?

16:42 <jjdavis> Not for arbitrary law enforcement. For federal-level, yeah.

16:42 <acklas> Wait, ARBITRARY law enforcement?

** acklas looks

16:42 <nicnus> Yeah. That’s the craziest part. Joe policeman wants a look at your emails? No problem.

Jack is happy for the distraction. Work has not become less and less of a successful distraction. He’s tried blocking out the world and diving in to interesting development problems, but after less than an hour he’s always left zoned out.

She had called. Only once. He didn’t dare call back. She hadn’t said much. Wanted to know what he had to say.

What did he have to say?

He was still confused as all get out about the entire situation. So he told her so. No use hiding it. She said she figured as much. Didn’t sound like that was a good thing.

A car alarm goes off outside his window. He saunters over and takes a look. People are streaming by on the sidewalk, but no one seems to even take notice of the alarm. Too much noise, so little of it matters. Desensitizes.

Who are all these people? Where are they going? Jack has no idea. Every day thousands of people stream by outside his window. Going somewhere. These are the people that Nicnus always wants so badly to protect, yet they, or most of them, do not want protecting. Is it nobility, altruism, or just arrogance? What’s the difference between a consumer advocate and a Jehovah’s Witness door-to-door missionary? That the consumer advocate is right? That he doesn’t go door-to-door?

His phone is ringing. Hmm? Yes. Answer that. Who is it? Work. They need him to come in. Physically come in. It happens. If he could work from home all the time he wouldn’t need to be in the States at all. In fact, now that she’s gone…

16:47 <acklas> man, I really need to find another job

16:48 <nicnus> corporate cubicle land not doing it for you anymore? 😉

16:48 <acklas> seriously

16:48 <acklas> very

16:49 <nicnus> Are you interested in what we do? With the product taking off like this

16:50 <acklas> Maybe

Jack wants to get into this conversation, but he really should head to the office.

16:52 <jjdavis> Getting called in to the office. bback

** jjdavis is away

Bill has been on the phone all day with local law enforcement across Canada. Now he is on the ground with some. About 50 creeps across Canada are about to get busted, but he wanted to be present to see at least one of them. He’d like to be everywhere, but that’s just not possible on the timeline they’ve got.

They aren’t a SWAT team. There’s no group of officers bristling with firearms. They are not going to break the door down. In fact, they aren’t allowed to. This is the real police now, and they have to follow the rules. Or at least, when it matters. The last thing Bill wants is to have everything ended by a small, media-noticeable breach of procedure.

He knocks. A woman answers the door. “Is your husband home, miss?”

The single mother is offended by his question. Crap. “Well, boyfriend, whatever?”

Very single. Very focused on being a mother. Crap. Where is the creep? He glances at the officers with him. Glances at his notes. William J. That’s the name they have. “We’re looking for William.”

Oh. It’s her son. Oh. She is not happy now. Her son is coming to the door. He can’t be older than 13 or 14. What is happening here? “Are you William J?” The kid shrugs. He’s William at least. At the right address. As confusing as this seems he can’t just ignore this. They’ll take him in, ask some questions, maybe figure out what’s going on.

Now the mother is more upset. What has her son done? The son is resentful and cold, but maybe he’s just always like that. Bill peers past the mother. A daughter. Little girl, 3, maybe 5.

Crap.

Microformats 2

Posted on

This is both a summary of, and an expansion on, discussions with Tantek Çelik and Kevin Marks at PubStandards LXVII about Microformats 2.

The Positive

  • Optimizations for root-class-only when it makes sense. Some people really want this. I don’t care much either way, but it seems fine.
  • Flat sets of properties are how I actually store some microformats in practice. Some things you want to be able to have more than one (like address), but it seems the plan is to make all such cases embedded microformats objects. Seems fine.

The Meh

Changing root class of hCard from vcard to hcard. This seems like an unnecessary complexity and just adds yet another case to look for. Still, whatever, not a big deal. I’m not for it, though. It seems this is actually not part of the proposal at all. It’s just part of the thought that leads to h-

Changing all root class names to have an h- prefix is in basically the same boat. h- is no better than just h or any existing names anyway, but other than making parsing a bit more complex and authoring a bit more ugly it’s not a big deal.

The Regressions

Update: After IMing with Tantek it seems that a lot of the syntax changes are rooted in the fact that, useful or not, many people want an RDFa/microdata (XML/RDF/JSON) -like generic syntax, but all the ones they are creating are too complicated for web designers (who don’t want to use any attributes they are not already using) and so we need to create a syntax to do this, since people are going to do it anyway, and that syntax needs to be designer friendly, so that designers don’t hate us.

  • Simple “universal parsing” (ie: prefixes on class names). Not useful (since universal parsing just gets you an internal representation that you later have to write specific code to understand the vocabulary for anyway. Bad because it means microformats syntax would no longer be compatible with POSH (Plain Old Semantic HTML). This is a serious regression. I have always been a fan of the microformats “paving the cowpaths”, that is, trying as much as possible to just converge the semantic efforts authors are trying anyway so that we all use the same vocabularies.
  • Typed class names. Similar problem to the first point, but I wanted to call out types specifically as a problem. The vocabulary specifies the type so this information is redundant.
  • An advantage is that authors can tell which classes are “from microformats”. This is only an advantage if you think of microformats as competing with microdata and similar: that is, encoding data in the page. I’ve always seen microformats as just suggestions for what semantics you ought to use in knows cases when you would otherwise be making up your own markup.
  • Vendor extensions are also an import from the bad world of arbitrary metadata.