March 7, 2013

Well it looks like I’m not the only one covering Jason Isbell. This is the Civil Wars singer John Paul White. Wish I sounded as good as he does…

JPW covers the Drive by Truckers at the Muscle Shoals Movie premiere party at Sundance 2013

(via thesongsurvives)

March 4, 2013

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.

March 1, 2013
Adam Laiacano: Using entropy to route web traffic

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 27, 2013

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.

February 5, 2013
The Creative Process Explained…

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.

February 1, 2013
What I’m Reading and Thinking: Volume I

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”: and No, I’m not going to tell you what I believe I’m wrong about. This one is just awesome! An approachable book by musician David Byrne on how music works:

## And I’m currently thinking about how to easily transform an R Markdown document into an interactive web application…

December 3, 2012
It’s Time For A Change: A Shiny One

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.

10:55am  |   URL: http://tmblr.co/Zf5rDyYaPNYS
Filed under: R rstats
November 19, 2012
RMySQL Looking For A New Maintainer

9:43am  |   URL: http://tmblr.co/Zf5rDyXbpGZ1
Filed under: R rstats
November 15, 2012
Innovation in Statistical Computing

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.

11:50am  |   URL: http://tmblr.co/Zf5rDyXKoTY0
Filed under: r rstats
October 17, 2012
Deploy Rook Apps: Part II

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 App

So 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")


8:31pm  |   URL: http://tmblr.co/Zf5rDyVVW2Jg