OUseful.Info, the blog…

Trying to find useful things to do with emerging technologies in open education

Anti-tags and Quick and Easy Block (Un)commenting

Looking back over the comments to @benosteen‘s post on Tracking conferences (at Dev8D) with python, twitter and tags just now, I noticed this comment from him replying to a comment from @miaridge about “app noise” appearing in the hashtag feed:

@mia one thing I was considering was an anti-tag – e.g. #!dev8d – so that searches for ‘dev8d’ would hit it, but ‘#dev8d’ shouldn’t.

The other tweak to mention is that booleans work on the twitter search:

‘#dev8d -from:randomdev8d’ would get all the #dev8d posts, but exclude those from randomdev8d.

Likewise, to get all the replies to a person, you can search for ‘to:username’, handy to track people responding to a person.

Brilliant:-)

Note also that one thing worth bearing in mind when searching on Twitter is that a search for @psychemedia is NOT the same as a search for to:psychemedia. That is, those two searches may well turn up different results.

The “to:” only searches for tweets that START with “@pscyhemedia”; so id @psychemedia appears elsewhere in the tweet (e.g. “waht the ??? is @psychemedia talking about?”), the “to:” search will not find it, whereas the “@” search will.

Why’s this important? Well, a lot of people new to using Twitter use the Twitter website interface to manage their interactions, the the “Replies” screen is powered like the “to:” search. Which means if someone “replies” to you in a “multiple addressee” tweet – e.g. “@mweller @psychemedia are you gonna make some more edupunk movies?”, then if you’re not the first named person, the @Replies listing won’t show the tweet… the only way you can discover them is to search twitter for “@psychemedia”, for example.

The Twitter advanced search option to search for posts “Referencing a person” is simply a search of the @person form.

(Note that Twitter search lets you subscribe to search results – so you can always subscribe to an ego search feed and receive updates that way; or you can use a client such as Tweetdeck which runs the search automatically.)

(I’m not sure what happens if someone actually replies to one of your tweets and then prepends some text before your name? Will twitter still spot this as a reply? If anyone knows, can you please comment back?)

Just by the by, the “anti-tag” trick reminds me of this code commenting pattern/trick (I don’t remember where I came across it offhand?) that makes it easy to comment and uncomment blocks of code (e.g. in PHP or Javascript):

Before the comment…]
/*
This will be commented out…
//*/
After the comment…

To uncomment out the block of code, just add a leading “/” to the first comment marker to turn it into a single line comment:

Before the comment…]
//*
This will NO LONGER be commented out…
//*/
After the comment…

The block comment closing tag is now itself single line commented out.

(I seem to remember it was described far more eloquently than that when I came across it!;-)

PS Ah ha, here we are – where I first saw the commenting trick: Every keystroke is a prisoner – a neat commenting trick.

Written by Tony Hirst

March 16, 2009 at 12:39 pm

Posted in Anything you want

Tagged with ,

3 Responses

Subscribe to comments with RSS.

  1. no, it won’t pick up ‘hey @psychemedia I’ve got a great idea for a mashup’ because it doesn’t start with @psychemedia.
    BTW – why search for to: and @ and not just ‘psychemedia’?

    Martin

    March 16, 2009 at 1:06 pm

  2. Why not search for just mwelle?!

    In the general case, disambiguation: using the @ I am very definitely searching for a twitter ID of a particular person. Also cf.a search for “joe” or “@joe”. I was posting about general case solutions, you are identifying a special case where a userID withouththe @, or a substring of the userID, still uniquely identify a particular person.

    re: the searching for @replies – if a client actually uses the intreplyto:tweetid option, than a proper “reply search” should be able to exploit that metadata even if the person sending a reply prepends another twitter ID to the tweet?

    Tony Hirst

    March 16, 2009 at 1:41 pm

  3. Yes, I see – serves em right for picking an ambiguous user name. I only search for mweller coz ppl don’t always put the @ in correctly.

    Martin

    March 16, 2009 at 2:50 pm


Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 787 other followers

%d bloggers like this: