10 New Year’s resolutions for designers
Mike Monteiro:
This year? This year’s gonna be a goddamned golden age. Last year we trained. This year we fight.
SEO Secret Sauce
Brad Colbow on SEO:
Create content for people not search engines. Content that makes them laugh. Content that makes them cry. Content that makes their lives a little better. Content that they have to share with their friends. Content that other sites want to link to. Content that you are proud to point to and say that you created.
I strongly agree with this. I’ve read a few articles that share this “secret”, lately. You can tell people over and over again that the key to good search engine placement is to produce great content, but I think they’re turned off by this “approach” because it requires more effort to create good stuff. Just slapping some words from a Word document into a website isn’t good enough anymore (if it ever was). You have to put yourself in your readers’ shoes, provide content that’s actually useful — the kind of stuff that you’d like to read.
Write to Write
It’s easy to snap out of the writing routine. There’s an insane number of excuses to not write. An excuse I gave myself was to take a break after getting an article published, and it’s a break I’m regretting. What I thought would recharge my creative has actually hurt me instead.
Totally. Weird how “taking a break” can throw you off.
LESS
If your CSS is complicated enough to need a compiler or pre-processor, you’re fucking doing it wrong!
Earlier this week, I decided to find out what all the fuss over LESS was about. Now I know. It’s because it’s awesome.
LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.
I figured it would be a useful tool to do simple things like use variables for colors. If you do this, you can “re-skin” a site in two or three lines of CSS, right? I also thought it would be really great for vendor prefixes. For example, just do something like:
.border-radius(@rad: 5px){
-moz-border-radius: @rad;
-webkit-border-radius: @rad;
etc.
}
Now, you don’t have to remember differences in syntax for different browsers. You just get all div{.border-radius(10px)}. Plus, if a vendor changes their implementation of something, you just have to update it in one place. But you can do a ton more, like defining your favorite .clearfix method as a variable and maybe removimg some markup. The more I used it, the more creative I got with it.
So, without further ado, here are some things I’ve done with LESS:
960 Grid System (kinda’)… but fluid… and with LESS
// Define some variables
@body: 960;
@margin: 10;
// Do maths
.grid(@span){
float:left;
width:(((@span * 80) / @body) * 100%) - ((@margin / @body) * 200%);
margin:0 (@margin / @body) * 100%;
}
// Make magic happen
#about-us{.grid(4); }
#sidebar{.grid(8); }
Baseline Grid with Everything in Ems
// Define some variables
@font-size:16;
@line-height:1.5;
@font-family: ‘georgia’;
// Do maths
@font-size-em: (@font-size / 16) * 1em;
.grid(@span){
float:left;
width:(((@span * 80) / @body) * 100%) - ((@margin / @body) * 200%);
margin:0 (@margin / @body) * 100%;
}
.getSize(@size, @top-margin: 2, @bottom-margin: 1){
@new-size: (@size / @font-size) * 1em;
@new-height:(@line-height * @font-size) / (@new-size * @font-size) * 1em;
@new-margin: @margin * @new-height;
font-size: @new-size;
line-height:@new-height;
margin:(@top-margin * @new-height) 0 (@bottom-margin * @new-height) 0;
}
// Make magic happen
h1{.getSize(60);}
h2{.getSize(36);}
h3{.getSize(24, 2, 0);}
Disclaimer
I realize, these may not be the most efficient or effective ways to do things, but I just started learning it, okay?
I’m not completely sold on a deployment strategy yet. Compiling it is a must for a production environment, and that’s easy with LESS.app. But once a project is live, I’m not sure what I’ll do about making quick one-off updates to the style sheet.
So, go try LESS.
PHP Checkboxes with Empty Values
When I’m processing forms and updating data with PHP, I do this alot:
foreach($_POST as $key=>$value){
$fields[$key] = $value;
}
$db->update(‘table’, $fields, “id = $fields[‘id’]”);
Everything works great. But a checkbox in the form can throw a wrench into this sweet automation. Look at this:
<input type="checkbox" name="some_field" value="1" />
If the checkbox is checked, you’ll get $_POST[‘some_field’] = 1, which is great. But if it’s not checked, you won’t get $_POST[‘some_field’] = 0. Instead you’ll get “<insert cricket noise>”.
Here’s a quick workaround:
<input type="hidden" name="some_field" value="" />
<input type="checkbox" name="some_field" value="1" />
That’s it. Just put a hidden input with the same name as your checkbox and no value (or you could use “0” if you want). Then if the checkbox isn’t checked, you’ll get $_POST[‘some_field’] = 0.
Under the Hood
Hello! So you want to see what’s going on under the hood of this design. Excellent. I learned how CSS works mostly by picking apart other people’s code, and I welcome you to learn what you can from mine. Just don’t go copying and pasting wholesale and calling it your own, capisce? I made this site more for me than for you.
Awesome message and documentation inside the stylesheet. I love the quick math in the comments. I need to start documenting like this.
Natural Format
Jeremy Keith has released a free, HTML version of HTML5 For Web Designers. It’s really cool to see something like this in action: The book, itself, is an example of what you can take away from the book.
You can read it on a desktop browser. You can read it in a mobile browser. You can read it in Lynx if you want. You can print it out. You can read it on the Kindle browser. You can read it on a tablet.
Obama Solicits Designers
“I find it ironic that the campaign is kicking off this big jobs program by asking designers to do free work for them,” he tells Rolling Stone. Monteiro says he’s a supporter of the campaign as well as a donor (“some of that cash on hand is mine”), but he adds: “I get furious when people ask for free design work, and even more furious when designers do work for free.”
“The design industry has been hit as hard as a lot of other groups,” Monteiro says. “We need jobs too.”
Pro Swaddlin'
Did you know: The screams of an infant are soul-piercing — they actually kill you… a little at a time… science proved it. So you have to know how to make that baby comfortable and put it down to sleep.
What to do With Inspiration
Tad Fry:
It’s important to collect inspiration so you can reference it during a creative slump. Motivation kicks in as you reflect on work that made you look twice. Furthermore, it’s an awesome puzzle trying to solve what’s inspiring about the item that… inspired you.
So obvious. I’ve been meaning to do something like this for a while. This is a great reminder why it’s important to capture the things that inspire you.