Git: You are in the middle of a conflicted merge.


So i’m not a git expert. But i’ve been using it for about a month and i’m mostly really happy. The only time it drives me crazy is when i get this damned message.

~/code/tt (master) $ git pull
You are in the middle of a conflicted merge.

It’s like this swamp in the gitverse. Normally merging is fine everything goes along with tons of merges branches for each feature which i merge back in. I really like it. But when merges fail git does not provide any path out of the swamp. Your magical merging technology has failed you and now you must find your own way out. Every command leads to the same damned message. “You are in the middle of a conflicted merge.” Well i know that! Trying git resolve doesn’t do much, that’s not even a command.

~/code/tt (master) $ git resolve
git: 'resolve' is not a git-command. See 'git --help'.

So what to do, well first resolve the conflict in your merging program of choice. Almost always for me it’s just textmate, open the damned conflicted file and edit it. FileMerge and others work too, but we’re just diffing shit, it’s not too hard.

Now here’s the trick, once you fix the problem, add the files which you’ve had to edit, and commit them.

~/code/tt (master) $ git add lib/im/response.rb
~/code/tt (master) $ git commit -m 'I hate failed merges'
Created commit 34d2648: I hate failed merges

That’s it. I’m writing this blog post because i keep forgetting what to do, and when i search on google for the error message, You are in the middle of a conflicted merge. i get some damned message on the kernel dev list about the development of git.

So here the steps are:

  1. Pull the update from master, or whereever – git pull
  2. See the dreaded merge failed message
  3. Edit the files which failed to merge correctly cleaning up the code
  4. Run your tests / specs just to make sure you caught everything
  5. Add and commit the manually merged file. git add path/to/file.rb; git commit -m “work damnit”
  6. Go back to pushing and pulling in peace

Git’s an amazing piece of technology with some really broken parts to it’s interface which makes learning how it works hard.

To me it’s similar to the differences between the GNU stack and Solaris. I came to know about the GNU tools through Linux, it was just how everything worked. Then one day i had to use Solaris, and the commands had all the same names, and worked. But not as well. The GNU tools have really amazing user interface and interaction design. Seriously. Read GNU Standards for Command Line Interfaces and you’ll be amazed, that’s what we all think of as linux and unix. It works, it’s standardized. It makes it easy to guess what’s next and discover how the application works. It’s not given credit, but that document, and the extensive toolset like readline, built on it, is what makes the internet work. It’s discoverable, it’s built on the idea that you can pipe information from one program to another, and that they will all work. If you don’t believe me, just look at DJB’s amazing, but far from standard apps.

So what should git do? Well it should suggest a solution. Or make a solution documented in the examples of the man file. It’s pretty damned simple, fix the merge, add the file, commit, and you’re done. Instead it locks up and prevents you from doing anything until you intuit your way out of the problem. Insanity.

PS. Yes i’m lazy and should submit the fix myself, people are submitting contributions to git all the time.



The Open Web Foundation – Why Do It?


So i’ve not been involved in the newly launched Open Web Foundation but i have been following along as various folks i know worked on OpenID and OAuth. Is it a great idea, or yet another structure? I’m not sure.

Here’s my understanding. Most standards traditionally have been heavy vendor driven processes. Even when you don’t need $$$ or to be a big company to participate, you do need to have the resources to fly around the world to the meetings, like IETF. It’s painful and nasty.

There are a series of standards which are created using more open source / hacker / collaborative ways which are emerging from code, like extracting a framework from your application, you extract the standard from your work and best practices. It’s easy, lightweight, great, works.

Some of these extracted open sourcey standards get picked up and big companies want to start implementing them. This is great, just look at how OAuth has gotten adopted all over the place.

But there is a problem, these big companies have lawyers and their lawyers are both stupid and evil. Lawyers created the stupid and evil system of intellectual property. These lawyers all seem to have adopted a particularly brain dead view of what my happens with related to participation and patents and intellectual property rights.

They think that unless you have a magic paragraph which says you don’t grant patents and intellectual property rights just by participating in a standards process, or even USING or READING a standard, the big corps loose their rights to enforce their patents.

Yes it’s super stupid, but that’s what you get when you let lawyers run your world.

So the Open Web Foundation is about creating something which will shut the lawyers up and let these bottom up, extracting standards folks still work without having to die the death of a thousand meetings with legal.



Beyond REST? Building Data Services with XMPP PubSub


Kellan and I gave a talk today at OSCON about some ideas we’ve been playing with around how to make web services work as things keep getting bigger and faster. Apparently it was well received.

UPDATE: There’s a great write up by Robert Kaye about the talk by on O’Reilly Radar and Joshua Schachter confirmed similar use / abuse pattern for delicious.



Does genuine tech innovation happen better in a recession?


I know this may sound a little counter intuitive, but bear with me. There are some important kinds of innovation in technology which require a recession and not full employment. In the late 90’s there was the huge dot.com boom, everybody who could code at all was working from dawn to dusk. Some people made huge amounts of money, some also lost it, others just worked endless hours.

Then there was a collapse, huge numbers of geeks were unemployed, hundreds of thousands in the san francisco bay area alone. Out of that collapse there was time for people experiment, play with stuff, do things which were not required for meeting the next deadline. That recession and massive underemployment of geeks created blogging as we know it today.

It also laid the groundwork for the small agile startups which optimize the whole web 2.0 thing. Ludicorp which could go from building a multiplayer game to photosharing site. Design shops who have time to roll their own web framework in an obscure programming language from japan, and the like.

When you are busy and having paying clients banging on the door, you don’t have time to focus on exploring new areas, discovering the depth and meaning of your medium. When i was working at odeo we were all heads down, coding, fixing, building, getting the damned thing done. There was real competition, apple and yahoo were both wanting to crush us with their huge legacy advantages of userbases and platforms. It was only once we realized we’d lost, that Odeo wasn’t going to be the podcasting platform we’d envisioned, that Ev decided to do a series of hack weeks, play with new ideas, see if there wasn’t something new which could be created. That playing around seemed like floundering to me at the time. I was frustrated and burned out. But that process is what helped Jack pickup some ideas he’d had floating around in his head for years, but no time to work on. Those ideas became twitter, called twttr at the time.

The dot bomb wasn’t the only time when many techies were underemployed. I was reading a review of Matz’s keynote at Ruby Fools in denmark a few months ago and something jumped out at me.

“The recession in Japan meant that Matz – while not unemployed – didn’t have many assignments at work, so he secretly started to hack away at Ruby at the office.”

Not only was blogging the result of industry wide underemployment of geeks, and twitter the result of a similar thing within a single company, but Ruby was created in a very similar environment during the recession in Japan in the 90’s.

To the vast majority of programmers, it’s a job, they’re the %80 who are vocational programmers. They program during their work day, and go home to do other things, on the weekend they aren’t working on their own projects. Then there are the people who are obsessed, the geek’s geek as it where. We believe in learning a new programming language every year.

Real innovation in software seems to happen when we have underemployment of the true geeks. Either inside of companies where the geeks are allowed to explore, or outside of companies through economic forces. Long hours and tight focus is often needed to get a startup going, or ship software, but it’s not what creates something really new.

It’s ironic, the very forces of modern capitalism which praise the internet economy as being the ultimate in friction free globalized markets hold back real innovation. It’s the down cycles, either within companies or in the broader labor market, which give the innovators space to risk walking down dead ends. It’s a cliché to say that you need to be able to fail if you are going to take real risks. When geeks are free to hack on their own then no deadlines, just interesting spaces to explore. It’s then that we see real innovation.

I spent a year working at Yahoo Brickhouse, we were supposed to be yahoo’s ‘inner startup’. We were going to find a way to create new stuff, employed to wander in the woods and come back with amazing ideas. We were told that it was ok to fail 9 times out of 10. We built several things which never made it out the door, two which made it to beta launch, Bravo Nation, and Fire Eagle. I’m not sure what the future of Bravo Nation is, but i know Fire Eagle is going to launch and it’ll be a major part of making location based systems interoperate. Fire Eagle was a project which was started by Tom Coates, Paul Hammond, and Simon Willison, they were working from London and largely ignored by everybody at Yahoo. Before they could finish they were taken off of the project to finish higher priority things. Then Yahoo Research Berkeley said, oh there are some neat ideas here, and they played with it for a while, they were also ignored by the larger yahoo who focused on shipping things rather than playing with interesting concepts. Eventually Tom talked Brickhouse in to joining in on this crazy location broker idea and it took another 6 months of work to get a beta out the door. The whole process went round and round all the while yahoo was doing it’s own internal soul searching. At the end of the day Brickhouse had to make either BravoNation or Fire Eagle succeed or it was getting restructured in to who knows what. The day of the big layoffs back in February, Brickhouse lost it’s director, Salim Ismail, and his boss yahoo vice president Bradley Horowitz. Caterina, who had the brickhouse idea in the first place, had already left on maternity leave. Chad Dickerson was left in charge and did amazing work to help fire eagle get out the door and support Yahoo Live. Clearly we weren’t actually allowed to go off and fail 9 times out of 10 in the process of coming up with a crazy new and important idea.

What i find truly ironic about the process is we did end up coming up with a pretty damned good idea. That of using oauth and webservices to broker information between other applications and services on the web while leaving the user in control and protecting privacy. Were we the only ones who came up with it? No, innovation is about a community of thinkers, there were many people involved who work at many places including twitter, pownce, magnolia, six apart, wesabe, flickr, many others, and of course yahoo and google. You see it now with interest in federated social network, the gnip project, and other stuff which is still in the works.

Shipping a product and being innovative are often not compatible goals. The innovation happens in the downtime, then once an idea has gelled, the innovation stops and the work of creating production code begins. Sometimes it’s the same folks, most of the time it’s different folks. Often there is a long gap between the ideas being created and somebody building something useful on top of them.

We need recessions and underemployment of the innovators for them to have time to do their work. In a more ideal world, we would support this just like we should support having artists in society. Until we change it, we’re stuck with dumb brutish capitalism which has lucked in to creating these spaces for innovation.

Update: I fixed some of the spelling and grammar problems, thanks. :)



Dear Lazyweb: What’s a good prosumer soho wifi / router / access point?


So i’m sick of flaky wifi / routers / access points. I’ve had netgear’s, d-link’s, belkin’s, and linksys routers. To me they all were about the same, which is to say they worked some of the time.

Before i go back to getting one more of the same to replace my now limping netgear, i’ve thought, what if i got something more than the cheapest consumer class wifi router. I know that hotels, conference centers, and all sorts of other places have wifi which doesn’t need to be restarted on a regular basis, that doesn’t suck. Sure some have wifi which sucks, but some don’t. The same goes with companies, at Yahoo! there was good wifi coverage all over campus, their crazy vpn made it hard to use, but the coverage was there.

So then my question becomes, what are my options one level up? So far a little searching around i found the Cisco Aironet’s which start around $200 for the lower end models and the ZyXAL’s ZyWALL 2WG router which supports 3G as a backup connection in addition to being a wifi router at $250+.

Are those good routers? What are the alternatives in that quality range? Has anybody tried and used either of those?

Dear lazyweb, please help….



iPhones in Argentina, Uruguay, and Paraguay


So while everybody up north is getting ready for the introduction of the 3G iPhone, it’s also arriving down at the bottom of the world. Apple chose the mexican company, Claro, formerly CTI Movil, to sell iPhones in latin america, probably because they could go with provider and get the whole region.

While Claro hasn’t been very clear about exactly how much the iPhone will cost, when it’ll be for sale, or really anything except to say that it’s coming. I do have some information.

According to their prices posted for mexico the monthly plans will cost between $45 USD per month and $85 USD per month. The rumors for chile had similar prices. The phone will cost between $450 USD and $0 USD depending on contract, 8gb vs 16gb, etc… Taxes included, which in latin america are substantial, here in Uruguay the IVA sales tax is %21.

How many iphones are coming down south? Well i don’t know all the numbers, but Claro’s confirmation page when you request notice about the phones says that they have imported 20,000 phones to Argentina, Uruguay, and Paraguay each. On the surface that seems fare, each country gets a nice shipment. The problem is, Argentina is a MUCH bigger country than the guay’s. Argentina’s population is 40.6 million, Paraguay’s 6.8, and Uruguay’s 3.4. The data i found is from 2006, but Argentina’s cell phone penetration is better than %76. Uruguay’s is %67, and Paraguay’s is %47. So not only did Argentina get fewer phones, they’ve got more people are likely to WANT one. There are 13.5 times more iphones for sale when adjusted for the cellphone ownership market in Uruguay than Argentina!

Given that it’s a couple hour ferry ride across the river from Argentina to Uruguay i expect there might be a grey market of Argentines buying their iPhone from Claro Uruguay if Claro Argentina sells out.

There have been come claims that Movistar (owned by the spanish telefonica) also will be selling iPhones in latin america, but clearly it’s not at launch, because there’s nothing on their websites about it.

I’ll followup when they actually release their prices and say when they will start selling them.



The ascendancy of Hacker News & the gentrification of geek news communities


I’ve been reading the reddit clone site, Hacker News from ycombinator more lately. It’s got a nice combination of alpha geek tech and small / agile startup topics. While i like the political news on reddit, honestly it’s stopped being very topical for me… to much taken over by link spammers i think who are gaming the system for traffic. The subsites like ruby.reddit.com are still a great source of traffic.

What has surprised me is that Hacker News seems to have found me about the same time i found it. When i went to go do a post i thought might be relevant to the community, about moving email from using smtp to xmpp, i posted it on hacker news. Only after did i discover that somebody had already posted a link to it.

Then yesterday i did wrote another blog post, this time about leaving yahoo brickhouse, and again over half the traffic came from another link posted to hacker news. So what’s going on here? Well first the community of folks has shifted. It’s previous semi-private places have been lost and new places created.

For me long ago i read slashdot, then kuro5hin, then my delicious network, then , then Hacker News. There were others in there too, i get lots of links from reading topical blogs like rubyinside, activist news from indymedia, etc…

The shift of online communities resembles urban development and the gentrification of many hip neighborhoods. The artists and hackers move in first, they are in development parlance, risk tolerant. For urban neighborhoods that means they’ll deal with crime if they can get cool warehouses to take over. Then slowly the neighborhood transforms, and gets some nice cafes and clubs, gets known as the place where the hip kids play, and more people come. Rent gets driven up, the crowds come, it becomes to crowded, and the hipsters have to move on. Just replace hipsters with alpha geeks and you get the same process.

We are creating virtual communities and then by our very own actions gentrifying them!

So why do i like the small sites, not just hacker news, but dzone, rubyflow and a bunch of others? Well for one because they work well for me. I can submit a link, or in the case of hacker news, somebody else in the community links to my stuff, and then i get traffic. A lot of traffic really, I can get 7 votes, but that translates in to 300 to 3000 visits to the article. It’s much harder to get on the front page of reddit, or dare say digg where the true unwashed masses of tech news junkies hang out these days. It’s even harder to get on top of yahoo buzz, where a few hours on the top page can lead to millions of page views.

Are we doomed to keep creating these communities, enjoying them for a while, then having to abandon them and move on? When i helped start indymedia.org back in 1999, we thought open publishing, the ability to put on the internet your own articles, videos, pictures about news was revolutionary. It was a big deal, this was before you could just create a blogspot or wordpress site. Our enemy was CNN the site which only showed you the news they wanted… But today cnn has Unedited. Unfiltered. News. iReport.com which is pretty damned similar to what we were doing with indymedia. Then then take some of the news created on ireport and integrate it to cnn.com’s site and use it in the news. The BBC does something similar.

The point is, we won. We took an idea, which said that the masses should be able to make their own media, and we did it as an example and eventually the people we were fighting against started copying us. No we didn’t win all of what we wanted, we had a political agenda which we able to advance here and there, we stopped the WTO round, ended the FTAA (free trade area of the americas), but in may ways we won.

So what does that mean to online communities, generating and finding news? Well first off it turns out that we, the broader hacker community is doing a good job at coming up with models which change the world. From blogs to wikis to link voting and collaborative editing, we’re coming up with ideas which other people are copying. Or sometimes the hacker community’s tools become mainstream. But we also face the reality that there is a tremendous value in influencing what gets seen.

If you can make a website which gets a lot of traffic, there is money to be made there. That’s the attraction of the SEO / SEM world. They’re not respected by true hackers, but they are huge, and they come in and destroy communities like reddit.

One option is we just keep moving, which is what we’ve been doing. From slashdot to kuro5hin, from digg to reddit from reddit to hacker news.. The other option is we try and build in to our systems anti-SEO / SEM protections. Find ways to use emergent behavior to find real and relevant content without having it be gameable. Twitter stopped spammers by using tinyurl for all links… Delicious did it by making it so my network is people i choose. The link voting sites will have a hard time. Perhaps we’ll just switch sites every 6 months to a year, but there’s got to be a better way.



Good Bye To The Purple Mothership: Leaving Yahoo


I just realized that i forgot to post anything on my blog about this… woops! I left Yahoo Brickhouse in April. I twittered about it, but wasn’t sure what to say in a blog. While at Yahoo i got to do the architecture work and a lot of the development of Yahoo! Fire Eagle. We launched the first rails app at Yahoo and were the first to release a working OAuth implementation. Working with Brickhouse was amazing, a great group of people who worked incredibly hard to release an amazing product.

Working with, or rather for Yahoo, was not so great. It was a constant painful struggle. Maybe at some point i’ll sit down and write about the relationship the reform movement part of yahoo had with the mothership. While i tried to make things better, i’m not sure that improving the quality of a fortune 500 company is really my cup of tea.

I have looked at a number of options since leaving Yahoo, and decided to spend some time coding along side the amazing geeks at entp.com. One time at a foocamp i heard somebody say, “find the smartest group of people you can and work with them.” Entp makes Lighthouse a ticket tracking system that rails itself uses, and a few other apps.

Moving to a small agile company is a breath of fresh air. Instead of we need to have a meeting about it, my questions get answered with, “sounds good, pdi”. Instead of being told that subversion is on the timeline for 2 years from now, everybody’s using git.

In addition to working with entp i’m also doing some work as an adviser to mapufacture, change.org, and others helping them with scaling, architecture and tech strategy.



The Future of Email: From SMTP to XMPP


Email is dead! Long live email!

Email has long been the killer app of the internet. It has taken us to a world were everybody has an address and anybody can send an email to anybody else. Email works incredibly well.

At the same time, email is totally broken. Address books are painful to maintain, and they don’t tell us about somebody’s ability to actually reach another person. Spam is a major problem, i have no easy way of saying who i want to be able to send me messages, no way of saying, i don’t want messages from you any more. Spam, and getting around spam filters with legitimate email is a huge problem. The vast majority of email is spam.

There is a reason the myspace/facebook generation hardly use email. They’ve got a system which solves the spam issue, built in is a buddylist which lets you define who can send you messages. It’s also a realtime system rather than a store and forward system expecting users to be mostly offline. The problem is these message systems are walled gardens.

Jabber, and it’s XMPP protocol, were built for IM, but they made it super flexible. It can easily be used for email to solve the delivery permission / address book issues. Now i can easily authorize people to send me messages.

The addresses are even compatible, so you can have a bridge, attempt to deliver via xmpp and if the domain doesn’t handle xmpp roll back to smtp.

Of course i’m far from the first person to have thought of this, it’s come up in 2004, 2006 and 2007. So the question is, why hasn’t it happened. Well first off, these things don’t just happen on their own, somebody has to do the work, write software, organize it, make the change you want to see.

How could we get from here to there? Kill email so that email can live free?

Well the way i see it there are several things which need to happen. It’s a chicken and egg issue, nobody is sending email via xmpp because nobody can receive email via xmpp, the clients don’t exist. Nobody’s building xmpp email clients because nobody’s sending email via xmpp to receive.

There are some things working towards adoption of xmpp for email. Critically, the email address can stay the same. Many of the alpha geeks already use the same address for their email and their jabber IM accounts. The email address is deeply embedded in the culture and any attempt to vary from it would doom the move to email over xmpp.

The second thing which can help lead to adoption of xmpp email is the integration of email / messaging and IM. You see it in yahoo mail, facebook, and myspace. The big email / messaging providers are already routing IM messages alongside the email.

The third third thing which will help is we don’t actually have to get very many providers to adopt xmpp email to get critical mass. Despite email’s incredibly federated nature, there are a few providers who have hundreds of millions of accounts. Get one, or several of those providers to switch and provide xmpp email support in addition to smtp email, and you’d be able to use that to shift everybody over. The promise of getting out of spam filters will be enough to get the big senders to jump over, and once you’ve got both sides, then it can take years for the rest of the net to move over, it has to be a gradual process. Once you’ve got a big provider who accepts email via xmpp, then you can work on building out library support, create the email extensions to ejabberd, openfire, etc… and bridges to sendmail, exim, postfix, etc..

The obvious people to do this are the google gtalk & gmail teams. They’ve already pushed the idea that my gmail address IS both email and IM. They’ve got the servers running in parallel. It’s simply a matter of building out a test setup, defining how the standard will work, and getting gmail to support it.

This is not to say that there aren’t others who could do it. My ex-employer, Yahoo! could do it, but fixing the future of email is probably not a high priority. Microsoft could do it, but they have a hard time adopting open standards and wouldn’t be trusted by the open source developer community who maintain the current technology stack which makes email work. Other than google, the only other player who i could adopting this and pushing it forward is actually AOL. While mostly ignored, AOL has been pretty decent at adopting and pushing new technology and could see this as a way of getting back in to the lead setting trends for the future.

While we wait for somebody big to adopt it, building proofs of concept, making a system which will work, would probably push forward the case for replacing smtp with xmpp as our global email delivery system.



Speaking about Fire Eagle


Last month I spoke about Yahoo! Fire Eagle at the Emerging Communications Conference. Lee did a great job putting together the conference, and had everything recorded. I feel i did an ok job explaining Fire Eagle, but perhaps i had too much coffee to make up for being on the tail end of a dozen straight days of conferences.

So if you’re interested in Fire Eagle as it relates to the mobile and telephony world, this is a good talk. The slides are online at slideshare.net.

It’s humbling to see a video of yourself speaking. Public speaking is really hard. I’ve been trying to work on my presentations, and i’m getting better over time.

Next week i’m going to be speaking at xtech in dublin in a longer talk about Fire Eagle. I’ll get in to the actual api’s and bit about building apps with Fire Eagle. In July i’ll be co-speaking with Kellan about using jabber for web services in Beyond REST? Building Data Services with XMPP PubSub at OSCON 2008. In between i’ll be at Google IO and Rails Conf / Caboose Conf, but thankfully i won’t be speaking, unless i get inspired to do a lightning talk.