Add to Technorati Favorites

Sack the golden towns of Montezuma!

20:09 April 8th, 2009 by terry. Posted under books. | Comments Off on Sack the golden towns of Montezuma!

“My dear fellow,” Burlingame said caustically, “we sit on a blind rock careening through space; we are all of us rushing headlong to the grave. Think you the worms will care, when anon they make a meal of you, whether you spent your moment sighing wigless in your chamber, or sacked the golden towns of Montezuma? Lookee, the day’s nigh spent; ’tis gone careening into time forever. Not a tale’s length since we lined our bowels with dinner, and already they growl for more. We are dying men Ebenezer: i’faith, there’s time for nought but bold resolves!”

From: The Sotweed Factor, by John Barth.


Coding

07:04 April 7th, 2009 by terry. Posted under me, programming. | Comments Off on Coding

Coding is what you do when you tire of dealing with other humans. You get to interact with a literal-minded idiot who slavishly follows your every wish. Unfortunately you have to specify *everything* down to the very last detail in order to get anything done. But at least it does what it’s told, which is comforting in a world where everyone selfishly insists on doing what *they* want. You should try it sometime, it’s very relaxing, and nice to be totally in control.


bzr – not your grandfather’s VCS

20:43 March 26th, 2009 by terry. Posted under programming, tech. | Comments Off on bzr – not your grandfather’s VCS

bzr viz


The entrepreneurial spirit in literature

23:33 March 2nd, 2009 by terry. Posted under books, me. | 19 Comments »

Once in a while I run across a piece of writing that has little or nothing to do with being an entrepreneur, but which reads as though it did. I posted an example in 2007: Orwell writing about and quoting T.S.Eliot: “Each venture is a new beginning, a raid on the inarticulate with shabby equipment always deteriorating“.

Below is one I encountered a few days ago. Can you place it? You can find the answer on Google in a flash.


The glamour of youth enveloped his parti-coloured rags, his destitution, his loneliness, the essential desolation of his futile wanderings. For months — for years — his life hadn’t been worth a day’s purchase; and there he was gallantly, thoughtlessly alive, to all appearances indestructible solely by the virtue of his few years and of his unreflecting audacity. I was seduced into something like admiration — like envy. Glamour urged him on, glamour kept him unscathed. He surely wanted nothing from the wilderness but space to breathe in and to push on through. His need was to exist, and to move onwards at the greatest possible risk, and with a maximum of privation. If the absolutely pure, uncalculating, unpractical spirit of adventure had ever ruled a human being, it ruled this be-patched youth. I almost envied him the possession of this modest and clear flame. It seemed to have consumed all thought of self so completely, that even while he was talking to you, you forgot that it was he— the man before your eyes— who had gone through these things.


Rupert Brooke and Sep Kelly

17:19 February 3rd, 2009 by terry. Posted under books, me. | Comments Off on Rupert Brooke and Sep Kelly

My great grand uncle was Frederick Septimus Kelly (aka Cleg or Sep):

On 22 April [1915] Kelly became aware that Rupert Brooke was dangerously ill. The following day Brooke died and was buried on Skyros by his close circle, the officers known as the Latin Club – the critic and composer, W. Denis Browne; Arthur (Ock) Asquith (later Brigadier-General Arthur Asquith); the scholar and son of Lord Ribblesdale, Charles Lister; Patrick H. Shaw-Stewart, scholar and, at the age of 25, a director of Barings Bank; Bernard Freyberg (later General Lord Freyberg VC and Governor-General of New Zealand); and ‘Cleg’ Kelly. Kelly’s measured description of both the death and burial of the poet have been extensively quoted in the Brooke literature. It was W. Denis Browne and Kelly who sorted Brooke’s belongings as their ship left Skyros for the Gallipoli peninsula, and it was Kelly, methodical as ever, who copied the contents of the poet’s notebook against its loss in transit to his family. After the Hood Battalion left England, the friendship between Kelly and Brooke had deepened. There are frequent references to their being together on group outings on leave, nights spent together at the dinner table, of W. Denis Browne and Kelly entertaining their fellow officers with Brooke to the fore and, towards the end, accounts of Brooke coming alone to Kelly’s cabin to read his poems and to discuss literature. Brooke’s death was a personal loss. Kelly is said to have begun composing his Elegy dedicated to Brooke as the poet lay dying nearby.

Taken from page 36 of “Race Against Time: the Diaries of F.S. Kelly”, selected, edited and introduced by Therese Radic. Published in 2004 by the National Library of Australia.

I have an MP3 of Kelly’s Elegy to Rupert Brooke in case anyone wants it.


Loose cannon

17:37 January 26th, 2009 by terry. Posted under companies, me. | Comments Off on Loose cannon

Today I referred to myself as a loose cannon to Esteve. Tonight I recalled describing a former boss that way in an email (company name obscured with xxxxx). Here it is:

i thought
hey, hold on
where the hell is quality control?
and i knew i was it
but still it’s so tiring to try to stop her
and almost impossible to make her listen
and understand
and my energy for that is limited
plus it’s just amusing to watch her rocketing along
read this, read this, read this
passing you papers printed at semi-random
from the web

  
to me
the phrase ‘loose cannon’
can be perfectly applied to her
she’s rolling around on the xxxxx deck
(wheel in deep sea fishing analogy here)
our most powerful weapon
at once capable of taking out a whole fleet of enemy ships
but also equally capable of shooting down the mast
blasting the crew
taking out the sail
firing on the powder room
and just generally causing any number
of unpredictable and inevitably high-impact results

 i know
we have to be the leather belts
that strap her to the deck
as much fun as it is to see her rolling about,
the recoil from one explosion
spinning her randomly to point at her next target
all further confused by the rolling waves
and her small metal wheels

 confused and terrified sailors
in blue-striped togs
run scrambling over the sea-slapped decks
holding their heads their ears
the ship’s wheel
half shot away by a stray ball
spins wildly
as we broach another peak

  
all hands on deck!


Just little and crazy

15:59 January 26th, 2009 by terry. Posted under me, other. | Comments Off on Just little and crazy

Tonight Lucas was crying about having to have dinner instead of being able to use the laptop. I asked him if he even remembered what life was like before he had a laptop to play with: “Yes. Before the laptop we had the Wii. Before that was the Nintendo DS. Before the DS was the Micro. And before that I was just little and crazy.”


FluidDB domain names available early (and free) for Twitter users

23:04 January 24th, 2009 by terry. Posted under FluidDB, Fluidinfo, twitter. | 30 Comments »

Sometime in the next few months, Fluidinfo will launch an alpha version of FluidDB, the database with the heart of a wiki. It’s a big engineering task, and there will still be a lot to do when we go into alpha, so we’ll initially only have a small number of applications being built on FluidDB.

But that doesn’t mean you can’t get into the action early.

Starting today, we’re pleased to offer FluidDB domains for free to Twitter users. This is perhaps the simplest way you’ll ever sign up for a new web service – if you’re a Twitter user:

Simply follow FluidDB on Twitter.

Yes, that’s it. You’re done.

Later, when we create your FluidDB domain, we’ll send you your FluidDB password via a direct message in Twitter. Note that we haven’t asked for your real name, your email, a password, sent you a cookie, or asked you to fill out a pesky sign-up form. The point here is simply to give you an early opportunity to trivially claim your preferred name.

Feel free to tweet the URL of this posting (http://bit.ly/bezc). You can follow me too for extra credit. If you’re not already a Twitter user and you want a free FluidDB domain name, sign up for Twitter, and then follow FluidDB.

Mini FAQ:

Why would I do this? By following FluidDB you will reserve your (Twitter) user name as your domain name in FluidDB.

Is there any charge? No.

What is a FluidDB domain? Sorry, but you’ll have to wait to find out the answer to this. We can tell you though that FluidDB domains will have many uses, and that they wont all be free.

What if I change my mind? Just unfollow FluidDB on Twitter.

Why Twitter? Because we like Twitter. We may do a similar thing for other services, allowing users to later claim their domain via OpenID, but that introduces the potential of naming conflicts.

Finally, please note that we can’t give an iron-clad guarantee that you’ll get your Twitter user name as your FluidDB domain name, but we’ll do our best. At this early stage of the game, we reserve the right to do whatever we want :-)


Who signed up for Twitter immediately before/after you?

03:52 January 14th, 2009 by terry. Posted under companies, python, twitter. | 2 Comments »

This is just a quick hack, done in about 20 minutes in 32 lines of Python. The following script will print out the Twitter screen names of the people who signed up immediately before and after a given user.

import sys
from twitter import Api
from operator import add
from functools import partial

inc = partial(add, 1)
dec = partial(add, -1)
api = Api()

def getUser(u):
    try:
        return api.GetUser(u)
    except Exception:
        return None

def do(name):
    user = getUser(name)
    if user:
        for f, what in (dec, 'Before:'), (inc, 'After:'):
            i = user.id
            while True:
                i = f(i)
                u = getUser(i)
                if u:
                    print what, u.screen_name
                    break
    else:
        print 'Could not find user %r' % name

if __name__ == '__main__':
    for name in sys.argv[1:]: 
        do(name)

I’m happy to have reached the point in my Python development where I can pretty much just type something like this in without really having to think, including the use of operator.add and functools.partial.

BTW, the users who signed up immediately before and after I did were skywalker and kitu012.

The above is just a hack. Notes:

  1. If it can’t retrieve a user for any reason, it just assumes there is no such user.
  2. Twitter periodically deletes accounts of abusers, so the answer will skip those.
  3. Twitter had lots of early hiccups, so there may be no guarantee that user ids were actually assigned sequentially.
  4. This script may run forever.
  5. I’m using the Python Twitter library written by DeWitt Clinton. It’s been a while since it was updated, and it doesn’t give you back the time a user was created in Twitter. It would be fun to print that too.

As you were.


10,000 things: Andrew Hensel lives (on Twitter)

01:21 January 5th, 2009 by terry. Posted under me, twitter. | 15 Comments »

Andrew Hensel was an extraordinary human being.

We were graduate students together at The University of Waterloo in Canada in 1986-88. I met him on my first day there and we spent many hours together on a daily basis over the next 2.5 years. I don’t want to try to say too much about him now. It occurred to me a few days ago that I might post a few stories here. We did lots of crazy things. At one point I had wanted to write something titled “100 things to a Hensel” and I made a bunch of notes, but it went no further.

I wrote about him in my Ph.D. acknowledgments in 1995:

Andrew Hensel, with whom I shared so much of my two and a half years at Waterloo, was the most original and creative person I have ever known well. Together, we dismantled the world and rebuilt it on our own crazy terms. We lived life at a million miles an hour and there was nothing like it. Five years ago, Andrew killed himself. There have been few days since then that I have not thought of him and the time we spent together.

I still think about him frequently. Today I was remembering one of his many, many oddball projects (most of which went unfinished), which he called “10,000 things”. It was to be a list of 10,000 things that he thought of. By the time he started sending them to me we had both dropped out of Waterloo. He was back in Australia and I was in Munich.

He only sent me 300 of the to-be 10,000. Of course I still have them. They’re all very short. At the risk of being thought macabre I’ve decided to bring Andrew back a very little and post them to Twitter, chosen at random, one a day. You can follow adhensel to get just a glimpse of his mind. The first tweet, people being planted into earth, is already up.

There are at least half a dozen twitterers who knew Andrew, including one who knew him probably better than anybody. Once in a while I get email from someone who finds my online mentions of him. Invariably they also found him extraordinary.

What would Andrew have made of Twitter? I have no doubt at all that he’d have immediately dismissed it as “weak”. That was one of his favorite adjectives. Almost everything was weak. It’s a small miracle to me to partly bring him back to life 18 years after he died, by posting just some of his 10,000 things to Twitter.

And… my apologies to anyone who knew Andrew and who finds this upsetting.


Lucas does a crazy solo dance

13:24 December 28th, 2008 by terry. Posted under other. | Comments Off on Lucas does a crazy solo dance


Alexandopoly

13:42 December 27th, 2008 by terry. Posted under Fluidinfo. | Comments Off on Alexandopoly

Alexandopoly


Not alone

16:39 December 5th, 2008 by terry. Posted under companies. | 4 Comments »

Robert Scoble has just written a really nice article about Fluidinfo, calling us both “world-changing” and “unfundable”. Funnily, Tim O’Reilly said something similar when I talked to him at OATV. He said something like: “This could take over the world” and in the very same sentence “but I don’t see how we could fund you.” The two things an entrepreneur most and least wants to hear, all in one sentence. I’ll never forget it.

A few people have mailed me to say that the Scoble videos create the incorrect impression that I’m building FluidDB alone. So I wanted to clear that up. Others who are actively involved in Fluidinfo are:


Esteve Fernandez is doing the most difficult coding. Esteve and I are the only two employees of the company. We even have modest salaries. We spend most of our time apart, writing code, swapping email. Once or twice a week we meet in person to talk about architecture, current problems, or for him to gently explain to me how I could have written my code more elegantly and usefully. I usually try to stay out of his way, as he’s a force of nature and I just slow him down. He left a solid and secure job that he liked in Barcelona and then said no to Google to join Fluidinfo.

Esther Dyson invested in Fluidinfo just over a year ago. Esther is an incredible investor to have involved for a company like Fluidinfo. I wont try to summarize, except to say that without her support we probably wouldn’t be here today. After a year of trying to find investors, I’m more keenly aware than ever of how extraordinary Esther is.

Russell Manley is the other company director. It was Russell who pointed Delicious out to me a few years ago and got me back onto working on this project after I’d put it aside for 6 years. Russell is a finance guy with a ton of experience in operations and running companies. He’s an investment director at Land Securities in London, and sits on over 30 boards. He’s also a close friend, incredibly smart, and widely read. I hope one day we’ll be able to get him into Fluidinfo, though that will take some doing.

Nicholas Radcliffe is an old friend and advisor. He’s the founder and CEO of Stochastic Solutions. He was also a founder, CTO, and then CEO of Quadstone, raising tens of millions of pounds along the way. Quadstone was acquired a couple of years ago. He’s into algorithmic approaches to targeted direct marketing, and he’s very successful. He has a Ph.D. in physics, so you don’t want to mess with Nick. He’s also an advisor to Scottish Equity Partners. Nick is my harshest and most unrelenting critic.

That’s it for now. There are probably a dozen others who are peripherally involved, but not on a day-to-day basis. I’m very happy to have just two people on payroll right now. We’re pretty much recession proof. I went through the 2000-2004 as CTO of Eatoni in New York, and we survived by cutting every possible cost and keeping our headcount as low as possible. So operating on a shoestring comes pretty naturally. I feel we’re strong and small like a hard nut, and not really exposed to the economic downturn. It’s a great time to be tiny and to be focussed on building a product.

It would of course be nice to be properly funded. But I’ve always been confident that’s just a matter of time. The main thing, perhaps the only thing, is to get an alpha version of FluidDB released so people can start building things on it.


Twittendipity: a chance interview with Robert Scoble

12:25 December 4th, 2008 by terry. Posted under me, twitter. | 12 Comments »

On Monday Tim O’Reilly posted a Twitter tweet suggesting to Robert Scoble that he contact me while in Barcelona.

First off, Tim is very generous in doing this. He’s ultra connected and he spends a significant amount of his time in Twitter pointing things out, connecting people, and re-tweeting stuff he finds interesting. Re-tweeting is really important because when you tweet you only reach the people who are already following you. But when someone re-tweets you, you reach new people who likely have no idea of your existence. And when Tim does the re-tweeting there can be a big impact. 24 hours after his message to Robert I had 50 new followers. Tim explicitly tries to help people doing things he finds interesting, but who have just a small number of Twitter followers. He filters and amplifies information, broadcasting it out to his 16,000+ followers. Robert was in a hotel about 10 minutes’ walk from my place and I had no idea. A mutual friend in California noticed and took a minute to connect us. That’s really something, and it perfectly illustrates some of the value of Twitter.

I met Robert yesterday afternoon and we spent 6 hours together. It was great. You can see at once why he’s been so successful: he’s smart, he’s thoughtful, he’s sympathetic, and he’s a careful listener. I had no idea what to expect, and seeing as what we’re building can take some time to sink in, I wondered what sort of an audience he’d be.

After we’d climbed around up in the Sagrada Familia (official site, wikipedia), Robert came back to my place to see a demo of the things I’d been describing. We sat down and he pulled out his cell phone and asked if he could film me. I didn’t really think about it and said of course. It didn’t dawn on me that we were doing an informal interview, and I was totally unprepared – which is probably a good thing.

In the end we filmed 4 segments: parts one, two, three, and four. There’s also been some discussion here on Robert’s FriendFeed page.

So if you’ve been wondering what we’re building in here, go watch the videos.

I had no idea all this was about to come down. The Fluidinfo web site (a generous word) was a single page with no contact information, no nuthin’. We simply haven’t needed a web site of any description yet. I went and added a box so you can sign up to receive news of the alpha launch.

And then there was this, posted on Twitter, and which I have absolutely no shame in reproducing (this is a blog, after all):

Wow, what @terrycojones showed me last night (a new kind of database that he’s been workng on for 11 years) blew me away. Uploading vids now

Now I have to put my head back down with Esteve to get the alpha out the door ASAP.


Airports to install giant security mood rings

06:55 December 3rd, 2008 by terry. Posted under me. | 2 Comments »

In March 2004 I was in a silly mood (yes, a euphemism) and dreamed up the idea of airports installing giant mood rings as security devices. Prospective passengers would be made to walk through the mood ring. If it showed a happy and peaceful color, you could get on the flight. You could carry a gun or even a bomb, no problem. But if the mood ring indicated anger, you’d be denied entry or forced to fly in a special Angry Class. In Angry Class the service is shit. The airline knows the passengers are angry before they get on the plane, so why bother?

I started to write the news:

Today the US Department of Homeland Security announced that the US is insisting that countries install the new Passenger Mood Assessment Security Screening (PMASS) in all airports with direct or connecting flights to the US. The system, developed by Kellogg Brown & Root (a wholly-owned subsidiary of Halliburton, an oil-services company), is based on techniques borrowed from functional magnetic resonance imaging and, most controversially, the mood ring industry.

Ashcroft, Bush and Rumsfeld flanked Homeland Security Director Tom Ridge today as he announced the new measures. "People have no right to turn up at the airport with a bad attitude."

Halliburton wins a no-bid contract, shortly after moving to buy up all known mood ring manufacturers, mystifying investors (stock falls sharply, then rises sharply on news of contract). To fly people to the US, other countries are forced install giant mood rings and to hand over the mood data of all embarking passengers to US authorities.

You get the picture. I sent an outline of this to the folks at The Onion, but never heard back.

It’s a joke, of course. Couldn’t possibly happen. Right? Think again.


Serverpronto (Infolink) is a RIPOFF

15:46 December 2nd, 2008 by terry. Posted under me. | 37 Comments »

I signed up for a dedicated server from Serverpronto in late 2006. At $30/month for a real Linux box the price seemed great. I recommended them to a friend who also signed up.

On July 29, 2007 we noticed that both our machines had been hacked into. We’re both very security conscious and we didn’t know how this had happened. Both machines had been broken into in the same way, from the same IP address, leaving behind the same evidence. It was pretty clearly a root kit.

I immediately contacted Serverpronto and asked for help. They offered to do a full system restore for $69 and were otherwise completely passive. I suggested that they might want to take a bit more interest as perhaps their other clients had also been hacked. After a couple of mails I got an email saying that they would make their best effort. But it was too late and I replied asking them to cancel service.

From terry Mon Jul 30 02:32:59 +0200 2007
Message-ID: <18093.12731.650708.403211@terry-jones-computer.local>
Date: Mon, 30 Jul 2007 02:32:59 +0200
From: Terry Jones <terry@XXX.es>
To: "SP1443" <support@serverpronto.com>
Subject: Re: [WYL-89853]: Machines broken into?
In-Reply-To: Your message at 18:34:08 on Sunday, 29 July 2007
References: <jlypcw.k87@serverpronto.infolink.com>

Thanks, but no. I would simply like to cancel service. What more
do I need to do?

Terry

====== Please reply above this line ======
Machines broken into?

Mr. Jones. I will transfer to the abuse team, and the Customer
Service your issue.

We will find the best solution.

They replied:

From support@serverpronto.com  Tue Jul 31 00:00:10 2007
Message-ID: <jlzkyj.p6l@serverpronto.infolink.com>
From: "SP1422" <upport@serverpronto.com>
Subject: [WYL-89853]: Machines broken into?
Date: Mon, 30 Jul 07 05:56:43 -0400
To: terry@jon.es

Machines broken into?

69.60.109.173 has been taken offline.
ServerPronto Support

Ticket Details
=========
Ticket ID: WYL-89853
Tracking URL: https://serverpronto.infolink.com/esupport/index.php?_a=tickets&_m=viewmain&emailre=terry@jon.es&ticketkeyre=dee55eec&_i=WYL-89853
Department: Technical Support
Created On: 29 Jul 2007 07:57 AM
Last Update: 29 Jul 2007 05:34 PM
Status: Closed

That’s it, right? End of story.

Unfortunately not. First of all, my friend could not get Serverpronto to stop billing after he also canceled his contract. They just kept billing. After many phone calls and emails, they eventually had to get rid of Serverpronto via getting the credit card company to refuse all charges.

I thought I had gotten off their books. But I got a phone call from Deutsche Bank a couple of months ago telling me that a company called Serverpronto was trying repeatedly to charge my now-expired credit card. I was completely surprised and told them that I had nothing to do with Serverpronto and that I had canceled service with them. I had been receiving mail from Serverpronto telling me that my credit card expiry date was coming up. I mailed them to tell them there was a mistake and that I was no longer a customer, and they promised to look into it.

And now, today, I get a statement from my bank showing that they have approved two charges for a total of $356.30 from Serverpronto!!!! That means those evil assholes have somehow called Deutsche Bank and managed to charge me for a whole year of costs on an account that was closed, for a server that was not up, and on a credit card that had expired.

I am assured by my friend that I will never see a cent of that money again.

Deutsche Bank are about to hear from me.

DON’T USE SERVERPRONTO.

Go search Google for things like Serverpronto billing cancel ripoff. You’ll get tons of hits. I should have done more homework before I signed up. They actually had good support. But the people running the billing department deserve a slow painful death. This is obviously a deliberate policy designed to extract the maximum out of their trying-to-depart customers.

To whom do I complain?


Amazon SimpleDB a complete flop?

03:18 December 2nd, 2008 by terry. Posted under companies. | 39 Comments »

Today Amazon slashed the price on storage in SimpleDB from $1.50 per Gb per month to just $0.25 per Gb per month.

Note that you can buy a 1TB hard drive these days for $75. That’s 7.5 cents per Gb for as long as the drive lasts. So Amazon were charging 200 times the price of retail hard disk storage per month. Yes, the AWS storage is replicated, and you don’t need a data center or employees, but a 200X markup (per month) seemed a bit excessive. Until last night, that $1.50 figure was the first price in the pricing section of the SimpleDB page – not a smart move (sticker shock). The storage price is now the last thing in the pricing section.

I spend a bunch of time talking to folks working at other startups. I hear about EC2 and S3 usage all the time, but I’ve never heard of anyone using SimpleDB. I hadn’t really thought about it too much. I had noticed that the price for storage in SimpleDB is (was) 10 times higher than for storage in S3, and thought that created an opportunity for Fluidinfo. But that huge difference is now gone – in fact SimpleDB is now free for everyone for the first 6 months following the public beta.

I found myself asking “What’s going on?” It’s not like Amazon to suddenly offer their services for free. The free offer coming with the service entering beta seemed pretty thin. If anything it should get more expensive, or stay the same, not suddenly transition to free.

Then I began to explicitly wonder just how many people are actually using SimpleDB. So I just ran some sample Google queries to get an idea. The results are amazing:

Query # Hits
“using amazon simpleDB” 68
“using simpleDB” 1010
“simpleDB sucks” 3
“love simpleDB” 1
“hate simpleDB” 0
“recommend simpleDB” 0
“we are using simpleDB” 0
“we are using amazon simpleDB” 0
“we use amazon simpleDB” 1
“we use simpleDB” 4

Note that all queries are entered into Google in quotes.

Given just these results, and knowledge that SimpleDB was launched a year ago, I think you’d have to conclude that SimpleDB is a complete flop. Either that or Google is playing evil tricks due to their own appEngine offering. That would seem unlikely. Plus, the numbers for the obviously popular S3 and EC2 are much much higher: If you try these queries with S3 or EC2 instead of SimpleDB, you’ll see 5K, 10K, 15K results.

I find the above numbers astounding. I’m deadly curious to know what’s going on here. Was SimpleDB just too expensive to consider using? Is its model too awkward? If it sucked, people would say so. But there’s virtually nothing out there. It’s as though developers took one look and completely ignored it. That would be my guess (in fact it’s what I did, so I’m probably biased in my explanation of what others may have done).

At least we can say that more people love SimpleDB than hate it :-)

It’s not my intention to bash Amazon or AWS. I love and use S3 and EC2 every single day. They’ve changed the world, and this is only the beginning. But I have no use at all for SimpleDB. I’d always assumed it was a big success too, but it looks like that may be wrong.

Comments very welcome. Do you know anyone using SimpleDB?


Changing POV under Twitter

19:01 November 26th, 2008 by terry. Posted under companies, twitter. | 16 Comments »

One thing I’d like to be able to do in Twitter is change my point of view. That is, see what Twitter looks like from the POV of another user.

Given Twitter’s asymmetric follower model and the prevalence of @ messaging, it’s very common to run across a fragment of a conversation that seems potentially interesting. It’s also common not to be following the full set of people who are interacting.

For example, four people might be exchanging tweets on a subject, and you may follow just one of them. So you’ll see roughly one quarter of the thread. Right now, to get the context for the discussion you need to go take a look at the archives of the various people and try to piece the conversation together. You have to do this one tweeter at a time. Or you could temporarily follow the people involved and then page backwards through time to see the flow of tweets. With some work on the server side, Twitter could let you see this using the Twitter search interface (you’d need to put in the names of the various parties though).

It would be much simpler and much cooler to just to click a link besides a user’s name and get that user’s POV. You’d see what they see, except for the people whose tweets are private and which you’re prevented from seeing by the Twitter permission system. Not only could you see more or all of a conversation, I bet it would be really interesting to see Twitter from someone else’s POV. You could click on the @Replies tab to see all replies to that user, etc. There’s no reason why not – it’s all public data, and you can easily fetch the @replies using the search interface. I think wandering around inside the Twitterverse jumping from the POV of one identity to another would be fascinating. It reminds me of wandering around inside the wayback machine, except it’s the present.

That would all be pretty easy to implement, even for a 3rd party using the Twitter API. It would be nice if Twitter were to implement it themselves. I could do the basics myself in a few hours, but I’d rather not. This is also something that could be accessed via a Firefox extension or Greasemonkey – install it and get an extra button next to every tweet. The button switches you to the POV of the tweeter.

All we need is someone to build it.

I have several more Twitter blog posts I’d love to write. The most interesting, to me, is all about evolutionary biology, sex, and the meaning of life itself. But no time, no time. I’ve finally added a Twitter category to this blog, and was surprised to find 14 posts that fit it. Am I obsessed?

As usual, make sure you follow me :-)


A kinder and more consistent defer.inlineCallbacks

19:20 November 21st, 2008 by terry. Posted under deferreds, python, tech, twisted. | Comments Off on A kinder and more consistent defer.inlineCallbacks

Here’s a suggestion for making Twisted‘s inlineCallbacks function decorator more consistent and less confusing. Let’s suppose you’re writing something like this:

    @inlineCallbacks
    def func():
        # Do something.

    result = func()

There are 2 things that could be better, IMO:

1. func may not yield. In that case, you get an AttributeError when inlineCallbacks tries to send() to something that’s not a generator. Or worse, the call to send might actually work, and do who knows what. I.e., func() could return an object with a send method but which is not a generator. For some fun, run some code that calls the following decorated function (see if you can figure out what will happen before you do):

    @defer.inlineCallbacks
    def f():
        class yes():
            def send(x, y):
                print 'yes'
                # accidentally_destroy_the_universe_too()
        return yes()

2. func might raise before it get to its first yield. In that case you’ll get an exception thrown when the inlineCallbacks decorator tries to create the wrapper function:

    File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 813, in unwindGenerator
      return _inlineCallbacks(None, f(*args, **kwargs), Deferred())

There’s a simple and consistent way to handle both of these. Just have inlineCallbacks do some initial work based on what it has been passed:

    def altInlineCallbacks(f):
        def unwindGenerator(*args, **kwargs):
            deferred = defer.Deferred()
            try:
                result = f(*args, **kwargs)
            except Exception, e:
                deferred.errback(e)
                return deferred
            if isinstance(result, types.GeneratorType):
                return defer._inlineCallbacks(None, result, deferred)
            deferred.callback(result)
            return deferred

        return mergeFunctionMetadata(f, unwindGenerator)

This has the advantage that (barring e.g., a KeyboardInterrupt in the middle of things) you’ll *always* get a deferred back when you call an inlineCallbacks decorated function. That deferred might have already called or erred back (corresponding to cases 1 and 2 above).

I’m going to use this version of inlineCallbacks in my code. There’s a case for it making it into Twisted itself: inlinecallbacks is already cryptic enough in its operation that anything we can do to make its operation more uniform and less surprising, the better.

You might think that case 1 rarely comes up. But I’ve hit it a few times, usually when commenting out sections of code for testing. If you accidentally comment out the last yield in func, it no longer returns a generator and that causes a different error.

And case 2 happens to me too. Having inlinecallbacks try/except the call to func is nicer because it means I don’t have to be quite so defensive in coding. So instead of me having to write

    try:
        d = func()
    except Exception:
        # Do something.

and try to figure out what happened if an exception fired, I can just write d = func() and add errbacks as I please (they then have to figure out what happened). The (slight?) disadvantage to my suggestion is that with the above try/except fragment you can tell if the call to func() raised before ever yielding. You can detect that, if you need to, with my approach if you’re not offended by looking at d.called immediately after calling func.

The alternate approach also helps if you’re a novice, or simply being lazy/careless/forgetful, and writing:

    d = func()
    d.addCallback(ok)
    d.addErrback(not_ok)

thinking you have your ass covered, but you actually don’t (due to case 2).

There’s some test code here that illustrates all this.


bzr viz is so nice

00:07 November 20th, 2008 by terry. Posted under python, tech. | 21 Comments »

A year ago we switched from SVN to Bazaar for source code control. I started using source code control in 1989 with RCS after comparing it with SCCS. Then I duly moved to CVS and on to SVN. In retrospect, they all sucked pretty badly but each in turn was a big improvement and seemed great at the time.

The topic of source code control is a very complex one. There’s tons of debate online about the advantages of various packages. I don’t want to get into details, plus there are details that I don’t fully appreciate anyway. It really is complex – at least if you want to do anything even a little bit sophisticated, e.g., with multiple users working on multiple branches.

Anyway, we wanted to move away from SVN, which is cumbersome, too manual and heavyweight (at least in its handling of branches), and requires you to talk to a centralized server all the time. Plus it has no handling of directories or symbolic links, and you lose history in merging. There are other problems and annoyances too.

A distributed version control system seemed like the way to go.

We looked closely at Bazaar and Mercurial. I was prejudiced towards Mercurial. I liked its name, I liked the coolness of the Qwerty-symmetric hg command, and above all I liked how lightweight and simple it is. We took a quick look at Git, but it looked like a bit of a hodge-podge and we’re Python fanboys, so we fairly quickly decided against it.

From what I’ve read, all of Bazaar, Mercurial and Git are excellent. It’s clear that they leave SVN for dead. When I run across open source projects, especially new projects, that are still using SVN I silently raise an inner eyebrow.

But like I said, I don’t want to get into details. What I do want to do is say that I really like a plugin for Bazaar called viz (aka vizualize). It’s in bzr-gtk in case you use apt-get.

You just type bzr viz and it pops a glorious window with a visualization of your branching and merging history. The image above is just a fragment of the full window. The most recent activity is at the top, so as you look down the page you’re looking at older and older branches and merges. On the left you see the branch numbers. The vertical lines are the branches, the left-most being the trunk (in this case). You can see that the 2 right-most branches have no activity in the fragment shown.

If you want to take a look at more of the window, showing a different part of the tree, click on the following image.

Not only does Bazaar make branching really lightweight, it takes all the uncertainty out of the process (ever try merging branches in SVN, reading the log file to make sure you’ve got the right revision numbers before entering the extremely long command?). Plus you get full history when merging (and this is nicely displayed in the output of bzr log) and with a tool like bzr viz you can just see the history. Our tree has some much more complex sections, including one where Esteve had 25 branches going at the same time! And yes, they all got merged to trunk. Bazaar makes branching and merging so simple you just start to do it all the time, and it becomes very natural. Then you just merge whatever you like into whatever you like and gradually merge your way back into the trunk (after merging the trunk into your branch first to have a look at things). It’s great.

That’s it. No time for blogging. I’m waiting for someone to upload a patch so I can continue working. Meanwhile, lightweight distributed version control has really changed how we work. It’s much much better. If you’re still using SVN and haven’t checked out Bazaar or Mercurial (and there are several others), you really should.