Monday, January 19, 2009

Hunt-n-peck on Dvorak

Once again I've taken up the Dvorak keyboard layout. I've switched to Dvorak on my primary workstation and my laptops. After years of touch-typing on qwerty, I'm back to hunt-n-peck and learning the new layout.

The last time I tried this, it didn't last very long. Wish me better luck this time.

Why do it?

As a learning test. How long does it take to memorize new key positions? Both brain and muscle memory are involved.

Supposedly Dvorak is easier on the hands — though this is a subject of dispute.

In the half-day that I've used it, I've drawn the new layout on a beige keyboard with a Sharpie, unlearned the vim keys, taken tutorials online, appreciated the Windows on-screen keyboard, and realized the difference between an English mix of letters and an engineering / coding mix.

Let's see how this goes!

Update at end of day 1: 15 to 20 wpm without looking at the keyboard!

Update at end of day 2: 20 to 25 wpm. The switch is going well!

Sunday, January 18, 2009

OpenVPN

I recently set up OpenVPN at home. It’s a pilot for someone who runs a business, and needs remote access to a samba file server located at the office.

There are several pieces to the puzzle, so I’ll list them all below.

Ubuntu: The first step was to buy a used Athlon 64 desktop system with 1.5 GB of memory and upgrade it with a 500 GB Seagate Barracuda hard disk. I installed 64-bit Ubuntu 8.10 on it, desktop edition. Using the Synaptic package manager I installed Samba and OpenVPN from Ubuntu repositories. Simple enough. I also threw in openssh-server for ease of administration and file transfer, and proprietary graphics drivers for getting a decent display.

Port forwarding: On my Belkin router I enabled forwarding of port 1194 (default port for OpenVPN) to my Ubuntu machine. However the IP address of my Ubuntu machine was a DHCP address assigned by the router, so that posed a problem, solved by the next piece of the puzzle.

Static IP: I had to set the Ubuntu machine to a static IP on my home network to enable port forwarding. (For some absurd reason this worked on one Ubuntu machine but not on another… I’m still investigating why.)

DynDNS: I had to access this system from outside my home network, and I have a typical DSL connection with a dynamic IP address. So I signed up for a free DynDNS.com account. My Belkin wireless router has built-in support for DynDNS, and I decided to use it instead of a standalone client.

OpenVPN Client: On a laptop I installed the OpenVPN client. Since the Ubuntu repository had given me a release candidate version of 2.1, I chose to install the latest 2.1 release candidate rather than the stable 2.0.9 version. The 2.1 series comes with the OpenVPN GUI integrated, which is a big plus.

Key Generation: I read the steps on the OpenVPN HOWTO and generated the required certificates and keys on the Ubuntu server. Then I copied over the required keys and certificates to the client laptop.

Configuration: From the HOWTO, creating a config file for a tun configuration proved easy enough for both client and server, with lzo compression enabled. I did not need bridging since Samba was on running the same server as OpenVPN.

So did it all work together? Of course not... read on!

First, my router's DynDNS update didn’t work as expected. When I had restarted my router and DSL modem for some reason, the DynDNS client on the router recorded a bogus non-routable IP address before the DSL modem could get an IP address from upstream. And then the DynDNS client on the router promptly proceeded to update my DNS record globally with this bogus non-routable address. What’s worse, even after I corrected the situation with a manual update, my router refused to give up its earlier cached DNS lookup that pointed to the bogus IP. As a result, I couldn’t refer to my VPN server by name at all.

The alternative I considered was a Perl program called ddclient. It worked for a first update but did not run successfully in daemon mode... haven't yet figured out why.

The second issue came up when I had connected successfully and was in the testing phase. I was able to see my Samba share from my client, but my connection was unstable. I decided to switch from UDP to TCP, and then it started to work reliably. To make this switch, I had to edit the server config file and restart the service, edit the client config file, and change the port forwarding setting in the router.

How well does it perform?

Going strictly through my own internal wiring, I was able to push or pull about 2 to 3 Mbps from my laptop to my Samba server, each way. The laptop was connected using wireless 802.11g. From a friend's home, I got about 300 to 350 Kbps for reads; I didn't test writes.

I suppose setting up an OpenSSH server and using SSH tunneling would have worked just as well, with the addition of a virtual NIC. But this was cooler. :)

Monday, January 12, 2009

Are Diamonds Forever?

Another in the “for you” reading series. There’s an old article from a 1982 issue of the Atlantic Monthly titled Have You Ever Tried to Sell a Diamond? It’s a long but fascinating read. And it’s not just about what the title says. It chronicles the growth and consolidation of diamond mining and more importantly, marketing.

In times past, a woman’s jewelry used to be her financial safety net, at least in cultures like India. Gold makes up the bulk of a typical collection, followed by silver. Diamonds are a relatively recent addition. Read on to find out why a diamond may not be a woman’s best friend after all.

From the website of Atlantic Monthly: Have You Ever Tried to Sell a Diamond?

Saturday, January 10, 2009

The Superinvestors of Graham and Doddsville

With this post, I’m starting a series on investing, targeted towards one specific reader – you know who you are. :)  The first thing I’d like you to read is a speech by Warren Buffett, titled The Superinvestors of Graham and Doddsville. In it Buffett explains the basic principle of value investing and the negative risk-reward correlation that value investors enjoy. About the principle, Buffett says:

“I've never seen anyone who became a gradual convert over a ten-year period to this approach. It doesn't seem to be a matter of IQ or academic training. It's instant recognition, or it is nothing.”

Soon to follow, an article from Buffett in the NY Times, which argues that now may be the perfect time to apply this principle, and he certainly is doing so.

With that, onward to the article. It’s best to download the PDF and read it along with the tables and illustrations.

Superinvestors: PDF
Superinvestors: HTML

Saturday, January 03, 2009

New Year, New Writing

Resolution time. I will post at least one item every month on this blog. Here goes the January post.

Looking back just a bit: Fall 2008 was crazy as well as blissful, thanks to Guruji’s visit to Texas and especially right here to Austin. We’ve heard before that the work of a Guru is done at a very subtle level, and this time it has been reinforced manifold for me. He was full of praise for the public talk we had organized, though it was far from being perfect. I learnt first hand what it takes to organize an event with a $20,000 budget, 700 attendees, 40 volunteers, and a Guru. (Hint: having the latter makes all the difference… everything else becomes easy to handle.) After our day with Guruji was past, I traveled with Guruji to Dallas and onward to Houston where I was volunteering for the Art of Living Part 2 course for five days. The short span of a day when Guruji was in Austin, and the bus ride to Dallas, and the time we got with Him in Houston – nothing can come close, and it still feels like it wasn’t enough! (Is it ever enough?) Here are some pictures on Picasa from Ravi R, our official photographer for the Austin event.

I got some good rest in November and December and restarted some reading. I completed The Audacity of Hope, the second book by President-elect Barack Obama who at the moment seems to be the beloved of the whole world (except for the Republican half of the US).

I am amazed at how well this book lays out the whole platform for the presidential campaign. Once he had written out his thoughts in the form of this book, I don’t think there was much new by way of ideas or rhetoric that he had to come up with for the campaign. Foreign affairs, race relations, economics, family values – it’s all there in the book. Another impression I carried away from the book was how well Obama can see both sides of an argument. I’m betting we’ll see less of the black-and-white “if you’re not with us, you’re against us” presidential world-view we’ve become used to in the last eight years in the US.

Here’s another book I’ve started reading: The Toyota Way, by Jeffrey Liker.

My own employer, AMD, has rolled out our LEAN initiative a while ago, starting with our manufacturing where it has apparently done wonders. We haven’t yet changed our ways in the engineering organization though, as far as I can tell. I haven’t reached the part in the book where he talks about LEAN for engineering and service organizations. Let’s see what comes up. Based on what I’ve read so far, I recommend this book highly.

Part of this new year break has been spent reorganizing my computing environment at home, migrating from a mostly desktop-based environment to having a laptop and a home server. More updates later on this front. And for the first time, my photography arsenal is seeing the addition of a compact, the Canon A590 IS, which I’ve decided to use as a walk-about camera at all times and especially for low-light and B&W shooting. Quality is nowhere near my Canon DSLR but here’s what I like about it that the DSLR and my 24-70/2.8L can never provide: it’s human-sized. It’s been fun so far!