Wednesday, 30 January 2008

Why I like unix

I like unix because it is easy to do tasks with throw-away 1 liners that take less than a minute to come up with.

I had re-factored some patches from one source tree to another, and I needed to make sure that I hadn’t missed any fragments.

$ git-diff ccache..v4-0-vfs-proxy | grep '^+++' | sort | uniq | sed -e "s/^\+\+\+ b\///" | while read f ; do diff -bwu ../$f /home/projects/samba-git/$f ; done

So I get a list of files that my changes affected, and then compared those to the equivalent files in the new tree. The diff was small and consisted mostly of pre-existing changes between the two trees.

I was easily able to account for any other slight differences is the resulting files.

I suspect that there were git-tools to help here, but the point is that I didn’t have to learn the official way to do my task, but I was still able to do it quickly based on existing knowledge.

Friday, 25 January 2008

Should I say thank-you?

Sam,

Of course I thank some-one in front of me who holds the door open for me to pass, but if the same person holds open multiple doors, should I thank them each time, or just the first and last time - and how can I know which will be the last?

Honourably Confused

Dear Honourably-Confused,

I am regularly filled with sorrow when I read such letters as this, demonstrating how low the manners of our population have sunk; however you did right to ask me!

You should not only thank the person at each door, but before you pass through the door you should both put your hands together and bow as a mark of respect.

If you both bow low enough the door will not be able to slam in anyones face.

If one does not bow low enough, not only will the door slam in the face, it will also be a sign of bad grace and so in such circumstance it would not be appropriate to apologise.

Sam