<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Simple = Human - Medium]]></title>
        <description><![CDATA[Design, Development and Leadership articles written and curated by Adam Silver &amp; Mark Jenkins - Medium]]></description>
        <link>https://medium.com/simple-human?source=rss----1173c96131a0---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Simple = Human - Medium</title>
            <link>https://medium.com/simple-human?source=rss----1173c96131a0---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 14:29:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/simple-human" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[But sometimes links look like buttons (and buttons look like links)]]></title>
            <link>https://medium.com/simple-human/but-sometimes-links-look-like-buttons-and-buttons-look-like-links-9b371c57b3d2?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/9b371c57b3d2</guid>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Mon, 25 Sep 2017 06:47:10 GMT</pubDate>
            <atom:updated>2019-03-11T19:26:00.479Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is part 2 of a 3-part series. Here’s </em><a href="https://medium.com/simple-human/buttons-shouldnt-have-a-hand-cursor-b11e99ca374b"><em>part 1</em></a><em>and </em><a href="https://medium.com/@adambsilver/buttons-shouldnt-have-a-hand-cursor-part-2-4a6e1c8423a5"><em>part 3</em></a><em>.</em></p><p>Sometimes we make links look like buttons. Sometimes we make buttons look like links. This can be a problem. Maybe there’s something we can do about it. But before we get to it, let’s discuss the four different types of buttons and links.</p><h3>1. Submit buttons</h3><p>Submit buttons let users submit a form. Examples of this include logging in, registering or adding a product to basket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*htVq9ffEuoPETfaX.png" /></figure><h3>2. Links</h3><p>Links let users navigate to pages or locations within a page. They’re usually underlined to stand out amongst prose content. Or they might be positioned in a special location like a header to help cognition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_qpnYixwTUx72oto.png" /></figure><h3>3. Buttons</h3><p>Buttons (with type=&quot;button&quot;) are not submit buttons. Buttons are used to create features that rely on Javascript such as revealing a menu or showing a date picker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vKgdl4vNKFwPsOzL.png" /></figure><h3>4. Calls to action</h3><p>Calls to action <em>look</em> like buttons to make them prominent but there’s no specific call to action element. They are just regular links styled as buttons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nR29av4hYMRF_txx.png" /></figure><h3>What’s the problem?</h3><p>In <a href="https://resilientwebdesign.com/">Resilient Web Design</a> Jeremy Keith discusses the idea of material honesty. He says that “one material should not be used as a substitute for another, otherwise the end result is deceptive”.</p><p>Making a link look like a button is materially dishonest. It tells users that links and buttons are the same when they’re not.</p><p>In <a href="https://medium.com/eightshapes-llc/buttons-in-design-systems-eac3acf7e23">Buttons In Design Systems</a> Nathan Curtis says that we should distinguish links from buttons because “button behaviours bring a whole host of distinct considerations from your simple anchor tag.”</p><p>For example, we can open a link in a new tab, copy the address or bookmark it for later. All of which we can’t do with buttons.</p><p>Calls to action — which again, are just links — are deceptive. Their styling removes their perceived affordance, obscuring their behaviour.</p><p>We could make calls to action look like regular links. But this makes them visually weak. Hence the problem.</p><p>Sometimes it makes sense to present links next to buttons as part of the same menu. Kidly’s account menu button* shown earlier is next to a basket link. You wouldn’t know it though because both are styled the same way with iconography.</p><p>Here’s another example demonstrating the same issue:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wXpSOQAWnxxDkDki.png" /></figure><p>All three items in the menu are styled to look like links even though ‘Choose day’ is actually a button.</p><p>Clicking ‘Choose day’ opens a calendar, but it deceptively looks as if it will take me to another page like ‘Previous day’ and ‘Next day’. And it seems I can right click and open it in a new tab, like any other link.</p><p>Maybe it should open in a new page and that would solve the problem? Maybe that’s not the desired experience? In any case, the reason we’ve styled these items the same is because consistency is a quality of good design.</p><p>But on this occasion the consistency card has been over played. The differences have been wiped out by removing the relevant signifiers. As a result we have a dishonest interface.</p><p>Consistency is not about making different things the same. It’s about making the same things the same.</p><h3>Differentiating calls to action</h3><p>If you’ve been nodding along so far, then you’ll probably agree that calls to action need to stand out. But that they also need to look different to buttons to signify their true behaviour of a link.</p><p>One example is the Government Digital Service’s ‘start buttons’:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KzJ2P5YPtx2GQFW4.png" /></figure><p>Start buttons stand out. They also look different to GDS’s standard submit button. The start button is slightly bigger and has an arrow. The arrow suggests the user is going to be taken to a new flow.</p><p>There’s a difference, but it’s subtle, and could be lost on users (more on this shortly). First, <a href="https://adamsilver.io/articles/buttons-shouldnd-have-a-hand-cursor/">submit buttons shouldn’t have a hand cursor</a>. In doing so, the hand (pointer) helps those using a pointing device spot a link.</p><p>Second, we need to make them less button-y and more link-y. To do this we could use a combination of whitespace, size and other visual treatment to make sure they stand out. Like using the right cursor, an underline would probably help.</p><p>What may also help is not having a load of other stuff on the page. The more stuff there is, the more it fights for attention and diminishes the prominence of the call to action.</p><p>It’s wise to have only one primary link/action/button anyway. Admittedly this isn’t always possible, or even the right thing to do but we can make this are default position.</p><h3>Differentiating buttons and links that are part of the same menu</h3><p>The problem here is that we want the items to be equally weighted without removing the perceived affordance. Buttons naturally dominate links!</p><p>Kidly’s menu looks consistent and equally weighted due to the use of iconography. But in doing so the meaning (subtle or otherwise) is lost.</p><p>With the schedule page ‘Choose day’ is not more or less important than ‘Previous day’ or ‘Next day’. Perhaps we need to make ‘Choose day’ look less link-y and more button-y without overpowering the links?</p><p>Locating them in the same place is a no brainer. Perhaps we can use whitespace and a separator. Maybe we just need a smaller button. One thing we probably shouldn’t do is give the button an underline as this could be deceptive.</p><h3>Do users care?</h3><p>Because we have made links look like buttons and buttons look like links — and because we have exacerbated the problem by incorrectly using the hand cursor — users have acclimatised and the lines have blurred.</p><p>Perhaps, if users knew they could open a call to action in a new window, they would? I certainly might. Maybe others wouldn’t. But does that matter? <a href="https://inclusivedesignprinciples.org/#offer-choice">Choice</a> is a principle of inclusive design.</p><p>Same goes for labels. Many sites don’t connect labels to radio buttons. Due to this people don’t trust that clicking the label (which is often easier) will mark the radio button as checked. If most sites did it right, users may start to use this and get the benefits.</p><p>Users shape design and design shapes users. That is, if the majority of sites differentiated buttons from links, perhaps users would care and find value in the functionality that lies beneath.</p><p>In isolation we might think of this as a small problem. But in combination with lots of other small problems, an experience can degrade noticeably.</p><p>When we talk about getting the small details right, this is the kind of thing that comes to mind.</p><h3>It’s the journey, not the destination.</h3><p>Others say it’s become a grey area. This is because forms and links can both take users to the same destination.</p><p>This is true, but the journey is not the same as the destination.</p><p>My TV and the accompanying remote have power buttons. The one on the remote is rubbery, small, red in colour and located in the top right corner. There’s also a lot of additional buttons in close proximity.</p><p>The one on the TV is solid, much bigger and concealed. It would be an odd experience if the designs were reversed or made ‘consistent’ by ignoring the context for which they are used.</p><p>Forms and links may take users to the same place. But just because the destination is the same, the journey (the interaction) is different.</p><p>Pretending they are the same and removing the perceived affordance in the process isn’t useful. Semantics are there for a reason, why design the meaning out of a component due to aesthetic minimalism?</p><h3>Summary</h3><p>I often go on about solving real problems. I get frustrated when we spend time solving problems that aren’t problems. Design, after all, is about solving problems.</p><p>This is definitely not the biggest problem in the world. But I think there’s something to this. I think there’s something we can do about it. Something that provides affordance and improves the experience by making it honest.</p><p>In isolation this may not seem like a big deal, but in combination with other small gains this could make a difference.</p><p>*Under the hood, Kidly’s account menu button incorrectly uses an anchor. I should have used the button element.</p><p><strong><em>If you enjoyed this, you’ll love my newsletter. I send an article like this once a month straight to your inbox. No spam and definitely no popups. </em></strong><a href="http://adamsilver.io/signup/"><strong><em>Sign up here</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b371c57b3d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/but-sometimes-links-look-like-buttons-and-buttons-look-like-links-9b371c57b3d2">But sometimes links look like buttons (and buttons look like links)</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inline validation is problematic]]></title>
            <link>https://medium.com/simple-human/inline-validation-is-problematic-399dd01d436f?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/399dd01d436f</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[forms]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Mon, 26 Jun 2017 06:14:17 GMT</pubDate>
            <atom:updated>2017-07-02T16:46:24.165Z</atom:updated>
            <content:encoded><![CDATA[<p>Inline validation informs users whether what they type is valid as they type. The theory is that it’s easier to fix errors as soon as they occur instead of waiting until submission. The thing is, inline validation causes several problems:</p><h3>1. Interruption causes friction</h3><p>For fields thats require a certain number of characters, the first keystroke will cause an error. Meaning users will be interrupted early and often.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7CmVSDy9YIuiJDOES3AI_A.gif" /></figure><p>We could wait until the user has entered enough characters but this means the only way a user will get feedback is after completing the field successfully which is pointless.</p><h3>2. Interruption on blur is too late</h3><p>We could provide feedback when the user leaves the field (onblur) but this is too late. The user has already started to mentally prepare for, and to fill out the next field.</p><p>Many people switch windows or use password managers to assist in filling out forms. Leaving the field (which triggers the blur event) causes an error to show prematurely before the user finishes typing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xdyAHxPmTxIx4UXS1Nhm4A.gif" /></figure><p>And tabbing to the next field causes an error in the first. Due to this error, the user leaves the second field to fix the error in the first. This causes an error in two fields. This sucks.</p><h3>3. Visual glitches are disorientating</h3><p>When a field switches between valid and invalid states, the error appears and disappears respectively. This causes the page to judder which is disorientating and can cause problems for mouse users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*e0WwkzIV9zZ0LP9JwAn1EQ.gif" /></figure><p>Ideally error messages should be hidden as the user starts to fix the field — either onfocus or onkeypress. However, this exacerbates the problem.</p><h3>4. Field groups are inconsistent</h3><p>Groups of fields need to be considered holistically. Take a group of checkboxes, for example. The user must choose at least two options. If the user clicks <em>yellow</em> and blurs is that an error?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*2XkMJDmy4NepAP3uk5bRVQ.png" /></figure><p>Or the date field below. As the user leaves the day box, the field is instantly invalid. You could validate when the last box is blurred but what if, for example, someone leaves the first box empty, and then tabs onto month?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*dQcS1jI2ewePdCHKBkbNig.png" /></figure><p>Designing something that relies on the user doing something in the right order is not ideal. We could validate these fields onsubmit but that gives users a false positive as they have grown to expect fields to validate inline.</p><h3>5. Server side validation makes for an inconsistent experience</h3><p>Some validation routines can only be performed on the server via submission. For example, checking someone’s login credentials. This inconsistency in behaviour is confusing.</p><h3>6. False positives are untrustworthy</h3><p>Some implementations use inline validation to show <em>green ticks</em> when the user fills out a field successfully. This may provide a sense of progression and stop people feeling like they need to check through their answers later on.</p><p>However, inline validation typically checks the <em>format</em>. This means that a correctly formatted field may still be erroneous once it’s submitted. This makes the experience untrustworthy and unpleasant.</p><h3>7. Pre-populated fields are tricky</h3><p>Pre-populated fields cause further issue. Should we display them in the success state, if there is one? If they appear to have been validated already, should we then hide the success message until they have left the field again?</p><h3>8. Validation inconsistency</h3><p>Some fields can be validated as the user types. For example, if typing a letter in a numerical field. But this causes inconsistency and is rarely applicable to the slew of fields requiring various different validation routines.</p><h3>9. Users might not notice it</h3><p>Many users look at the keyboard as opposed to their screen when typing. In this case users won’t see the error until later or at all.</p><h3>10. It breaks the user’s flow</h3><p>In <a href="https://www.formulate.com.au/blog//is-inline-validation-out">Is Inline Validation Out?</a>, Jessica Enders says <em>users have to repeatedly switch between two quite different mental modes: form filling and error correcting. This slows the user down, increases cognitive effort, and generally reduces user satisfaction.</em></p><h3>11. Marking success is confusing</h3><p><a href="https://alistapart.com/article/inline-validation-in-web-forms">Luke Wroblewski’s testing</a> showed that users weren’t sure how to interpret a green tick. He says the <em>participants knew we had no way to know their correct name, so they knew that the green check mark didn’t mean “correct.” But they weren’t sure and that was the problem.</em></p><h3>12. Problems for screen reader users</h3><p>When someone is using a screen reader they may want to go through the form fields to get a feel for what is coming before attempting to fill each field out. This could cause errors in all fields before the user even started their journey.</p><h3>Summary</h3><p>Inline validation causes many problems and forces users to switch between filling in forms and fixing them.</p><p>Designers like inline validation because it avoids users seeing lots of errors after filling a long form. Assuming this is a true we can:</p><ul><li>remove unnecessary fields</li><li>ensure fields are well-understood with clear guidance</li><li>ensure error messages are presented well</li><li>use <a href="https://www.smashingmagazine.com/2017/05/better-form-design-one-thing-per-page/">One Thing Per Page</a></li><li>use <a href="https://www.smashingmagazine.com/2012/06/form-field-validation-errors-only-approach/">Errors-only approach</a></li></ul><p>In any case, designing the perfect inline validation experience is nigh on impossible. Any potential benefit is outweighed by the problems it introduces. Instead put the user in control by showing errors on submit.</p><p><em>This is something I cover in my upcoming book </em><strong><em>Form Design Patterns</em></strong><em>. If you enjoyed this </em><a href="http://adamsilver.io/signup/"><em>sign up to my newsletter</em></a><em> and I’ll let you know once it’s released.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=399dd01d436f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/inline-validation-is-problematic-399dd01d436f">Inline validation is problematic</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Floating labels are problematic]]></title>
            <link>https://medium.com/simple-human/floating-labels-are-a-bad-idea-82edb64220f6?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/82edb64220f6</guid>
            <category><![CDATA[ux-design]]></category>
            <category><![CDATA[forms]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Thu, 25 May 2017 05:31:01 GMT</pubDate>
            <atom:updated>2019-02-07T13:23:44.833Z</atom:updated>
            <content:encoded><![CDATA[<p>After writing <a href="http://adamsilver.io/articles/placeholders-are-problematic/">Placeholders are Problematic</a> some people suggested the <a href="http://bradfrost.com/blog/post/float-label-pattern/">floating label pattern</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*GqNGB0mTjPwsRXInOlCZUw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*tC4Me7pO6rJwdMTyv5tnvQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*SCn-QWHHJz_U45OnCPu8qQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*wIGNWQjF5UoKslkfk1X8SQ.gif" /><figcaption>Some floating label pattern implementations</figcaption></figure><p>We are often seduced by novel patterns that save space but this pattern is problematic. Here’s why:</p><h3>1. There is no space for a hint</h3><p>Floating labels start inside the text box leaving no space for an additional hint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*xzbhD5X_vUvUEWCq.png" /></figure><h3>2. They are hard-to-read</h3><p>Floating labels typically have small text, so that as it floats, it takes up a small amount of space. But small text is hard-to-read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*q2zq3GoUrnzJOAKi.png" /></figure><h3>3. They need space to move into</h3><p>Floating labels needs space to move into. If label text is friendly (see previous point), there would be no saved space anyway — just more <em>white</em> space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*aseTzNjYz784Tj7_.png" /></figure><p>Alternatively, we could create space <em>as</em> the label moves into position. But this makes the page judder, creating a disorientating experience as the user starts typing.</p><h3>4. The animation is problematic</h3><p>Animation, even if it’s done well, could be distracting and disorientating, particularly for low-confidence and cognitively impaired users. And, when zooming in, the label might disappear off screen.</p><h3>5. They have poor contrast</h3><p>Like placeholder text, floating labels have low contrast to differentiate it but low contrast text is hard-to-read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*s7rHiuD9zR8bWKEI.png" /></figure><p>Depending on the design, when the label floats outside of the field, its colour will need to change. Otherwise the text will be lost against the background colour.</p><h3>6. They may be mistaken for a value</h3><p>People may skip the field thinking it’s completed already. When they submit, they will see an error which needs fixing. This is frustrating and time consuming.</p><h3>7. They are inconsistently located</h3><p>Radio buttons, checkboxes and select boxes have static labels and legends. Where as text boxes have floating labels. This creates an inconsistent experience.</p><p>When looking at a text box, for example, the user has to look <em>inside </em>the control. For a select box they have to look <em>outside</em> of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*r_BYMhXo1AP8ytot.png" /></figure><h3>8. The label may get cropped</h3><p>If the floating label is longer than the size of the field, it will be cut off by the field. We should <a href="http://adamsilver.io/articles/stop-using-device-breakpoints/">design for content</a>, we shouldn’t make content fit the design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*mcxEigIemhnjvROM.png" /></figure><h3>9. They ignore the standards</h3><p>We know placeholders are problematic anyway. However, if we’re going to put text inside a text box, <a href="https://www.w3.org/TR/2011/WD-html5-20110525/common-input-element-attributes.html#the-placeholder-attribute">it should be a hint, not a label</a>.</p><h3>Summary</h3><p>Forms are not a source of entertainment. The floating label won’t make users enjoy using forms. Users don’t care. They just want the outcome.</p><p>Static labels and legends positioned outside the field create familiar and consistent experiences. Two qualities often found in well-designed interfaces.</p><p>There are <a href="https://www.smashingmagazine.com/printed-books/form-design-patterns/">better and more productive techniques for improving form design</a>. Let’s spend time and energy on those instead.</p><p><em>This is something I write about in my upcoming book </em><a href="https://www.smashingmagazine.com/printed-books/form-design-patterns/"><strong><em>Form Design Patterns</em></strong></a><em>. If you enjoyed this </em><a href="http://adamsilver.io/signup/"><em>sign up to my newsletter</em></a><em> and I’ll let you know once it’s released.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82edb64220f6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/floating-labels-are-a-bad-idea-82edb64220f6">Floating labels are problematic</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Problem with Atomic CSS]]></title>
            <link>https://medium.com/simple-human/the-problem-with-atomic-css-d0c09c7aa38e?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/d0c09c7aa38e</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[atomic-css]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Sun, 16 Apr 2017 20:09:56 GMT</pubDate>
            <atom:updated>2021-03-12T07:17:44.685Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RgGTNcJQULToii9ldyKIyA.png" /></figure><p>Since publishing <a href="http://maintainablecss.com/">MaintainableCSS</a> I’ve received some criticism from advocates of atomic CSS. One person said they puked up all over their screen after reading it, which was mildly entertaining.</p><p>When I wrote about semantic class names, it made sense to talk about them in comparison to non semantic class names. Often we deduce what it is we <em>should</em> do, once we analyse what it is we <em>shouldn’t</em>.</p><p>In response, atomic CSS champions critiqued semantic CSS. I actually don’t mind the critique. It’s good to be challenged. It certainly challenged my own thinking, but so far, my mind is mostly unchanged.</p><p>In this article, I’m going to explain fully why that is. And I’ll also address some of the comments made by atomic CSS advocates. Here goes:</p><h3>1. “S<em>emantic</em> is a misleading word”</h3><p>In <a href="http://adamsilver.us9.list-manage.com/track/click?u=b8fb04f39bf86109693e00ba5&amp;id=711b355d7c&amp;e=518c1e4999">Understanding Semantics</a>, Léonie Watson points out that <em>semantic</em> means <strong><em>of code intended to reflect structure and meaning</em></strong><em>.</em></p><p>This is why the word <em>wrapper</em> is semantic. It is an element that wraps another, <em>always</em>. Whether CSS clears floated “columns” on big screens or stacks them on small screens, it’s always a wrapper.</p><p>Therefore once we write HTML, it doesn’t need to change. Where as a class of <em>red</em>, or <em>clearfix</em> is not semantic — at least in the context of HTML.</p><p>In the context of HTML, a semantic class name describes what it <em>is</em>, not what it looks like (or how it behaves). This compliments the element itself.</p><h3>2. “Semantic classes result in slow sites”</h3><p>I’ve built many websites. They were never slow because we used semantic class names. For example, I built a responsive e-commerce site in 2016 which totals 48kb.</p><p>It has many components, fussy styles and breakpoints too. (Blame the visual designer for that. :D )</p><p>Despite this, the CSS isn’t slow. And it’s not like I paid much attention to CSS performance. No doubt we could make savings. But no bother, it’s not hurting users <em>at all</em>.</p><h3>3. “Atomic CSS ensures design is consistent”</h3><p>The theory is, that if I’m only allowed to use predefined classes, the visual design is more likely to stay consistent.</p><p>This makes some sense, because it limits the developer to what styles they can use. At least in theory.</p><p>However, it’s all in the application. There is nothing to stop me adding, for example, a new margin-bottom class or using the <em>wrong </em>one.</p><p><strong>Perhaps there is an opportunity to create a tool as opposed to a convention to solve this?</strong></p><h3>4. Analysing CSS performance in isolation</h3><p>The most touted aspect of atomic CSS is size and performance — in particular, time to first paint. Advocates often discuss this in isolation, which at best is misleading and at worst it’s deceiving.</p><p>Firstly, the size of the HTML increases significantly. Remember, CSS is cacheable and often serves an entire website. HTML is often unique, dynamic and personalised. It can’t be cached.</p><p>Secondly, the amount of CSS saved — even on large sites — would be relatively small. I am sure there are stories of websites with ten trigabytes of CSS, but having built many websites, I’ve found CSS is rarely the culprit.</p><p>Moreover, the size of CSS is not the only performance indicator. There are many others and they need to be thought about holistically.</p><h3>5. Atomic classes are hard to read</h3><p>Atomic class names are typically abbreviated. Abbreviations are hard to read. They have to be understood <em>and</em> mentally mapped. We should strive for <a href="http://adamsilver.us9.list-manage.com/track/click?u=b8fb04f39bf86109693e00ba5&amp;id=9be803745a&amp;e=518c1e4999">clarity over brevity</a>.</p><p>What does blk mean, for example? Does it mean <em>black</em> or <em>block</em>? Let’s say it means <em>black. </em>Is that black text or a black background.</p><p><em>(Whilst this is not something I’ve made up, it’s important to note that a badly named atomic class name has no bearing on the validity of the approach.)</em></p><p>We can use verbose names that are easier to read, but then this exacerbates the problem of HTML bloat and performance — which is the reason for abbreviations in the first place.</p><p>Or perhaps it’s about saving keystrokes, but any decent editor will have autocomplete.</p><h3>6. Atomic CSS recreates CSS in HTML</h3><p>Atomic CSS recreates the same constructs found in CSS in order to use classes in HTML. CSS was designed for styling. It’s tedious having to recreate a convention for HTML, that encourages developers to use the wrong tool for the job.</p><h3>7. We need semantic hooks anyway</h3><p>In order to write functional tests and enhance websites we’re going to need semantic classes. Therefore there is going to be a mix of classes each reserved for different things.</p><p>Inconsistent code is hard to reason about and if there are two ways of doing something, inevitably they will be misused.</p><h3>8. Semantic CSS doesn’t violate DRY</h3><p>Trying to reuse a CSS rule, is like trying to reuse a variable across different Javascript objects. It’s simply not in violation.</p><p>CSS abstracted all the rules and permutations for us, so that we can specify what we want, when we want. Thank you CSS.</p><h3>9. Semantic CSS is easy to delete</h3><p>A semantically-defined component is easy to delete because the related CSS pertains to that module in question. Atomic CSS is intertwined across a multitude of elements making the code hard to delete.</p><p>Before deleting the related CSS you would first need to look at each class, on every element within the module, to determine if it is used elsewhere. Only then can you decide whether to delete it or not.</p><p><a href="http://adamsilver.us9.list-manage1.com/track/click?u=b8fb04f39bf86109693e00ba5&amp;id=7a45c5a206&amp;e=518c1e4999">Good code is easy to delete</a> because it’s <em>not</em> intertwined.</p><h3>10. Atomic CSS is a responsive design anti-pattern</h3><p>As Ben Frain states in <a href="https://benfrain.com/oocss-atomic-css-responsive-web-design-anti-pattern/">Atomic CSS is a Responsive Design Anti Pattern</a>, <em>making very specific changes at certain breakpoints and tying them to a class that has to be added to the HTML seems needlessly complex.</em></p><p>He continues to say that<em> you inevitably end up with a raft of classes in your stylesheets that are obsolete.</em></p><h3>11. It’s harder to style pseudo classes</h3><p>For every single style you want changed, you need an equivalent, verbose and hard-to-read class name. For example .red-text-when-hover and .black-bg-when-focus etc.</p><p>If the styles need to change at different breakpoints, it&#39;s harder still. For example .red-text-when-hover-on-large-screens.</p><h3>12. It’s harder to style based on state</h3><p>Consider a basket that has an empty state. Each style that is different due to the state needs its own class.</p><h3>13. Javascript now needs to manage styles too</h3><p>Let’s say we have the following HTML:</p><pre>&lt;div class=”red-text float-left border-1px border-color-red”&gt;</pre><p>Now, in response to some state, Javascript needs to change the module to have 2px borders that are blue. You need to add (and optionally remove) individual styles from within the Javascript component. Meaning that Javascript has to be “style aware” too.</p><h3>14. It’s harder to style based on reading direction</h3><p>David Mark’s <a href="https://twitter.com/Cinsoft/status/835968849086394368?s=09">tweet</a> covers this:</p><blockquote>…invariably, “pull-left” contains float:right in RTL configurations. That’s a clue as to why it makes no sense.</blockquote><h3>15. It’s harder to enhance</h3><p>If we want to use @supports we would need a .supports-x-do-y-class-name.</p><h3>16. It’s harder to change layout mechanisms</h3><p>As Ben Frain says in the same article, <em>suppose […] we change our product […] from float based layouts to Flexbox based layouts. We now have twice the maintenance burden.</em></p><h3>17. It’s harder to fix Internet Explorer issues</h3><p>Sometimes we add conditional CSS to fix Internet Explorer bugs. We can’t target atomic class names to do this.</p><h3>18. Atomic classes are misleading and redundant</h3><p>For example, overflow-hidden is used to clear floated children. However, in small screens the children are stacked, not floated. This is misleading for developers and redundant for users.</p><h3>19. Every element needs classes</h3><p>With atomic CSS every element needs several classes. But sometimes we don’t need to add a hook, as we can do this: .blah div or this:input[type=submit].</p><p>Also, Markdown, for example, forces us to style elements through a common ancestor (with a semantic class name).</p><h3>20. It makes the inspector noisy</h3><p>It’s hard to determine where a module starts and ends as there is nothing in the HTML to indicate this. The content is obfuscated and the inspector has more lines of code to look through.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V-9PDvaWbfV0vbLX5rfPMw.png" /><figcaption>Many declarations is a cognitive burden on developers</figcaption></figure><h3>21. It’s hard to find HTML</h3><p>We often inspect elements using the inspector. Atomic classes aren’t unique, meaning it’s hard to use those hooks to find out where the HTML lives. Good file structure and templating helps, but we shouldn’t have to solely rely on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wDoigTX2IjfrFlumzSqvrQ.png" /><figcaption>Using Atomic hooks to find HTML is not going to yield positive results</figcaption></figure><h3>22. “Switching between HTML and CSS is hard”</h3><p>Some commend atomic CSS because there is less switching between CSS and HTML.</p><p>Of all the things developers have to do, pressing <em>cmd+tab</em> is hardly taxing.</p><p>Moreover, it’s practically nonsense. The only way you won’t have to switch to CSS is if you know every available class name at your disposal. I doubt this is the case for most people.</p><h3>23. “Atomic CSS makes it easy to reuse CSS across projects”</h3><p>Advocates suggest atomic CSS makes it easy to reuse CSS across projects. It’s a nice idea, but it’s practically useless unless every site is going to look the same. Most websites don’t.</p><h3>24. It’s hard to theme CSS</h3><p>When I worked on a white-label solution for several e-commerce sites, the HTML was reused, not the CSS. That’s because the HTML is similar, not the CSS.</p><h3>25. It’s hard to create new components</h3><p>On your first day at a new job, you have to develop a new component.</p><p>Instead of giving the component a semantic class and styling it, you have to add a multitude of classes that you’ve first checked exist or not. You can’t simply know what class names are available. Therefore the job is harder.</p><h3>26. It’s hard to edit an existing component</h3><p>This time you need to <em>change</em> a component. You manage to find the HTML but this time you have to work out which classes need removing and adding.</p><p>To add one, you must first check the existence of a class before you may or may not use it. If it’s there, you can use it. If it’s not, create one.</p><p>I don’t know anyone that reads all the available CSS to see if there is something they can reuse.</p><h3>27. “Semantic classes are longer than atomic class names”</h3><p>Here’s a typical snippet of atomic CSS from a site that has <em>basic</em> styling:</p><pre>class=&quot;w5 w6-m w-50-l center overflow-visible mt3 mt4-m dtc-l v-mid-l tr-l&quot;</pre><p>I’ve never seen a semantic class name that is close to this. Have you?</p><h3>Summary</h3><p>In many cases, atomic CSS will decrease the size of your CSS file. That’s to be expected. Just like if decided to inline all my styles, I would expect the size of the CSS file to be zero bytes.</p><p>The problem is that it introduces many other issues that we would be foolish to ignore.</p><p>Performance is only an issue once it becomes an issue. There could be many factors at play.</p><p>I’m not saying to wait for a problem, but I’m not saying we should discard tried, tested and technology-embracing techniques like semantic CSS either.</p><p>There are other ways of making websites load faster with regards to CSS. For example, we don’t have to load the entire site’s CSS at once. We could include the CSS a page needs and cache progressively.</p><p>Focussing on CSS isn’t necessarily where our energy is best spent. Perhaps the page has too much stuff. Perhaps the visual design is wasteful and not benefiting users. You might be using a framework, CSS or otherwise which you don’t need.</p><p>All in all, having to navigate our way through all the trade-offs to shave some CSS, which drastically increases the size of HTML, is just trading one problem for <strong>several</strong> others.</p><p>In most cases, we’re going to need semantic classes to do the job regardless. We may as well make use of them for CSS too.</p><p><em>This is something I first wrote to my subscribers. I send an email out like this once a month ish. If you want to avoid all my past mistakes, </em><a href="http://adamsilver.io/signup"><em>sign up here</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0c09c7aa38e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/the-problem-with-atomic-css-d0c09c7aa38e">The Problem with Atomic CSS</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop using device breakpoints]]></title>
            <link>https://medium.com/simple-human/stop-using-device-breakpoints-b11a87e2625c?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/b11a87e2625c</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Tue, 28 Mar 2017 17:14:49 GMT</pubDate>
            <atom:updated>2017-04-09T10:49:40.443Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vHm-dfkzQy_tzdeDZwHesA.png" /><figcaption>Visualisation of a tiny segment of viewport sizes</figcaption></figure><p>I see it all the time. Designers, and developers alike, setting breakpoints according to their favourite device. When will we learn from our past mistakes?</p><p>When the web came along we settled on 640 pixel widths. Then a few years later, when larger monitors came to market, we settled on 960 pixels. We no longer cared about people with smaller monitors.</p><p>Then more years passed. The mobile web was born. Or more accurately, we could consume websites on our phones, which happen to have small screens. A million browsers came out. A million devices came out. And browsers gave us media queries.</p><p>At about this time, we decided to use 320 pixels for mobile. <em>Why?</em> Because a lot of us had the iPhone, and this was its width in portrait.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PO-X9g5ZJZQFDILcbAaDdA.png" /><figcaption>And then. And then. And then.</figcaption></figure><p>Then landscape mode. Then tablet (that’s still mobile right?). Then desktop. Then big desktop like super size thunder screens or whatever the hell they’re called. (I’m not Googling it because you know what I mean). Then TV. Then wristwatch and then...</p><p>You get the point. The web is not print. The web is the web and we have no idea what size screen our users have. We just can’t control that. And even if we could, the proliferation of devices means that designing for them is futile.</p><p>But there’s a few things we <em>do</em> know. We know our brand and our UI. And, more importantly, we know our <em>content</em>. Content isn’t just paragraphs of text. It’s <em>the things that are held or included in something.</em></p><p>We should always start with content. Without content, design is meaningless. We <em>design</em> to help users consume <em>content</em>. We don’t use content to help users enjoy our designs.</p><p>We often start designing with a box. And then we put smaller boxes inside it. Then later we’ll fill in these boxes with actual content.</p><p>As Frank Chimero beautifully explains in <a href="http://www.frankchimero.com/writing/the-webs-grain/">The Web’s Grain</a>, <em>this is just about the worst thing we can do</em>.</p><p>How can we possibly design something until we know what the content is?</p><p>I’ve witnessed designers finish their mock-ups and ask the resident content designer to make the content fit. Maybe even ask them to shorten their user-friendly content to make sure it doesn’t wrap and so forth. It may help the designer. It doesn’t help the user.</p><p>And when they check their design on landscape or on a device they don’t own, they get flustered. What they see as control, is really an unnecessary constraint on their design to a known set of device sizes.</p><p>Instead we should let content be our guide. We should set a breakpoint when and <em>if</em> the content requires it. We can call them <em>content breakpoints</em> or what Frank refers to as <em>points of reassembly</em>.</p><p>Take for example the subscribe form on <a href="http://maintainablecss.com/">MaintainableCSS</a>. Taking a content-led, small-screen first approach, the button sits under the text box. And when there’s room, they sit along side each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*BqGlYQLXhhRp7buZYx1ejw.png" /><figcaption>Responsive subscribe form based on content break points</figcaption></figure><p>The media query uses a breakpoint of 36em. <em>Why?</em> Because that’s when there is an opportunity for content reassembly. The button and text control lose their affordance when they get really wide on bigger screens. So we can fix that.</p><p>And it’s only relevant to the subscribe form. There is no blanket rule that states that 36em means “big”. The breakpoint reflects the need of the module and content in question.</p><p><em>Technically</em> it’s just a media query. But the mindset and the approach is what sets it apart. The design supports the content. Not the other way around.</p><p>This is why CSS <a href="http://getbootstrap.com/css/">frameworks</a> cause problems by unnecessarily constraining our content to fit into a predefined grid. How can a CSS framework know what our content is? It can’t.</p><p>The term <em>mobile first </em>encourages us to think in terms of device. But the web isn’t a set of devices. The web is a continuum of edgelessness. That’s the coolest sentence I’ve ever written.</p><p>Sorry for using jargon. What it means is this. There is absolutely no point — whatsoever — in trying to work out the size of a particular device, in order to then define a codified responsive grid.</p><p>At best it’s constraining and at its worst, it causes problems.</p><p>Instead, let the content be your guide. If and when it breaks we can reassemble it with the necessary content breakpoint.</p><p>Responsive design frees us from the shackles of designing based on devices, which is impossible to get a handle on. Content breakpoints give people better experiences no matter what size device they have.</p><p><strong><em>That’s the end. But, if you liked this article, you should </em></strong><a href="http://adamsilver.io/signup"><strong><em>subscribe to my private mailing list</em></strong></a><strong><em>. I send an article like this about once a month straight to your inbox. It’s a good way to continue the conversation.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b11a87e2625c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/stop-using-device-breakpoints-b11a87e2625c">Stop using device breakpoints</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing inclusively]]></title>
            <link>https://medium.com/simple-human/designing-inclusively-5442ca2850ba?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/5442ca2850ba</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[inclusive-design]]></category>
            <category><![CDATA[accessibility]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Wed, 01 Mar 2017 14:44:19 GMT</pubDate>
            <atom:updated>2017-04-04T11:57:21.062Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QmXNLlk_Mq_y-wWB62_DAQ.png" /><figcaption><a href="http://marcysutton.github.io/5-things-i-learned-from-accessibility/#/8">Inclusive design affects us all</a></figcaption></figure><p>Whilst the web is still young, it’s been around long enough for us to know about its power and its constraints. We know what these constraints are now because we’ve bent them so much over the years.</p><p>Before CSS we used tables and spacer gifs for layout. Before border-radius we used background images for rounded corners.</p><p>We use pre-existing mediums as a guide for how a new medium should work. We take our preconceptions and apply them as we see fit.</p><p>Whilst we’re better now at embracing the web, we still make plenty of <a href="https://resilientwebdesign.com/chapter7/#Assumptions">assumptions</a> about it. And those assumptions get shattered down the line.</p><p>We used to think all viewports were 640 pixels wide. We used to think all computers had a keyboard and mouse.</p><p>Now, we think small screens mean swipe-able, and big screens equate to mouse users. These are also assumptions. These assumptions are wrong.</p><p>We need to embrace the fact that we don’t know what users are doing. We don’t know their capability and we don’t know their preferences. We don’t know much. And that’s okay.</p><p>We need to design inclusive experiences that embrace these constraints. This is neither boring nor easy. Designing a great and inclusive experience on the open web is a delicate challenge that we need to step up to.</p><p>We can’t be creative without constraint anyway. Only with constraint can we design something truly brilliant.</p><p>In order to be creative we need to know what these constraints are. So I’ve jotted them down so we can remember them easily. Here they are:</p><h4>1. Understanding</h4><p>Everybody’s different. How people think and see the world is unique to the individual.</p><p>We’re influenced by our environment, upbringing and the people we spend most time with. And we speak different languages.</p><h4>2. Disability</h4><p>My left eye sucks (it won’t move left) and so I have to turn my head to use it properly.</p><p>That’s just me — an estimated <a href="http://www.serviceandinclusion.org/index.php?page=basic">48.9 million people suffer from disabilities</a>. Disabilities that affect <a href="https://the-pastry-box-project.net/anne-gibson/2014-July-31">mobility, hearing and eyesight</a>.</p><p>Furthermore, many disabilities are temporary. Even a mother holding a baby in one arm, is one arm down.</p><p>If we can create something great for people with one arm, then we’ll be creating something even better for people with two.</p><h4>3. Preference</h4><p>Even someone who is fully-abled (should such a person exist), still has preferences. And those preferences can change under different circumstances.</p><p>My two year old boy, for example, can’t understand why nothing happens when he touches the screen of my Macbook. If it had a touch screen, that’s how he would use it. I prefer using keyboard myself but sometimes the mouse is better.</p><p>Even people use screen readers in different ways. Users may navigate by heading. Or they may navigate by landmark. They may use braille displays and keyboards.</p><p>And whilst I rarely print pages, not everyone is like me. Ensuring pages are easy to read when printed is something we must also consider.</p><h4>4. Internet speed and connectivity</h4><p>We (people who work in the industry) tend to have fast connections. But many people out there are not like us.</p><p>We must consider performance and connectivity from the beginning. Make the slow fast, and the fast faster.</p><h4>5. Screen size</h4><p>People use all sorts of devices, from watches to huge TVs, and everything in between. We need to consider how things work across the board.</p><p>Responsive design isn’t about 3 different sized containers according to device. It’s about <a href="https://medium.com/simple-human/stop-using-device-breakpoints-b11a87e2625c">fixing content where it breaks</a> (if at all).</p><h4>6. Browser capability</h4><p>The devices and browsers people use have varying capabilities. This impacts what they can do and the features we offer them.</p><p>We should deliver a core experience, and <a href="http://adamsilver.io/articles/progressively-enhanced-javascript/">enhance only when the feature is available</a>. Everything but content is an enhancement.</p><h4>7. Internet data cost</h4><p>Again whilst you and I may have expensive data contracts, many people do not. And even if it’s cheap, data can run out. Either way, we must think about this when we want to design inclusive experiences.</p><p>This is not just about making lightweight experiences (though that’s essential). Breaking up content across pages allows people to load content as they see fit.</p><h4>8. Environment</h4><p>Experiences are affected by low lighting and screen glare. Or being outside in the cold wearing touch-screen friendly winter gloves. Or choosing to interact verbally. Or turning down brightness to save battery.</p><p>Either way, we need to test our designs in the real world.</p><h4>9. Standards and conventions</h4><p>Android and IOS have standards and guides for designing apps. These guides act as constraints. This ensures we solve the same problems in the same way.</p><p>The same applies to web design.</p><p>When websites use the same patterns and conventions, interfaces become familiar. Familiar is better.</p><p>You can <a href="https://medium.com/@mibosc/responsive-design-why-and-how-we-ditched-the-good-old-select-element-bc190d62eff5#.8m0u1kb7p">break conventions</a> but you need a good reason for doing so.</p><h4>10. Interoperability</h4><p>People don’t just consume content directly through websites. They use Safari’s reading mode or a feed reader. And they rely on how Google displays a search result.</p><p>Therefore, we need to design experiences that are interoperable because this is how people use our services.</p><h4>11. Configuration</h4><p>People customise their phone and their browser to their liking. They may add plugins, or adjust the font size.</p><p>Building experiences that honour people’s configuration and ability to choose is a vital aspect of designing inclusive experiences.</p><h4>Summary</h4><p>Each of these constraints elevate the needs of users to the number one spot. They influence everything from our choice of words and interaction design, to the code we use behind the scenes.</p><p>Simply put, exclusive experiences ignore people. And there’s a lot be said for design that ignores people. People ignore it.</p><p>Let’s not ignore people. Let’s design with these constraints at the fore. And in turn design better experiences for everyone.</p><h3>I’m actually writing a book about designing simple and inclusive forms. If you want to receive free excerpts and updates about it then <a href="http://adamsilver.io/signup">sign up to my free newsletter</a>.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5442ca2850ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/designing-inclusively-5442ca2850ba">Designing inclusively</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Year in review 2016]]></title>
            <link>https://medium.com/simple-human/year-in-review-2016-1cd19a1d4d07?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/1cd19a1d4d07</guid>
            <category><![CDATA[inclusive-design]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[accessibility]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Thu, 16 Feb 2017 14:17:42 GMT</pubDate>
            <atom:updated>2017-02-16T14:17:41.572Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve never written one of these before because I started this newsletter less than 12 months ago. It’s fresh just like me :D.</p><p>It’s good to reflect on the past, rather than rocketing into the future all the time. Which funnily enough is one of the biggest problems in our industry.</p><p>We spend so much time looking for the latest and greatest whatever, that we don’t realise how much amazing stuff has already been solved in the past.</p><p>So before looking ahead I’ll take a look at the last 12 months to see what went well and what didn’t — a retrospective because everyone loves Agile.</p><p>I’m also going to need your help if you can spare a minute, so hold tight on that.</p><h3>What went well</h3><h4>1. I gave a talk to 180 people</h4><p>When Simon McManus invited me to speak at a <a href="http://enhanceconf.com/">Enhanceconf 2016</a>, my initial reaction was “no way”. Why would I subject myself to the fear of public speaking? I’m not that crazy.</p><p>But they say you should step outside your comfort zone and so after friends and family convinced me to do so, I went ahead with it. The conference matched up to my own principles and I got to talk about a subject close to my heart.</p><p>My talk was entitled <a href="http://adamsilver.io/articles/embracing-simplicity/">Embracing Simplicity</a> so if you haven’t seen it you know what to do.</p><p>I also learnt a lot about <a href="https://medium.com/simple-human/how-to-speak-at-conferences-if-you-lack-confidence-1b6ba6ae48cd">public speaking</a> so if you’re thinking about giving a talk that may save you some preparation time.</p><h4>2. I wrote for Smashing Magazine</h4><p>Someone at Smashing Magazine read <a href="http://adamsilver.io/articles/why-infinite-scrolling-is-probably-a-bad-idea/">7 reasons why infinite scrolling is a bad idea</a>. And they liked it enough to ask me to write for them. Who’d of thunk it.</p><p>I was flattered and excited at the prospect because not only would I get to reach a larger audience, but I would also have talented people editing my shoddy work.</p><p>After several rounds of feedback it was released on June 2016 and was entitled <a href="https://www.smashingmagazine.com/2016/06/improving-ux-for-color-blind-users/">Improving The UX For Color-Blind Users</a>. If you haven’t read it, I think you’ll enjoy it.</p><h4>3. I wrote a book</h4><p>I suddenly had the urge to write a book about maintainable CSS and I because I’m creative I called it <a href="http://maintainablecss.com/">MaintainableCSS</a> (but without a space).</p><p>I had seen the hype around atomic class names, something I disagree with. And seeing as I wanted to document my own approach it seemed like a good idea to type shit into a computer and have it live on the internet.</p><p>It’s been read more than 300,000 times since I released it in April last year. And it’s currently getting about 10,000 readers a month. I’ve had some wonderfully positive comments, and some heavy critique to match.</p><p>Either way, I’m glad other people find value in it.</p><h4>4. I started a newsletter</h4><p>And that’s what you’re reading now so thank you for subscribing. It means a lot to me. Without you there would be no me (or this) — you know what I mean.</p><p>I wanted to start a newsletter for a number of reasons. For one, it’s a good way to get to know my readers better. And for two, it’s a good way to motivate me to write.</p><p>My readership has steadily grown to 500+ subscribers and it’s growing slowly. What I’m most happy about is that I’ve managed to write consistently, about once-a-month ish.</p><h4>5. I helped launch Kidly</h4><p>In my day job I signed up for a 12 month contract with Kidly. We designed and built — from nothing — a beautiful responsive e-commerce website to sell the best stuff for your baby.</p><p>I’m particularly proud of how we embraced simple UX patterns and avoided the the complex patterns which users rarely appreciate.</p><p>For example, the navigation avoids the hamburger and works on click (not hover). This is more discoverable and inclusive to users.</p><p>Customers have raved about the site. And when I left, conversion from basket was at the 26% mark, which is excellent.</p><p>If you want to read more about my Kidly experience, I wrote about it in <a href="http://adamsilver.io/articles/how-we-cut-our-mvp-in-half-to-launch-kidly/">How we cut our MVP in half to launch KIDLY</a>.</p><h4>6. My article was featured in “Inclusive Design Patterns”</h4><p>I turned up to work one day, and Tim, a designer on my team told me that I’ve been cited in Smashing Magazine’s latest book, <a href="https://shop.smashingmagazine.com/products/inclusive-design-patterns">Inclusive Design Patterns</a>.</p><p>The chapter about buttons and links, references my own article about how <a href="https://medium.com/simple-human/buttons-shouldnt-have-a-hand-cursor-b11e99ca374b#.2tfgocaxv">button’s shouldn’t have a hand cursor</a>.</p><p>I wanted to read the book anyway, but as I was featured in it, I started reading it immediately. Because I’m egotistical like that :).</p><h4>7. I worked less</h4><p>I worked part time for pretty much 12 months. Sometimes 3 days, sometimes 4 days and the odd 5 day week. If you’ve never done it, I can’t recommend it enough. There is this amazing double-whammy affect. You lose a day’s work but you gain an extra “weekend” day.</p><h4>8. I read some amazing books</h4><p>In no particular order here they are:</p><ul><li><a href="https://www.amazon.co.uk/Hooked-Guide-Building-Habit-Forming-Products/dp/1494277530">Hooked</a></li><li><a href="https://www.amazon.co.uk/d/cka/One-Plus-Equals-Three-Masterclass-Creative-Thinking/1447287053/ref=sr_1_4?s=books&amp;ie=UTF8&amp;qid=1484302764&amp;sr=1-4&amp;keywords=one+plus+one">One Plus One</a></li><li><a href="https://www.amazon.co.uk/Talk-Like-TED-Speaking-Secrets/dp/1447261135/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1484302786&amp;sr=1-1&amp;keywords=Talk+Like+Ted">Talk Like Ted</a></li><li><a href="https://www.amazon.co.uk/d/Books/Mans-Search-Meaning-classic-tribute-hope-Holocaust/1844132390/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1484302807&amp;sr=1-1&amp;keywords=mans+search+for+meaning">Man’s Search For Meaning</a></li><li><a href="https://www.amazon.co.uk/Penguin-Great-Ideas-Shortness-Life/dp/014101881X/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1484302821&amp;sr=1-1&amp;keywords=on+the+shortness+of+life">On The Shortness Of Life</a></li><li><a href="https://www.amazon.co.uk/d/Books/How-Win-Friends-Influence-People-Dale-Carnegie/0091906814/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1484302836&amp;sr=1-1&amp;keywords=How+To+Win+Friends+%26+Influence+People">How To Win Friends &amp; Influence People</a></li><li><a href="https://www.amazon.co.uk/Letting-Go-Words-Interactive-Technologies-x/dp/0123859301/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1484302850&amp;sr=1-1&amp;keywords=letting+go+of+the+words">Letting Go Of The Words</a></li><li><a href="https://www.smashingmagazine.com/inclusive-design-patterns/">Inclusive Design Patterns</a></li></ul><h4>9. A publisher offered me a book deal</h4><p>Even though I turned it down, I was chuffed just to be asked. I decided against it as a) I didn’t want to be on someone else’s schedule and b) I like the idea of self-publishing, and in my own time no less.</p><h4>10. I started working for GOV.UK</h4><p>One of the things I’ve been frustrated with in our industry is the lack of empathy for users. Too often we design exclusive experiences where only young people, with good vision, on their cutting edge iPhone can comfortably use a service.</p><p>This is why I’ve wanted to work in the public sector. I’ve always wanted to work in a place where we embrace the web as a platform, and strive to design inclusive experiences, that solve real problems.</p><p>So when the opportunity came up it was a no brainer to accept a contract with them. I hope it continues to be as enjoyable as the last 6 months.</p><h3>What didn’t go well</h3><h4>1. I left Kidly</h4><p>When I joined Kidly, I was aware my time there would be short. I even helped to find my permanent replacement. But as I enjoyed working with the team and the product so much, I didn’t want to leave. But this is the life of a contractor.</p><h4>2. I made little progress on my forms book</h4><p>Early last year I began writing a book on how to design forms. I’ve been obsessed with forms since 2008, so I’d quite like to dump all my learnings into a book so it’s out of my head. But I’ve not really made much progress beyond a contents page.</p><h4>3. Carbon Ads made no money</h4><p>I’ve never been a fan of ads but Carbon Ads are unobtrusive and relevant. I gave it a go on my website and made pretty much nothing. So I took them out. Worth a go I guess.</p><h4>4. Working 5-day weeks again</h4><p>Since leaving Kidly, I’ve been working 5-day weeks again. The money is good, but my spare time is once again at a premium.</p><h4>5. I didn’t publish MaintainableCSS on Kindle</h4><p>Some of my readers expressed an interest in this, so I put it on my list but it didn’t get done.</p><h4>6. I retired thebfed.com</h4><p>The website is dead. But <a href="http://adamsilver.io/articles/the-boring-front-end-developer/">The boring front-end developer</a> will forever live on through my website.</p><h4>7. I couldn’t decide where I should publish my articles</h4><p>With the rise of Medium, I didn’t know where to put my articles. Some went on there, some went on my blog, and some went on both. I’ve since rectified this which I’ll explain in the next section.</p><h3>What’s coming up in 2017</h3><h4>1. Newsletter</h4><p>I’ll be continuing sending you my newsletter. I’ve already got another 12 or so topics I want to write to you about. And I think I’ll be continuing with the same pace (at about once a month).</p><h4>2. Improvements to AdamSilver.io</h4><p>My website is now the source of truth for all my articles. If it’s on Medium, it should also be on my blog. I may choose to repost to Medium so that more people can read it and comment if they wish.</p><h4>3. Forms book</h4><p>Along with the newsletter this is something I’d like to complete. I’m making no promises but this is high up the list of priorities.</p><h4>4. MaintainableCSS</h4><p>I’ve already rebranded MaintainableCSS which I hope you like it. I’ve also given the content a good old spring clean which should make it much easier to read. And I really would like to get it published on Kindle, which should please some of you, and hopefully I can make a little money in the process.</p><h4>5. Working for GOV.UK</h4><p>I want to continue solving real problems in a simple, human and inclusive way for the UK public. My fingers are crossed.</p><h4><strong>Which brings me to you</strong>!</h4><p>I need your help. If you think I could do something different. Or you’d like me to write about a particular topic, I’d love to hear from you.</p><p>Any guidance, good or bad, is helpful. At the end of the day I want to know what you want. So if you have some ideas, just hit reply (I read every email).</p><p><em>This was originally sent to my private email list. I send an email thing about once a month. If you’re up for it, you can </em><a href="http://adamsilver.io/signup"><em>sign up here</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cd19a1d4d07" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/year-in-review-2016-1cd19a1d4d07">Year in review 2016</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t initialise Javascript automagically]]></title>
            <link>https://medium.com/simple-human/dont-initialise-javascript-automagically-85a1231914ce?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/85a1231914ce</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Thu, 05 Jan 2017 18:38:40 GMT</pubDate>
            <atom:updated>2017-06-17T19:41:21.946Z</atom:updated>
            <content:encoded><![CDATA[<h4>The problem with looping over behavioural HTML attributes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OnJ2BxMdhRyPIgby6eC1iQ.jpeg" /><figcaption>Credit: <a href="https://www.pexels.com/u/austin-guevara-66189/">Austin Guevara</a></figcaption></figure><p>I used to write Javascript that initialises components automagically. Don’t worry I’ll explain what I mean. Take a look below:</p><pre>var datepickers = document.getElementsByClassName(‘datepicker’);<br>for(var i = 0; i &lt; datepickers.length; i++) {<br>  new DatePicker(datepickers[i]);<br>}</pre><p>The technique works by looping over every element with a particular behavioural class name. If the Document contains the class name several times, the script creates several instances. With no Javascript changes at all. That’s the automagical bit.</p><p>Developers commend this technique because there’s only four lines of code. Less if using a library. And it never needs updating. If you want another date picker, just add a class of date picker. Job done.</p><p>This approach is problematic for many reasons. Here’s why:</p><h4>1. It’s harder to understand the codebase at a glance</h4><p>To understand the codebase at a glance, you need to know what behaviour exists and where.</p><p>The loop doesn’t tell you how many date pickers there are. There could be a thousand instances or there could be one (or none) — in which case the loop is misleading. Either way you don’t know.</p><h4>2. You might apply behaviour by accident</h4><p>If you happen to use a class that corresponds to a component, then you might accidentally initialise behaviour.</p><h4>3. It’s difficult to estimate stories</h4><p>If you can’t document what you’re changing and where, it’s difficult to define and estimate a story.</p><h4>4. It’s difficult to QA</h4><p>After modifying a date picker, a tester will ask you what parts of the system you’ve affected. The loop doesn’t help you answer this question.</p><h4>5. It’s harder to debug</h4><p>If there’s a problem with one date picker, finding and debugging it is more tricky. You will have to find the problematic instance by searching the HTML templates. Then you will need to step through the loop until you find the erroneous one.</p><h4>6. It’s harder to delete</h4><p>As you don’t know where the loop is executing, you can’t delete code in confidence. Thus, the code stays in the codebase for a long time.</p><h4>7. It’s hard to determine behaviour</h4><p>This approach forces you to store behaviour in HTML attributes. This isn’t an elegant way to define behavioural relationships. HTML becomes bloated and hard to read. Every attribute value is a string, when you might, for example, want a number.</p><pre>&lt;div class=&quot;datepicker otherComponent&quot; data-datepicker-attr=&quot;etc&quot; data-datapicker-event=&quot;listener&quot; data-othercomponent-attr=&quot;blah&quot;&gt;</pre><h4>8. It’s painful to customise</h4><p>When you need to use models and XHR etc, it becomes painful to work with this approach.</p><p>I’ll give you an example. Imagine you have a form with two date pickers: a start-date and end-date.</p><p>When the user chooses a start-date, the end-date values update. This is to ensure the end-date is always after the start-date.</p><p>This is hard to define in HTML. In Javascript it’s easy:</p><pre>var startDate = new DatePicker();<br>var endDate = new DatePicker();<br>startDate.on(&#39;changed&#39;, function() { endDate.whatever(); });</pre><h4>9. It’s painful to infer behaviour from HTML</h4><p>The loop doesn’t allow you to customise an instance by passing in options. Instead, you have to store behaviour in HTML. When you change behaviour, you must update the HTML. This goes against recommended​ <a href="https://en.wikipedia.org/wiki/Separation_of_concerns">practices</a>.</p><h4>10. It’s painful to override behaviour</h4><p>To override behaviour, you will need to add an extra class to the HTML. Then the date picker (or the loop) will determine the override by checking for this extra class. At this point, the component (or the loop) is no longer generic.​</p><h4>11. It’s hard to destroy instances</h4><p>It’s easy to store the instances during initialisation. But, determining and retrieving one later so you can destroy it, is harder this way.</p><h4>12. It increases the chance of performance issues</h4><p>This approach means the Javascript has to crawl the DOM a lot more than is otherwise necessary. First to find elements that need enhancing, and second to determine behaviour from attributes.</p><p><a href="https://www.nczonline.net/blog/2009/02/03/speed-up-your-javascript-part-4/">Touching the DOM is expensive</a>, which increases the risk of performance issues. The risk increases further when you have many components and many instances of a component.</p><h4>13. It’s harder to unit test</h4><p>It’s difficult to unit test behaviour when you store behaviour in HTML. You might then decide to use HTML fixtures. But they are slow and you’re no longer writing unit tests. You <em>could</em> mock the DOM but this is tedious and problematic. The less you store in HTML the easier it is to test.</p><h4>14. It’s harder to initalise at different times</h4><p>This technique often assumes that we want to initalise everything when the Document is loaded. But sometimes we need more sophistication. For example, we may want to initialise a component once it’s loaded later with AJAX. This approach makes this hard.</p><h4>15. It exposes a security hole</h4><p>You can read about the <a href="https://githubengineering.com/githubs-csp-journey/#object-src">security hole here</a>.</p><h4>16. It increases the size of HTML</h4><p>Putting Javascript in HTML increases the HTML. But unlike Javascript, it can’t typically be cached because HTML is likely to contain personalised and dynamic content.</p><h4>“But I don’t want to update Javascript every time I want a new instance?”</h4><p>I fail to see why updating Javascript is a problem. In fact, I would <em>expect</em> you to change Javascript when updating behaviour. Updating HTML instead of Javascript is not better.</p><h4>“Is this necessary—it feels like code bloat?”</h4><p>If code is valuable, it’s not code bloat.</p><h4>“But the Javascript will have a lot more code.”</h4><p>Maybe. Maybe not. It depends on your architecture and your requirements. Even if it did, good code is not just determined by the number of lines.</p><h4>“But let’s at least use it for simple components.”</h4><p>Even if it did work for simple components, you have to draw a line between simple and complex. This is arbitrary and having two ways of doing the same thing makes code inconsistent.</p><h4>“It’s easier for <strong>backend developers to add behaviour in HTML.</strong>”</h4><p>You need to decide whether backend developers should be writing Javascript or not. If they should be writing it, then help them do it right. They are software engineers. Trust them.</p><h4>Summary</h4><p>Good code is not about number of lines.</p><p>Good code is not about how easy it is to write the first time.</p><p>Good code is easy to reason about.</p><p>Good code is easy to update.</p><p>Good code is consistent.</p><p>Good code is easy to unit test.</p><p><a href="http://programmingisterrible.com/post/139222674273/write-code-that-is-easy-to-delete-not-easy-to.">Good code is easy to delete.</a></p><p>Bad code is easy to write but hard to delete. Bad code is magical. Magic is entertaining. Code shouldn’t be entertaining.</p><p>Automagical loops obfuscate complexity. They make things appear simple when they’re not.</p><p>Help future-you by writing Javascript that doesn’t suffer from these problems. HTML isn’t good at defining behaviour. But Javascript is.</p><h4><em>Please ♥ the article if you found value in it.</em></h4><h4><em>If you </em><a href="http://adamsilver.io/signup/"><strong><em>sign up for my newsletter</em></strong></a><strong><em> I’ll send you other articles </em></strong><em>about designing and developing simple, human and inclusive experiences on the web.</em></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85a1231914ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/dont-initialise-javascript-automagically-85a1231914ce">Don’t initialise Javascript automagically</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Less but better]]></title>
            <link>https://medium.com/simple-human/less-but-better-a7e6bf22bb5f?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/a7e6bf22bb5f</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[continuous-improvement]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Fri, 18 Nov 2016 08:07:04 GMT</pubDate>
            <atom:updated>2017-12-19T10:07:54.276Z</atom:updated>
            <content:encoded><![CDATA[<p><em>First appeared in my </em><a href="http://adamsilver.io/signup"><em>private email list</em></a><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cWq57TTgp23pVcfFgz9KZA.png" /><figcaption>Essentialism</figcaption></figure><p>There are times in life when you learn something new — a moment that sets you off down a different path. Maybe you always had it “in” you, but something triggered it. Maybe it was a culmination of things or maybe something else entirely.</p><p>I think it happened to me when I was working with <a href="http://theluckystrike.co.uk/">Mark Jenkins</a> in the UX team at <a href="http://just-eat.co.uk/">Just Eat</a> back in 2014. But, before I tell you what happened, I want to set the scene a little bit.</p><p>They say 3 of the hardest things to deal with in life are: having a child, refurbishing a house and moving job. Well, the hero I am (ha!), I did all three at the same time.</p><p>And while it was my choice to do the first two, the third wasn’t. They let me go and while that can happen as part of being a contractor it wasn’t part of the “plan”.</p><p>Doing one thing is hard enough but doing three is not the way to do something well or stress-free. If I just had the new job, it would’ve been easier to deal with.</p><p>So I moved on and sorted myself out with a new contract at Just Eat. And that is when I met Mark, a UX designer.</p><p>It didn’t take long for me to realise how awesome he was. I am not one of those guys who says everything is “awesome”. Mark though, was and is, awesome.</p><p>We talked about some of the troubles that Just Eat had. How we hoped we could help the team make things better. In terms of UX, front-end and the time it takes to release — to name a few.</p><p>It’s not only Just Eat — most companies, teams and products have problems. They have problems because of their huge success.</p><p>Success can breed failure because success breeds growth. And when a company grows, there is just <em>more</em> of everything — more people and more opportunities to spend your attention on.</p><p>Mark and I spent a lot of time discussing these things. Then, one day he gave me this book: <a href="https://www.amazon.co.uk/gp/product/0753555166/ref=as_li_tl?ie=UTF8&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0753555166&amp;linkCode=as2&amp;tag=adamsilverio-21"><em>Essentialism: The disciplined pursuit of less</em></a><em>. He</em> said “read this, you’ll love it.”</p><p>I did love it.</p><p>It was the idea that doing less is far more productive than doing more. The idea that you can do less, but better.</p><p>Problem is, it seems as though people are hard-wired with a do-more mindset.</p><p>I see it all the time in our industry. We design solutions for problems that don’t exist. We make something far more complicated than needed. We do a whole bunch of stuff that adds little or no value.</p><p>People think you’re mad if you say you want less stuff . The American Dream revolves around the idea that more is better — but that <a href="http://www.theminimalists.com/dream/">story</a> is for another day.</p><p>When you do more, there is a tendency to do even more after that. It’s habit forming.</p><p>And I am not just talking about design. I am talking about <em>everything</em>.</p><p>Whether you’re designing, coding, defining a product, make the next smallest improvement. Then get feedback. Do just what you need to do and no more than that.</p><p><strong>Narrow your focus and do it better.</strong></p><p>In software engineering, it’s called <a href="https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it">YAGNI</a>.</p><p>In product management, it’s called <a href="https://en.wikipedia.org/wiki/Minimum_viable_product">MVP</a>.</p><p>In Agile, it’s called <a href="https://leankit.com/learn/kanban/continuous-improvement/">continuous improvement</a>.</p><p>In reality all this — everything — is design. Whether you’re designing a product, a process or even your life, it’s all design.</p><p>Coding up a UI component? Just build it and worry about abstraction later. Once you’ve learned more about what’s worth abstracting.</p><p>Facilitating and managing the delivery process? Add just as much process as you need and no more. Ask your team how it went. And improve.</p><p>Enhancing something with Javascript? Build the degraded version first and see if it’s good enough. You might surprise yourself.</p><p>Living life? Try and <a href="https://medium.com/the-mission/the-1-rule-for-creating-all-habits-53aa3f10bc5d#.8n48coaus">improve something small just 1% per day</a>.</p><p>We get excited by more. We get excited by complexity. We get excited by the idea that something can be perfect but there is no such thing.</p><p><em>Done</em> is better than perfect.</p><p>I get excited by doing something that didn’t need complexity. That didn’t need more. That <em>less</em> was enough, that <em>less</em> was <em>better</em>.</p><p>It’s a constant practice, a habit to form, a mindset to nurture.</p><p>The trick is to practice continuous improvement.</p><p>Then after you’re done you can <em>iterate</em>. The next smallest improvement creates momentum. Then you’re done again.</p><p>Then you’re in a flow of done.</p><p>Then you’re in a flow of learning (from users).</p><p>Then you’ve achieved momentum.</p><p>Then it’s just the way you do things.</p><p>The users might be your team members following a process.</p><p>They might be your fellow developers trying to use your code.</p><p>And, of course, people using your product.</p><p>When you do more, you spread yourself thinly. You widen your focus and you do it to a lower standard. You learn fewer things, over a longer period of time and get stressed. That’s not a recipe for success.</p><p>Anyway, this email is my MVP. Time to press send.</p><p>If you unsubscribe, that’s okay. For one I got it done. For two I can learn to iterate and write you a better email next time.</p><h4>Hi, I want you to <a href="http://adamsilver.io/signup">sign up</a> to my newsletter so that I can send you articles just like this.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7e6bf22bb5f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/less-but-better-a7e6bf22bb5f">Less but better</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Semantic class names: are you being too generic?]]></title>
            <link>https://medium.com/simple-human/semantic-class-names-are-you-being-too-specific-or-too-generic-4a24c9304c2c?source=rss----1173c96131a0---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a24c9304c2c</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Adam Silver]]></dc:creator>
            <pubDate>Mon, 31 Oct 2016 08:29:16 GMT</pubDate>
            <atom:updated>2016-12-05T10:08:05.903Z</atom:updated>
            <content:encoded><![CDATA[<p>Make no mistake. Naming class names is difficult. It’s no coincidence that I discuss semantic class names early on in <a href="http://maintainablecss.com/">MaintainableCSS</a>.</p><p>In that chapter, I explain that you should name your module based on what it is. Not what it looks like or how it behaves. Even if you’re sold on the rational, there’s still plenty of room for error.</p><p>Even if you avoid stylistic and behavioural class names, you can still get your knickers in a twist. In my experience, your class names will be either too generic or too specific.</p><p>Most developers choose generic class names. In theory, this is a good because the more generic the class name, the more reusable it is. In reality it’s not so simple.</p><p>To show you what I mean we’ll build a login form together. This form consists of an email and password field.</p><p>To start, you could name these fields as follows:</p><pre>&lt;div class=”loginForm”&gt;<br>  &lt;form&gt;<br>    &lt;div class=”loginForm-email”&gt;<br>      &lt;label&gt;…&lt;/label&gt;<br>      &lt;input type=”email”&gt;<br>    &lt;/div&gt;<br>    &lt;div class=”loginForm-password”&gt;<br>      &lt;label&gt;…&lt;/label&gt;<br>      &lt;input type=”password”&gt;<br>    &lt;/div&gt;<br>  &lt;/form&gt;<br>&lt;/div&gt;</pre><p>These class names are specific and coupled to the login form module. This is good because you can style this form without affecting other forms.</p><p>Also, you could style this form to be consistent with the other forms on your site. Either by using a mixin or by comma-delimitting selectors:</p><pre>.loginForm,<br>.someOtherForm {<br>  /* Common styles for container */<br>}</pre><pre>.loginForm-email,<br>.loginForm-password,<br>.someOtherForm-someField {<br>  /* Common styles for fields */<br>}</pre><p>Depending on the site, you may end up with a lot more CSS which seems a bit unnecessary.</p><p>For example, you could name the fields more generically. Perhaps .loginForm-field would work better.</p><p>This still seems too specific because they’re unnecessarily tied to the module. But these styles are worthy of being modules, as they’ll look the same across all forms. After-all consistency is an aspect of good design.</p><p>If we make both of these fields the same module, then we should probably name that module .formField.</p><p>All three of the class names follow the MaintainableCSS principles. But they have significant differences in how they impact the maintainability of your codebase.</p><p>Let’s find some more problems with this generic, reusable .formField module.</p><p>What if there are some occasions that need a slightly different .formField such as one that must accommodate a hint? And, what if each field that has a hint needs extra or different styles?</p><p>This is where <a href="http://maintainablecss.com/chapters/modifiers/"><strong>modifiers</strong></a> come in. You add an extra class name to the element and make the required tweaks.</p><pre>&lt;div class=”someForm”&gt;<br>  &lt;div class=”formField”&gt;<br>    &lt;label&gt;…&lt;/label&gt;<br>    &lt;input type=”text”&gt;<br>  &lt;/div&gt;<br>  &lt;div class=”formField formField-withHint”&gt;<br>    &lt;label&gt;…&lt;/label&gt;<br>    &lt;p&gt;The hint goes here&lt;/p&gt;<br>    &lt;input type=”text”&gt;<br>  &lt;/div&gt;<br>&lt;/div&gt;</pre><p>In this example we just need a few tweaks but what if we had something more significant, such as a field that contains a set of radio buttons?</p><p>Using a modifier is problematic because there is little to inherit. When we were thinking about .formField we didn’t consider radio buttons at all did we?</p><p>This isn’t a bad thing. In fact, I think in many ways this is a good thing. Often we can trip ourselves up trying to combine different things into one before we understand the requirements of a design system.</p><p>Technically speaking, you could name all elements .item because everything <em>is</em> an “item”, but this is not practical or useful.</p><p>A set of radio buttons is different to a text field. It would have a legend, a fieldset, and a different look and feel. In reality, they are so different that despite both being form fields, we shouldn’t consider them to be the same. <strong>And this is a major point worth pondering over.</strong></p><p>It is at this point that it becomes clear that .formField is too generic. I certainly don’t want to update styles for a set of radios, and worry that I will regress styles in a text field. I also don’t wish to work out the few bits of commonality between these two entities to shave a little CSS.</p><p>So where does this leave us?</p><p>We’ve gone from too specific to too generic, and we are trying so hard to do a good job.</p><p>If .formField is too generic and .loginForm-email (and .loginForm-field) is too specific then where do we go from here?</p><p>Having navigated through these problems in detail, it is much easier to work out a better name. It would make sense to call the text field .textField and the radio group field .radioGroupField and just treat them as the distinct modules they are.</p><p>They are specific enough to be able to differentiate, yet they are generic enough so the we can use them many times across several forms, without writing unnecessary CSS.</p><p>The <em>real</em> problem is that we face decisions like these all the time. We have to rigorously and frequently consider these problems.</p><p>This is why I sway towards being too specific because I’d rather have a little more CSS with the flexibility to style elements consistently or differently (whatever the case may be), than to get caught up with overrides and regression. I am not saying this is “perfect”. But that’s why I do it and why I advise it.</p><p>Being specific also gives you the time to learn what is worth abstracting and what isn’t. You might come to learn that even .textField is too generic in that you might have many different types of text fields that are better off being their own modules, you might not.</p><p>The takeaway here is to think and ask questions frequently and rigorously:</p><h4><strong>1. What if a module is used in lots of places but sometimes it can look a bit different for reasons such as proximity, location, contents etc?</strong></h4><p>In this case, you’ll probably benefit from a modifier.</p><h4><strong>2. What if a component can be used frequently, pretty much as is, elsewhere?</strong></h4><p>In this case, abstract into a module but be careful not to name it too generically.</p><h4><strong>3. What if you’re spending a lot of time writing many different modifiers or working out what to abstract as common styles?</strong></h4><p>In this case, it’s probably named too generically. Split up into separate dedicated modules.</p><h4>Summary</h4><p>The process of naming is challenging, but after all, it is just a name and as you can see, the benefits (or consequences) of naming are quite far reaching. The good news is that if you’re conscious from the beginning, you can avoid the problems that are born out of either being too generic or too specific.</p><p><em>P.S. I first sent this out to my private email list. If you want in, you can </em><a href="http://adamsilver.io/signup"><strong><em>subscribe here</em></strong></a><strong><em>.</em></strong></p><p><em>Thanks for reading — if you enjoyed it, please hit the ♥ button below.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a24c9304c2c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simple-human/semantic-class-names-are-you-being-too-specific-or-too-generic-4a24c9304c2c">Semantic class names: are you being too generic?</a> was originally published in <a href="https://medium.com/simple-human">Simple = Human</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>