Archive for the ‘Open Source’ Category

In Critique of Git

Monday, November 26th, 2007

Now as anyone who knows me knows, I love Git. I find it gives a very productive and comfortable workflow. One of my favourite new(ish) features is git rebase --interactive, which along with cheap’n'fast branching gives a great way to hack and commit as you go and then later on refactor your work into sets of nice orthogonal patches.

However, there I do still find a good few things wrong with git, so I’d like to discuss these problems and possible solutions:

  1. Error Messages

    In general git has some terrible cryptic error messages. My favourite example is if you modify a file and then pull a change that modifies that file before you commit it:

    Updating beb8c37..b953e6f
    test: needs update
    fatal: Entry 'test' not uptodate. Cannot merge.

    WTF? what does uptodate mean? why isn’t it up to date? whats gone wrong? what should i do?
    Surely something like:

    Cancelling pull as 'test' has changes that would be overwritten by this pull. Please commit your changes or force an overwrite using the '--force' flag

    would be a lot better?

    I leave it as a reader excercise to repeat this process for most error messages…

  2. The index

    Why oh why oh why is it called the index? It does no indexing as far as the user is concerned. Its name gives you no clue to what it is, you don’t know when or how you’re supposed to use it. git add and git rm modify it and it’s used all over the place by the obscure low-level git helpers that you stumble over.

    How about commit staging area, that being what it actually is. You could have nice commands like git stage and git unstage and git stage --interactive. That’d make more sense, right? Then git add and git rm would be a lot more meaningful, being only used when you actually want add or remove a file.

  3. Remotes

    With git remote this is a lot better than it used to be - having to use cryptic refspecs (see git-pull manpage for the gory details). Unfortunately refspecs are still scattered all over the documentation just to confuse you… That should almost certainly be moved out to less user-visible documentation.

    The main issues I have now are:

    • Remote branches don’t always behave like local branches when they should. In particular git pull . <remote branch name> doesn’t work (and gives an obscure error) but git merge <remote branch name> does. remote branches should act just like local branches you can’t modify.
    • I’m not sure I like git branch -r to list remote branches, maybe git remote branches would be nicer and more obvious, or even git branch --remote
  4. Lots of git-* commands that confuse people

    This is a common complaint, and I have to say that I agree. Why not put all the low-level commands in libexec? People who really use them often (which can’t be many!) can always add it to their path.

  5. No bug tracker!

    For such a user-facing tool, a bug tracker would be very useful for users who lack the experience or time to get their hands dirty in the codebase. It certainly seems that just taking bugs to the mailinglist without a patch isn’t generally useful.

So, what do people think? What other bugbears do beginners and experienced git users see? Are these useful ideas?

After some discussion, I’ll happily take these to the git mailing list and come up with some patches!

Update:
Looks like people had some problems with my OpenID based login. Comments are now open.

Open Source in Mobile

Monday, September 17th, 2007

I’ve just landed in Madrid ready for OSiM tomorrow. If you’re there and want to chat about Codethink, GNOME Mobile, Tinymail, OHM and power management, HAL on embedded, D-Bus or anything else, do feel free to search me out!

gobject-introspection

Monday, September 10th, 2007

So, progress has been moving on nicely on a tool for generating gobject-introspection xml. Development’s getting pushed forward now by two veritable geniuses, Jürg Billeter and Mathias Hasselmann. We’ve got sparse able to handle extended attributes, so headers can be marked up with details like ownership of returned data. There’s also a git branch of gobject-introspection where we’ve been delveloping some python code that takes the headers, runs sparse over and generates some basic introspection XML, using ctypes to call into gobject for getting interfaces, signals and properties.

Very Nice!

BUT, we’ve hit a big problem. Sparse is licensed under the Open Software License 1.1. Debian considers this non free, and it certiainly looks to have some overly onerous clauses. Linus did try to relicense it a few years ago, but hit a brick wall with Transmeta, who own some of the copyright from when Linus worked there.

We might end up having to drop the use of sparse and maybe have our own bison-based parser. We really don’t want to have to go there though. So, here’s my lazyweb request - Does anyone out there know anyone at Transmeta that we could talk to about relicensing this work? It might be worth pointing out to that it might be in their interests, given the patent termination clauses.

Introduction to Codethink

Friday, July 6th, 2007

As those of you who’ve been a bit more observant may have noticed, I now have a new company - Codethink Ltd. It’s really just starting up, but so far we’ve been doing work on HAL, OHM and Tinymail and it’s been good fun. However I don’t want to go the normal contracting house route of taking on employees to supply demand. This inevitably leads to static power structures and static role assignments which generally seems to lead to inefficiency, conflict and boredom as a company grows.

Where I want to take Codethink:

In business, I believe the future lies in loosely connected individual contractors, dynamically coming together to attack a project or idea, much as was described a few years ago in the seminal article ‘The Dawn of the E-lance Economy’ by Malone and Laubacher (Though I have to admit I hate the term ‘E-lance’..). Back then a few businesses were started up to try to facilitate this, like guru.com and elance.com, but I think these fail fundamentally as they don’t represent the knowledge of the network - that requires real people who actually know each other.

Of course here in open source we implicitly understand the importance of knowing each other’s strengths, the importance of introducing new people to our community and building new expertise. This can only happen in loosely-bound structures, where cost of entry is negligible - quite the opposite of the standard large-corporation model.

So with Codethink I propose to act as an agent of change. I plan to provide support and help to groups and individuals who want to strike out on their own. I will use my knowledge of the management, architectural and coding expertise of these individuals to provide the service of assembling teams to attack projects for clients.

There needs to be another side to the equation. For this to scale, I also need to invest in bringing new people into our open source world and training them as experts able to strike out on their own. So that means taking on employees of a kind - but with the covenant that I will be expecting each employee to be looking at becoming her own boss in time.

So my cards are on the table now - for this plan to work it needs to be transparent by default. It may turn out to be a crazy idea that’ll never work in practice, but lets see.

If anyone wants to chat with me about these plans, you can find me at rob.taylor@codethink.co.uk on email and XMPP and I’m always around as robtaylor on Freenode and GIMPNet.







the taste of sweet crack

Wednesday, June 27th, 2007

I’ve been gradually pushing on in my free time on gobject-introspection, so I can make the dbus-glib bindings decent. A couple of months ago back I started hacking up a code scanner to generate the introspection xml,using code from gtk-doc, but using perl regexps to parse C just made me feel dirty…

Johan Dahlin pointed me at Sparse, a front-end parser for c developed by some of the kernel guys. The only problem is that it doesn’t have language bindings (or even, seemingly, a stable abi). So I’ve just submitted a patch to sparse that adds an executable ‘c2xml‘. c2xml will dump the parse tree of the input file as a simple xml structure, suitable for manipulation by some python or suchlike. That could then be used to, say, generate c api descriptions, documentation and language bindings or make code navigation or refactoring tools.

I like it!

On Cambridge, UK and the arts..

Tuesday, April 24th, 2007

For some reason the arts are really badly promoted in Cambridge. There’s an absolutely stunning festival of art and technology on this week called ENTER_, which has apparently had 2 marketeers working for 6 months to promote. The strange thing is, I only heard about this a few days ago when I came over it in a completely unrelated blog. Same for other guys here involved in tech and art. Something’s broken in this city…

Update:
It might actually help more if I get their link right….