Archive for September, 2011

Logging steps via Google Docs

Thursday, September 15th, 2011

My employer, Pearson, provided the opportunity for its employees to participate in the 2011 Global Corporate Challenge. The GCC consisted of teams of 7 who tracked their daily steps counted with a pedometer for 16 weeks. The idea is to motivate people to become more active. The event started on May 19, 2011 and ended September 6, 2011. Being an engineering type of person, I liked the idea of gathering the daily step count as a metric for activity. The event suggested a goal of achieving 10,000 steps a day. I was pretty active recording my pedometer activity every morning via the SMS text message data entry technique: the GCC has an SMS short code and you entered the date and number of steps. Submitted text messages were recorded in your step log on the GCC web site. Being able to enter the data via my phone was very handy as it let me enter data while I was on vacation without missing a day. But, now that the event is over, I still wanted to keep track of my step counts. Here is the technique that I worked out using Google Docs to record my step counts.

I created a Google Docs Form to collect my daily step count. The collected data is stored in a Google Docs Spreadsheet. The form can be viewed in a web browser or in Google Docs for Android. Since I have an Android phone, the form lets me use my phone to still collect my daily step counts each morning. And since the data is stored in a spreadsheet, I can perform calculations on the data to get my total and average step counts and even graph my daily totals. Here is the process that I use.


Adding the handy separator to Cygwin

Thursday, September 15th, 2011

Separator Screen Shot

Lifehacker had a pretty neat post yesterday which added “a Handy Separator Between Commands in Your Terminal on Mac OS X and Linux.” I use a Cygwin terminal on my Windows machine, and the Linux script almost worked: the dashes didn’t print. I tracked down my particular problem to the COLUMNS variable used to calculate how many dashes to print in the separator. In my Cygwin terminal prompt, running “export $COLUMNS” showed the variable was blank; meaning that no dashes were used for the separator. Looking at the Mac modification, I noticed that it used the command “shopt -s checkwinsize” to check the window size and if necessary update the LINES and COLUMNS variables. So after adding these two lines to the beginning of the Linux “.bash_ps1” script, hereĀ, the separator worked for my Cygwin terminal.

shopt -s checkwinsize
export COLUMNS