2011-10-15

Make use of the Caps Lock key

So, there is this Caps Lock key on all keyboards, sitting untouched in polite society. Why not put it to good use? Here are the commands that map the Find symbol to the Caps key on Linux. Stick them somewhere in the X session startup:

xmodmap -e 'remove Lock = Caps_Lock'
xmodmap -e 'keycode 0x42 = Find'

Then I map the key to the keyword completion command in Emacs like this. The second command is needed for Emacs in a terminal window:

(global-set-key [find] 'dabbrev-expand)
(global-set-key "\M-[1~" 'dabbrev-expand)

2011-10-04

"Version Control by Example" -- first impressions


One summer night when browsing Reddit or HackerNews, I came across an offer of a free book about VCS'es in return for filling in a simple survey. I thought, what the heck, and did it. They promised to dispatch it within 2 or 3 months. This morning an envelope arrived.

The book is printed on a heavy, coated paper, which imparts a sense of quality. Certain design and editing aspects, though, give away it being a self-published work. In particular, I find the coloured borders of pages are a bit too noisy for my taste, and punctuation like "?!?!?" would have never gotten through a professional editor.

The author, Eric Sink, curiously, is the founder of AbiWord open source project. He's been is in VCS business for 15 years. His company started by offering tools for SourceSafe, and is now promoting their own open source (Apache licensed) source control management system Veracity.

Obviously, promoting Veracity is the motive of giving away books for free. However, along with Veracity, the author gives an equal standing and an honest review of Subversion, Mercurial and Git, along with a general introduction into version control concepts and some sage advice about best practices in version control. The book presents each VCS by going through an example of two developers collaborating on a small and silly C program, which is easy to follow and presents the peculiarities of each VCS in a natural setting.

I'm sure this will become my handbook tome when dealing with Mercurial and Git. I have long fantasized about having a nice dictionary of command equivalents in different VCS'es (clone/branch, fetch/pull/update), and the book has such a table in an appendix. However, sadly, Bazaar is missing from this comparison and the rest of the book, although it is mentioned as one of the three most popular DVCSes in the introduction.

Altogether, I'm thankful for the gift of a book that has, doubtless, taken a lot of time and effort to make.