[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

keyboard shortcuts

Filed under: Hacking — Thomas @ 14:39

2009-02-23
14:39

At FOSDEM I was hacking a little on a script called Quicktile which seems to be a handy tool for window placement. More on that later, but one of the things that makes it useful is that you can have it listen to certain key combos and react on them for window placement.

Except that, both on my T61 Lenovo laptop and my Logitech Wave keyboard, the shortcuts you're supposed to use (Ctrl-Alt-Keypad numbers) don't actually work.

Since I've always been scared about the way keyboards are handled in Linux I never took the time to learn and am now thoroughly confused by all the layers involved. Raw, cooked, kernel, console, X, xcb, keyboard mappings, ...

So, simple question to all you knowledgeable hackers - if my Gnome Keyboard Shortcuts preferences applet behaves like this, in combination with ctrl-alt:

  • 1-2-3-4-6-7-8-9 are dead
  • 5 and 0 act like Escape (abort)
  • Enter is correctly recognized as KP Enter
  • All others (., /, *, -, +) are dead too

- then what is wrong, what should I reconfigure, or what should I do to get all my keypad keys recognized ?

Interestingly, my Thinkpad behaves much the same, except that it lacks a Keypad Enter, but the main Enter button is recognized as a KP Enter.

UPDATE: Jan pointed me in the right direction apparently this is due to the mousekeys function, which hijacks your numeric keypad to let you move the mouse pointer using the keyboard.

I had no idea this existed, and I honestly still don't know if I should be feeling mentally violated for having my interpretation of NumLock thus subverted, or whether I just discovered a supercool feature that would have helped me out in so many cases in the past where the mouse for some reason didn't work. Ah, the agony of having choice!

I'll try it out on my Thinkpad tomorrow.

Now *that* is quality

Filed under: Life — Thomas @ 11:03

2009-02-20
11:03

I ordered some shoes on Tuesday from a store in London (I had bought a blue pair on sale in Barcelona, and went looking on the net for other colors). The store they originally came from, S***R-LONDON, had that model in grey, also on sale. around 40 euros shipping included.

I ordered them, got a mail within 5 minutes saying the order was received and the next morning that the shoes had left the building. The mail gave me a tracking link and the link said I would have the shoes today. Yeah, right, I thought.

Five minutes ago the doorbell rang. My shoes are there, delivered by a hasty UPS man. (He actually gave me two packages - the other one was the hard drive from my dad's hard drive recovery process, a drive that had gone to Spain and back even though the company seems Belgian - but that's a different post).

I open the package, inspect, everything's fine. I go back to sit at my computer, and one minute later a mail arrives from the shoe company saying that their records show that the order has been delivered. Should I be checking my building for planted wires ? The mail includes a link to use in case I'm somehow unhappy with the delivery.

I think I'm going to use that link now to say how impressed I am.

Fun at FOSDEM

Filed under: Conference — Thomas @ 01:16

2009-02-08
01:16

1) I run into Jan in the bathroom (we used to work together). After a subdued 'Hi, how are you?' we finish our business, and go outside. Jan says 'OK, now we can hug!' Hugging ensues. I ask 'so you couldn't hug me in the bathroom just before ?' 'Nah, that would just have been awkward.'

2) Lennart, after he makes the obligatory inapropriate Belgian/children jokes, tells us the only joke he knows, then messes up the ending. If you meet him, ask him about crocodiles and male appendages. He tried to make up for it by telling his mother's favourite joke but I'm not sure I got it.

3)
Me: "Hey Jan, I have this patch I want you to look at before commiting to gst-plugins-good."
Jan: "Well, that's too bad, we're frozen for release for good."
Me: "Frozen for good ? You bastard, so I'll never get to commit my patch ?"
Maintaining GStreamer has gone to his head, I tell you.

Moules Frites

Filed under: Conference,Fluendo,Flumotion,Python,Twisted,Work — Thomas @ 17:49

2009-02-06
17:49

It went a little something like this.

I wrote a mail to our internal mailing list saying 'if anyone's coming to FOSDEM, I invite you to my place and I'll make moules frites for you.'

I was expecting, oh, I don't know, maybe four or five people.

After that, Pierre, our development manager started negotiating with our CEO to invite all the developers to FOSDEM. And he succeeded. And then the support team wanted to come too.

The result is now there are 14 people coming over for mussels and fries tonight.

This is what 14 kilos of mussels and 7.5 kilos of potatoes look like before preparing.

By the way, if you like mussels, you like programming (especially Python), and you like Barcelona, we are hiring again. (Actually, we also hire people that don't like mussels). You can also come talk to anyone on our team if you happen to be at FOSDEM so you don't have to take my word for how awesome working at Flumotion is. You should be able to recognize them by their shirts.

ways in which git makes the opposite of sense to me

Filed under: Hacking,Python,Twisted — Thomas @ 14:05

14:05

DISCLAIMER: I originally wrote this post 18 months ago but never posted it because it was unusually negative.

Recently, with GStreamer switching to git, and GNOME thinking of moving to it as well, I thought I'd pick the post back up and see if git had improved since writing it. For me, the most frustrating things about git are:

  • the user interface experience is the absolute worst of all of them since tla was around
  • there is no obvious way to do it - clearly shown by the 50 different git tutorials, and the myriads of git commands that are very similar-sounding and have strange descriptions that to the layman sound like they would do the same thing

Personally, I remain convinced that it would be easy to start a git hater's blog (much like the linux hater's one) and fill it with content, though I doubt that will stop me from using it in practice.

Feel free to rush to the defense of git, insult me, call me stupid, whatever you want! I just thought it'd be an interesting exercise to see if my frustrated vitriol from last time still held up.

I'll annotate each part with today's experience in italics, and finish off with a final git score.

Exhibit A:

[thomas@ana git]$ git init
Initialized empty Git repository in .git/
[thomas@ana git]$ mkdir t
[thomas@ana git]$ git add t
The following paths are ignored by one of your .gitignore files:
t (directory)
Use -f if you really want to add them.
[thomas@ana git]$ find . -name ".gitignore"

There is no .gitignore file, so what are you talking about ?

2009: this now actually works without problems. Score one for git! 1 out of 1 for git usability improvements.

Exhibit B:

[thomas@ana tmp]$ git clone gt clone
Initialized empty Git repository in /home/thomas/tmp/clone/.git/
fatal: 'gt': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
fetch-pack from 'gt' failed.

Ok, so I have a typo. But this is how you choose to let me know ?
"unable to chdir" OR "not a git archive". Hey, YOU're the computer. And git, you're the program tracking these things, you can't tell the difference between a git archive and something that is not ? Why don't YOU tell me which of the two it is instead of failing to handle errors in a logical way.

Also, I have no idea how it knew that I was on the phone with my mom and my mom got angry at something I said and ended the conversation. Oh ,wait, that wasn't what you were referring to when talking about unexpected hangups ?

And I thought fatal meant fatal. Apparently the first fatal was not fatal enough to already stop, you prefer confusing me with another fatal. Which one of the two should I be fixing ?

Kudos though for cleaning up the failed creation of the clone repository.

Please, when I make this simple mistake, tell me only: "The repository 'gt' does not exist."

2009: behaviour exactly the same. 1 out of 2 for git usability improvements.

Exhibit C:

[thomas@ana clone]$ ls /usr/bin/git-* | wc
139     139    3158

Compared with

[thomas@ana clone]$ ls /usr/bin/e* | wc
69      69    1244

I would say that the Lobby For Commands In /usr/bin Starting With G has gone a little overboard here.

2009: only 131 commands left for git. In the interest of preserving my sanity I'm not even going to try figure out which ones got removed or replaced or folded. 1 out of 3 for git usability improvements.

Exhibit D

Maybe that last one was an unfair stab ? Maybe 139 binaries come for free anyway so I should not complain ? I wasn't sure either first. Until I took two random entries from there and ran:

[thomas@ana clone]$ git whatchanged -h
fatal: unrecognized argument: -h
[thomas@ana clone]$ git citool -h
usage: /usr/bin/git-citool
[thomas@ana clone]$

Care to guess how many of these binaries have no useful -h output ? I sure don't want to find out, there's 139 binaries to check. 130 of them have manpages though - I guess that could be one reason why git implements "git command" by having a binary "git-command" - how else are you going to document this monster ?

What I *really* wanted to do when finding this out is to find a command that would show me which files are not under version control and give that to me in the most easy to parse way. git status is something, but maybe one of those 138 other commands gives me something better ?

(answer after some random command 'bisecting': git ls-files --others)

2009: behaviour has changed, but is still unhelpful

[thomas@ana git]$ git whatchanged -h
fatal: bad default revision 'HEAD'
[thomas@ana git]$ git citool -h

The last one now pops up a TK dialog box that says "couldn't open /usr/share/git-gui/lib/tclIndex": no such file or directory. 1 out of 4 for git usability improvements.

Exhibit E:

In my quest to figure out what some git commands do without wading through the man pages, I've resigned myself to the black box approach.


[thomas@ana clone]$ git describe
fatal: cannot describe '02d3a05f1e9710f9a6683ed8a62c9bd2ff3680a8'

For once I must side with git on this one. I have no way to describe that hex string either.

2009: output changed, but equally unhelpful:

fatal: Not a valid object name HEAD

Still inclined to side with git, I don't name my objects HEAD either. 1 out of 5 for git usability improvements.

Exhibit F:
I'm following this simple tutorial and it suggests that git has a slightly different model for committing. Most VCS systems have you "add" paths to tell the VCS you want to track them. Git seems to have something in addition - it has "files that it tracks", "files that it tracks and is going to commit in the next changeset", and "files that it doesn't track". git add then seems to be used to add to "the next changeset", and as a result also add it to "files that it tracks". A little confusing, but OK. So basically, to do a commit, you must add files to the commit.

The tutorial explains that you can do both at once by using git commit -a. Obviously the two step process of committing was so unintuitive that they made an option do to both, and the tutorial thinks this shortcut is important enough to mention.

Except that this happens:

[thomas@ana git]$ touch 1
[thomas@ana git]$ git commit 1
error: pathspec '1' did not match any file(s) known to git.
Did you forget to 'git add'?
[thomas@ana git]$ git add 1
[thomas@ana git]$ git commit 1
Created commit 79e67c26b27c80f7f0ddc37293cbc022f932c968
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 1
[thomas@ana git]$ touch 2
[thomas@ana git]$ git commit -a 2
Paths with -a does not make sense.
[thomas@ana git]$

I guess I should be lucky it didn't call me stupid outright. It may not make sense to you, git, but I guess this is how my intuition works when I read your tutorial and you've already made it clear to me that you're not planning to have your help or usage output to be helpful or useful or for that matter even be period.

As a hint, here's what I expect to happen when I run git commit -a 2:

  1. git adds the file 2 to the next commit
  2. git commits the change to file 2

That wasn't so hard to make sense of now, was it ?

2009: slightly different behaviour. First off, the actually helpful suggestion from before (did you forget to add 1) is now gone. Why ? The second part is still the same, exactly as is. 1 out of 6 for git usability improvements (and actually a step back).

Exhibit G:

[thomas@otto git]$ ls /home/thomas/tmp/git/repo/.git/
branches/    description  hooks/       objects/
config       HEAD         info/        refs/
[thomas@otto git]$ git checkout /home/thomas/tmp/git/repo
fatal: Not a git repository

What do you mean, not a git repository ? I gave you one argument that clearly is a repository. Could you try and tell me what is wrong in a way that us humans can read ?

2009: different error:

[thomas@ana git]$ git checkout /home/thomas/tmp/git
error: pathspec '' did not match any file(s) known to git.

I'm guessing I should be giving it an additional argument. Hey, wouldn't that be a nice understandable error message instead ? 1 out of 7 for git usability improvements.

Exhibit H:

gitk is in Tk. Tk !!! 1991 called and they ... Oh never mind, not even going there. No, really. Start it up and click on 'File'. Then move the mouse pointer to 'Edit'. Is it just me, expecting the logical thing to happen, while nothing happens at all ? At a guess, this behaviour was probably for those people who were logging in to a remote X server over a 300 baud modem.

2009: still the same. To be fair, the application is actually pretty useful, you'd almost forgive it being written in tk. Still, 1 out of 8 for git usability improvements.

If you're still here, feel free to point out where git's behaviour really was my fault. I'm all for learning more about why things are the way they are. I'm just not convinced at all yet that git has made huge inroads on the usability level as its defenders often claim when discussing git vs. bzr.

« Previous PageNext Page »
picture