Asleep (The Smiths Cover) – Stars

I read The Perks of Being a Wallflower at thirteen or fourteen or fifteen, and that’s how I learned about The Smiths. The next chance I got, I opened Napster over my family’s dial-up connection and searched for the song in question—“Asleep.” (I know I had to be thirteen or fourteen or fifteen because the book came out in 1999, and, according to Wikipedia, Napster was only active beween June 1999 and July 2001.) 

My search returned a lone file by an artist cryptically listed as “Benjamin B.” I downloaded the track (slowly!), listened to it, and listened to it again; almost every mix CD I made for the next few years included that song as its final track. But somehow, I persisted in believing that it was really The Smiths. Maybe I thought the metadata was messed up; maybe I thought one of the band’s members was named Benjamin B. I don’t really know what I thought, but I do know I was very surprised when I heard the studio version for the first time. For me, “Asleep” had always been a quiet, intimate track; when I eventually heard the original by The Smiths, it struck me as too spacious.

When this cover by Stars came on at the end of their new EP last night, these memories flooded me. I was listening after dark, and it was quiet.

Building SoundScout

Between November and December 2012, I built SoundScout as a way to discover up-and-coming musicians on SoundCloud. What started as a simple command-line script rapidly evolved into a Ruby app running on Sinatra, powered by two gems, deployed to Heroku, fueled by Sidekiq workers managed by a Redis instance. Building SoundScout was one of the most challenging projects I’ve ever undertaken, and one of the most satisfying by far.

image

It all started when I realized I wanted to find more people to follow on SoundCloud. My first impulse was to scroll through artists in my Rdio collection and then search for each name on SoundCloud in turn, but after a few minutes of rapid tapping, a realization kicked inA computer could do this! 

A quick skim of Rdio’s API documentation confirmed my hope that I’d be able to get the info I needed through their API. Meanwhile, past experience with the SoundCloud API reassured me that it would be smooth sailing on that end. Before long, it occurred to me: this had the potential to be a great final project for CS50, Harvard’s introductory computer science course (and one of my favorite classes last semester). A conversation with Erik convinced me that I could actually go beyond finding the SoundCloud accounts of my favorite Rdio artists—that the higher good would be to identify new artists to check out based the revealed preferences embedded in my Rdio data. And so, it was decided. With that decision, the next month of my life was more or less spoken for.

This is the story of that month, what I learned along the way, and where I ended up.

Read More

Art and Convenience: Reflections on The Cultural Cold War

Cultural freedom did not come cheap. [Between 1952 and 1969], the CIA was to pump tens of millions of dollars into the Congress for Cultural Freedom and related projects. With this kind of commitment, the CIA was in effect acting as America’s Ministry of Culture. – Frances Stonor Saunders

In July 2012, I wrote:

Did you know the 1950s CIA patronized Abstract Expressionism indirectly? Neither did I! But according to [Lewis] Hyde, the whole story is detailed in a book titled The Cultural Cold War: The CIA and the World of Arts and Letters, by Frances Stonor Saunders. 

I need to read this book.

Thanks to a mysterious sender, the book appeared on my desk a week later. I started reading it right away, finished a few months later, and let it sink in for a few months more. The Cultural Cold War is a dense, difficult, painstakingly-researched book, and it blew my mind.

Because the book was so dense and difficult—Biblical in its litanies of names, dizzying in its quick cuts between poorly-illuminated scenes—I can’t recommend it without reservation. To get a flavor of the weirdness, I’d suggest this (much) shorter news piece by the book’s author, instead: “Modern art was CIA ‘weapon’”. But if you’re looking to thoroughly upend your understanding of art, prestige, and the role of government, and you’re tireless in your search for truth, this is the book for you.

Read More

Sunday, January 6, 2013 marked the second meeting of 24-Hour Bookclub—a reading flashmob anyone can join.

After spending the whole day reading Both Flesh and Not (the new collection of essays by David Foster Wallace), I set my trusty reading device down and recorded the track above, alternately rambling and rejoicing over the experience.

So much happened, and for one day it all hung together. But the links are fading away already, so I wanted to make sure to collect them all in one place before the reality we inhabited for a single day disappears completely!

First and foremost: all tweets (over 200!) from all readers.

In-depth conversations about each essay on Branch.

Highlights and notes on Readmill.

(And don’t miss the nice blog post Readmill wrote about 24-Hour Bookclub!)

I’m so happy that this happened, and can’t wait to see it happen again.

24-Hour Bookclub Tips

In just a few short hours, the latest edition of 24-Hour Bookclub—a reading flashmob you can join!—will begin. We’ll be reading Both Flesh and Not, the new collection of non-fiction essays by David Foster Wallace. If this time is anything like last time, I’m going to be delirious with happiness by the end of the day. I’m already kind of delirious with excitement.

Since a ton of readers are joining us for the first time, I thought I’d jot down a few examples of ways people have seized the day and new ideas we’re trying out this time. These are all things that people came up with spontaneously, though, so my number-one piece of advice is: experiment! If it seems like a good idea, try it. We’re all making this up as we go along, and that’s what makes it so fun.

You could…

  • Take a picture as you start reading. Capture the book (or the device you’re reading it on) in your natural surroundings. And if you received a membership card in the mail…might we suggest using it as a bookmark?
  • Pull quotes that catch your attention and post them to Twitter. Make sure to add the hashtag #24hourbookclub to all your tweets so that we can find them!
  • Throw an in-person reading party with friends. Last time, people in San Francisco got together to read Mr. Penumbra’s 24-Hour Bookstore in Dolores Park with bagels. This time, people are gathering in Brooklyn to read together and eat coffee cake. That’s so cool.
  • Write more than 140 characters on Branch! Thanks to Libby and Josh at Branch, we’re all set up with a shiny new Branch group for 24-Hour Bookclub. Click “ask to join” and we’ll let you right in once it’s Sunday morning where you are. We’ve set up separate branches for each essay in the collection. Once you finish reading “The (As it Were) Seminal Importance of Terminator 2,” for instance, you can hop on over to the associated branch and see what other people have to say, as well as adding your own thoughts. Branch and Twitter are complementary; Branch emanates quiet purpose and lively civility, where Twitter is all chaos and bright light. I’m excited to see them coexist!
  • Highlight in Readmill as you go along. I did this for my original solo book-in-a-day experiment and I can’t wait to do it again for Both Flesh and Not. When Matthew from Readmill interviewed me and Max over email, I realized that “calm and exhilaration are two sides of the same coin: books were made for immersion, and no experience is more immersive than Readmill.” If you’d like, you can follow my real-time highlights and notes here.
  • Share your thoughts out loud with SoundCloud. I love the image of a time-shifted in-person bookclub…all of us sitting around a kitchen table, talking once we have things to say. SoundCloud’s mobile apps are great for recording audio on the fly—I use their iOS app pretty much every day.

Or…just quietly read, and know that you’re in good company. I love playing with new tools, and I love that so many 24-Hour Bookclub readers do, too. But books are our first love, and if solitude feels truest to you, then that’s what you should do. This can be whatever we want it to be, and if all you need is the license to throw yourself into a book for a day…well, dear reader, we will give that to you in a heartbeat.

I hope to see you in the morning! Thank you for being a part of this.

“Weapons,” by Dad Rocks!

The whole album is so good. Teenage me would have been head over heels, and twentysomething me is, too. I was suspicious of the band name when I saw it in SoundCloud’s Community Team Favs 2012 set (will this be like Yo Gabba Gabba crossed with Wilco?), but the music won me over quickly. This track features Charles Spearin of Broken Social Scene on cornet.

My voice—with its grain, with its accents, with its imprecise diction, its tonalities, rhythms, pauses and vacillations—is witness to a presence even when I’m not there; it brings me close to people and doesn’t negate my transformative capacity because its presence is dynamic, alive and trembling even when seemingly still.

Wu Ming, via Jane

I love this about sound.

I’m playing with Medium.

Code Log 12.4.2012

Notes on what it’s like to write code.

I woke up this morning and pulled my open laptop onto the mountainous comforter piled over my knees. Eyes blinking against the sunlight, I squinted at the Terminal window on my screen. Before email, before Twitter, before breakfast, before anything: the most pressing, exciting thing in my world at 7-something this morning was the status of the script I’d set running overnight…

…Noooooooo. I’d forgotten to turn off Energy Saver. The script had stopped when the laptop went to sleep, which is to say, right about when I went to sleep, which is to say, it hadn’t run overnight at all.

The goal had been to grab a ton of data from SoundCloud using their API, so that I could fill my database with useful test data against which to tune my algorithm. I’ve been working nonstop on this app idea I laid out exactly one month ago. It’s nominally my final project for CS50—due this Sunday!—but it’s become much more than that, as I always hoped it would.

Over Thanksgiving, I spent late nights coding at my grandma’s house in Wyoming, precariously connected to the internet over tethered cellular data. I generated piles of CSVs as I experimented with different properties that might indicate promising SoundCloud musicians inspired by artists a user follows on Rdio. My working title for the project was “Riser.” Since all my early files remained in the RIser folder, you can see the accumulated detritus of experimentation:

image

(Terminal sporting Erik’s dotfiles. They’re indispensable!)

As you can see, the folder was a mess. I’m philosophically okay with messiness (especially in the beginning of any new project), but I’ll admit that I added a needless layer of messiness by not using version control from the beginning.

Conceptual discomfort with version control was not the problem. I love using Git and GitHubmy GitHub profile shows 18 public repos—mostly forks of other projects—and I have 5 private ones (mostly original material) besides. The two main sticking points were subtler:

  1. To work with the Rdio and SoundCloud APIs, I needed to hand off some personal information through my app. In the beginning, I was just storing that info willy-nilly through the code. I eventually moved it to a credentials file (credentials.yml), but still had a nagging worry; I didn’t want to risk uploading a credentials file to GitHub.
  2. especially didn’t want to “risk it” because I semi-remembered that I’d hit my limit of private repos on GitHub’s micro plan. (Free to students.)

In truth, I probably could have figured out what to do. My eventual solution was to delete one of my private repos (which was actually just an empty app, so it was good to get that cleaned up anyway) and to add credentials.yml to my gitignore file so that Git would, well, ignore it when deciding what to track and send to GitHub. A quick conversation with Erik was all it took to get me over the hump and into using version control (in a new folder bearing the project’s final, still-top-secret name) at last. But what’s funny is that I’d actually handled each of those situations once or twice before; they weren’t completely alien to me. Rather, the hurdles felt just unfamiliar enough that I held on to some resistance below the level of conscious awareness. Minute to minute, the sensation was: I just want to keep making my app better! But now I’m kind of disappointed not to have the full history of my progress preserved eternally on GitHub. 

Next time will be better.

And the script that went to sleep? Well, that had a happy ending. After turning off Energy Saver with a flourish of righteous indignation, I spent some more morning minutes squinting at my screen (eyes slowly opening), improving the script, messing with my database, until it seemed like it was in better working condition. I set it running and then stepped outside to go get oatmeal from the cafeteria.

It was my first trip outside in…oh, about 36 hours.

I’m hopelessly hooked.

Code Log 11.4.2012

Notes on what it’s like to write code.

Today, I raced back into Ruby’s arms.

It’s hard to believe, but the end of the semester is drawing near, and so CS50 (the intro to computer science course I’m taking at Harvard) is winding down, too. Well, “winding down” would probably be an overstatement; there’s a lot of work left to do! But lectures have finally broken free of the thicket of C, and this week’s problem set will be our last. After that, there’s just one more quiz and the final project.

The final project. The specification explains: “All that we ask is that you build something of interest to you, that you solve an actual problem, that you impact campus, or that you change the world. Strive to create something that outlives this course.” I’ve built apps before, but something feels different about the prospect of this one. It might be my great love for the course; it might be the element of communal experience; it might be that CS50 itself feels like a rite of passage. It might be that in the past, apps I’ve built have always felt hacked together—hanging by a thread. This one might, too, but I’ll understand the threads so much better. I’ll see how they come together.

For a long time, I’ve imagined that I’d build my final project for iOS. The promise of being able to experience something I built on my phone just seemed impossibly cool. But after spending some time with Apple’s iOS documentation this weekend, my heart fell. In spite of my newfound (relative) comfort with C—a close relative of Objective-C, the language iOS apps are written in—the tutorials still felt insurmountable. This could be for a lot of reasons, but I have a feeling that Xcode’s cryptic interface contributed mightily.

So I backed up. I remembered RubyMotion, a “toolchain” that lets you write iOS apps in Ruby that then compile to Objective-C. Also, if the screenshots are to be believed, it lets you circumvent Xcode. Hallelujah! Seems great. The only problem is that it costs money. I visited their website for the dozenth time, and this time noticed that they were willing to discuss student discounts for those who wrote in. I wrote in. I still hope to hear back; I’d love to try it out. But in the meantime, my mind started spinning on alternatives.

The idea for the alternative I’m running with arrived unbidden, as most good ideas do. This is how it came about:

This coming Thursday, I’m traveling to Berlin—for the first time!—to visit friends at SoundCloud. I’m so, so excited for this trip. One reason: I’ve been recording daily, private audio messages to Erik using SoundCloud’s iPhone app for the past year (now up to 321 tracks totaling over 75 hours), so SoundCloud means a lot to me; this will be like a pilgrimage to the mothership. Another reason: I’ve never been to Germany, and haven’t been to Europe at all in almost eight years. Also: I’ll get to hang out with David!

So over the weekend, looking forward to the trip, I decided it was high time to follow more people on SoundCloud. My primary one-to-one use case means that I haven’t played around with many of the site’s social features, and I wanted to take those for a whirl by filling out my network a bit. The only question: how?

I was running errands while mulling this over, so I pulled up the SoundCloud app on my phone and decided to just start searching for the names of bands and musicians I like. But—well—that didn’t seem very thorough. So I opened up Rdio (my primary music app) and started scrolling through the artists in my “collection”—a list of albums stored in my account, originally built off of my iTunes library (which is itself now in deep storage on an external hard drive…Rdio and sites like HypeMachine and SoundCloud serve all of my day-to-day music needs, and SSD storage space is precious). It’s a long list; my iTunes library was huge, holding almost a decade’s worth of accumulated tracks. When I saw an artist that rang a bell as a solid favorite, I’d toggle over to the SoundCloud app on my phone and search for that artist’s name. But the hit rate was disappointingly low, and I soon grew frustrated with the workflow. This seemed like the kind of repetitive work a computer could be doing…

A computer could do this!

And that means I could make a computer do it.

The idea started to shudder to life in my mind. What if…matching?…Rdio…SoundCloud…APIs?…this must already already exist?…shouldn’t it be built in to SoundCloud?…but…well…it sounds fun.

My mind careened onto other topics, then veered back, then kept careening. Later that evening, back in front of my computer, I decided to give iOS development one more shot. I got stuck on some Xcode setting and felt totally defeated. Eventually, I went to sleep.

Today, Erik and I got to talk in real-time for the first time in a while; he was at RubyConf in Colorado for the second half of the week, and we typically rely on time-shifted methods (like my SoundCloud audio messages) during the workweek anyway. We talked about all kinds of things (including the lightning talk he gave on the T gem, his open-source command-line power tool for Twitter), but eventually ended up at the question of my final project. 

I presented the options. Option 1: I attempt an iOS app, but I somehow have to figure out all of iOS development in two weekends, since I’ll be traveling for most of the rest of November and the CS50 fair (where we exhibit our apps) is on December 10. Or, Option 2: I explore this Rdio/SoundCloud idea in Ruby (a familiar language) and focus on making the interface cool. But…that didn’t feel like quite enough. I’ve mashed APIs together before; for a project last spring, I at one point had Stripe, Twilio, and MailChimp all hooked up at once. So where was the challenge befitting a semester of hardcore computer science?

Erik’s suggestion: focus on the algorithm. What if instead of straight matching—”you listen to this artist on Rdio, here’s that same artist on SoundCloud”—the app used Rdio artists-in-collection as revealed preference inputs to a suggestion algorithm for new, up-and-coming artists to follow on SoundCloud?

Now that was interesting. I could feel myself getting more excited. I’ve never tried to write a real algorithm, though I’ve gotten close in my work with databases. When I interface directly with databases, it’s usually about pulling all the fields I think might be useful, exporting to a spreadsheet, then messing around in Excel til the data starts to make sense. The prospect of writing an algorithm tugged at those same detective instincts, but went beyond. Rather than figuring out how to make sense of the data in one particular configuration, I’d be trying to figure out how to make sense of the data across all users and all cases, and to present the results of that sense-making in a usable form. When I mess with data in Excel, I’m the intended audience; by putting data through an algorithm, it expands the possible audience to—well, anyone.

So, that’s the going idea. That’s what I’ll be working toward. But this is one of my favorite things about coding: glimpsing the end goal let me see all the hurdles standing in the way—stretching out to the horizon—and gave me the energy to start jumping them, one by one.

Obstacle #1: I wasn’t actually sure what Rdio’s API looked like. I’ve used SoundCloud’s API for projects in the past (here’s one example), so I felt pretty confident that I’d be able to get what I needed from that side. But Rdio’s API was a total mystery. And, weirdly, I haven’t seen many people tap it for projects. That could just be a sample error (I only follow so many people on Twitter, so I only hear about so many hackathon projects), or it could be that Rdio just doesn’t have a big presence at hackathons, or it could be a lot of other things. But that relative void made me wary, so I decided to investigate Rdio’s API first, to make sure it had what I needed.

I found Rdio’s developer page just by searching for “rdio api,” and quickly realized that I would need to apply for an API key. I was a bit worried that a human would need to review my application, so I resigned myself to a couple-day wait. But fortunately, the process was automated; my application was approved instantly. I browsed the documentation just enough to reassure myself that the API was, indeed, quite extensive. And then it was time to rush off to lunch.

When I came back from lunch, I hit obstacle #2: finding the right Ruby gem.

The hazard—and joy—of programming in the GitHub era is that for any given API, there might be lots of ways to access it in your language of choice. Companies will often release an official “wrapper” for their API that makes it nicer to interact with their data through Python, or Java, or—my favorite—Ruby. But that wrapper (called a “gem” in the context of Ruby) may or may not be the nicest one: some kind soul out there in the world might have taken it upon themselves to make an even better one. There’s really no way to know until you start looking. And, unfortunately, the company’s documentation will not always give you the answer you seek.

In the case of Rdio’s API, I started out on the straight and narrow. Well, I thought it was the straight and narrow. I typed `gem install rdio` at the command line, kind of expecting that to be the canonical one. Simplest name, most canonical; makes sense. Sadly, as I soon discovered, the gem hadn’t been updated in a while…and didn’t behave exactly as I expected. It might actually be fine, but I veered away before answering that definitively, because a closer look at Rdio’s documentation told me that what I really wanted was Rdio-Simple, a family of wrappers developed by Rdio itself and hosted on GitHub.

Except…did I really want it? The syntax seemed kind of horrible—not Ruby-like at all—and I was having trouble getting it to do what I wanted. Again: maybe it’s fine. I didn’t push it far enough to know for sure. What I do know is that I got frustrated and went on a last-ditch quest to find something better. To do that, I went straight to the source: GitHub.

GitHub explains itself as a place for “social coding,” and it meets that definition, certainly. But it can also act like magical toolbox: every time you go there, the available tools have gotten better and shinier in your sleep. I say “act like” because in reality, it’s not magic at all: it’s a result of the efforts of hundreds of software developers, working out in the open, giving their creations back to the community. What makes GitHub so great is that those creations are made instantly usable and instantly discoverable—so instantly that as soon as you find the tool that does what you need, you can’t imagine how you ever lived without it.

So, I went to GitHub and typed into the search box: “rdio”. Rdio’s official rdio-simple repository did show up first. But a few lines down, something caught my eye: a different gem by AnilV, titled “rdio_api”. I went to the gem’s page, skimmed the README, and noted that its author cited the Twitter gem as inspiration. Erik’s one of the Twitter gem’s primary maintainers, and so I’ve seen first-hand all of the care that’s gone in to designing it well. This seemed like a good sign. I installed the gem and revised the few shreds of code I’d written up to that point, trying to use the gem the way I thought it should work. I ran the program and…it didn’t break! The gem worked the way I wanted it to! I didn’t have to bend to its will, or bend it to mine; it already fit my will like a glove. 

That’s one of the nice things about open-source: sometimes it’s not about what version is better or worse, but about which one matches your built intuition. The rdio_api gem matched mine, and so I ran with it.

I figured out how to get artist names from Rdio; then figured out how to input those names as search terms to SoundCloud; then figured out that if I ranked the results from SoundCloud by number of followers, I got a reasonable approximation of the “most legit” account matching any given artist’s name. I started printing those results to the command line, but then realized that scrolling up and down through Terminal would be a pain; printing the results to a CSV (which I could then open in Excel) would be way more usable. So I got that working, and then watched with glee as my spreadsheet filled up with permalinks to artists’ pages. I hit a few snags—I periodically got 503 error codes from SoundCloud, and discovered that SoundCloud couldn’t seem to handle colons as search input. (My iTunes library was voluminous enough that it included a couple of artists with this issue, including the mysteriously-named P:ano.) But overall: it worked. It worked! The basic idea worked.

With the data in a handful of spreadsheets, I started exploring—clicking permalinks that seemed promising and, on a meta level, trying to develop some intuition for what datapoints I was privileging when deeming permalinks as “promising,” so that I could build that into a future algorithm. I ended up following about 45 new accounts (you can see all of them here), very few of which I would discovered without this exercise. A few highlights:

  • Olafur Arnalds makes serene, dreamlike music. At least one of the tracks appears to be a true improvisation—not just a polished, finished track. I always like it better when artists show their work.
  • The way I was sorting showed me that Vagrant Records is actually home to several artists I love, including Edward Sharpe and The Magnetic Zeros and School of Seven Bells. Since Vagrant lists those artists in its profile, SoundCloud search picked up on the connection and returned Vagrant’s account as a result. And now I’m following them, which means I’ll get to trust their taste further.
  • It seems improbable that this Owen Pallet account is legit, but I loved hearing the demo version of “Tryst with Mephistopheles”—a song I listened to every morning, for a span of months, when I lived in San Francisco.
  • Lykke Li!

Now that I’ve cleared many of the hurdles, I can’t wait to start building out the app itself—tweaking the algorithm, generalizing the code to work for more users than just me (probably by enabling authentication), figuring out how to present it all. But underneath that anticipation, there’s also ecstatic satisfaction. There’s nothing quite like bringing an idea to life in an afternoon, and I never get that feeling more reliably and more acutely than when I’m working with code.

And I’d say that the prediction/wish I made last week is holding truer than I imagined: “I don’t think I knew how good I had it with Ruby…but I also never knew what it was capable of (or what I was capable of). So that’s the bet I’m making: two months of alternately infuriating and satisfying hand-to-hand combat with C followed by a lifetime of harmonious cooperation with Ruby and whatever comes next.” Ruby is awesome. It’s so good to have it back. I’ll never take it for granted again.

What else? So many things!

While debugging with Erik today, we took a detour into talking about SOLID principles of object-oriented design—specifically, the Liskov Substitution Principle, which states that “objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program” I actually had a bug that related to that principle, so it proved a good learning moment. In the process, I learned about Barbara Liskov—a computer science pioneer, now at MIT. New goal: meet Barbara Liskov before I leave Boston/Cambridge!

Exploring SoundCloud, I ran across this Four Tet remix of Ultraísta’s “Smalltalk,” (warning: it’s great), which reminded me of this Twitter exchange with Patrick and Buzz, wherein Buzz noted that “Objective-C actually shares one of the same ancestor[s] as Ruby (Smalltalk),” and Patrick recommended Squeak as a way to play with Smalltalk today. Still need to dig in to all the links they suggested, but that thread is one of the many that feels more woven into my life lately.

I’m still making progress through Seymour Papert’s Mindstorms, which I picked up from the library after taking heed of Bret Victor’s strong recommendation in his post on “Learnable Programming.” The book is sort of about LOGO (the programming language with the turtle), but mostly about learning. A few passages I’ve loved recently:

Of all ideas I have introduced to children, recursion stands out as the one idea that is particularly able to evoke an excited response. I think this is partly because the idea of going on forever touches on every child’s fantasies…
…what is important when we give children a theorem to use is not that they should memorize it. What matters most is that by growing up with a few very powerful theorems one comes to appreciate how certain ideas can be used as tools to think with over a lifetime. One learns to enjoy and to respect the power of powerful ideas. One learns that the most powerful idea of all is the idea of powerful ideas.

An important component in the history of knowledge is the development of techniques that increase the potency of “words and diagrams.” What is true historically is also true for the individual: An important part of becoming a good learner is learning how to push out the frontier of what we can express with words.

And, finally, there was this: an artifact of today’s remote pair programming date with Erik, the moment where I excavated all the way to the bottom of an object’s ancestry.

image