Peter Sobot

Bona fide software engineer @pagerduty. @uwaterloo alum, @wubmachine, @foreverfm. Musician at heart.

Page 3

Software, Art, Music and Games

I am a software engineering student. The exact definition of that varies among my classmates and professors. Some say that it implies an ability to write software. Others argue that it requires a strong grasp of algorithms and mathematical optimization. Still others say that software engineers need only be able to design large, complex pieces of software, or manage teams of coders, or communicate project specifications, etc.

Few people correlate software engineering with art.

There are those that will argue that “software itself is a form of art,” or that “this code is beautiful.” There are certainly pieces of software, written in different languages, that could be considered their own distinct forms of “poetry.” (And no, I’m not just talking about Lisp poetry.) Elegance, cleverness, and the functionality of the code all contribute to this sense of inherent artistry.

I prefer to write...

Continue reading →

The middle ground between form and function

I’ve noticed a distinct trend in all of my recent work. Not all of it is useful, and not all of it is feature-complete - but it all places a lot of importance on form over function. Let me give an example:

launder me, get it?

Earlier this month, I put together a quick site called, which tracks the usage of laundry machines at VeloCity, my student residence at the University of Waterloo. It’s simple and email-driven. Residents can email to say that they’re using a washer, and they’ll get an email back in ~30 minutes to remind them that their clothes are done. Other residents can also check the site and see if the machines are occupied.

It’s an exceedingly simple idea, with very little code required on the backend. (It’s a Rails app with ~300 lines of ruby.) I’ve even made an API to allow other residents to make apps out of it, or link in hardware sensors with Arduinos and ethernet...

Continue reading →

“The Street Preacher” - A Hyper-Local Twitter Bot

I walk through Yonge & Dundas Square in Toronto every day.

So. Many. People.

That intersection, which some call Toronto’s equivalent of Times Square, has a large number of street preachers. Loud, startling, obnoxious people that yell warnings of doom or urge repentance. Silly people.

I decided to use Twitter’s real-time streaming API to make an extremely specific location-based Twitter bot. The purpose? To respond to you if you tweet near the street preachers at Yonge & Dundas, with similar messages. Call it art, or a statement about society, or making fun of those preachers, whatever - I call it a fun technical and social experiment.

Using an excellent ArsTechnica article as a guide, I created a quick Python script that watches the Twitter stream for a given area, and replies to tweets in a very specific location. (±10 meters or so, by my guess.) If you’re one of the lucky few to tweet within those...

Continue reading →

More Lessons from The Wub Machine

Four months ago, I released the Wub Machine, an online Dubstep remixing web app. It hit Reddit for a couple days, got popular on 4chan, and has since remixed nearly 24,000 songs. About a month ago, at the wonderful Music Hack Day Montréal, I wrote and released an Electro-House remixer to complement the Dubstep one. It sounds kinda awesome - here’s Stevie Wonder, remixed:

Since then, I’ve polished up a completely new framework for the Wub Machine - nearly everything about the site has been rewritten since its first release. The first version was held together with duct tape, PHP and prayers, which resulted in some catastrophic failures when the site was initially launched. I’ve sinced rebuilt it in 100% Python, load tested, and added features.

Instead of talking about the code (which I do over on GitHub), I have a better story - being featured on the immensely popular VSauce channel...

Continue reading →

The Wub Machine, Postmortem

The Wub Machine, my fancy dubstep-remixing web app, unexpectedly launched last week. In the days that followed, I took a crash course in how to manage a heavily-used web service. Here’s the first of many pretty graphs:

First week stats. Dem spikes.

  1. Uploads (whenever a song was uploaded for remixing)
  2. Processing (started/finished/failed) (the analysis & rendering of the remix)
  3. Sharing (sharing of a remix to SoundCloud)
  4. Downloads (when a user explicitly downloads their remix)

All of these actions are graphed separately, to provide a detailed look at what happened over the first week of running the Wub Machine.

So, what did I learn?

Dat failure spike.

  1. Don’t pretend to have capacity.

    • I didn’t expect such massive server load, and as such, I assumed there would be no harm in allowing people to upload tracks when other tracks were being remixed. This ended up creating a never-ending queue of songs, and prevented anybody from...

Continue reading →

The Wub Machine, Revisited

The Wub Machine was a great little auto-remixer project - some audio hackery in Python to make a neat script. Unfortunately, I can probably count on one hand the number of people who actually downloaded the script and tried it on their own songs. So, I decided to make it into a web app. (try it out !)

Oh, Paul Gilbert...

I opened up my trusty Photoshop, cranked out some multicoloured waves and set “The Wub Machine” in beautiful Proxima Nova. Then I set about the immense task of actually implementing the remixer on the web.

I’d go into the technical impressiveness of the system, and how it’s brilliant and took me months to come up with… but it’s really not. It’s one big hack.

I ended up using:

  • PHP to serve the front-end, as well as serve the AJAX progress updates and interface with SoundCloud
  • Python to power and tie together all of the processing on the back-end
  • the Echo Nest Remix API to do the...

Continue reading →

The Wub Machine

UPDATE: I turned the Wub Machine into a website. Go and remix your own tracks!

I like dubstep.

There, I said it!

That massive bassline, two-step beat and killer rhythm has some odd allure that I can’t resist - and I’m typically a fan of rock, metal and prog!

I’m also a huge fan of the Echo Nest and their brilliant Remix API. In their words, the Remix API is an “internet synthesizer” - quite true. I can send off an mp3, and get back extremely detailed beat, timbre and pitch information within seconds. Some people have already used this to make any song swing, put a donk on any song, and much, much more.

For the first SE Hack Day, I decided to use the Remix API to automagically add dubstep to any song.

Now, as you may be able to tell from the samples above, this isn’t quite ready yet. In fact, it’s extremely rough. Even the code looks horrifically ugly. (And yes, you can download...

Continue reading →

A Better Music Workflow?

I produce a lot of music.

One of many, many songs.

I don’t necessarily release a lot of it (or finish all of it) but I have at least 100 songs I consider developed enough to listen to, and about 300 other song files that are just riffs, beats and vocal ideas floating alone.

With so many files, projects, songs, sounds, and work in one place, I’ve developed musical workflow that borrows a lot from software development patterns. My music tends to be produced in stages and cycles.

I’ll usually start with an idea from noodling around on some instruments, then do two things:

  1. Record (track) instruments with the main riffs of the song or basic chord structure.
  2. Record a basic drum loop and bass loop, then arrange to fit song structure.

Then, I don’t do anything.

For any length of time between a day and a month, I usually don’t touch the song-in-progress. The song needs a break, while I can forget about whatever...

Continue reading →

Pushed to my Pocket

As soon as I got my shiny new iPhone about six months ago, I set up instant Push email. This remarkably useful feature has really changed the way I use my email accounts and respond to email. It’s also made me reflect on exactly how dynamic and instant the web has become.

A lot of people wouldn’t expect that posting a YouTube comment like this:

Thank you, YouTube!

…would cause the device in my pocket (or on my nightstand) to vibrate and alert me instantly. This wasn’t even something I had to go out of my way to set up - YouTube’s default email notification settings accomplished this.

Responding to a tweet, commenting on Facebook, or any other number of nearly-instinctive online actions people do nowadays all cause unexpected side-effects: vibrating phones. It’s not a bad thing, nor is it even that annoying. (yet) Just somewhat mind-blowing that the click of a mouse on one side of the world will...

Continue reading →

What a difference four months makes…

My second year of University has been wildly more productive and interesting than my first, by far. First year taught me how to try to pass exams, while second year gave me material I wanted to know, bypassing the need for a lot of pointless memorization. But it’s been more than that. Some things have become second nature now, completely. I’ve acquired new skills that I feel like I’ve always had.

From school:

  • I built a compiler (from a subset of C to a subset of MIPS machine language) that taught me the basics of how all compilers work.
  • I hand-wrote 1000 lines each of MIPS and Motorola 68000 assembly language, and I now feel like C is too high-level.
  • I learned exactly how circuits and magnetics work, which is oddly more relevant to guitars, audio equipment and synthesis than computers.
  • I learned how to interpret statistics and run unbiased studies.
  • I learned how to mathematically...

Continue reading →