garmin

People who know about my running problem know that I am also not disciplined. Running is way too fun for me to treat it with real goals and stuff. My goals for running are pretty simple: go somewhere cool and enjoy doing it. Of course I could take the train and accomplish that same task, so there is the component of the sheer motion of running that I absolutely love. The rhythm of running is a beautiful thing to experience, and I am thankful every day that I am able. That said, it also turns out that, perhaps owned to my scientific and analytical nature, I am intensely curious about all the sorts of numbers that one can assign to running. How fast am I going? How far did I go?

When I first got a heart rate monitor (HRM) about three years ago, I was intrigued by the simplicity of the measurement. My first HRM was a Suunto T3, and I managed to wear out the heart rate strap and break it after about a year. As a replacement I moved up to the Polar RS200, a watch that is marketed as running specific and even features a dot matrix running man on the time display. Polar are clearly the heart rate gurus, having invented the technology so many years ago, but the pace of technology has quickly learned to keep up, for the most part. The RS200 was not without its shortcomings, which took me about a year of running to fully appreciate. It only holds the last 16 workouts. It has 3 lines of data. The lap button isn’t fool proof on the run. And most importantly, to get any notion of how speed and distance progress over the course and during a run, one has to rely on a crude approximation given by the speed and distance sensor that attaches to the shoe, powered by 2 heavy AAA batteries that frankly didn’t last a month of running.

It was fun while it lasted, and while I’ve had my eye for awhile on the Garmin Forerunners, I wasn’t ready to go for it until Garmin caught up in the following, relatively minor areas: battery life and heart rate strap comfort. For GPS technology tracking distance and, combined with time, speed, it is incredibly appealing, considering the amount of trail running I do, where it is hard to estimate distance, especially given the amount of time I spend lost and running around in circles. Figuring out pace and “performance” is always tricky, and I admit I like to know at the very minimum how far I’ve gone and how long I was out there.

Enter the 310XT. It sounded like the answer to all of my problems, and I couldn’t have gotten ahold of one fast enough. Just in time to be a pacer at my first ultramarathon, the Vermont 100, I put it through a couple of short runs to get used to it and familiarize myself with it. Additionally, I was able to use it for the entire 17 hours and 22 minutes I was pacing at the race (63 miles) on a single battery charge. While I didn’t quite push it to the advertised 20 hours, 17 is not bad and at least plenty for all races up to about 60-70 miles. I guess I’ll have to have a strategy for 100 milers.

Read the rest of this entry »

Wolfram Alpha

16 May 2009

I dunno, I’m not really impressed:

wolfram

The rumor mill is buzzing with evidence that Apple will soon release two new wireless devices, what amounts to an iPhone micro and an iPod touch macro. It’s clear that the larger iPod touch-like device will not be a cellular device, though it may include the 3G cellular wireless internet technology. I have a specific interest in a tablet-like device whose screen is exactly 7.5″ x 10″. Here’s why.

The problem is that it’s nearly 2010. I seem to recall in the 90s being promised a future full of Jetsons-like gadgets. We are not supposed to have to walk from point A to point B but have those belt things you see at the airport. Cars should be flying by 2010. (Dogs should be talking?) And our offices were guaranteed to be paperless by now! We are quite far from the paperless office, specifically, and I want the Apple’s iPod touch macro to be a media pad that helps fill this gap. What will it need to do to succeed?

1. LED-backlit high resolution LCD: 7.5″ x 10″. It’s the size of a sheet of paper, minus the margins. Small form factor but all screen. And readable.

2. One USB port, 802.11n, bluetooth, mini-DisplayPort, and optional wireless 3G. This is the bare essentials for ports. One USB port for universal connectivity. 802.11n for fast internet access. Bluetooth for connecting external keyboard and mouse if desired (someone will make a kickstand for this simple device). Mini-DisplayPort so it can give presentations. And finally, I say optional wireless 3G because I have absolutely zero intention of buying something that requires a monthly service contract. I simply don’t want it.

3. 8 GB solid state drive. Enough space for applications and some music, perhaps. No moving parts, please.

4. Touch gesture controlled but with stylus input. While it’s clear that multitouch is the future of a specialized device like this, the stylus input will be key, though auxiliary. The stylus will be crucial for utilizing the Ink Well software already part of Mac OS X.

5. Operating System. It’s clear that this device will have to run some variant of Mac OS X. As I see it, Apple have 3 options for an operating system. They can go with the iPod touch/iPhone model of downloading apps from a controlled source (iTunes store). They can go with the full Mac OS X model and open the device up to any software on OS X. Or they can go the Microsoft route and brand yet another version of OS X with ambiguous “Media Center” differences and confuse branding on their stellar OS. To me, the full OS X model is the way to go here. The primary reason for this is users should be able to run all of the wonderful software available to OS X currently, without limitation. Merging contents of the iTunes store will make that space confusing, as apps compatible with the iPhone/iPod touch will likely not be compatible (at first) with the new media pad device. Nevertheless, I can completely see Apple erring on the side of control in this case, for at least the perceived reason of protecting the 3G network from malicious programs. Of course, as with all attempts at DRM type control, this can and will be circumvented. Why confuse the space unnecessarily for marginal benefits?

6. Software – PDF Reader Example. There is one piece of software that I’m going to focus on, in order to give an idea of what such a media pad device can accomplish. It’s a simple PDF reader, on its face. PDFKit driven, the model in my mind here is Skim.app, a freely available program that takes full advantage of PDFKit’s annotation and note-taking capabilities. Consider being able to underline, write notes, and mark up PDFs on the go in a digital format, where your notes are automatically converted into text and your underlining/highlighting is automatically converted into digital underlines. Saving this file will make all notes transportable to other devices or printable. Furthermore, one can zoom text effortlessly with the multitouch features already demonstrated in multitouch trackpads on Apple laptops and on the iPod touch/iPhone. To be able to keep a library of PDFs on this device will solve the problem for paper that the mp3 player solved for music: while a CD player requires carrying CDs and cumbersome switching, the mp3 player can now have dozens or hundreds of albums in a convenient form factor. The Media Pad device will allow us to become more mobile with more documents.

7. A few other issues. Give us a thin bezel, please. Battery life should be reasonable. The device should be thin. While a sync feature would be in line with the iPod touch model, I still prefer a full on OS X device model. Perhaps there could be a compromise here. It’s also clear that this device will require its own special developer tools to take advantage of stylus transduction and multitouch interaction. Apple will do well on this, if their past is any indication. Finally, I think Apple needs to seriously look at their anti-aliasing to make this device very readable on screen. e-Paper is not the solution, until refresh rates and color are both substantially improved; however, e-Paper is very readable.

I’ve been thinking about a device like this to solve many of my problems as a scientist whose life of reading revolves largely around the PDF article. I suspect that other professions also could use something like this, especially in the software model in which any arbitrary application can be created to take advantage of this device.

Here’s a quick tip for Mac OS X Leopard’s exposé feature that I just encountered by accident. If you activate Exposé, in either the application windows or all windows mode, you can use splat+tab or splat+~ to move back and forth between open windows of each application. This is very useful when you have dozens of windows open, because they are now contained within each individual application space.

expose

Note: splat is also known by its inferior names as “command key” or “apple key”

.bashrc by example

5 April 2009

The learning curve for .bashrc is very broad and takes patience or a very good tutorial. Here’s a happy medium between those two.

Basics:
Bash is a shell that allows you to enter commands at the command line. It’s a very robust program that allows scripting, variables, and a whole host of other features you may/may not ever use. If you’re interested in learning about it, there are a lot of great books on the subject.

If you don’t know what shell you are running on Mac OS X or if you’re new to Linux, try opening a Terminal window and typing this:

echo $SHELL

That will tell you the full path of the shell program you are using. For instance, mine is ‘/bin/bash’.

Bash reads from several files in a prescribed order, depending on various circumstances. This can allow for customization or be very confusing, depending on how sophisticated you want to be. I’m only now getting a sense of why that could be useful, but let’s ignore that for now. I tell bash to basically look at one file for all my shortcuts, etc., so that’s what we’ll set up here.

Read the rest of this entry »

The promise of the open source programming language Python for numerical computing has been frustrating for lack of good, consolidated advice out there to troubleshoot issues that should be really simple. Here’s a brief tutorial on how to get readline support on Mac OS X 10.5.x.

What is readline? Readline is a program that allows you to use tab completion, history, and other features that you’re used to in your favorite shell, MATLAB from the command line, and GNU Octave.

There are two steps to this. The first is to tell python to always use a startup file. The second is the create the startup file with the right info inside. I’m assuming you use Bash and are running python from a terminal — in xterm, Terminal.app, or iTerm.app, etc.

Step 1: In your .bashrc file (or .profile, .bash_profile, etc.), using your favorite text editor, put the following line:


export PYTHONSTARTUP=~/.pythonrc

To initialize this, at your shell, type:


source ~/.bashrc

(substitute your file appropriately)

Step 2: Create the file .pythonrc in your home directory (~/):


import rlcompleter
import readline
readline.parse_and_bind ("tab: complete")

Save this file, and now run any python build you may have on your machine. Python will read this file automatically and now you can test out tab completion by typing (no quotes): ‘imp’. The word “import” should be completed.

There is a minor stir occurring among owners of Apple’s new 15″ MacBook Pro Unibody machines concerning memory capabilities. The primary problem is that the models that can handle 8 GB of memory appear to be ambiguous by Apple’s own standard, and sorting it out is somewhat confusing. There’s also a lot of misinformation and missing information floating around. This is an attempt to clear things up.

Read the rest of this entry »

Just realized there are several handy keyboard shortcuts on Google Maps. Feel free to add to this list.

Arrow keys: simple, accelerated navigation. The longer you hold the key down, the faster you go (to a limit, might be based on your connection speed?)
Home/End (Fn+Arrow R&L on Mac): move about 3/4 of a page West and East
Page up/down (Fn+Arrow Up & Down on Mac): move about 3/4 page North and South
Equals/Plus key (=/+) (no shift needed): Zoom in
Minus key (-): Zoom out
Forward slash (/): Puts the focus on the search box

It dawned on me that posting my .gvimrc file, which I use on Mac OS X exclusively with MacVim, might be instructive by example for people searching high and low on the interweb for this information (which I just did).

Let me back up a sec. The .gvimrc resource file is meant for the GUI version of the wonderful text editor vim. MacVim is a native GUI version of vim for Mac OS X folks. It is Sliced Bread. MacVim uses .gvimrc to tell it how to behave. MacVim also takes a peek at .vimrc (the general vim resource file), which I’ll post separately.

Read the rest of this entry »

Project Euler

8 February 2009

Project Euler is a small database of computational/mathematical problems that one can solve using any method he/she knows. I think it’s going to be a fascinating way to learn different numerical programming techniques.

I only solved the first few problems* so far, and while I think in MATLAB/GNU Octave for the time being, I am certain I can learn enough Perl or C to do (at least some of) these problems as well.

*I am sure someone’s pointed this out in the 8 years since its introduction, but I might as well mention it here. The original problem 1 statement reads:

“If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.”

If we expand the boundary from 10 to 20, we see that the numbers divisible by 3 include 3, 6, 9, 12, 15, and 18. The numbers in the set divisible by 5 include 5, 10, and 15.

We are told to look for the sum of all the multiples of 3 OR 5 below 1000. In this toy example, I do not think the solution should include 15, which is divisible by 3 AND 5. In any case, they meant and/or (and go so far to say so in their PDF solution), so my qnd solution was correct. Feel free to contact me for at least one MATLAB solution to this problem.