Music

Most episodes of Software Engineering Daily are interviews with an expert about a technical software concept. Over the past year I have done a few experiments that are more editorial in nature, and both were very popular. The first editorial was about 10 Philosophies for Engineers, and the second was about how poker relates to software engineering.

Today’s episode is an editorial about the creative process of writing computer music, and how it relates to software engineering.

Since it is a departure from the normal format, I am releasing it on a weekend, and there are no ads on this episode. If you don’t like this episode — don’t worry. On Monday, Software Engineering Daily will be back to the usual highly technical rigor. In any case — please send your feedback on Twitter or email.


A year ago, I was working at Amazon as a software engineer. Much of my spare time was spent writing music on the computer. I would wake up at 6 AM, work on music for three hours, and then walk to work through downtown Seattle.

The great tragedy of working at any giant tech company is that most employees are completing menial tasks that make the company millions of dollars and make the employee a small fraction of that financial windfall.

In the past, these economics made sense for the employee. The employer used to be a source of leverage for talented workers. Today, our tools are so cheap and powerful that we can succeed on our own, without a giant corporation. Unfortunately, this is such a recent development that most employees remain trapped within the story of corporatism. Employees dutifully believe that the corporation is doing them a favor.

The last song I wrote while I was at Amazon is called Zeroes. It is about people who are not aware of the fact that they have much more power than corporations want them to believe.

Writing music is similar to writing software. The digital audio workstations that music producers use are similar to IDEs that we use to step through a debugger, or detect errors in code. Just as an IDE will help you organize your code and manage your abstractions, a digital audio workstation can be used to coordinate instruments. The workstation can tell you what keys to play in what order, so you don’t need to know anything about music theory.

Despite all of this help, the music software still doesn’t write the song for you. Much like the human-machine teams that currently dominate competitive chess, the best music today comes from the musicians who are best able to work in harmony with the most sophisticated technology. This has always been the case — from The Beatles to Max Martin to Skrillex.

What the human brings to the table in human-machine music creation is an understanding of contemporary tastes. This is why I listen to pop music. Top 40 radio stations and Spotify playlists are not perfectly democratic, but they are close enough. I pay attention to the trends of the most popular music, and try to replicate them.

This next song was written because I was copying the bass lines that became popular from the Iggy Azalea song Fancy, which was #1 for seven weeks straight in the Summer of 2014. Even after trying to copy the bass line, I ended up with a very different song than Fancy.

Open source allows software quality levels to reach new heights. With open source, new software builds compounding interest on previously written software. The software spreads and replicates freely around the internet thanks to open repositories that new users can pull from.

In music, this easy replication of information has led to a sampling revolution. Sampling is the act of cutting a snippet of sound from a song, or a TV show, or simply any random noise that you find interesting, and turning that snippet of sound into its own instrument.

In 2009, I was studying hip hop production techniques. On uTorrent, I found a download of hip hop acapellas — samples of rappers rapping without instrumentals. I stitched some of these acapellas together and made a lyrical sample with 50 Cent, Eminem, and Nas. Underneath that vocal, I sliced up a sample from 24-Carat Black, a soul and funk band from 1970s that has been sampled by lots of hip hop artists.

As a warning to sensitive listeners, these lyrics contain some harsh and sexist language, and do not represent my views as a podcaster.

This next song is called Chicago, written when I was in Chicago at my first job out of college. The creation of that song was driven more by raw emotion than a logical approach, or a specific musical concept.

I was working as a software engineer at an options trading company called PEAK6. The people at the company had fascinating, extreme personalities and brutal honesty was encouraged more than anywhere else I have worked.

At PEAK6, building options trading software that could directly translate into profits for the company, I also had the feeling that if I did something important that made the company a lot of money, I would be compensated fairly. In this sense, a trading company can be more of a meritocracy than other tech companies.

Working at a trading company, if you build a software feature for the traders in your company, you can walk over to the traders and ask them how much money it is making them. If they say it has increased their profits by 10%, it is very straightforward to ask your boss for a raise of at LEAST 10%. In contrast, at most tech companies, if you build a tool that improves productivity for your coworkers or your customers, it is often harder to quantify whether you deserve a raise based on building that software. Furthermore, at big tech companies there is so much office politics, and so many rules of propriety and servility and respect of your superiors — if you do something that you think is impressive, but it doesn’t positively impact your manager, that action might actually have negative consequences for you as an employee.

On the trading floor, the atmosphere of healthy debate, brutal honesty, and lots of money flying around reminded me of my roots as a poker player, and in that sense I felt at home. In college, I was so obsessed with the intersection of finance and technology that I wrote a piece of fiction about an artificial intelligence that gets built at a hedge fund. The AI gets so smart that it eventually divests itself from the hedge fund and starts its own company, calling itself simply “Bank”.

This next song is about that financial AI that awakens within the hedge fund — the song is called BANK.

Most software engineers have written a game at some point in their career. I spent much of my time in college thinking about games that reflected the absurd financial fluctuations that I experienced as a poker player. The greatest games provide the player with a sense of drama. A game should be designed to be able to turn your stomach or fill you with elation and adrenaline.

One game I worked on in college with a few friends is called MoonStocks. I built it with a few friends — Josh Stewart and Pong Tam — in this game, you can buy and sell fictional stocks that fluctuate in price based on Fourier transforms of songs I wrote. On the Android Play Store, you can download MoonStocks if you are interested.

MoonStocks gave me great pleasure, because it allowed me to combine my niche interests of games, finance, music, storytelling, and programming. This is a lesson in creativity that is preached often these days in our long-tail economy: if you can’t be a 10,000 hour master of one specific thing, try to master the intersection of a few niche topics. The more unusual the topics that you pursue, the greater a chance you have at developing a deeper understanding than anyone else.

Another game I built in college was called “RatMarket”. The setting of the game is a post-apocalyptic world where the only organisms left are rats and humans. Rat meat has become the only commodity that is traded in the world, and human arbitrageurs create bizarre financial instruments out of the rat meat commodity trading market. This was yet another dead-end project, but after working on it for awhile, I was so engrossed that I wrote a song based on it. So I hope you enjoy this next song, “RatMarket”.

Absurdity is at the heart of the projects I work on. Playing with absurd concepts lets you stay unpredictable as a creator. When you combine absurdity with a relentless work ethic, you end up exploring more ideas with more tenacity than anyone else. People who respond to absurdity with shame and condemnation are repressed. They have never discovered the utility of the absurd because they have never experimented outside of local maxima of what makes sense.

This is not to say that absurdity should be adopted as a way of life. Absurdity taken too far is embarrassing and unproductive. A pleasant, intellectual conversation with a hint of absurd humor can be ruined by a sarcastic person, a drunk, or a stoner who takes the absurdity too far.

Absurdity is a tool to explore the edges of what has not been clearly delineated by science and reason. It is with a taste for the absurd that Airbnb was dreamed up. I’ve seen enough videos of Airbnb CEO Brian Chesky telling the Airbnb story to know that absurdity is deeply ingrained in the DNA of the company. How else would you come to the conclusion that having strangers sleeping on air beds in your apartment would be a billion dollar business? Not to mention the cereal box fundraising story.

When I try to reason about how intelligent machines will think about the world, my sense of logic fails me. When we are speculating about how machines will think, we instinctively turn to the way that humans think, and try to imagine robot cognition relative to the human model of cognition. This is almost certainly wrong. But still, this topic inevitably comes up in conversation.

Vacillating between the ideas of the serious, and the absurd, the next two songs explore two sides of how I speculate about the evolving artificial intelligence. The first song is simply called Robots, and it represents the absurdly alien sense of how robots might come online with self-awareness. The second song, Roger the Robot Janitor, explores the human-relativistic view of how robots might think to themselves.

Roger the Robot Janitor is more about humans than it is about robots. Most of us have had a job that we don’t like. Roger has been designed with cutting edge artificial intelligence technology, and his job is to clean toilets at an elementary school.

If you are a well-educated American listening to this, you were probably raised with the belief that you could do anything. You jumped through all of the right hoops, you went to college, you got a high paying job. And yet, somewhere along the way, the ideals that you felt growing up turned into a desperation in the pit of your stomach. It seems like something happened along the way and you are no longer looking at the world as an opportunity, but as something to insulate yourself from and relentlessly hedge against.

It is an all-American seduction that many of the best and brightest computer scientists are seduced from college into crappy, dead-end jobs at giant software companies. They are dead end jobs because they seduce you into a mindset that is not true. The mindset is that you need a giant corporation to survive, and that it is noble and validating to go work at a job with minimal creativity and maximal servility.

In this sense, we are all Roger the Robot Janitor. We have all woken up to realize we have been programmed with the peculiar desire to keep ourselves from doing anything substantial, for fear of disrupting the safe but blase life that we have established for ourselves.

If you have had this realization, you have either suppressed it, or experienced a dramatic internal transformation. Or — if you are like me when I was at Amazon — you are experiencing cognitive dissonance. You are suppressing yourself from acting out because you are in preparation mode. You are preparing to escape your cloistered environment, saving up money and willpower.

You are on the Career Track, but soon you will be on your own. And there is great drama in this moment.

In the Summer of 2010, the cassette-to-iPod connecting cable in my car broke, and I could no longer play podcasts and music while I was in the car. On the commute to and from my Summer internship, I had an hour and a half of time driving. So I started listening to radio, and during this time I discovered the beauty of contemporary pop music.

The melodies in pop music are extremely simple, and this makes songwriting extremely simple. In software engineering, when you have the simplest abstractions, programming is exhilarating. Studying pop music was like studying functional programming — the abstractions make creativity unexpectedly easy. Also, both pop music and functional programming have rabid fan bases.

In order to fully adopt the mindset of a pop musician, I had to write a song about love and relationships and heartbreak, because almost every pop song is about romance. During this time, I was becoming so obsessed with pop music that I decided at some point I was going to become a pop music producer. With this in mind, I needed to learn to collaborate, so I convinced my friend Genevieve to sing what I wrote. The song is called “Letdown”.

At this point, I have talked through an hour’s worth of songs. This topic is too self-indulgent and far removed from the core idea of Software Engineering Daily to go much further today, but if you listened this far I sincerely thank you.

I always want to know what you think of this show. Send me an email at softwareengineeringdaily@gmail.com, or tweet at me. It is a huge privilege to have people who listen to this show — so let me know what you want to hear about.

I’m going to close with a song that I wrote for my cat Scout. The song is called Scout. Thanks again for listening.

Comments