Going Google AMP

Going Google AMP

Faster, Google! Faster!

If you’re reading this on a phone, and you got here via a Google search, you might have noticed that my site loaded rather quickly. Indeed, thanks to Google AMP (accelerated mobile pages), the entire page was pre-rendered by your mobile device before you even tapped the link. So cool, right!? On top of providing visitors with a quicker experience, valid AMP pages also require site owners to forego much of the cruft typically found on websites these days, resulting in a much more pleasurable reading experience. Converting my site, as simple as it is, to be totally valid AMP...

Continue reading...

I generated $7.11 in revenue on $203.08 in expenses, bringing my grand total to a whopping -$195.97 profit. A terrible investment to be sure, but an excellent learning experience!

If you’ve ever wanted to give running a Teespring campaign a shot, check this out. I discussed my numbers in detail, along with what worked, what didn’t work, and what I’d do different next time.

There is a mountain of advice available online about how to run your first teespring campaign. The most consistent suggestion was that shirts focused on a specific niche sell best. With this in mind, my first challenge was deciding who to make shirts for.

I just started my very first teespring campaign today. In addition to the actual campaign, I wrote up a short medium post about why I decided to try this out, and what’s been involved so far. The campaign is scheduled to last 10 days from now, so once it’s done, I’ll be posting an update with a breakdown of what I spent, what I made, and what I learned.

In 2015 we have a wealth of tools available to solve common problems — depend on them as much as possible so you can focus on solving the interesting part of your application. Think ahead of time of somebody has solved some portion of the problem you’re trying to solve. Is there something on the interwebs/github (with an appropriate license) that you can reuse? Yes, expect to make heavy modifications, but more often than not this is a time saver. Things you should not be reinventing in 2015 in your project (unless these ARE your project)

Words of wisdom. I’ve started digging in to new code bases this week, and based solely on this factor, as well as the sheer number of lines of code, become adept at accessing the skill level of other developers on the project. In fact, more than once, I’ve seen junior developers re-implement entire role-based authorization systems, similar in scope to Roleify. These home-baked systems always manage to miss a few key details and lead to security issues. Moral of the story is - don’t be clever and try to start of scratch.

I wrote my first article on Medium yesterday. While very much a spur of the moment idea, I think it turned out well. And in general, I found the writing interface pleasant to use. In terms of readership, I haven’t really gotten many reads. I’m definitely going to keep publishing things there, as the desire strikes, but I think publishing here will continue to be my go-to option, as infrequently as that may be.

On a related note, publishing on medium was one of my New Year’s resolutions. Hell yeah!

New Year; New Writing Workflow

New Year; New Writing Workflow

Ok, Glass. Make me a famous Internet person.

Trying to come up with new ideas to write about all the time is difficult for me for some reason. I am good at conversing and arguing ad hoc, but not so good at committing my ideas to paper. To help with this, I’ve started using Drafts, and iPhone dictation to record my thoughts and get a lot of ideas out quickly. I’m interested in seeing how this new process works out, and if it makes a difference in terms of what, and how often I post. I’m going to use this method for a few weeks and see what...

Continue reading...

Notes From 'How To Get What You Want'

Notes From 'How To Get What You Want'

How to Get What You Want by Jason Shen

I just finished reading @jasonshen’s new book “How To Get What You Want” which, while short, I really enjoyed it. I’ve pulled a couple of my favorite quotes below. It seems so obvious but we often lose sight of what we really want, and get caught up in a routine, doing things we don’t like and which serve no greater goal. This hasn’t been the case for me in the last few years, but there have been a few times where I was very close to falling into this trap. Routine is comforting, and pushing too far outside of it...

Continue reading...

“Customer service is the new competitive edge. Everyone has SaaS businesses. We’re all using the same frameworks, copying the same design techniques. Most software being produced today is infinitely better than it was years ago. The competitive edge isn’t going to be who has the better bevel. I actually think it will move to things like: ‘Who has a better relationship with the customer?’” – Des Traynor

A great episode of ProductPeople.tv with Des Traynor from Intercom.io, which I use and love.

Getting Started With React.js

Getting Started With React.js

Here's a thing I made with React.js!

I’ve spent the last 6 weeks rebuilding the Crossfader website in React.js (nb: the new version isn’t live as of me writing this…), as well using it to build a couple of small things in my free time. I wanted to write down my thoughts on the framework now, and see how they compare after I’ve been using it for a few more months. One thing I should say before diving in, is that I’ve been doing exclusively backend development since the end of 2013. These past few weeks have been my first baby steps back into the world of...

Continue reading...

When you’re building product at a startup you’re always moving a million miles an hour. It’s tough. You need to ship.

The usual story people tell about Airbnb is how ‘one simple growth hack grew their business by a billion percent!’ This article covers what to me is the more interesting aspect of their company culture.

First, that nothing is off-limits. Second, just ship it. I’m convinced that having the infrastructure in place to be able to send code out the door (for web/server/mobile/whatever) quickly is just as important as having code to send out the door. Seems like Airbnb is committed to that, and the low cost of making a lot of small bets is paying off for them.

When new users fully understand the value of your app and how push messages will add to their experience, they are much more likely to opt-in to push notifications.

Andrew Chen posted a guest-post from the Kahuna team about the state of push notifications in mobile apps. Crossfader is included in the list of ‘apps that request push notification access right.’

I just came across this gem in the Github weekly explore email, and am happy I did. This takes the concept of the Heroku pg_extras command, which allows you to get performance feedback from your database, and turns it into a stand-alone web app. You can get a live view of how big your tables and indexes are, along with a spot to run explains queries. Definitely handy if you aren’t running Heroku Postgres, or you don’t want junior devs connecting directly to the production database.

Finite Machine looks like a great gem for building state machine. I’ve used acts_as_state_machine in the past, and wasn’t very happy with it. I found ASSM to be too heavy for what I needed it for, but this gem fixes that, based on what I’ve seen reading through the docs so far.

A good primer on query plans from Thoughtbot, with several good links to more resources for understanding exactly what Postgres is up to. Rails is notoriously good at making it easy to bury yourself in bad queries, so understanding the cries for help from Postgres is a must.

Running iOS Simulators In The Cloud

Running iOS Simulators In The Cloud

Crossfader for iOS Saving A Cross

As part of our on-going effort to build a better end-user experience for the Crossfader iOS app, we wanted to move cross audio creation out of the client and on to the web. Every time a user saves a cross they like, they trigger a 1-2mb audio file upload. We can’t assume that a client will have a reliable internet connection to upload assets in a reasonable amount of time. In practice, we found that something like 50% of crosses ended up never getting media to the server. This, in turn, introduced a ton of complexity in various parts of...

Continue reading...

Measuring A Rails API With Graphite and StatsD

Measuring A Rails API With Graphite and StatsD

There are already a ton of great articles and tutorials discussing the finer details of insturmenting a rest API with graphite, but I wanted to share my experience and a few little lessons I’ve learned so far. Graphite is a pain to install. I spent the better part of a day trying to get the requiset pieces up and running locally. Python wasn’t cooperating and put yo a string fight every step of the way. Installing on an EC2 Ubuntu instance was considerably easier, but it’s definitely something worth taking the time to script out. Use a third party graphs...

Continue reading...

Crossfader - The Gem

Crossfader - The Gem

I’ve been at DJZ.com since October, working on the API that supports the Crossfader app. One of the new features that we support in the app is allowing anyone to upload their own audio loops to mix. While this feature is currently limited to the DJZ team, I wanted to build something to make the process of converting and uploading new music less tedious. To that end, today marks the launch of Crossfader 0.1! At the moment, it’s a pretty simple command line utility which handles batch wav -> mp3 conversion, and batch API uploads. I’ve got some ideas for...

Continue reading...

Nested Forms and Strong Attributes

Nested Forms and Strong Attributes

I’m working on a Rails 4 project with that has a model with a self-referential has_many :through => setup. Using Simple Form and Nested Form made short work out of creating new nested models, but for some reason the update action wasn’t working correctly. Here’s my original code to permit parameters, under the new strong parameters model. Can you spot the bug? params.require(:website).permit(:name, :url, :owner_name, :competing_websites_attributes => [:name, :url, :owner_name]) gistfile1 hosted with ❤ by GitHub I wasn’t allowing the nested model’s id through, so it was trying to create a new website every time I updated the parent website....

Continue reading...

Fun With Ruby Arrays

Fun With Ruby Arrays

I’ve been working on a personal project for the last week, and it involves a lot of work with creating, sorting, and managing arrays. As a result of this work, I’ve discovered a few fun and very helpful (duh) methods that I’ve put to good use. each_cons(2) – each_cons takes an input array, and returns an enumerator of new arrays of x length, made by grouping every x elements in the original array. Rather than relying on each_with_index to manually build the groups, this does it all in one go. Interestingly enough, grouping array elements like this was the basis...

Continue reading...

Considerations for A New Rails App

Considerations for A New Rails App

In working with several Rails code bases over the years, I’ve picked up a few best practices to keep in mind from day one. The list below is by no means comprehensive, but sticking to it makes life much easier exactly when you need it most. Having good habits in place early on keeps things from getting out of control during emergencies. Keep Git Clean - Configuration doesn’t belong in the git repo. Like ‘database.yml’ for example. Under normal circumstances devs on each project will have varying setups for their development databases. If ‘database.yml’ gets shared, you’ll quickly find yourself...

Continue reading...