The current state of Mitter

I just tweeted about this, but better put here so everybody knows:

Mitter trunk (from SVN) is broken. Broken, broken, broken.

Why? It all started when I realized that all interfaces where saving the last seen tweet and last seen reply. Also, to cut the seen replies and tweets, the interfaces were actually removing the seen ones from the result set. In other words, we were requesting the full page of tweets/replies and then ignoring the ones whose ID was below the last one the interface displayed. Twitter supports a since_id parameter, which was created exactly for that. Also, we were requesting just the first page, so if you didn’t open Mitter for a while, you’d not see some tweets.

Also, for a long time, there is a hack to make console interfaces work properly. Due the nature of the graphical interfaces, we need to create a thread (kinda like another process, if you don’t know what a thread is) so when requesting data the interface won’t freeze. That’s not an issue for console interfaces and, to make them work properly, I had to add a hack, which make the code even uglier. The removal the thread broke the GTK interface completely… for now; I have plans on how to fix the GTK interface and they will be added as soon as I fix the network bit.

During this time, there was another thing bothering me: The amount of hard-coded values. The GTK interface, for example, only keeps 60 tweets in the list. Problem is, if you want to keep a bigger list, you’d need to change the code directly. That’s not a good solution to me, so the idea was to move everything to the config file, which pointed to the second big design issue: The options were floating all around the code. Keeping option values coming from the command line and from the config file was a mess. For that, I decided to create my own OptionParser (the command line option parser) and ConfigParser (the config file parser) combinator. Yesterday I finally finished ConfigOpt and I intend to move all Mitter options to use it (which will make our code cleaner and hard-coded values free — or so I hope.)

And, since I’m working in all that, I decided to start paving the road to multiple network support. A tiny bit of it is already there, but there is also a long way to reach the final line.

There is still a long way to finally make Mitter stable again. But we’ll get there, I promise.