Category: Web Dev
Big Dump MysQL Importer
Filed away for future use: Big Dump, a MySQL import utility. I was having trouble with importing a big SQL file to a database on a shared hosting plan—the import kept timing out. Big Dump gets around this by splitting large files and importing them sequentially. You set the config for your database, upload the php file and SQL to your webserver, and let it run.
Drupal Features Module and Nodequeues
A little thing I’ve noticed with the Drupal 7 Features module and Nodequeues: the View automatically created by a nodequeue doesn’t show up in the “Views” listing when creating a Feature. You have to manually create the View, and then it’ll show up in the listing.
If you haven’t used Features before, they’re a way of collecting your configuration changes into a module that can be applied to an existing site. Since the changes are pushed into code as a module, that means they can be applied to a site without disturbing the database. This way you can apply changes to a site that’s already live and full of content.
Typekit and Drupal
We recently got a Typekit account at work, so the next step was to see if I could integrate it into some Drupal 7 projects. I was going to include the JavaScript files manually, but fortunately I stumbled upon this module first: @font-your-face. You’ll need to generate an API token and you’re going to be up and running. If you’re not using Typekit, @font-your-face also supports other font services, like Font Squirrel, Fontdeck, Fonts.com, Google Fonts, and KERNEST.
One quick note: If you’ve enabled the @font-your-face module and the Typekit module but you don’t see your Typekit JS being included in the HEAD of your html, check that the sites/default/files/fontyourface/font.css file is writeable by your server. I’m not sure why that makes a difference—it doesn’t look like that file contains anything, but after making it writeable and disabling/re-enabling the modules the Typekit JS showed up.
Typekit and MAMP

Because I couldn’t find much info on this out on the web: Does Typekit work with MAMP? Yes, it does.
Typekit’s domain settings cover local domain hosts just like actual public domains. You just have to enter your local domain names into the kit settings. For example, if I have a local “dirtystylus” host I just add that to the kit settings and when the kit propagates my fonts will be available for local testing.
Responsive Web Design by Ethan Marcotte

A Book Apart just released volume 4 in its ongoing series of books, Responsive Web Design by Ethan Marcotte. Words like “essential” get tossed around far too easily these days, but this book deserves that and every other accolade it’s racked up. So instead of trying to pile on with the superlatives I’ll put it this way: this is the book I’ve needed for the last few months, but not exactly for the reasons I expected.
I’d read the original Responsive Web Design article and heard Ethan speak at An Event Apart Boston, so I’d already cobbled together an ad-hoc workflow based on what I gleaned from those sources. Still, there were gaps. I felt like I had been given the pieces of a very powerful machine (or robot!), but with only a napkin sketch on how to assemble it.
So I was looking to this book to fill in those gaps, and it does that. It explains each of the components of responsive web design—fluid grids, flexible images, media queries—and shows how to combine them into a design and development workflow. More importantly, however, it places them in the context of a much larger discussion about how best to serve users. That is what truly impresses me about what Ethan has done with this book: he’s articulated part of the why in addition to the how. And frankly, that’s the more important question, because it’s the one we should be asking ourselves at the outset. He writes:
The long and short of it is that we’re designing for more devices, more input types, more resolutions than ever before. The web has moved beyond the desktop, and it’s not turning back.
Those are words that are simultaneously scary and exciting: we have a bigger challenge, but we also have a huge opportunity to affect the course of the open web. Before I read this book, I had thought of responsive web design as primarily being a solution for challenges specific to “mobile” users: “how do I get this big site to look good on little screens?”. The bulk of the book does just that, taking a website originally designed with a large (desktop) screen in mind, and applying responsive design techniques to present that same content in a smaller screen. In the final chapter, however, Ethan flips this order on its head:
Speaking broadly, responsive design is about starting from a reference resolution, and using media queries to adapt it to other contexts. A more responsible approach to responsive design would mean building our stylesheet with “mobile first” in mind, rather than defaulting to a desktop layout. So we’d begin by defining a layout appropriate to smaller screens, and then use media queries to progressively enhance our design as the resolution increases.
That single paragraph really made me stop and think, because when used as a mere solution to layout problems, responsive web design can still ultimately fail the user. Ethan goes on to describe the way his personal site ethanmarcotte.com builds from the simple to the complex, and then finally applies that thinking to the example site used throughout the book. This interpretation of progressive enhancement is nothing new, but to me it’s the crucial part of this book. Without this underlying philosophy of putting the user first and scaling their experience to match their device capabilities, responsive web design can be misused as a decorative parlor trick. It’s when it is employed as a way to solve problems for the user that it becomes absolutely revolutionary. That is what profoundly affected me after I put it down, and why I hope this book finds its way into the hands of as many web designers as possible.