archive / 2012

2012 in review: media queries, a Raspberry Pi and one very bad Friday

Looking back at my third year as a web developer: responsive design for real clients, learning Vim, a Raspberry Pi that took months to arrive, and what I want from 2013.

The world didn’t end on 21 December, so I suppose I owe you a year in review. Here’s 2012, in more or less chronological order.

The numbers#

Sites launched at the agency14
Of which responsive5
Production incidents caused by me1 (you know which one)
Sheets of A4 Jef taped to my desk1
Blog postsfewer than I’d planned, as usual
Days the Raspberry Pi was “on its way”about 100

The good#

Responsive design went from blog topic to client work. I first read about responsive web design back in 2010 and thought “nice idea, for designers with time”. This year it became real. A client asked why their site looked “tiny” on their new iPhone, and the sports club wanted members to check the match schedule from the sidelines. Five of our fourteen sites this year adapt to the screen size.

The basics turned out to be simpler than I’d feared. A viewport tag:

<meta name="viewport" content="width=device-width, initial-scale=1">

And media queries that override the desktop layout on smaller screens:

.content { float: left; width: 65%; }
.sidebar { float: right; width: 30%; }

@media screen and (max-width: 600px) {
    .content,
    .sidebar {
        float: none;
        width: auto;
    }
    .nav li {
        display: block;
        border-bottom: 1px solid #ddd;
    }
}

The hard part isn’t the CSS. It’s the conversation with the designer who delivered a 960-pixel Photoshop file, and the client who wants to approve “the mobile version” as a separate thing. Also: IE8 doesn’t understand media queries, so we load Respond.js for it in a conditional comment. Some things never change.

I learned Vim. Or rather: I’m learning Vim. In March I promised myself I’d use nothing else for a month. The first week I couldn’t even quit. (:wq. You’re welcome.) By April I was faster than in my old editor, and now I catch myself typing :w in Word documents. Running vimtutor once a week for the first month helped more than any cheat sheet.

The Raspberry Pi arrived. I ordered one on launch day at the end of February. It arrived in June. For 35 dollars I got a credit-card-sized board with 256 MB of RAM that runs Linux. It now sits in a plastic box in my hallway running Raspbian, serving a small wiki with notes from work and doing a nightly rsync of this blog’s files. Is that useful? Barely. Is it fun? Very.

Node.js stayed on my radar. Since my little chat experiment last year, I’ve built a few internal tools with it. Nothing for clients, because they’re all on PHP shared hosting, but enough to know I like it.

The bad#

The UPDATE without a WHERE. I wrote a whole post about it. Short version: I learned more from those four hours than from the rest of the year. And our backup procedure is now actually tested.

Too many forms, too little learning. If I’m honest, a large part of my year was the same work as in 2011. WordPress theme, contact form, slider, launch. I’m good at it now. That’s exactly the problem.

Things I want to stop doing#

  • Saying “it’s only a small change” before I’ve looked at the code.
  • Answering emails from clients at eleven at night.
  • Copying jQuery snippets from Stack Overflow without reading them first.

What I want from 2013#

  • Write more JavaScript and less glue. The frontend frameworks everyone was talking about this year (Backbone, Ember, AngularJS, which hit 1.0 in June) look like where things are heading. I want to build something real with one of them.
  • Work on a product instead of on projects. At the agency, every site is “done” at launch and we never see it again. I’m curious what it’s like to work on the same thing for years and live with your own decisions.
  • Blog at least once a month. (I write this every year.)

That second point is something I’ve been thinking about a lot lately. More on that later, maybe.

Happy holidays, and may your deploys never fall on a Friday.

    Tip: / opens search, ↑↓ to select, ↵ to open.