Why do backend developers have more confidence in their profession than frontend developers?

Because 99% of the time when someone identifies as a front-end developer they are saying that they have not been a developer for very long.

Think of it this way. On the web, Ajax was “invented” in 2004 (actually Outlook was doing it in 1999 but shh…we can’t give Microsoft any credit). It did not become a central part of most web developers’ lives till 2008/2009 or so. Even then, Javascript was avoided by many until frameworks started coming out in the early 2010s.

So what were people who were already established developers pre-2010 doing? Working largely on the back-end. So now that they do a lot of front-end work too, they face the choice, do they brand themselves as a “front-end” or a “full-stack” developer? I certainly choose the latter.

Which leaves most people who embrace the “front-end” moniker as people who have been coding professionally for less than six years. So yeah…they’re less sure of themselves.

For the record, I use the “front-end” and “back-end” terms above in the manner I see them used more often, with “back-end” meaning server-based languages, databases, etc; and “front-end” meaning HTML, CSS, and Javascript. Personally, I dislike those definitions and prefer “back-end developer” to indicate how good someone is at understanding architecture, performance, databases, and security; and “front-end developer” to indicate to what degree someone thinks about human-computer interaction, responsiveness, UI optimization and reusability, browsers, responsiveness, and accessibility. When you formulate definitions this way you start seeing these as two largely orthogonal dimensions of a square, rather than anything mutually exclusive.

Disclaimer: I use 99% rhetorically. It certainly is an overwhelming majority but I haven’t done any data gathering on the subject. That being said, I certainly don’t claim that front-end development is easy. There’s a huge amount of churn. There aren’t many other areas of development where people have to actually stay on top of language specs. 

Convert an image to a data URI with your browser

You probably know that you can use data URIs in just about any browser now, but how do you convert an image to a data URI? It turns out, most browsers can do it for you.

What is a data URI?

Data URIs are all the rage these days. They let you reduce HTTP requests by putting small images right in your HTML or CSS. For a full overview of what they are and how to use them, check out this post on CSS Tricks.

Here’s what they look like in case you need a refresher:

Now I’m going to show you how to generate these URLs using a tool that every web developer has: your browser.

Chrome & Opera

This trick works in Chrome and newer versions of Opera, since they use the same rendering engine.

1. Load the page that contains your image (loading the image directly won’t work) and right-click on it. Select Inspect Element.

2. You’ll see the console appear. Now click on the value of the src attribute.

3. The console will switch to the Resources tab and highlight the image. Right click on it and select Copy Image As Data URL.

4. Now just paste it into your HTML or CSS!


Firefox is the easiest because it works for images on a webpage as well as images loaded directly in the browser. There’s also one less step compared to Chrome/Opera.

1. Load the image or the page containing your image and right click on it. Select Inspect Element.

2. The image will appear highlighted in the DOM. Right click on it and select Copy Image Data-URL.

3. Paste it into your HTML or CSS.


Safari is similar to Chrome, but the UI is a bit different. It’s the same number of steps, and it won’t work if you load the image directly in the browser—it has to be on a page.

1. Load the page that contains your image and right-click on it. Select Inspect Element.

2. The console will appear with the image highlighted. Click on the value of its src attribute.

3. The image will be shown in the console. Right click on it and select Copy Image.

4. Paste it into your HTML or CSS.

Internet Explorer

Alas, I haven’t found a way to copy an image as a data URI using IE9, 10, or 11, but you can use a free online tool instead.

A free online tool

Another easy way to generate data URIs is to use a free service. DataURL.net lets you drag and drop an image and gives you the resulting code instantly. So if you don’t like the in-browser method (or if your browser doesn’t support it) you’re not out of luck.

My 10 principles of interaction design

I got my start as an interaction designer during the first internet bubble. Since then I’ve worked on interactive marketing and products for everything including finance, automotive, electronics, packaged consumer goods, pharmaceuticals and healthcare. In that time and experience I have come to know that there are a few key things that make good interaction designs and designers. Here are 10 of them.

01. Start with two

Interaction Design is like driving a car at night. You can only see as far as the headlights, but you can still get to your destination.” When a task seems too big, start by picking two things, like a page and a button. Establish their relationship and interaction. Once that is done, pick something else that relates and keep going. Everything will come together thanks to the brain’s natural ability to spatially model the world.

02. Prototype

Benjamin Franklin is famously quoted as saying, “Well done is better than well said.” I highly doubt he said this because Thomas Jefferson was long-winded and used too many buzzwords. The fact is, showing something working is always better than saying it will work. Wireframes speak to interactions while prototypes are interactive. Learn some code, Keynote or Powerpoint, Fireworks, or any of the many tools, like Axure RP, that allow you to prototype and start doing designs well.

03. Use patterns and prediction

Everything people do is based on a pattern they have previously experienced and the expectation they have is based on those patterns. Some interaction designers call those patterns ‘mental models’ and use them to build ‘scenarios’ to predict how users will interaction with their designs. Mental models and scenarios are esoteric ways of saying that you should predict what your users expect and plan your response accordingly.

04. Trick people

Technology tends to be very slow compared to our cognitive abilities. There are technical ways to speed up the response time of our designs, but sometimes it isn’t enough. This is when I design ways to trick people. Remember that while people are predicting an expected outcome, they can be easily distracted. Use this to your advantage when technology isn’t keeping up and design the unexpected. The distraction will trick them into thinking the technology is faster than it really is.

05. Tell stories

Stories include a setting, characters, dramatic tension and resolution. That’s all fine and good if you’re writing a novel, but thankfully interaction designers don’t have to be so structured.  Users need interaction designers to solve their problems, and the best way I’ve found is to frame the character and tension as the problem to resolve.

06. Use but don’t abuse metaphors

Metaphors are everywhere in interaction design. The desktop, like your desk, is where you keep your frequently accessed files, folders hold those files, so on and so forth. These are acceptable metaphors that are based on previously learned interactions. However, there are also metaphors like the page-curl. That 3D looking, dog-eared corner suggests a layer of content below: a terrible metaphor for pages in a book bound by a spine. It’s nothing more than a button and does nothing to improve interaction with technology today. Use metaphors to improve interaction, not for the sake of being cute.

07. Don’t be a dick

Ten years ago, Flash was at odds with accessibility experts because, as a plug-in, it didn’t expose its code to devices for impaired users. Today I’m shocked when I talk to young designers who don’t know that the ‘alt’ in HTML was created specifically for those devices. Now as HTML5 and CSS3 are taking the limelight away from Flash, it is our job as interaction designers to bring accessibility issues back to the forefront. Consider the elderly, those who rely on hearing devices and screen readers for the blind when designing interaction. Ignoring them as users is inexcusable. Don’t be a dick.

08. Make novices experts

No product is so simple that every user is automatically an expert. Make sure that by default your designs have a learnability that make novices into experts with every interaction.

09. Be a humble expert

People are impossibly complicated, and designing interactions for them is even more so. You have to be a student of the world if you want to be successful, and that success will make you an expert in where ever your designs end up. However, being that expert does not always make you right. Good ideas can come from anyone and anywhere. Being humble enough to accept other ideas is paramount to your success.

10. Seek your failures

You won’t learn as much from praise as you will from criticism. Criticism almost always comes from honesty. It’s a lot harder to know if that is the case with praise. The best things are always hard, and the hardest part of criticism is not taking it personally. When you find a good critic you’ll be able to defend yourself in lively debate with neither party taking it as an attack. You and your work will be better for it.

One last thing to remember is that rules should be broken as systems evolve but you first have to understand the rules inside and out in order to break them and come out ahead. Understanding comes with experience and experience comes with time and good mentors. If you don’t have access to mentors at your company, seek out communities online, like the www.IXDA.org and read as much as you can.

Remember, interaction design is the coming together of psychological behaviour and technical development. Personally, I like to alternate between books on business innovation and management like The Cluetrain Manifesto by Rick Levine and classic design books like About Face by Alan Cooper with the occasional cognitive science book, On Intelligence by Jeff Hawkins thrown in.

How to get the dominant colors of an image with JavaScript


You know how Dribbble shows a color palette for each shot users upload? They always look perfect right? Here’s a tool that can give you the same quality results using pure JavaScript.

I played with Color Thief a few months ago but surprisingly never posted about it. For me, something that’s easy to use and has consistently great results is pure gold. Here’s how it works.

Getting the dominant color of an image

Generating a color palette from an image

Learn more about how Color Thief works and try it out with your own photo. The project was created by Lokesh Dhakar and licensed under the Creative Commons Attribution 2.5 license.

What about a PHP version?

It’s amazing that JavaScript can do all these great things, but if you’re running PHP on the backend then you’re out of luck. In that case, there’s a PHP port of Color Thief that you can use for similar results.

External Popup Links Using jQuery

With the deprecation of the target attribute in XHTML Strict, opening links in new windows has become a bit trivial, if not annoying, to standardize. I always look for a consistent, unobtrusive approach that degrades gracefully; and since I use jQuery quite frequently, this is how I usually handle them.

The solution is a small piece of jQuery code in your $(document).ready()section:

Now, add rel="external" to all of the links that you want to open in a new window:

From here on out, users that have JavaScript enabled will receive external pages in new windows, while those without JavaScript will still be directed to the appropriate location.

I use rel="external" because it’s generally a good practice to limit popup links to external websites only. You could very well use rel="popup"instead, but I prefer the former for semantics.

Social sharing buttons are ineffective

I have often talked about why plastering social sharing buttons all over your website is completely ineffective. This morning, Smashing Magazine all but confirmed my theory.

In today’s Smashing Newsletter, they wrote:

Are social sharing buttons really that effective to be placed in the most visible areas of websites, sometimes even as “sticky” notes on the left or on the right side of the page? Are there any case studies which provide proof that these social icons are actually effective? Or are they indeed ineffective, barely used and really just annoying?

While their stance isn’t conclusive, the fact that they even raised the question says quite a bit. Are people are finally becoming desensitized to all the Facebook and Twitter logos everywhere? Maybe now that social media is commonplace, we can all get back to writing better content instead of designing trendy new share widgets.

750 Free icons from Google for Material Design


Google Design are open-sourcing 750 glyphs as part of the Material Design system icons pack. The system icons contain icons commonly used across different apps, such as icons used for media playback, communication, content editing, connectivity, and so on. They’re equally useful when building for the web, Android or iOS.

Check them out: https://github.com/google/material-design-icons/releases/tag/1.0.0

Bootstrap Responsive Video Embeds

Responsive videos seem to be an after-thought for many websites. While text and images are easy to resize to mobile and tablet screens, videos have always required extra work. Even popular video sharing sites like Youtube.com still don’t have an easy “responsive” option and require specifying a video dimension for embedding.


Luckily, the 3.2+ version of Bootstrap solves that with a few simple classes you apply. To use them, wrap the <iframe> code with a div and give it the class of embed-responsive and either embed-responsive-16×9 (for widescreen) or embed-responsive-4by3 (if your videos are stuck in the 1980s format).

The embed-responsive-item part is optional. Since the only requirement is the outer wrapper for the video, it’s easy to globally apply this previously embedded videos, saving a ton of work with legacy content. This little snippet of jquery using .wrap() will wrap any iframe for you.

If you’re upgrading from an older version of Bootstrap and compiled your CSS from the LESS source files, you’ll need to include the responsive-embed.less file in your bootstrap.less file so the new styles are available.

The Perception of Value

I thought this was a great quote about the “perception of value” from an article explaining why Apple has not changed the design of the iPhone for many years now.

Apple is not and will not change things just for the sake of change. And while some may now be clamoring for this change, the paradox is that if Apple did make some big changes, many of the same people would bitch and moan about them. Apple is smart enough to know that in this case, most people don’t really want change, they just think that they do because that’s the easiest way to perceive value: visual newness.
… Within minutes or even seconds, you just know this is something different. Something far beyond what others are doing with their false magic. You want this. You need this.
… That’s why Apple is now the most valuable company in the world. And that’s why you will buy an iPhone 5. And an iPhone 6. And beyond.