April 2013
6 posts
Well I was late to class and out of gas
So I grabbed a bull and I hoped it last
When I saw a pretty girl and I had to ask
“How d’you stay so thin?”
She said Adderall, Adderall
Three days you’re up and the next you fall
Sure love taking that Adderall
It’s what helps me keep so trim
When I got to class Ol’ Teacher asked
Why my grades were down and fallin’ fast
He said Son the final’s your last at bat
so get yer but in gear!
If I fail the class, they’ll kick me out
I’ll lose my scholarship without a doubt
Then the pretty girl began to twitch and shout
and nearly busted my ear
She said Adderall, Adderall
Three days you’re up and the next you fall
You’ll make the grade with Adderall
It’ll help you persevere
Well that final was only three days away
had to act fast before I strayed
So I asked the pretty girl if there was any way
she could get me that study aid
She handed me three by thirty mgs
I gulped them down and my heart seized
Then fell to the ground on my bended knees
And I began to pray
Adderall, Adderall
Three days your up and next you fall
Lord help me get through this Adderall
And I’ll change my ways today
Pretty girl helped me up off the ground
Said “Hit the books time to knuckle down
Stay clear of the bars in this college town
And you’ll earn that phd.”
well I knuckled down for three days straight
overslept and got to class late
but I aced that final teacher said your great
and I graduated barely cum laude
I went to the dorm to thank the pretty girl
When I found her room my toes curled
She was sprawled on the floor white as a pearl
Study aid killed her dead
Adderall, Adderall
Three days you’re up and next you fall
Don’t go takin’ that Adderall
‘Cause it will kill you dead
Here’s a song I tried recording this morning… I didn’t get all the way through because I had just finished practicing scales and I got a “slowhand”. Medium strings on an acoustic guitar will make you look like Popeye by the end.
Well you’re tearin’ at your face and sobbin’ on the floor
Bangin’ on the windows and bangin’ on the doors
Don’t go bangin’ on your plate glass heart
I ‘been a mutterin’ and wondrin’ why you be this way
Surely it can’t be things I do and say
I’m worried ‘bout your plate glass heart
You ‘been a holerin and a huffin all over my glasses
Foggin’ up the lenses and makin lots of scratches
Can’t see inside your plate glass heart now
Hearts were made to break, And the pieces fall right back in place,
And since yours is made of glass, stop takin me to task
‘Cause I love you till my last dyin’ day.
Well you’re a little bit fragile and a little bit tough
And aside from your heart, you’re made of good stuff,
I just love you for you plate glass heart
Sorry for callin’ out your firey disposition
Ain’t like I’m askin for a Spanish Inquisition
Tryin to understand your plate glass heart
Well drinkin’ kills my liver, but if I see a crack
Or a tiny little sliver, gonna watch my achin back
Don’t wanna die from your plate glass heart
Hearts were made to break, The pieces fall right back in place,
But since yours is made of glass, I think I’m gonna pass
On fightin for the last piece of cake.
Wanna love you and nobody else
And I wantcha taking real good care of yourself
Just tryin to love you for your plate glass heart
Well it’s 2am and you’re barkin at the moon
I’m right behind you with a dustpan and a broom
You know sleep it don’t come easy
When you’re carin’ for a plate glass heart.
I try to act civil and win you over
But you make like it’s a hostile takeover
It’s risky doin’ business
with your undervalued plate glass heart.
Hearts were made to break, And the pieces fall right back in place,
But since yours is made of glass, Try to make it last
Till I buy a titanium case
Down is just the most common way out because down is the easiest way out.
Nobody ever wants to do the hard thing because it hurts.
March 2013
7 posts
Anna asked me to write a song for our “baby on the way”, but I don’t think she expected a sad irish folk tune.
Here’s an original bluegrass tune about the September 11 attacks and the death of Osama Bin Laden.
I got a little carried away with the harmonies… there’s some fifths in there that are a little too strong. Oh well.
A LITTLE PARANOID ON MONDAY
Had a blast recording this with my son Nick. He’s been playing guitar for a few years and he’s very dedicated. We got him a bass this past Christmas, and he somehow talked his brother Joseph into asking for a set of drums, which he got… and Joseph won’t play them… but mom and dad do. We channel the White Stripes pretty well.
Three months later and we’ve managed to build a very bare-bones recording studio with said instruments, a Marshall tube pre amp, some unnamed bass amp, an acoustic guitar, one mic, two interfaces (one quarter inch to usb, one xlr to usb), and a crappy laptop running audacity on windows 7.
We’re recording together so that Nick can learn the ins and outs of what may be a more obtainable career than being the next Tony Iommi. Nothing against Iommi, but I’m just not down with the whole “rock-n-role lifestyle” for the kid.
I told him to pick a song and we’ll play all the instruments and record it. We settled on Paranoid by Black Sabbath because I wasn’t much into the shear terror screaming or gutteral growling he so likes to listen to on his doom metal songs… (we’re looking forward to that influence going away)… and Paranoid had the tamest lyrics which did not invoke the occult or something else horrible.
He tried singing it, then I tried singing it, and we both agreed my voice was the less bad of the two.
Nick’s still working on the guitar solo, but I’m so pumped that we got this far in the recording process and I thought I’d share a bit early.
Earlier this week, Blake asked me for some help with a problem he’s working on. He has a couple of hash functions that are being used to route web traffic to a number of different servers. A hash function takes an input, such as a blog’s url, and outputs a number between 0 and 232. Say we have…
February 2013
3 posts
YOU GOTTA START SOMEWHERE
Cover of Jason Isbell song Outfit
Ever since I heard Jason Isbell sing this song on Letterman a few months ago, I’ve been obsessed with it. Turns out my feelings are shared with a few other crazies.
The goal in creating this cover was to see if I could actually sound like Isbell and also to test out our recording setup. Check and Check, but a fail in both. It’s hard singin’ and playin’ and it’s hard recordin’, but you gotta start somewhere…
Next up I’ll be sharing an original song, probably short, but hopefully a little better.
Me: I am a knowledge worker. Everything I do (and read) helps me do my job :)
Wife: Yea well I’m an artist, so telling people what to do then eating hershey kisses for an hour while I stare out the window is called the creative process.
Twitter is great. I’ve curated a cool list of people who feed me really interesting reads. I can’t remember who and which tweet led me to this book, but it’s given me a nice perspective on how to deal with the emotions of “being wrong”:
![]()
![]()
December 2012
1 post
I presented rApache to the public for the first time at the Directions in Statistical Computing workshop in August 2005 (paper), almost seven years ago. It might have been novel, maybe even crazy at the time, but I think rApache showed people a new way to bring R to the web.
I presented brew, a templating framework for mixing HTML and R code, on a poster at useR! 2007. When used with rApache, it’s basically just like using PHP… but with R.
I wrote rApache to scratch an itch. I wrote brew on a whim, just to see if I could do it. They’re both open source, so anyone can use them or change them, but I’m kind of bored with them.
I like shiny. shiny is the web application framework I had hoped to write one day, but I had lost motivation and what’s worse lost touch with what was going on in the web programming space.
I’m going to write shiny applications like this one now.
Disclaimer: I helped implement the shiny server running on RStudio’s beta site. It’ll be open sourced soon.
November 2012
2 posts
Please contact me if you’d like to take over maintainership of this popular R package.
In A Capitalist’s Dilemma, Whoever Wins on Tuesday, Clayton Christensen lays out three kinds of innovations through which an industry cycles:
- Empowering Innovations - those that offer products and services to a new customer base. The classic empowering (or disruptive) innovation is Ford Motor Company’s introduction of the low-cost Model T coupled with the ability of Ford’s own workers to afford such a car.
- Sustaining Innovations - those that improve on the value of current products and services by replacing them with newer and better ones. Christensen offers the hybrid Toyota Prius as an example.
- and Efficiency Innovations - those that reduce the cost of making and distributing current products and services, such as steel minimills and low cost car insurance like Geico.
Today, I see this cycle coming full circle in the field of statistical computing, and specifically with R.
There is no question that John Chamber’s S system has been an empowering innovation. The S System was remarkable in that it pioneered the use of data visualization and interactive computing. Prior to S, statisticians wrote single programs to perform a single task, or they bundled these programs together into algorithmic collections or subprograms.
Without a doubt, the open source R project (not unlike S) can be viewed as a sustaining innovation. It improves on S in many ways, preserving and enhancing the interactive environment, the language, data visualization, etc. More importantly, it integrates the ability to easily download and use software located on CRAN (Comprehensive R Archive Network).
Finally, there are many efficiency innovations that have occured with R, mainly through new R packages. There are too many to list, but Paul Murrell’s grid package gave birth to lattice and ggplot2 improving data visualization, and Hadley Wickam’s devtools package made it easy to create and distribute packages.
But the biggest efficiency innovation to alter statistical computing in R has been the creation of RStudio, an open source IDE for R. No other IDE, commercial or open source, can touch the feature set or even quality of RStudio’s products.
Two observations about RStudio have brought me to this conclusion:
- their complete IDE can run in the browser, offering the possibility to harness supercomputing facilities and big data from a laptop, and easing systems administration of many R users by managing only one R install.
- and the ability to quickly create packages and share them with others. This video shows the bare minimum steps needed to bundle your code and share it with millions, in under two minutes!
Truth be told, RStudio leverages all the good work made by others. For instance, it’s Wickam’s devtools package underneath the hood driving RStudio’s packaging feature. It’s Yihui’s knitr package along with Sweave that makes writing R documentation in RStudio such a pleasure. But it’s in the engineering, the stitching together of all these packages that creates an innovative experience. And it’s too soon to tell, but we may look back on this period in history and say that RStudio was more than an efficiency innovation; it might just have been disruptive, too.
October 2012
1 post
In Part I, I described how you can deploy your Rook applications with rApache. This post describes how you can do it with R itself. But before we get into that, I’d like to explain the off-again on-again relationship Rook has had with CRAN, R’s package archive network.
Since inception (of Rook, not the movie), I wanted to give Rook the most flexibility possible, and that meant discovering how R’s internal web server worked. By inspecting the code from startDynamicHelp in the tools package, I discovered there were two basic calls to start and stop the server:
.Internal(startHTTPD("127.0.0.1", ports[i]))
and
.Internal(stopHTTPD())
but it turns out that inclusion of .Internal calls is a violation of CRAN’s Policy:
CRAN packages should use only the public API. Hence they should not use entry
points not declared as API in installed headers nor .Internal()l nor .Call()
etc calls to base packages. Such usages can cause packages to break at any
time, even in patched versions of R.
Understood. R-Core does a herculean job of maintaining the package repository with very little human and physical capital, and ensuring that R packages behave nicely from one R release to another is a task that all package authors should strive for. So, I yanked those calls out of Rook and play nicely by calling startDynamicHelp.
Unfortunately, that hobbles Rook in just the slightest way; it can no longer listen on any other IP address other than 127.0.0.1 … at least out of the box, but you as a Rook user are in full control of your R environment. That leads me to the following recipe for deploying a Rook app.
Yes, Using Only R, You Can Deploy A Rook AppSo here’s a recipe I cooked up to circumvent R’s http environment. I don’t recommend doing this for production, but it’s nice to show a few friends and co-workers. This is an Rscript file which you can execute from the shell. It starts up Rook on port 8000 and will listen on the 0.0.0.0 IP address. That means it will listen on your loopback device as well as any other network device you have set up on your machine. If you want to be really savy, you could even change the myPort variable to 80, like a real web server! Just know that’s a priviledged port and will need root access.
The recipe adds the test application from the Rook package system files, and it’s easy to add more than one application if you like.
#!/usr/bin/env Rscript
library(Rook)
myPort <- 8000
myInterface <- "0.0.0.0"
status <- -1
# R 2.15.1 uses .Internal, but the next release of R will use a .Call.
# Either way it starts the web server.
if (as.integer(R.version[["svn rev"]]) > 59600) {
status <- .Call(tools:::startHTTPD, myInterface, myPort)
} else {
status <- .Internal(startHTTPD(myInterface, myPort))
}
if (status == 0) {
unlockBinding("httpdPort", environment(tools:::startDynamicHelp))
assign("httpdPort", myPort, environment(tools:::startDynamicHelp))
s <- Rhttpd$new()
s$listenAddr <- myInterface
s$listenPort <- myPort
# Change this line to your own application. You can add more than one
# application if you like
s$add(name = "test", app = system.file("exampleApps/RookTestApp.R", package = "Rook"))
# Now make the console go to sleep. Of course the web server will still be
# running.
while (TRUE) Sys.sleep(24 * 60 * 60)
}
# If we get here then the web server didn't start up properly
warning("Oops! Couldn't start Rook app")