Archive for May, 2008

Web 2.0 Pronunciation

When I was a young, brash lad, full of myself and having more than my fair share of natural sibling competitiveness, I used to poke fun of my older brother when he mispronounced words that he had read, but had never heard spoken. After he read THGTTG he pulled out some doozies; I with I could remember exactly what they were.

With Web 2.0 names approaching Gaelic, Welsh or Old Norse in terms of oddball spellings, I now find myself struggling to figure out how to pronounce some of these names. Two in particular that are getting the best of me are Qik and Hahlo. Is it “Kick” and “Halo” or “Quick” and “Hah-low”?

I have a little company called Xidey that throws lots of people off. I’ve heard pronounced every which way. “Ziti” (like the noodle), “Zitty” (like pimples!), “Excitey” (close, but not quite)…I’m happy with my new startup product’s name, “Crowdify”, which is probably not a candidate for mispronunciation.

What Web 2.0 names throw you off?


You’ll Never See a Tweet Like This

Another reason I like Twitter better (way better) than FriendFeed: fewer monkeys throwing poop on each other, under the guise of “conversation”.

What’s that old simile comparing “Arguing on the internet” with “Special Olympics”? Hmmm….

Twhirl “Limit Exceeded” Message

Have you see the error on the bottom of your Twhirl Twitter client that says something like “limit exceeded, paused 5 min”?

Twhirl limit exceeded message

If so, here’s the culprit:

The API limit is still being kept at 30 requests per hour to help us stabilize the service for everyone. Some folks will get “rate limit exceeded” error if you use API clients that request data from us at a higher rate. Please reconfigure them appropriately for the time being.

Change this setting down to 30 in Twhirl by clicking on the wrench icon at the top (Configuration), then the Network tab, then the Request Usage dropdown.

Why Robert Scoble REALLY Loves FriendFeed

Today’s meta-meme is about Twitter employee Alex Payne supposedly laying all of Twitter’s problems at the feet of so-called “super-users”, aka Robert Scoble. Read the post and tell me if you don’t think Scobleizer overreacted.

The deeper issue is this whole FriendFeed vs. Twitter meme, with several prominent blogger/tweeter types recently proclaimining in favor of FriendFeed. It’s sort of like a superdelegate coming out in favor of one of the Barack or Hillary – it’s big news and gets echoed repeatedly.

Scoble is firmly on the side of FriendFeed, and it’s not just about Twitter’s scalability problems. Here’s the real reason why: On Twitter, he’s just one of many people you may follow. On FriendFeed he’s a big fish: he gets to start and own “conversations”, with people piping in to contribute to memes that HE started. He posts a one-liner with a link and gets dozens of people following up on his entry.

Twitter is democratic; FriendFeed is oligarchic. Twitter is loose and unpredictable; FriendFeed reads a lot like the blog posts at the bottom of If I wanted to hear a bunch of people agreeing with Scoble I’d just go read his damned blog.

So if you want a bunch of me-too bloviating, by all means go follow Scoble on FriendFeed.

Twitter is a different animal – lifestreaming in the truest sense of the word. I enjoy the glimpses of things happening that go by; I like being able to jump in and out of the tweetstream; and I enjoy the brevity that Twitter forces on me (and the people I follow).

I also enjoy the fact that I don’t need to go back and read all the tweets I “missed” while I was offline. Mathew Ingram, whose name in Latin must mean the aggregation of the terms “echo”, “meme”, and “ex post facto”, doesn’t like this – he wants to go back in time and “catch up”. Man, if you think Twitter is about catching up, you don’t get Twitter at all.

In this battle, make sure that you vote properly: are you in favor of being a super-user groupie (FriendFeed), or a first-order participant (Twitter)? Choose wisely.

(If you love Twitter and liked this post, follow me at

Comparing SQL Queries That Solve My Thorny SQL Set Operation Problem

For comparison’s sake, the following is a runnable T-SQL script that contains both the solutions provided by helpful friends to my previous “Thorny SQL Set Operation” problem.

set nocount on

drop table person
drop table category
drop table personcategory
drop table groupcategory


/* create the person table */
create table person (personid int, name varchar(50))
/* create the category table */
create table category (categoryid int, name varchar(50))
/* create the personcategory table */
create table personcategory(personid int, categoryid int)
/* create the group table */
create table groupcategory (groupid int, categoryid int)


/* insert the person data */
insert person values (1, “Hillary Clinton”)
insert person values (2, “Segolene Royal”)
insert person values (3, “Barack Obama”)

/* insert the category data */
insert category values (1, “Man”)
insert category values (2, “Woman”)
insert category values (3, “Politician”)
insert category values (4, “American”)
insert category values (5, “French”)

/* insert the personcategory data */
insert personcategory values (1, 2)
insert personcategory values (1, 3)
insert personcategory values (1, 4)
insert personcategory values (2, 2)
insert personcategory values (2, 3)
insert personcategory values (2, 5)
insert personcategory values (3, 1)
insert personcategory values (3, 3)
insert personcategory values (3, 4)

/* insert the group data */

/* GROUP 1: American Politicians */
insert groupcategory values (1, 3)
insert groupcategory values (1, 4)

/* GROUP 2: Female French Politicians */
insert groupcategory values (2, 2)
insert groupcategory values (2, 3)
insert groupcategory values (2, 5)

/* local vars */
declare @american_pols int
select @american_pols = 1
declare @female_french_pols int
select @female_french_pols = 2

/* QUERY METHOD 1: “Hans Method” */

select distinct p.*
from Person p
join PersonCategory c on (p.personid = c.personid)
where c.personid in (
select c.personid from PersonCategory c
where c.categoryid in (
select g.categoryid from GroupCategory g
where g.groupid = @female_french_pols
group by c.personid
having count(*) = (
select count(*) from GroupCategory g
where g.groupid = @female_french_pols
and c.categoryid in (
select gc.categoryid from GroupCategory gc
where gc.groupid = @female_french_pols

/* QUERY METHOD 2: “Tom Music / Brian Dorsey Method” */

select p.personid,, count(*) from person p
join personcategory pc on pc.personid = p.personid
join category c on c.categoryid = pc.categoryid
where c.categoryid in (select gc.categoryid from groupcategory gc where groupid = @female_french_pols)
group by p.personid,
having count(*) = (select count(gc.categoryid) from groupcategory gc where groupid = @female_french_pols)
order by p.personid

Bitmasking Solution For Thorny SQL Set Operation

My previous post outlined a tricky little SQL query problem dealing with set intersection. In addition to the solution found by Hans, I thought for completeness I would post a little scalar function that does a bitmask comparison to achieve the same result – with the notable, and possibly untenable solution that it limits the number of categories in your database to 64 (the number of bits in a BIGINT).

create function IsMember
@personid int,
@groupid int
returns int
declare @ret bigint
declare @personsum bigint
select @personsum = (select sum(power(2, pc.categoryid - 1))
from personcategory pc
where pc.personid = @personid)
declare @groupsum bigint
select @groupsum = (select sum(power(2, gc.categoryid - 1))
from groupcategory gc
where gc.groupid = @groupid)
if ((@personsum & @groupsum) = @personsum)
select @ret = 1
select @ret = 0
return @ret

Thorny SQL Set Operation

UPDATE 2: I posted a full script that contains both working solutions in a related post.

UPDATE: Hans developed a query that works. See the comments. It works even if my group is (Female + French), but my Person is (Female + French + Politician) – e.g., extra categories not part of the group are ignored.

Thanks for all the help!


I’ve been working for a bit on a (possibly) hard SQL query and thought I would write out my problem here, in the hopes that (a) I’ll solve it, and (b) I’ll make the solution available to others via the magic of Teh Google.

Here’s the problem: I have a concept of “category”. Example categories: Man, Woman, Movie Star, Politician, American, French.

I have a concept of “person”. Persons can belong to one or more categories.

I have a concept of “group”. A Group is merely a listing of one or more categories. For example, “Male Movie Stars” is a Group (Man + Movie Star). “Female French Politicians” is a group (Woman + Politician + French).

What I want to do in my query is this: Given a Group, find all Persons who belong to that Group.

pseudo-code query:

select * from Person p
join PersonCategory pc on (p.personid = pc.personid)
join GroupCategory gc ON (pc.categoryid = gc.categoryid)
where gc.groupid = @groupid

However, normal JOIN syntax using the IN operator does an “OR”-type operation, when what I really want is an “AND”-type operation. Using the “Female French Politicians” example from above, this query will return French OR Woman OR Politician. Not what I want.


TwitterCounter for @anthonyrstevens
Add to Technorati Favorites

RSS Feed

View Anthony Stevens's profile on LinkedIn