2010 Books


Every year in December I start to think about tracking the books I read for a year. I frequently am reading more than one book at a time, and sometimes I read two or three books in a week. Being the child of organized list makers, tracking what I read isn’t necessarily a simple thing. Do you track only those books which are new, or can you count ones that you’ve read before?

This year I’ve decided to add a new posting for each book I finish reading. The posting will indicate whether or not this is a first-read or a re-read, and it will included, thanks to my Amazon Associates account, a link to the book on Amazon. If you should follow that link and make a purchase, I’ll get a pittance in return.

Once before I used a spreadsheet to track my reading habits for a calendar year and if my memory is right I read about 75 books that year, with perhaps 45 of those being new, first-reads, and the rest being re-reads. My guess is that I’ll read about 50 books in 2010.


Book: Heat Lightning


John Sandford’s Heat Lightning is the second book with the central character Virgil Flowers.  Virgil works for the Minnesota Bureau of Criminal Apprehension for Lucas Davenport, the central character of all the Prey books. The first Virgil Flowers book, Dark of the Moon, was a little slow getting started but a good read. This second story was very good.


How to Use Facebook Via RSS


I have a love-hate relationship with Facebook. I appreciate seeing what the people I know are up to, but I dislike all the quizzes and games and their associated chatter. Turns out it is possible to get status updates, notifications, notes and links via RSS feed. Naturally, since Facebook wants to your share your stuff with the world and not just lurk in the corner like a good introvert, they don’t make it obvious how to set up the feeds.

Jamie Zawinski has a short posting on his Live Journal site explaining how to use Facebook using RSS feeds. I’ve copied the directions below.


Using Synergy Over a Secure Connection


At work I now have four computers and five screens, all controlled from one keyboard and mouse. Here’s how I did it.

Hardware

The primary machine at work is a Mac Pro running Mac OS X 10.6.2 with 2 x 2.66 GHz Dual-Core Intel Xeon processors, and 4 GB of 667 MHz DDR2 RAM. This machine has two 20" Apple Cinema displays attached to it, and an Apple Keyboard and an Apple Mighty Mouse. This machine is called Palantir.

The work supplied laptop is a 15" MacBook Pro also running Mac OS X 10.6.2 with a 2.4 GHz Intel Core 2 Duo processor and 2 GB of 67 MHz DDR2 RAM. This machine is called Orthanc.

The final machine in the mix is my personal MacBook Pro running Mac OS 10.6.2 on an 2.66 GHz Intel Core 2 Duo with 4 GB of 1067 MHz DDR3 RAM. This machine is called BlackPerl.

I also have a Dell Precision 390 running Windows 7 Professional, it has an Intel Core2 Quad CPU running at 2.4 GHz, and 2 GB of RAM. It’s called Khazad-dum. This machine doesn’t actively participate in the Synergy setup, it’s accessed via Remote Desktop from my Mac Pro.

Software

According to their web site, Synergy

While you could manually start the server each time you wanted to use Synergy, a better solution is to have it started automatically each time the computer is restarted or booted. Using Lingon I was able to create a launchd plist for Synergy that starts the server component automatically. My net.sourceforge.synergy2.plist looks like this:

{{ $image := .ResourceGetMatch “synergy2.png” }} Once this file is created, Synergy will start automatically every time the machine is booted. This creates the server necessary for Synergy to work.

On each client machine I added a function to my .bashrc file to create a secure shell connection to the machine with the Synergy server, in my case called Palantir. The function looks like this:

function pssh() { ssh -L 24800:localhost:24800 userid@palantir.example.com }
What is happening here is that port 24800 on the local machine is being forwarded to the same port on the remote machine (Palantir). All traffic to port 24800 will be encrypted and passed along to the other machine.

In addition to that function, each client machine also has a second .bashrc funtion called syn, that starts the Synergy client over the port forwarding created by the first function. It looks like this:

function syn() { /Users/username/bin/synergy-1.3.1/synergyc -f --name clientName localhost }
This function starts the Synergy client (synergyc) and names the client machine (–name clientName) and points it at localhost as the server. Since the Synergy port (24800) is port forwarded to the server machine, pointing the client at localhost works.

How to Use

With the Synergy server always running on my Mac Pro it is easy to start Synergy on both client machines. I open up a new Terminal tab and run the port forwarding function first (pssh). This function results in your being signed into the server, and this connection must exist in order for Synergy to work.

Next, open a new tab, which will give you a prompt on the client machine, and run the syn function to start the Synergy client. This tab will record the output generated by Synergy as you move into and out of the client via the host’s mouse.

I have discovered that Synergy is persistent; as long as the client is running and the port forwarding exists your client machine will respond to actions happening on the server. For example: if I take one of the laptops to a meeting without breaking the Synergy connection, and the screen saver starts on the server, the screen saver will be activated on the client too. This is a very minor downside as it is easy to Cmd-Tab to the Terminal instance with the Synergy tabs, and Ctrl-C out of the Synergy client and exit from the remote connection.

Notes

Synergy seems to be a dead project. No updates have happened to its source in a long time. Also, this setup which worked flawlessly under Mac OS 10.4, and 10.5, seems to be a bit flakier under 10.6. If you aren’t interested in this much effort to build a secure connection for Synergy you might want to look at Teleport, an alternative for accessing multiple computers from one keyboard and mouse.

Also, the launchd plist creation software, Lingon, is no longer being supported either.


50,000


Four years ago, on December 5th, 2005, I installed Mint on my domain host and started accurately tracking visits to my site. This morning at about 7:30 am the 50,000th page was served to the 26,620th unique visitor.

{{ $image := .ResourceGetMatch “50000.png” }}

Obviously my little personal site is way out on the power curve of the World Wide Web, but nonetheless it pleases me to see my numbers increasing. A rough count of the visits in the last 12 months adds up to nearly 22,500, meaning the rate of visits in accelerating here at Zanshin. If the same rate of acceleration continues throughout the next twelve months I should see 100,000 or more a year from now.

50,000 in this case means pages served by my host to some browser. Kind of like McDonald’s billions and trillions served signs, only fewer. The 26,620 unique visitors really means 26,620 unique sessions on my site. If you visit my site, look at a page or three and then leave that is a unique session. If you go to another page, say google.com and then come back, that would be a new unique visit. Sticking with the McDonald’s analogy, one trip through the drive-thru lane followed by a lap around the building and another drive-thru lane excursion would be two unique visits. All this really means is that most people look at 1.87 pages per visit to my site.

The most popular postings here fall into the “how to” genre. The most popular posting is Installing PostgreSQL on Mac 10.6, closely followed by Using jQuery to Create an iGoogle Style Drag-and-Drop. These type of postings are fun to create, and since they attract visitors I’m planning on more of them in the future.

What’s fascinating about these how-to style postings is the geographic diversity of the visitors. I regularly have visitors from India, Germany, Russia, the Netherlands, Poland, Spain, Italy, Brazil, Australia, and even more obscure places like Iraq and Vietnam.

The newest edition to the suite of sites under the zanshin.net umbrella is Solfège, my site about learning to play the violoncello. While it’s only been around for a couple of weeks it already has nearly a dozen postings and several pages dedicated to my experiences learning to play music.


Minus Seven and a Half


In the three months or so since Sibylle and I purchased our Honda Insight Hybrid, we have averaged about 43 MPG for each tank of gas. The car’s computer has a number of displays providing all sorts of information about the car’s performance and gas milage. One of the displays shows the current miles per gallon for the tank of gas in use, as well as an instant MPG graph.

I tend to leave the computer set to this combined display as it shows me how I am doing at the moment as well as how the MPG rating is fairing for the current tank of gas. Fairly early on in driving the Insight I discovered that there is a bit of entropy in my route to and from work. There’s a big hill I go up on the way to work, and back down on the way home. It would seem logical that whatever milage was lost climbing the hill would be regained coasting back down it. While this equality is possible, it is not guaranteed. If you are at all aggressive about climbing the hill (the speedometer glows green if you’re being economic and a bright blue if you aren’t) you can’t regain the lost miles per gallon on the way back down.

The game I play is too see how little if any I lose on the overall tank rating on each outing. Most trips to or from work I can stay even or at most lose 1/10 (0.1) MPG. Some days, when I catch all the lights and can maintain momentum, I can gain a tenth or two. Obviously the longer it has been since the last fill-up, i.e., the more miles on a particular tank of gas, the harder it is to improve the average.

Today all of this changed dramatically. Today is the first seriously cold day we’ve had. The high was only about 36º and the performance impact on the Insight was dramatic. When I backed out of the garage this morning the tank average was 43.3. And the tank only had about 5 miles on it. By the time I arrived home for lunch this figure had dropped to 36.0. This evening when I got home it was 35.8. I believe that I didn’t drive any more aggressively than I usually do, if any thing I was more cautious as it was sleeting or raining or snowing while I was driving.

One of the interesting characteristics about our hybrid, and I guess most others, is that the gas engine turns off at red lights since it isn’t needed. With it colder outside the car didn’t shut off once on any of the trips to and from work or the store. My guess is that in order to heat the cabin comfortable the gas engine needs to run, so I am suspecting that our wintertime gas milage is going to be in the mid-30s rather than the low-40s.

So my score for today was -7.5. Ouch.


Installing MyEclipse


MyEclipse, from Genuitec, is a popular set of plugins for the Eclipse platform. For several years I used it on my own as my primary Java development tool, and now I have an opportunity to use it in my work for the University. What follows is how I installed it for use on Mac OS X 10.6 (Snow Leopard).

Upon downloading the “All in One” installer, which includes Eclipse 3.4.2 and a Java Runtime Environment (JRE) and running it, I was unhappy to discover that not only could I not specify where the install would occur, but that it installed the majority of itself in the root Library directory (/Library).

I ran the full install with the default settings and ended up with a “Genuitec” directory in /Library that contained both some common files and the MyEclipse 7.5 installation. The root Applications directory, /Applications, contained a MyEclipse folder with an alias to the /Library/Genuitec/MyEclipse 7.5 folder, and an uninstall application.

Out of curiosity I ran the uninstall and it completely removed MyEclipse, the Genuitec directory was gone from /Library, and the MyEclipse directory was gone from /Applications.

Re-running the installer a second time I changed the default locations to my Applications directory, inside my Home folder, or /Applications. And I successfully copied the MyEclipse folder from the root applications folder (/Applications) to my personal one (/Applications).

Here’s how I did it.

Step 1: Start the MyEclipse installer from the download

{{ $image := .ResourceGetMatch “myEclipseWelcome.png” }}

Click on “Next” to start the installer.

Step 2: Accept the License Agreements

{{ $image := .ResourceGetMatch “myEclipseWelcome.png” }}

After reviewing and accepting the license agreements, click “Next” to continue.

Step 3: Change the Default Locations

{{ $image := .ResourceGetMatch “myEclipseWelcome.png” }}

I chose not to accept the default “Install” and “Common software” locations. Click the “Configure” button and enter in the locations you want. In my case I entered /Users/mark/Applications/Genuitec.

{{ $image := .ResourceGetMatch “myEclipseWelcome.png” }}

After setting the locations, click “Next to continue.

Step 4: Install

{{ $image := .ResourceGetMatch “myEclipseWelcome.png” }}

With the locations set to your preferences, click “Install” to complete the process.

Step 5: Dismiss the Application’s First Run

Once the install is complete, MyEclipse will automatically start. Dismiss the “Workspace Launcher” dialog so that you can finish moving installed files where you want them.

{{ $image := .ResourceGetMatch “myEclipseWelcome.png” }}

Click “Cancel” to dismiss the launcher.

Step 6: Move the “MyEclipse” directory

When I can, I’ve been installing software into my personal Applications directory. There’s no technical reason for this choice, it’s a personal thing: I want to segregate (as much as I can) applications I’ve installed from those that came with the machine.

In my case I located the “MyEclipse” folder in the /Applications directory and dragged it to the Applications directory in my home folder, or ~/Applications. This isn’t necessary as MyEclipse will work perfectly from /Applications.

Now you are ready to start MyEclipse by double-click its icon in the MyEclipse folder.

One final note

Running the provided MyEclipse uninstaller won’t completely remove the software if you move it as I have done. The “Genuitec” folder and the “MyEclipse” folder will remain in their new locations. I suspect the install process doesn’t leave a breadcrumb trail for the uninstaller to follow. If you uninstall MyEclipse after installing it in a custom location, you’ll have to remove those folders by hand.


Learning Cello


When I was in the 5th grade my class was taken by bus to one of the middle or high schools where we heard the student orchestra play. After the arranged pieces were complete, each instrument was demonstrated in a short solo piece and then explained by the conductor. It was hoped that this demonstration would interest some of us in to wanting to study music.

Starting in the 6th grade I played Cornet, not because that was the instrument of my dreams but rather since my mother’s friend Mrs. Lamb had a cornet we could borrow. I played all through sixth grade. Also during that year I started what would be four years of braces. Having my lips pinched between the rather small mouth piece of the cornet and my braces was no fun, so in the 7th grade I switched to baritone horn, or more commonly baritone.

At the time I was rather small, the baritone in its case was nearly as big as I was; it certainly dwarfed me I held it in my lap on the school bus to and from school every day. The music teacher was less than pleased with our 7th grade practice ethic and so she sent home a practice log to be initialed by our parents, a log that required 30-minutes practice per day. My school bus was full, so I was forced to lug the baritone and its sizable case on and off the bus every day, and to ride the bus with the thing in my lap all the way.

All of which made for good excuses to stop music altogether. This also being the year my sister died I think my parents weren’t interested in requiring that I stick band out for the whole year. Regardless of the excuses or reasons, that was the last formal, organized music instruction I had.

As a summer camp counselor I acquired a guitar and learned through rote memorization one strumming pattern and three songs. Through out college I tortured my pianist roommate with the opening chords of Stairway to Heaven. Endlessly. He now says, 30 years later, that he still has nightmares about my “playing.”

Fast forward to three years ago when Sibylle and I met. While she is a pianist and piano teacher, she had several other instruments scattered around her studio including a beautiful cello. I have always found cello music to be the most beautiful and evocative. Seeing one up close and in person made me wistful for the squandered opportunity in junior high and high school. I confided with Sibylle that I had always wanted to learn to play cello but I had never followed through with that dream.

Starting this week I have finally taken the step necessary to learn cello. The cello actually belongs to Sibylle’s oldest son, a musician himself, and he was willing to rent it to me. Searching for lessons I contacted the University’s cello professor and also the cello instructor at the local music store. I had my first lesson this past Monday with the music store instructor. Her teaching style and my learning style did not line up at all. I suspect without knowing that she has few if any mature adult students. Much of her presentation was aimed a someone much younger than I. Also, I found her materials to be disorganized, chaotic, and not very inspirational. The lesson consisted mostly of how to carry the instrument, and how to remove it from its case. We didn’t play at all. Learning even a simple open string song or piece would have been marvelous. It was like getting a whiz-bang toy for Christmas but no batteries to make it go.

Fortunately the contact with University’s cello professor paid off as I now have a lesson set up with a student of his for this weekend. My hope is that this young man will have a teaching style more to my liking. In the meantime, with Sibylle’s musical help, and my minimal understanding of piano, I’ve started to figure out a couple pieces to play pizzicato.


Using SSHFS, MacFUSE, and Macfusion to Access Remote Filesystems


SSHFS

sshfs is a secure file system client that allows you to access and manipulate files on remote systems where that would normally be available via SFTP. sshfs is dependent upon FUSE or Filesystem in Userspace. FUSE is available for Linux, FreeBSD, NetBSD (as PUFFS), OpenSolaris, and Mac OS X (as MacFUSE). It was officially merged into the mainstream Linux kernel tree in kernel version 2.6.14. h1.

The Pieces of the Puzzle

You will need to install three applications / frameworks:

At present the preference pane that MacFuse installs is 32-bit, so your System Preferences will restart in 32-bit mode when you select the MacFuse pane. The only option it exposes is a check for updates.

Installing Macfusion

Macfusion is an open source SSHFS mounting application for Mac OS X.

Download and install from: http://www.macfusionapp.org

Setting up an SSHFS file system

Once Macfusion is installed, start the application and click on the plus icon in the bottom left of the main window and choose SSHFS.

{{ $image := .ResourceGetMatch “Macfusion_sshfs.png” }}

Set SSHFS mount parameters

Under the SSH tab:

Under the SSH Advanced tab:

Under the Macfusion tab:

Then you need to rename or remove that library. Navigate to the /Applications/Macfusion.app/Contents/Plugins/sshfs.mfplugin/Contents/Resources directory and rename (e.g., sshnodelay.orig) or remove the sshnodelay.so file.

Update SSHFS

Now that you have a working connection it is time to verify the version of sshfs included with Macfusion, and update it if necessary. Using the Terminal, navigate to:

$ cd /Applications/Macfusion/Contents/Plugins/sshfs.mfplugin/Contents/Resources
The copy of sshfs that Macfusion uses is located in this directory. Run the command:
 $ ./sshfs-static -V
to verify the installed version. As of this writing the current available version of sshfs was 2.2, if the displayed version is anything less than that, you will see a performance increase by updating.

Download SSHFS from: http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS

For Mac OS X 10.6 you want to get the sshfs-static-leopard.gz file. Uncompress the gzip archive. Inside the resulting sshfs-binaries folder will be an application called sshfs-static-leopard. In Terminal rename the original sshfs-static application (assuming you are still in the /Applications/Macfusion/Contents/Plugins/sshfs.mfplugin/Contents/Resources directory):

$ mv sshfs-static sshfs-static-orig
And then copy the new version into place:
$ mv ~/Downloads/sshfs-binaries/sshfs-static-leopard sshfs-static
This should result in a significant performance increase.

Preventing .DS_Store files over Network Connections

You can prevent .DS_Store files from being created on the mounted filesystem by executing the following command in Terminal:

$ defaults write com.apple.desktopservices DSDontWriteNetworkStores true
This will affect interactions with SMB/CIFS, AFP, NFS, and WebDav servers. You will need to restart the computer or log out and back in to your user account for this change to take effect.


USB 2.0 is Way Faster


One of the last things to transfer to the new MacBook Pro was my iPod. I’ve got a 30 GB 5th Generation iPod that is nearly full; at last synchronization it only had 912 MB free.

Any given synchronization between the iPod and the PowerBook was reasonably quick, since the contents of my music library are fairly static. But the initial load of the iPod, and the one time I had to restore it, took hours and hours. I’d start the process at 6 or 7 pm in the evening and it would still be churning through the middle range of the list at midnight when I’d go to be. The PowerBook only had USB 1.1 ports.

Over the weekend I decided to transfer the iPod to the new laptop, and, based on my experience with a full-synchronization with the PowerBook, I was expecting it to take hours and hours again. However, the MacBook Pro sports USB 2.0 ports. They are on the order of 40 times faster, 480 Mbits/second versus 12 Mbits/second.

480 sounds fast but until you plug the iPod in and restore it (the only way to synchronize it with a new machine) you really don’t get a fell for what faster means. The entire process took less than an hour, more like 40 minutes.

Forty minutes instead of eight hours. Wow.