dinosaurs eat everybody

for all your Dave Schwantes related needs

Thing A Week 24 - RecLab Feed

This was another busy week but I manged to get some solid work done on RecLaboratory stuff.

First I took some pictures to use as a cover photo on our Twitter and Facebook pages. This ended up being a big project that involved moving a bunch of my music equipment around and finding a clear area in my small apartment. I am not a great photographer but I’m pleased with how it looks. Feel free to follow/friend us on either. We’re starting to post things.

Last Wednesday night I just couldn’t sleep so I stayed up until 2:30 and knocked off a few bugs around comments but the major work I got done this week was around the event feed. I knew I couldn’t just rig something together with a bunch of ugly table JOINs I ended up using the public_activity gem. It listens for controller actions and makes an entry in a separate table for every event I want to show up in the feed. Most of our events are just the result of object creation and public_activity handles this really well right out of the box.

Right now I just have basic events around Users, Comments, Tracks, and Songs and I need to clean up how I’m using the public_activity params hash to avoid some n+1 database call issues but so far it’s made it really easy to build feeds on User, Track, and Song pages. I’m working on building the main homepage feed now, which is proving a little trickier. Obviously I’d like to do this with a single call to the Activities model but because it’s tracking polymorphic objects, the SQL is taking some work.

I’m hoping to have the feed stuff done by next week and start setting up a non-local version of the Rails site + Rocktopus soon. Then I have BUNCH of WebAudio stuff to work on around the player/audio tools. Oh, and I should probably be planning my wedding at some point too…

bonus thing

I actually drew a real comic this week, one where I penciled and inked and everything. Check it out!

Thing A Week 23 - Bird Watcher Display

This weekend Eileen was out of the house for her bachelorette party so I tried to knock out a few outstanding wedding related projects (apparently that is coming up pretty quickly). The Bird Watcher project had been dragging on for a while so I thought this would be a good time to wrap it up, too.

For those who don’t remember, Bird Watcher is a system that listens for photos with certain #hashtags and displays them to a live page. I plan to use it to let people take pictures during our wedding and show them on a projector during the reception.

This project has spanned a few Thing A Week posts and involved playing with the Twitter and Instagram APIs, as well as learning a bit more about Postgresql and the Sequel gem.

At this point most of the hard work had been done. I have Twitter and Instagram listeners (which both work in very different ways) that store info about photo posts in a database. I just needed to write something to pull them out and display them.

Originally I had written some nice code for prioritizing new photos and minimizing database calls but that ended up being a scoping pain in the ass in Sinatra. I would have had to build some sort of session object persistence system and honestly, the scale of this project just wasn’t worth it.

I ended up with a simple AJAX loop on a timer that pulls a random “photo card” with the image and some information about it, and displays it on a page that should work nicely full screened on a projector. I still need to run some tests to make sure I don’t get any weird image sizes but it’s working well right now.

I’m a little worried that I’ll spend part of my own wedding reception tweaking code or sshing into my server to restart some service, but I think everything should run pretty smoothly. This was a fun little project and made me play with some new technologies. Hopefully lots of people use it at the wedding.

Thing A Week 22 - Reclab Routing

This was a pretty busy week. I ended up flying back to Chicago on Thursday for my bachelor party, which was really awesome! These good times didn’t leave a lot of time for building things but I managed to get some interesting routing work done on the Reclab site.

I want Reclab to namespace songs and tracks by username, similar to the way Github namespaces repos. Obviously I also want to use nice identifiers for the resources rather than just id numbers, so I started by setting up FriendlyId, which is a great gem for this sort of thing.

What’s really cool about FriendlyId is that it can generate a slug that is unique across multiple fields in the object. For example, I want to allow user1 and user2 to both be able to have a song name “My Song One” so I want the path to each song to be something like user1/songs/my-song-one and user2/songs/my-song-one. Note that the song identifier “my-song-one” is only locally unique, not globally unique. To do this FriendlyId lets you scope slugs:

extend FriendlyId
friendly_id :name, use: [:slugged, :finders, :scoped], scope: :user

Then, in order to get things to work with ActiveAdmin I had to make Songs “owned” by Users. If you don’t do this, ActiveAdmin tries to use the FriendlyId slug as a globally unique identifier. This is an easy fix in the /admin/song.rb:

ActiveAdmin.register Song do
  belongs_to :user

I still need to clean up the routing in the rest of the app but this was a big step forward to some nicer paths.

Thing A Week 21 - Wedding Invitations

This seems like a bit of a cop out but when I thought back to what took up most of my time last week it turns out, it was putting together and mailing out wedding invitations.

Again, this is sort of cheating because most of the creative work was done by our very talented friend Debby. After listening to our asinine ideas she designed awesome invitations, RSVP cards, and thank you cards.

Then it was our job to pick out paper and envelopes and all that other stuff (which is a much bigger ordeal than I had ever imagined). Eileen and I both took a morning off of work just to talk to paper stores and printers. It was exhausting.

Once everything was actually printed on fancy paper we had to do all sorts of crafty things like tie twine around the jackets that hold the invitation and RSVP card, addressed all the envelopes, print return address labels, and puts stamps on everything. None of it was particularly hard (except for maybe addressing everything, but Eileen did that because my handwriting is illegible) but it just took a LONG TIME.

On Saturday morning we got everything mailed out, which felt good. This was a much bigger project than I expected it to be, but they turned out really cool.

Thing A Week 20 - RecLab Layouts and Rocutopus Connection

This week I ended up getting quite a bit of RecLab work done, especially for a shortened week.

The major breakthrough was getting the Rails site talking to Rocktopus, the audio processing API I’ve been writing. It’s not perfect but it has some basic authentication and the Rails Track model gets updated based on the response from Rocktopus. This is all just working locally right now but it shouldn’t be hard to set up a server to server connection once I have Rocktopus deployed somewhere.

The other large chunk of work I got done was due to being home alone this weekend. With Eileen hanging out with friends in Napa I decided to start working on the first real site layouts. I made great progress on the user profile pages and started doing some of the url rewriting work. I considered dropping Bootstrap in favor of Bourbon/Neat/Bitters after exploring the latter libraries at work but I think for what we’re trying to build right now Bootstrap will get us up and running much faster.

As always, there’s still a lot of work to be done but it felt good to make some serious progress this week. Again, if you are interested in this project head over to reclaboratory.com and enter your email. We’ll get in touch with you when we’re ready to start letting people try the site.

Thing A Week 19 - RecLab Online Presence

So this Thing a Week post is late because I was out of town from last Saturday until late yesterday night.

While I did make some progress on getting the RecLab Rails application to connect to Rocktopus (our audio processing library) the main thing we got accomplished last week was setting up our RecLab presence online.

A major part of this was building out a Launchrock page to point our domain at. So now if you go to reclaboratory.com you actually see something! Right now we’re just collecting email addresses, but building this out helped us think through some basic service descriptions, a tagline, and formalizing how to write the name. It’s officially RecLaboratory. Note the capital ‘R’ and ‘L’. It took us a surprising amount of discussion to decide on this convention.

We also cleaned up our Facebook, Twitter, and Instagram accounts, so those are ready to be used.

Feel free to follow us at any of those places as we’ll be starting to use them soon.

Thing A Week 18 - Wine Women and Song Cover

I didn’t really plan to do anything outside of RecLab work this week but yesterday I got in the mood to play and record some music so I ended up with a new recording for this week’s thing.

Eileen and I have been talking about doing more recording together (as Packets and Waves) and after a recent Hurray For the Riff Raff show, we were in the mood to do some old country songs. We settled on doing a cover of Loretta Lynn’s Wine Women and Song. It’s a short, simple song (which was important because we started learning it at about 11:30pm on Saturday night) and I just like the phrase “wine, women, and song”.

We didn’t want to it be an exact copy of the original so I tried to give it a dirty Black Keys-ish guitar sound and keep the guitar part pretty simple. I resisted to urge to layer on a bunch of random instruments and only used guitar, bass, and drums for most of the song. The piano was only added in the chorus and solo sections, even though I tried a few takes where I recorded some sporadic piano comping throughout the whole. In the end, the stripped down version just sounded cooler.

I’m really coming around the the virtual drummer in Logic Pro. At first I really resisted the idea of letting the software “write” my drum parts for me, but the sound is so much better than MIDI drums and I can actually get some interesting parts. For this song I used “Logan” with a retro sounding kit. I thought the tom driven verses worked out really well.

Eileen’s vocals turned out nicely, as usual. I was tempted to dirty up the vocal recording with a tube mic simulator, but I ended up just using a simple “out of the box” compressor effect, which sounded fine.

This ended up being a really fun little project. It only took a few hours from idea to finished product and the result was really satisfying. Enjoy our cover of Wine Women and Song!

Thing A Week 17 - RecLab and Drawing Class Update

This week, while I was busy with the first week of my new job, I did manage to get some RecLab work done. Also, I’m a few weeks into my drawing class, so I wanted to post an update from that.

While not the most productive RecLab week, I did finish the basic comment functionality for Users, Songs, and Tracks. I also learned about seed.rb and wrote some seed code for the Instruments data. The trick there was that I wanted to be able to run rake db:seed multiple times, so I needed seed code that would let me update or create records. I ended up with a nice solution that lets me break the instruments down into separate arrays by family and then loop through everything to create or update:

instruments = [[strings, "strings"], [woodwinds, "woodwinds"], [brass, "brass"], [percussion, "percussion"], [keys, "keys"], [other, "other"]]

instruments.each do |f|
  f[0].each do |i|
    instr = Instrument.where(name: i).first_or_initialize
    instr.family = f[1]

Now I’ll need to use a tagging system to attach both Instruments and general Tags to objects. I’m leaning toward As Taggable On, which apparently was written by an old childhood friend of mine. Awesome!

The art class is going well. Value and shading are still pretty tough for me because I’ve spent the last few years just doing line drawings for comics. I also have a tendency to draw pretty lightly (which is probably also a result of erasing pencil lines for comics). I don’t think I’ll leave this class a brilliant artist, but but I’m certainly learning things and getting better.

Thing A Week 16 - No Thing Again

Once again I didn’t have a great Thing a Week week. I actually didn’t even get to the point of planning a project for the week. But I did accomplish one thing: I got a new job.

I spent a bunch of time this week prepping for and going on interviews and on Thursday I accepted a position as a Senior Full-Stack Engineer at Couchsurfing. Today was my first day and so far it’s an awesome gig. The office is amazing, it’s full of dogs, and I get lunch and dinner provided everyday by the staff chefs. The work seems like it will be a lot of fun too. I’m doing Rails development and it seems like I’ll be able to have a lot of say in how the product gets architected.

While it wasn’t the most productive Thing a Week week, getting a new job certainly qualifies this as a pretty productive life week.

Thing A Week 15 - RecLab Song Collaboration

Once again this was another week where my main productivity was with RecLab. I’m back to mainly working on the Rails application now, focusing on building out some of the song access features.

Our big breakthrough this week was being able to actually collaborate on a song using RecLab. Bobby and I were able to record tracks on our individual computers, create new tracks in RecLab, and combine them together into a song. The process was pretty clunky and the interface is still very sparse but it felt like a big step to use the product for its intended purpose.

There is still lot of work to be done before we can even start letting other people try the product but hitting these little milestones feels good.