Keep [C]*(od|do)ing

May 27 th

0

Designing for the Social Web (Book Review)

Filed under: book — Tags: , , — Liwen @ 11:02 am
Designing for the Social Web by  Joshua Porter

Web, a public place just like restaurants, libraries and pubs, has rapidly developed into a new phenomenon – I hope not many people have doubts over this statement. Who doesn’t want to build the next Facebook or Twitter? However, considering the complex interactions in social behaviour, designing for social web is definitely no easy task.

The book starts with an introduction of ‘Part Interface Design, Part Psychology’ and the typical rudimentary web ‘Usage Life-cycle’ to raise readers’ awareness of what hurdles social web design may face and the ultimate goal: ‘Better Design’.

Besides clearing all the hurdles in the following chapters, there are lots of insights and clichés scattered across its 187 pages, some you may completely agree with and some would make you think. Overall, it was an intriguing read for me. Just like the famous Don’t Make Me Think from Steve Krug, this book is more about common sense. It’s not rocket science, but you just don’t happen to have collected and have systematised all the simple bits and put them in good use. Comparing the style of drawing conclusions from author’s own experience in Don’t Make Me Think to providing more results from research in Designing for the Social Web, this book suggests less detailed description of how to apply the insights into practice, which means you may have to combine your own experience with what the book says to find the best solutions on your own. I felt the author carried out very good research into the subject and represented it compactly yet coherently in a conversional style.

In the London Web Standards meet-up, we discussed this book and someone found that the chapter “Authentic Conversations” is a bit out of topic. Interestingly enough, I found this chapter is particularly useful and I would like to research it more. After been working for a media company, which runs several high profile social web sites for a while and based on the observation on how the publishing team runs the sites, I can see how we can improve and hopefully to put the knowledge learnt from the book in use in the future. It has been said, if you combine your own experience with what the author presented in the book, most likely you will find something interesting and useful.

If you grab this book before going on a trip or jumping on a commuter train, it could make you journey.

Author: Joshua Porter
ISBN-10: 0321534921
Thanks to London Web Standard and Jeff Van Campen for the book.

May 16 th

0

Save Emacs Pinky

Filed under: hardware,obsession — Tags: , , — Liwen @ 10:55 am

After suffered index finger pain from using mouse for a long time, In spite of the risk of getting emacs hands, I equipped all my systems with Emacs and decided to use GUI as sparingly as possible.

Emacs Fingers
(Source ❐)

I have the habit of using both Ctrl keys in standard IBM keyboard layout so I was not lurked to Remap Caps Lock Key, which is a half-standard popular approach of giving left pinky double work based on the fact that traditional UNIX keyboards typically had the control key where the caps lock key is now. This knowledge is true, but it is not the correct answer to Emacs.

Emacs shortcuts were designed specifically for the space-cadet keyboard which is commonly used for List machines in the 80s. In those keyboards, Ctrl key is the main modifier key and Meta is right after it as the secondary modifier. In today’s IBM PC keyboard, the Meta key has been replace by Alt and the Ctrl key is placed in the corner far away out of thumb’s reach. Strangely enough, despite the fact that IBM has made the Ctrl key one of the most costly keys to press, almost all software designs have followed the convention of using Ctrl key as the main modifier key along with the HCI guidance published by IBM itself and Apple.

Symbolics Keyboard
(Large Image ❐) (Source ❐)

Although the keyboard layout change was a tragedy for Emacs users, it didn’t affect new generations of programers such as myself, as I only had Commandore 64 as my first Computer/Game console when I was 5. After that, IBM keyboard dominated the PC market.

Nowadays, I use Emacs friendly Microsoft Natural Ergonomic 4000 keyboard at home.
Microsoft Natrual Ergonomic 4000

This is definitely one of the best keyboards you can get as a programmer, it has split keys oriented for each hands, very large modifier keys. Most importantly, they are symmetrically positioned on each side, which is the perfect design for people use modifier keys a lot. If that doesn’t satisfy you, you can even re-map the modifier keys with the IntelliType software comes with the keyboard. For example, you can swap Ctrl and Alt keys to make the keyboard function exactly same as original Symbolics Keyboards.

I was quite happy with it.

Things started to go wrong when I switched to a MacBook Pro, which only has one bad positioned small Ctrl key positioned in the middle nowhere.

Apple Macbook Pro Keyboard Layout

To cope with the pool design of precious Ctrl in Emacs, I re-mapped Caps Lock key for the first time . Who needs Caps Lock key anyway, especially when you are using Emacs :p. Also I re-mapped Caps Lock key for my work PC in Windows XP, hoping to form the new finger habits quicker.

I can live with the feeling that my right pinky has been cut off and hope I can get used to it in a few weeks. But after a while, my left pinky hurts and It hurts a lot. I have been searching for the solutions and tried to work out the best one for my case. But after reading How To Avoid The Emacs Pinky Problem, I give up the thought of getting a Apple Keyboard just for the right Ctrl key. Apple keyboard sucks!

To ease my pinky pain, I am bring the Microsoft Natural Ergonomic 4000 keyboard to work and upgrade to Microsoft Natural Ergonomic 7000 for my home PC, then move back to Linux again. As for the Macbook Pro, I’ll just use it mainly for design and coding objective-c.

That’s right, I am giving up the slick Macbook Pro because of Emacs Pinky.

May 3 rd

0

Password-less svn+ssh Access on Mac OS X – Updated

Filed under: Tools — Tags: , , — Liwen @ 8:57 pm

Related Posts:

1. Install Subversion 1.5.5 on Bluehost Linux 64bit Box
2. Configure svn+ssh on Windows OS

After relentless pounding of my fingers on the keyboard just to feed the same password again and again and again to subversion repository in Mac terminal, I realised that typing password is not as fun as developing finger habits in my beloved Emacs, although they are both repetitive.

I was reluctant to set up password-less svn+ssh access on my new Mac machine. The reason is that the key pair I am using were both generated by Putty, one deployed on Linux server and one for Windows clients. I would rather play Street Fight 4 online for half hour other than reconfigure SSH access across three different operating systems – if it is not absolutely necessary. They both involve the phrase “pain in the ass”, if you know what I mean :)

Good news is that Mac OS comes with a SSH agent:

ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA). The idea is that ssh-agent is started in the beginning of an X-session or a login session, and all other windows or programs are started as clients to the ssh-agent program.

With the ssh agent, we can add the identity once per login. It means ‘add once, use everywhere’! It will be really helpful if you use more than one clients to connect to the same repository server.

Step1:
Use mac os build in ssh-keygen to generate a pair of openssh format keys. Deploy the public key on your server (assume your server uses openssh) and set up the appropriate permissions (see the related post1 to lean more). If you already have a .ppk key, then a conversion from Putty format to openssh would probably be the easiest way to go. It can be done either using PuttyGen in Windows OS or using a Putty Mac port (MacPorts or DawinPorts).

Step2:
Grant the key file minimum permissions. It needs to be:
chmod u=r,ga-rwx

If you are curious about ssh agent, read step3 and step4, otherwise, just skip to step 5.

Step3:
Find out the ssh-agent environment variable values: SSH_AUTH_SOCK and SSH_AGENT_PID. For more info about ssh agent in Mac OS, please read here.

Mac OS SSH agent

Step4:
Set SSH_AUTH_SOCK and SSH_AGENT_PID environment variables in your subversion client of choice. If you only use command line clients, this step can be skipped.
Update: It turned out the SSH_AGENT_PID value changes form login to login.

/tmp/ssh-XXXXXXXXXX/agent.<ppid>
Unix-domain sockets used to contain the connection to the authentication agent. These sockets should only be readable by the owner. The sockets should get automatically removed when the agent exits.

In this case, the clients need to talk to the OS to find out the value. Since ssh-agent servers as a lower level service in the OS, it seems to be impossible to set up those values for clients manually and I assume it is not necessary.

Setp5:
Use ssh-add command to add the key to ssh authentication agent.
ssh-add yourkey

Find the following three files in the ~/.ssh/ directory (create if not exist).

 ~/.ssh/identity
    Contains the protocol version 1 RSA authentication identity of the user.
 ~/.ssh/id_dsa
    Contains the protocol version 2 DSA authentication identity of the user.
 ~/.ssh/id_rsa
    Contains the protocol version 2 RSA authentication identity of the user.

Append your private key in the right file (depends on the key type) and change the permission to owner read only, the ssh-agent will automatically read those files and add identities to the agent every time a ssh request occurs.

Now it’s really password-less!

Mac ssh-add command

Powered by Wordpress | All rights reserved, all wrongs observed. @ 2009 Liwen Zhang (14 queries. 0.206 seconds.)