Our Carderock guidebook on rakkup!

Brian Florence and I recently did a first edition Carderock guidebook on rakkup as a labor of love. The rakkup app works on iPhones and Android. The app is free on the Google and Apple stores. Our guidebook is an add-on purchase for $5.99.

Check it out!

This winter, when the leaves are gone from the trees, we will be busy taking new photographs for the second edition. After that, we are debating whether we should also publish a print version.

I think rakkup has the right idea for the future. Nobody wants to throw a heavy guidebook into their crag pack, which is already full of important things. But, everyone keeps their cell phones on their body, no matter what.

And, because the rakkup app uses the phone’s GPS, it navigates to crags in a way that a print guidebook can’t.

Climb on!


Syntax highlighting for Mac OS X Mail and applications

Code is a lot harder to read without syntax highlighting, and I needed highlighting for emails and presentations. So, I cobbled this solution from what I could find on the net. This OS X service allows me to select and highlight text in many OS X applications. It works for Pages, Keynote, and Apple’s Mail. It does not work, as written, in Microsoft Office, although you can still copy highlighted text from Pages to Word or PowerPoint, or perhaps modify this script to make it work in Office.

You will need two things to get this service working on your computer. First, download and install a command-line based syntax highlighter. Second, you need to set up an Automator workflow, to enable the service itself.

Install a command-line highlighting utility.

I use highlight. A strength of Pygments is that it can auto-detect languages, while highlight does not. But, Pygments often doesn’t guess the correct language if the highlighted code is short, because today’s popular languages use highly similar syntax.

I installed highlight using Homebrew:

$ brew install highlight

To install Pygments:

$ pip install pygments

Create your Automator workflow.

Open Applications > Automator. Choose “Service” as your new workflow type. Choose “Run Applescript” as your one and only action. Above this action, you will see some options. Set this workflow to receive text in any application. Do not check the box that says ‘Output replaces selected text’ because then this script won’t work.

Copy and paste this code.

In your run Applescript box, copy and paste:

-- inspired from http://apple.stackexchange.com/questions/94222/how-to-get-automator-to-treat-text-as-rtf/94246#94246

-- limitation: does not auto-detect syntax (which is iffy with short sections of code, anyway); therefore this action is limited to Python syntax

on run {input, parameters}
        set old to the clipboard as record
    end try

-- the tr function is necessary because some applications copy rtf as OS 9 CRs instead of Unix LFs.

    do shell script "echo '" & input & "' | tr '\\r' '\\n' | /usr/local/bin/highlight --syntax=Python --out-format=rtf  --style=edit-matlab --font=courier | pbcopy"

--do shell script "echo '" & input & "' | tr '\\r' '\\n' | /usr/local/bin/pygmentize -l python -f rtf | pbcopy"

-- copying and pasting via the clipboard necessary because text replacement bypasses the word processor's automatic conversion of RTF

    tell application "System Events" to keystroke "v" using command down
    delay 0.5

        set the clipboard to old
    end try
end run

Save this service.

I use the name “Python Syntax Highlighting” but you can call your service whatever you want. Whenever you select text in any application, your new Service will appear on the menu bar as [Application] > Services > Python Syntax Highlighting [or whatever name you saved it as]

This service works well for programs that support RTF. I use it all the time in Keynote, Pages, and Apple’s Mail. It does not work in Microsoft Office, though, although it may be possible to modify the script above to make it work in Office. Good luck!

Installing scientific Python with NumPy, SciPy, matplotlib, PyMC, and Basemap/geos on Mac OS X 10.9 Mavericks, 10.10 Yosemite or 10.11 El Capitan

I love OS X for day-to-day work, especially compared to its main alternative, Windows. But Apple neglects data monkeys who install tools under the hood. For my research, I use Python, NumPy, SciPy, matplotlib, PyMC, and Basemap/geos, among other modules. These tools used to break with each new version of OS X, although as OS X has matured, the disruptions with each new release have become less.

I’ve tested these instruction on OS X 10.8 Mountain Lion, 10.9 Mavericks, 10.10 Yosemite, and 10.11 El Capitan when they were reasonably current (I usually stay about one OS X release behind). Over the years these instructions have evolved, and Homebrew formulae have been added and improved. I haven’t been going back and re-testing these instructions on older OS X releases, so your mileage might vary if you do this.

Consider starting with a clean install of OS X.

The dirty upgrade works great if you’re an everyday user who stays on the UI level, but in the distant past it made a terrific mess of my tools installed under the hood. I’ve ended up with multiple MySQL servers and multiple apache servers. But, as OS X has become more mature, I’m noticing less of a need to do this.

If you decide to take my advice and do a clean installation, first make sure that you have a backup. Time Machine works spectacularly well for this purpose, or you can install onto a new hard drive or carbon copy your old drive. Erase your working hard drive, install OS X, then have Migration Assistant import user accounts and applications from the backup (but leave the Other Files & Folders box unchecked). Migration Assistant takes care of restoring ordinary documents, which Apple does well, yet it provides a relatively blank slate under the hood to freshly install tools.

If you decide that you don’t want to start with a clean install of OS X, then go through these instructions anyway. For each package, use brew to uninstall, and then reinstall each package in sequence. Use my directions to keep you on track as you update each package individually. Don’t forget to also test each package after each reinstallation, as I have demonstrated in my instructions, so that if there are problems, you know exactly what the problem is.

Download Xcode from the App store and install the command line tools.

Xcode is a dependency for Homebrew, which uses Xcode’s gcc compiler to compile everything from source. Once you have Xcode installed, you need to install the command line tools for the gcc compiler to work. The quickest way to do this is from Terminal:

$ xcode-select --install

Check the systemwide PATH variable.

Open a Terminal window, and type:

$ cat /etc/paths

Make sure that /usr/local/bin occurs before /usr/bin. If they don’t, then you need to change this order. Edit /etc/paths using vi or your favorite text editor. I love and use TextWrangler. Close your Terminal window and open a new Terminal window for this change to take effect.

Obtain Homebrew. 

Homebrew is a great package manager for OS X that installs everything in /usr/local/bin and does not require sudo.It then creates symlinks to the expected locations so that the various tools can find one another. Because the packages are centralized in the Cellar, they are easily updated and/or removed.

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Fix any problems that Homebrew detects.

$ brew update
$ brew doctor

Follow brew doctor‘s instructions. brew doctor usually complains about Xcode. If I’m guessing the error correctly, here is the solution that brew doctor will suggest (assuming OS X 10.10 – note the version since this affects what you will type into Terminal):

$ cd /Applications/Xcode.app/Contents/Developer/Toolchains/
$ sudo ln -s XcodeDefault.xctoolchain OSX10.10.xctoolchain 
# note the version (10.10) and modify accordingly.

Run brew doctor again. Continue to follow brew doctor‘s instructions until it tells you that “Your system is ready to brew.”

Install Homebrew’s gcc.

This step, overlooked in the other blogs I’ve seen, has been required in the past for successfully installing SciPy and PyMC (newer Homebrew formulae may have fixed this problem). Without this, installation has failed with a vague gfortran error.

$ brew install gcc

Install Homebrew’s Python.

$ brew install python

Update OS X’s Python symlink to point to Homebrew’s Python.

This symlink controls the version of Python that runs when a user types python in Terminal. These directions should have appeared at the end of your brew installation, but in case you missed them, here they are (These instructions assume Python 2.7.6 – note the version since this affects what you will type into Terminal):

$ cd /System/Library/Frameworks/Python.framework/Versions
$ sudo rm Current
$ ln -s /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/Current
# note the version (2.7.6) and modify accordingly.

Now, we will verify homebrew’s Python installation. If there’s a problem, we need to fix it now before proceeding with installations.

$ which python
# should see /usr/local/bin/python

Don’t touch or relink OS X’s system Python. Change your hashbang habits.

This is another place where this blog differs from other blogs.

OS X exasperatingly contains yet another copy of Python, called system Python, located at /usr/bin/python. The standard hashbangs !#/usr/bin/python or !#/usr/bin/env python will call Homebrew’s Python when the script is run by the local user, but will call system Python if the script is called by a launchctl daemon/agent. Other blogs have recommended deleting system Python and symlinking the deleted file to homebrew’s Python installation, but this solution creates serious problems with OS X Server, which depends on the original system Python installation being left intact.

Therefore, just change your habits to always use this hashbang: #!/usr/local/bin/python and all of these problems go away, no matter where or who your script is executed by. Easy-peasy.

Install NumPy, SciPy, and matplotlib.

First try each installation using homebrew. In the past, Homebrew didn’t yet have formulae for some of these, so I used pip whenever a formula was not available.

$ brew tap homebrew/python
$ brew install numpy
$ brew install scipy # this module used to require homebrew's gcc to succeed.
$ brew install matplotlib
# let's test our installations
$ python
>>> import numpy
>>> import scipy
>>> import matplotlib
>>> exit()

Install Basemap.

Basemap depends on geos, which needs to be installed first.

$ brew install geos

Download the latest non-Windows Basemap tarball. Unpackage it by double clicking on the compressed file on your desktop (which is easier) or use tar -xzf. Then, cd into the directory.

$ python setup.py install
$ cd examples
$ python simpletest.py 
# this tests your installation

Install PyMC.

This module is for Markov chain Monte Carlo (MCMC) simulations. If you don’t use MCMC then you should skip this. PyMC won’t install without a successful SciPy installation, which, in turn, has depended upon Homebrew’s gcc compiler.

$ git clone https://github.com/pymc-devs/pymc.git
$ cd pymc
$ python setup.py build
$ python setup.py install
$ python # let's test our installation
>>> import pymc
# if you get a warning about statsmodels and/or patsy you can probably ignore it. 
# I did, and my simulations have worked fine.
# (I hope!)
>>> exit()
$ rm -R pymc

You’re done! Happy programming!

I didn’t come up with all of this on my own. I acknowledge:

Steamboat Springs


Ever since we were kids, DSC_6362we’d read about Steamboat Springs, legendary for its “three-tier high” snow.  This season, Tiffany was able to find good hotel rates for Steamboat Springs so we decided that this would be the place to visit this year.

Mike Germano, an old friend from college who now lives in the Denver area, was able to join us.  It was great seeing and snowboarding with Mike DSC_6403again and I hope we get a chance to do that again soon.

Steamboat is set about 3 hours apart from the other major ski resorts in Colorado, and even then it is about a 25 minute drive on a small country road from Hayden regional airport.

The mountain was impressively large, with some really great runs. Most of the runs were groomed. DSC_6408The mountain as a whole wasn’t very steep, and combined with the grooming and all of the restaurants it was obviously an ideal venue for families. We never went through the day without at least one pit stop at the many warming huts to fill up on good food and lighten our wallets.

Snow conditions were packed powder that was
conductive to enthusiastic high-speed carving.  DSC_6458It had dumped the week before we were there, and it dumped the week after we left, but
we weren’t so lucky to have fresh snowfall while we were there.

The picture on the top shows us posing in front of the trail sign for Rudi’s Run.  We just know that this run must be named after Rudi Garmischt from Hot Dog: The Movie.  How many other Rudis do we know?

Rudi: You people… stay out of our way. You may ski on zat side OR on zat side, but stay out of zee meedle!

Dan O’Callahan: Hey, Rudi, you can kiss my ass. Not on zis side and not on zat side, but right in zee meedle!

156,506 vertical feet in 6 days


Jackson Hole Mountain Resort has a promotional program called the Vertical Foot Club. People who sign up at Guest Services and successfully ski or snowboard 100,000 vertical feet in one week receive a certificate and one day’s free ticket for the following season. Lately, this is nothing to sneeze at because ticket prices are approaching $80.web

This year, I went with just Ryan. Paul Burns, who was planning to come, stayed behind to prepare for his Chicago Fire Department Lieutenant’s exam.

The first two days, it snowed at the top of the mountain, with a great deal of wind. The new tram’s digital windspeed meter recorded 50 mph of continuous lateral wind. While we were
web_1enjoying the rapidly depleting snow on the top half of the mountain, someone we rode up
Thunder lift with suggested that we try the
Hobacks, which we hadn’t done in years. The Hobacks are a large expanse of ungroomed, untouched terrain along the south half of the resort, and are famous for either having great snow or miles of impossible ice formations. We found the snow there to be pristine and spent much of two days on the Hobacks.web_2

As the week progressed, it became warmer and conditions transformed into true spring slush, which drove us to the terrain park. This year marks the first time since the early ‘90s that I have dedicated a lot of time just to the halfpipe and terrain park, and I think we were beginning to see some results by the end of our trip.

On Thursday, we had our 7th web_4Shrimp Festival on Ship’s Prow, an outcropping of rock overlooking Rock Springs Bowl.

We’d known about the Vertical Foot Club for years, but had never joined or even tried tallying our vertical feet. This year, we set out to see how much vert we shredded in a day. Ryan used his brand-new Garmin GPS, a gift from Tiffany, which kept very accurate GPS data throughout the day. web_3From the GPS data, we were able to see how many times we took each lift and from these data we calculated our total: 156,506 feet in 6 days. Our highest total for a single day was 28,612’ on Day 5, and our lowest was was 21,816’ on Day 1. Other interesting GPS statistics: we did 18 Après Vous quad runs, 16 gondola runs, and 12 trams. Our maximum speed was 40 mph and, of all places, this was on the catwalk at the bottom of the Hobacks.

DSC_6698.jpgderivative=medium&source=webThere was only one hitch. We never did go to Guest Services and enroll in the Vertical Foot Club, so I guess we won’t get our free tickets after all.

Corbet’s Conquered

Jackson Hole has a legendary run called Corbet’s Couloir which everyone who ever skis or rides there hears about. There’s a drink named for it at the bar, reserved only for those
who have done the deed, and it is famous enough to have its own
Wikipedia page as well as numerous news reports and video clips on YouTube showing people attempting the feat.
Corbet’s Couloir is located on the East Ridge at the top of the mountain, a short distance from the tram. For a long time it was marked off as a cliff area, but more recent editions of the trail map show it as a double-black run, which is still a bit of an understatement as you can see from the picture above.DSC_4479

For years we boasted that we would someday go down Corbet’s. How it actually ended up happening is this: it had just dumped seventeen inches the night before, and we were busily looking for the remaining untracked snow to mark up, which eventually brought us to the top of the mountain. We were going up and down Rendezvous Bowl via the new East Ridge double chairlift when Ryan spotted the opening of DSC_4488Corbet’s from all the people standing around the surrounding cornice looking down into it.
Neither of us had ever actually seen Corbet’s during the winter, just photos, so we decided to take a few minutes out of the day to hike over and peer down.

There happened to be a ski school instructor teaching a group of middle school-aged kids how to drop into Corbet’s, and they were slowly DSC_4499doing it, one by one. From watching the instructor and the kids dropping in, it became
obvious that we could do it quite easily. The conditions were perfect that day: the sun was out, a rarity on top of Rendezvous mountain, and there was a stash of soft powder at the bottom of the couloir. Ryan took a look down and he said something along the lines of “That doesn’t look so bad” and then a few moments later, “I’m going down”DSC_4611

Which he did, with little hesitation.  He dropped
off the cornice, disappeared in a cloud of fine powder, and within a few seconds he was standing at the bottom of the couloir.  Since there is really no other way to get down to
that area of the mountain from where I was standing, that forced the issue for me, so I went down, too.

One second I was on the cornice, then there was DSC_4647a feeling of free fall, a soft landing marked mostly by an explosion of powder which covered me from head to toe, and I was still in control, sailing smoothly and happily through the lower half of the couloir in the best powder I’d been in all day.

It was so much fun that we ended up doing an encore later in the day. The second time we went down, I went first and kept my eye out for a mythical cave that I had heard about many times before. It turned out to be a small alcove carved into the precambrian rock which makes up the north face of the couloir.  There was a plaque on it dedicating it to Doug Coombs and it
was decorated with a ribbon. We decided that
this alcove was the perfect place to have our
annual Shrimp Festival.

Planes, Cars, and Avalanches

Day 1 – Wednesday, February 6, ’08

CIMG3016Earlier in the week, Corey had been anxiously following the weather in Chicago because a bad snowstorm was predicted for Wednesday, the same day that they were flying to Salt Lake City. I had it much easier, with it being light sweater weather in Baltimore, and I arrived at about 8:30 pm.  Ryan and Corey’s original flight was cancelled; they rebooked on United, which was then delayed, so they did not arrive in SLC until after 2:00 in the morning.

CIMG2994I thought of Wendy Osterling who had told me she lived near the airport, and texted her while still in Baltimore and to my delight she was available!  After arriving in SLC I drove the rental car to her house and we went out for a light meal and drinks, a welcome change from the airport environment.

Afterwards she went to bed as she had to work early the next day. I napped on her couch until CIMG2995Corey and Ryan texted that they were ready to be picked up.

We headed out to Snowbird, which is in Little Cottonwood Canyon, about 35 minutes from the airport. This canyon is notorious for its avalanches. And just as we thought our luck for the night had turned, we drove up to a roadblock and police cars with flashing lights. There had been a massive avalanche, the deputy said, which had come crashing down one side of the CIMG3049canyon and actually went back up the other side, and the road was closed until tomorrow and possibly beyond.

I think being too tired helped us conceal the extent of our disappointment. We drove back down the canyon, eventually settling for a hotel which offered a reasonable rate, and crashed for the night. Unfortunately, we ended up having to pay the Cliff Lodge at Snowbird for that night
that we never slept there, because we had CIMG3008declined their optional travel insurance policy. 

Day 2 – Thursday, February 7, ’08

That morning, we woke up and checked the weather report, thinking that we would probably go to Solitude or one of the other resorts around Salt Lake City.  Our luck had changed!  Little Cottonwood Canyon had just opened!  We packed up the car, stopped for breakfast and drive to our new digs at the Cliff CIMG3021Lodge, which is located at the base of Snowbird, right in front of the Peruvian Express lift.
After checking in, we hit the slopes.

There had been 7 inches of snow the previous night and it was mostly powder.  There were high winds, with the report said was 53 mph with 75 mph gusts (my brothers dispute that it really felt like that, but it was plenty cold).  The wind plus the blowing snow made visibility very hard, and we took a long time coming down the CIMG3024mountain those first few runs.

There were reports during the day of the canyon closing again, and the Snowbird employees were moaning and disgruntled to say the least.  In particular, one lift operator abandoned his post, leaving us stranded about a half-mile away from the hotel and with no choice but to hoof it uphill back to the Cliff Lodge.  Luckily, while we were walking, we spotted a shuttle coming up the CIMG3027road and hitched a ride.

That night, we were advised to not leave the Cliff Lodge building due to avalanche warnings.  They did open up a buffet on the top floor, and we had a nice pasta meal at a reasonable price.

The day would not be complete without a viewing of Sunny, Rudi and Harkin in Hot Dog: The Movie.

Day 3 – Friday, February 8, ’08

We went to Snowbird again, and explored more of the mountain.  The weather was a little clearer although still very windy.  We found some undisturbed pockets of powder, mostly in between the trees, CIMG3045and were able to make a few new tracks down over the other side. Even I could hear the howitzers in the area firing all day to clear the packed snow.

Day 4- Saturday, February 9, ’08

This was our third day at Snowbird.  We spent much of the day on the Gad lifts.  That night we watched the 1986 film Aliens.

Day 5 – Sunday, February 10, ’08

Snowbird has a tunnel near the top of the mountain which goes through to the other side of the mountain with a “magic carpet” conveyour belt that pulls skiiers and boarders through.  We just had to see what this was like, so we checked it out.  Our day ended early at 12:30; we hastily packed up our stuff in the locker room, loaded up the car, and drove to the airport in time to catch our flights home.