Archive for the ‘Tech’ Category
Mitter and the Future, part Troix: The Alternatives
(This is getting long, doesn’t it?)
One more point to analyze the future of Mitter: The Alternatives.
Right now, the space that Twitter fills is getting crowded. Not that Twitter was there first, but it surely is the widest, most recognized service in the area. And, most of all, I’ll list one the ones I have an account.
- Twitter (me): Ok, you all know Twitter. 140 chars, used to have updates and notifications via IM (but is down for a very long time already), updates and notifications via SMS.
- Jaiku (me): Was there before Twitter. Works almost the same way: Messages are limited to 140 chars, updates and notifications via IM and SMS. Also, it provides a proper “reply to” function, which allows you to do a reply to an specific message (Twitter always points to the last message from the user you are replying to.) The problem with Jaiku is that, about an year ago, it was bought by Google and they closed the service to everyone. Right now, to get an account, you need an invitation code by someone that already have an account there.
- Pownce (me): Offers way larger messages (around 400 chars, if I recall correctly), proper replies, can share links, files and events. Doesn’t have IM or SMS notifications (or updates) but you can receive notifications via email.
- Facebook (me): Although it is a social network thing, it have a “What are you doing?” field (originally, it was a “[Username] is …” field.) As far as I can see, the status can be longer than 140 chars (but I’m not sure how long.)
- Identi.ca (me): The new Twitter clone, but completely open source. You can download the sources and run your own service. And, because it works with the Open Micro-Blogging Protocol, you can still reply to people using other servers.
- Tumblr (me): Tumblr works a little bit like Pownce: You can update your status, post pictures, links, audio and video. One the nice things that Tumblr does is create a page that actually looks like a blog to you.
- Plurk (me): Almost the same as Twitter (140 chars), but it can save some space with “actions” (you start you update with a pre-defined verb.) Again, like Twitter, they have IM notifications and updates, but it’s down for the moment. They have a timeline feature, which displays the “progress”
Now re-read the list and notice that every single alternative offers things better the Twitter. And, still, none of the them actually harm Twitter’s popularity. Heck, not even the FailWhale seems capable of harming that. But, still the point remains: There are alternatives to Twitter, which work better and/or offer more features.
Which brings us back to the point of “plugable” networks…
Mitter and the Future Part Deux: Community
Still in the line “What will happen to Mitter now that there are more options around” let me say that one of the things that are driving me back from Twitter development (or, better saying, developing Twitter applications.) is the community of developers.
When I started Mitter development, as usual I decided to lurk around the Twitter Development Talk, a list created by the Twitter developer themselves to talk about the directions of the API and the service. Long before Twitter became the synonym of “it doesn’t scale”, the discussion was always productive, with very small traffic. But it went really downhill after that.
You could find people saying that Twitter decided to close their garden only to read, a few messages later, that they were really abusing the system; a lot of “Twitter is not sending data properly, you broke my product!” complains, when they should be ready for anything and should be way faster if they solve thing on their side. It goes way down, to the point of people almost demanding when Twitter will fix their side. And always almost demanding Twitter to fix their problems.
I’m not trying to defend the brokeness of Twitter. It’s annoying and recently was enough to made me do a quick release ’cause Mitter was crashing hard (due some really broken JSON result) but… demand a fix from a free service? Complain about a service “destroying their business plan” when they were actually abusing the system? Sheesh. People, it is a free service and they have the right to simply close the API ’cause people don’t behave properly. They have no responsibility for your client or your business model.
And the worst part is that Twitter would usually bend over to make those guys happy. It saddens me to see a product with potential being directed away from its original vision to something to make everyone happy. Honestly, what’s the point of developing something for a product that may not be what they pronounced it would be?
Don’t get me wrong about those two posts. I loved Mitter and I still think it’s the best Twitter client around. I surely still want to make it become better and better but, each passing day, I feel more and more disconnected with Twitter.
Mitter, Maemo, Identi.ca and the Future
When I started Mitter, my plan was to create a client capable of updating my Twitter status using my N800. Since I could carry it everywhere because of its small size, it would be perfect. And I could do that using Python and PyGTK (PyHildon, but it’s almost the same thing.) My plan was quite simple: write a client small enough but capable of using multiple interfaces. That way, I could write the starting code without using Maemo and later just convert it. It may sound a little bit weird, but first I needed the network bits in place and then, later, I could just plug the interface. Even as today, I still have to fight the network layer (mostly because I didn’t made good plans about all that and a little bit because Twitter changed since I started the project [mostly the limits and user behavior].)
A few weeks ago, Mauku, the Maemo client to Jaiku (the micro-blogging platform now owned by Google), announced that they will have support for Twitter. Now users have an option to update their Twitter status in their N770, N800 and N810. Basically, Mauku did was I was trying to do for a long time.
And all that around a time when Twitter is under, let’s say, “attack”. Users are getting annoyed by the Fail Whale (the message shown when the services are down), although the situation improved considerably in the last month or so (but still, the little glitches, like followers disappearing without any good reason, still happen from time to time.) At the same time, competitors in the Micro-blogging arena are emerging. While Jaiku is another service in the same model of Twitter, it’s now closed for new registrations and you need an invitation to create an account there. Identi.ca, an open source competitor, suddenly appeared and seems capable of “stealing” Twitter users.
So, what are the plans in the future of Mitter? At this point, honestly, I don’t know. What I would really like to do is completely split the network bits from the main application, so you could plug networks are easy as you can plug interfaces today. There is an experimental (although completely functional) status update for Facebook on a separate branch. The reason it’s there is because I didn’t find a way to split the network layers properly. If such split was something easy to do, you could post to facebook, Twitter and probably Identi.ca.
The fact the Identi.ca have it’s source open is something that really compels me. And, by that, I mean that the next fail whale I see I’ll stop using Twitter and move to Identi.ca.
And what about Maemo? Well, since the interface is still plugable, it’s just a matter of writing it. My current problem with the Maemo platform is the environment. Installing Scratchbox is a pain lately, due:
- I have a MacBook now and PyGTK development on it is pain. Most visualization tools are slow or behave badly (or, at least, weren’t so pleasurable to use.)
- PyGTK on Macs is slow and buggy (either the X11 version or the Quartz version.)
- Scratchbox insists in breaking every now and then.
I think the last point happens a lot ’cause Scratchbox virtualizes the Maemo environment (an ARM processor.) So, any small changes on the host operating system makes it behave badly. Also, the fact that Nokia decided to create their own widget set based on GTK instead of doing something like the Windows port does makes things harder. I’d love to write it in PyGTK and not having to deal with the conversion to PyHildon.
All that sounds good and all, but you must remember that I’m just one guy. Although Deepak helped me a lot with fixes to the PyGTK, it doesn’t increase the count that much. And he (and so I) have a lot of other projects going around. If we go for another interface and another network code, it would be really hard to maintain such beast.
I don’t want to stop working with Mitter. But, at the same time, things are less compelling in this space for now. Maybe if I really managed to split the network and make it generic enough to work with all the current micro-blogging options, but there is not enough manpower for that at the moment. The best I could do is fix the current Twitter network layer and then start looking at a way to split that.
World of Blizzard
The year is 2010. To reduce production costs, Blizzard decided to join all its franchises into one single product. That’s when “World of Blizzard” was born.
On it, you can be a Protoss Zealot Hunter, in your quest to save the world from Diablo and his brothers.
One of the most popular races/classes is the Zergling Priest.
Blizzard plans to take over the world
(from the “it’s-funny-laugh” department)
Over the weekend, we had the announcement of “Diablo 3″, the new game from Blizzard. Blizzard is famous for its “World of Warcraft” franchise, which is about to get a new expansion, “Wrath of the Lich King” in a non-announced time. Blizzard is also working on “StarCraft 2″, so popular on Asian countries that they held competitions which could rival the Olympics.
Now… Can anyone imagine what would happen if Blizzard announced that those three releases would happen in the same day?
First of all, Asian markets would stop ’cause everybody and their mums would buy StarCraft 2 and start playing. American economy and parts of Europe would also come to halt due Wrath of the Lich King (and everybody racing to be the first reaching level 80 with their Death Knights.) The few pockets of resistance would be smashed by Diablo 3.
Governments, in desperation, would pay Blizzard to remove copies of their games from the market.
From Queries to ORMs
Let me start this by saying that I know I’m trying to do the thing in the reverse way, but what the heck!
So, a few months ago I decided to write the queries for my Web Gallery application. Why? ‘Cause I had no idea how to do it and I think it’s fun to play directly with SQL. Honestly, I couldn’t find a way, but asking some friends, we did come with a good solution. All of the queries are quite simple, except for this one (the one that retrieves all URLs [soon to be replaced by pics] which have a set of tags):
select urls.url, urls.description, urls.id from urls where (select count(1) from relation where relation.url = urls.id and relation.tag in (%s)) >= %d
[The "%s" is the list of tags and the "%d" is the number of tags]
So, this query works perfectly fine. But we are in the times of Web 2.0, where no one writes queries anymore and queries are like black magic and stuff. So yes, I’m thinking about using an ORM, but I can’t see how one ORM would be capable to reaching the same solution (or a better one) for that.
I just got to a point where I don’t believe an ORM would be capable of reaching a sane solution for what I want and I think it’s stupid to import and ORM into my project just to insert a direct query.
WordPress and the Cruft
I really like WordPress, but NanoBlogger always amazed me for its simplicity. It’s not like I update my blog every hour or something to have something rendering the same pages again (and dynamic content, like the Last.fm, Twitter and Del.icio.us widgets don’t behave properly under WordPress cache plugin — or, at least, it didn’t work when I tried last time.)
So, just for the fun of it, I decided to try to write a “WordPress 2 NanoBlogger” converter. The first is get a copy of the database, so I have the data to convert in first place. Simple MySQL-dump would be enough to me (well, not completely necessary, but I still don’t have internet at home and I can’t connect to my database without the data.)
Dump in hand, I decided to take a look at it. The amount of cruft on it is really impressive. I still have things about my LJ-exporter, which isn’t being used for a year already. And Twitter Tools is keeping copies of all my Tweets.
I know it’s not the normal WordPress use, but I guess it should have some option to clean up its database (at some request in the admin interface.)
Mitter and Git
For a while, I tried to keep a Git repository of Mitter. It looked all nice and dandy, but it was a pain to keep it up-to-date with everything, not to mention that Git-Svn apparently doesn’t convert SubVersion branches to Git branches (or GoogleCode is broken — anyway, branches doesn’t work for Mitter.)
But, for those who still want to play with Mitter code using Git, there is one solution: I set up a git repository to myself, following just the trunk, which is updated hourly (fetches the trunk from GoogleCode and updates the Git repositories.) The project can be seen here: http://git.juliobiason.net/?p=mitter. Just note that I’m not keeping this as the main repository, just a nice thing for people who want to play with Mitter (or Git.)
Useful Git config
Here are some useful configuration option for Git (thanks to Nathan and Simon for the tips.):
git config --global color.ui true # Colours for git status and git diff git config --global alias.st "status" # Make git st work as git status git config --global color.diff auto # Try to use colours on git diff git config --global color.status auto # Try to use colours on git status git config --global color.branch auto # Try to use colours on git branch
Also, using git config –global core.excludesfile ~/.gitignore and then editing a ~/.gitignore with the files that should be ignored will make all files ignore those files (easily to ignore *.pyc and *.sw?)
Git repositories on Dreamhost via SSH
After some mucking around, I managed to create a remote repository for Git projects on my Dreamhost account, without the need of WebDav. Here are the steps:
- First, you’ll need to install Git on the server side. But git also requires Curl, so the first step is compiling Curl.
Get curl here and Git here. - Install Curl using the default process of ./configure && make && make install. Just remember that you are working on your own home directory, so you’ll need to run ./configure with a –prefix like $HOME/software or something (just a suggestion, thought. But the prefix must be somewhere in your home directory.
- Now, to install Git, you need to configure it with ./configure –with-curl –includedir=$HOME/software/include/. Why? Because your curl headers are in $HOME/software and, without that, Git won’t compile with Curl and SSL (required for SSH). After the configure, you need to run make NO_MMAP=1 (as pointed by the Dreamhost Wiki, I haven’t tried without it but there they say it makes bad things like rape small children or kill Git processes or something.). Once it finishes compiling, install it with make NO_MMPAP=1 install (again, I’m not sure if the NO_MMAP=1 flag is required here, but I used it just to be sure.)
- Next step is to make Git accessible. Edit your .bash_profile and add $HOME/software/bin to your PATH. Note that changing it on your .bashrc doesn’t work — You have to add it on your .bash_profile. You’ll probably want to disconnect and connect again just to be sure that it will work (call git after logging again; if it complains about unknown command, your PATH is not right.)
- Almost done with the server side. Now you need to create the repository for your projects. Putting it into your “host directory” (the directory with your webpage) will make it easier to someone clone it. So go there and mkdir project && cd project && git –bare init-db. That will create a bunch of directories needed by Git.
Now you’re done with the server side. This step assumes that you already have a local Git repository (e.g., you did a git init and committed at least one revision on it.) On your computer you’ll need to change your Git config inside your project to have the following:
[remote "hostname"]
url = ssh://username@server.dreamhost.com/~username/hostname/project
fetch = +refs/heads/*:refs/remotes/dreamhost/*
push = refs/heads/*
Just be sure to change username to your Dreamhost username (twice in that row), server to the Dreamhost server you are allocated (or you can replace the whole thing with your own hostname, but you’ll still need to put it on the path), hostname is your hostname directory and project is the name of the project you created in the server. Once you updated your config, do:
- git-update-server-info
- git push hostname master
It should work at this point. Note that I have changed my SSH to be passwordless, so you may find an issue if you don’t.
