Book List – Update May 2014

Almost two years ago I posted about starting a book list. So I did, and today I also took some time updating my Book List Page.

Books "A-List" per 2014-05-11

The list was growing, so I divided it into three groups. Shown above are 10 book covers from the “A List”: books which I loved reading and would highly recommend. The “B-List” are books that were well worth my time, yet aren’t directly recommended for one reason or another. The “C-List” are books I’ve read, but I’d recommend against picking them up for one reason or another.

A shout-out goes to my friend and colleague who’s been solid in providing recommendations (as well as lending me physical copies); he’s accountable for about half of the books on my A-List.

I’m in doubt what to read or do next though. Some things I’m considering:

  • Either one of the “Seven X in Seven Weeks” series (programming languages and/or databases).
  • Something about Java and/or a new book on programming for Android.
  • Anything like “PHP The Good Parts”, if it’s out there. (with topics like OO, Unit Testing, Dependency Injection, etc.)

On the other hand, I might also stick with some hobby programming or Pluralsight courses for now.

Of course I was hoping writing this post would help me figure out the question of what to do next. No luck so far though.

Ah well, the Right Thing to do will come to me with time, I guess.

Measurements in Responsive Design

My wife called me out for looking at CSS through a pair of Programmer’s Glasses™. She hastily added this could well be a Good Thing, and I suppose I’ll just interpret it as a compliment. In fact, I must say I agree, feeling more like a “developer” than a “designer”.

Let’s first look at how we ended up at this name-calling. Here’s a code snippet from Ethan Marcotte‘s book Responsive Web Design from the A Book Apart series:

He then goes on to state that:

I usually put the math behind my measurements in a comment to the right-hand side of the line, which makes future adjustments much, much easier for me to make.

At first glance, this makes sense. However, in the long run, this feels really weird to me: it smells like code duplication. The actual result and the calculation in the comment both express the “what“, just in different form. It reminded me of Clean Code, where a whole chapter is dedicated to comments, and I’d think this would fall under the Bad Comments section (“Noisy Comment”, perhaps?).

Now I’m currently thinking I must be wrong: everyone who is something in responsive design is generating this type of sample code. Maybe it is because I should read this kind of code like:

Both forms describe what the font-size should be. Form 2 is probably “best” from a Clean Code point of view (as it’s most descriptive), but unfortunately only form 1 is valid (plain) CSS. As a compromise both forms are kept.

So, what are the options for improving things? There’s at least a few I can currently see:

  1. Combine “Form 1 and 2”. Accept that you’ll need discipline to keep the measurement and comment in synch. This is what the Responsive Design community leaders seem to practice.
  2. Just use “Form 1”. You’ll loose (or never have) the benefit of understanding your measurement.
  3. Use a CSS pre-processor. There are Sass and LESS, the most well-known ways to introduce (among others) calculations in stylesheets.
  4. CSS3 modules. The CSS3 Calculations module introduces calculations, and the Variables module may even take this one step further (as far as preventing code duplication is concerned).

To be honest, this list is currently my reverse order of preference. I’d love for option 4 (the CSS3 modules) to become a success. Until then, I’m bound to investigate the CSS pre-processors, because option 1 and 2 are both crappy, in my opinion.