<?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[Stories by Tiago Romero on Medium]]></title>
        <description><![CDATA[Stories by Tiago Romero on Medium]]></description>
        <link>https://medium.com/@themindfuldev?source=rss-a9cf8b3432bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SyZFIIBO7yFqMoeE49HMGg.png</url>
            <title>Stories by Tiago Romero on Medium</title>
            <link>https://medium.com/@themindfuldev?source=rss-a9cf8b3432bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:19:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@themindfuldev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Pragmatic rules of web accessibility that will stick to your mind]]></title>
            <link>https://medium.com/free-code-camp/pragmatic-rules-of-web-accessibility-that-will-stick-to-your-mind-9d3eb85a1a28?source=rss-a9cf8b3432bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d3eb85a1a28</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[inclusion]]></category>
            <dc:creator><![CDATA[Tiago Romero]]></dc:creator>
            <pubDate>Wed, 17 Oct 2018 16:00:50 GMT</pubDate>
            <atom:updated>2018-10-17T19:40:23.894Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8wSWsgY5iNzLCqNOIdRIQ.jpeg" /><figcaption>&quot;The Paralympic Games is about transforming our perception of the world.&quot; — Stephen Hawking<br>The same could be thought for <strong>web accessibility</strong>.</figcaption></figure><p>I first started to work with web accessibility back in 2015, at an American retail giant. It had just gotten a hefty lawsuit, as its website failed to comply with the Americans with Disabilities Act (ADA). After that happened, my team and I worked extensively on the ADA compliance, when I was introduced to many web accessibility principles.</p><p>However, over the next years, I found myself constantly violating such principles, even though I was regularly working with them. Somehow, I would never remember them properly while I was coding. I wouldn&#39;t admit it, but I definitely had not fully internalized these principles.</p><p>Eventually, I decided that the time had come to invest my time into boiling things down into simple, pragmatic rules which are easy to remember. I finally did just that, and they have been working quite well for me ever since.</p><p>This article has 2 sections: <a href="#138c">What is web accessibility?</a> and <a href="#13e5">3 pragmatic rules of web accessibility</a>. In the first section, I give a refresher on web accessibility and share my experience with it. But if you would rather cut to the chase, then just go straight to the second session: <a href="#13e5">3 pragmatic rules of web accessibility</a>.</p><h3>What is web accessibility?</h3><p>As I mentioned, back in 2015 my company got sued for not complying with the ADA.</p><p>The <a href="https://www.ada.gov/">ADA</a> is a civil rights law that</p><blockquote><em>“prohibits discrimination against individuals with disabilities in all areas of public life, including jobs, schools, transportation, and all public and private places that are open to the general public”</em>.</blockquote><p>This way, the ADA requires that <strong>businesses, state and local governments, and nonprofit services providers</strong> make accommodations for the disabled public to access the same services as able-bodied patrons. Similarly, <strong>federal government agencies</strong> are required to comply with a federal law called <a href="https://www.section508.gov/">Section 508</a>.</p><p>In the context of the web, any public website in the USA failing to comply with the ADA or Section 508 is in reality excluding several groups of users with varying degrees of impairments.</p><p>On the other hand, the inclusive practice of making a website&#39;s content available to everyone and its functionality able to be operated by anyone is understood as <a href="http://en.wikipedia.org/wiki/Web_accessibility">web accessibility</a>, or just <a href="https://a11yproject.com/posts/a11y-and-other-numeronyms/">a11y</a>.</p><h4>Who can be supported by a11y?</h4><p>According to the <a href="http://www.who.int/disabilities/world_report/2011/report/en/">World Report on Disability</a>, published in 2011 by the <a href="http://www.who.int/">World Health Organization</a> (WHO), it is estimated that 15% of the global population lives with some form of disability. Of these, 2 to 4% experience significant difficulties in functioning.</p><p>An excellent article by the great <a href="https://medium.com/u/2508e4c7a8ec">Addy Osmani</a>, <a href="https://medium.com/@addyosmani/accessible-ui-components-for-the-web-39e727101a67">Accessible UI Components For The Web</a>, spells out the four major areas of disabilities to be considered in the context of a11y:</p><p><strong>1. Visual issues:</strong> can range from an inability to distinguish colors to no vision at all.</p><p><strong>2. Hearing issues:</strong> means a user may have issues hearing sound emitted from a page.</p><p><strong>3. Mobility issues:</strong> can include the inability to operate a mouse, a keyboard, or touch-screen.</p><p><strong>4. Cognitive issues:</strong> means a user may require assistive technologies to help them with reading text, so it’s important to ensure text alternatives exist.</p><p>Keep in mind these are very broad ranges of impairments. This means that one doesn&#39;t need to have a severe impairment to need a11y support.</p><p>In order to learn more, I recommend taking the <a href="https://www.udacity.com/course/web-accessibility--ud891">Web Accessibility</a> free course on Udacity, by Google. Here is a video from the course that covers these areas of disability:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLdVlbO7_hz8%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLdVlbO7_hz8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLdVlbO7_hz8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5a9db71a1c508dbbaf24c3e3dd94fda/href">https://medium.com/media/d5a9db71a1c508dbbaf24c3e3dd94fda/href</a></iframe><h4>Alright, so how can we provide a11y support?</h4><p>By the time we got the lawsuit in 2015, there had been an audit which found several a11y issues. Our team went through a day-long accessibility training session, where we learned about the <a href="https://www.w3.org/TR/WCAG21/">Web Content Accessibility Guidelines</a> (WCAG, currently at version 2.1), which are generally accepted as the standard for a11y compliance.</p><p>The WCAG are maintained by the <a href="https://www.w3.org/WAI/">Web Accessibility Initiative</a> (WAI) of the <a href="https://www.w3.org/">World Wide Web Consortium</a> (W3C). The same group authored the <a href="https://www.w3.org/TR/wai-aria-1.1/">Accessible Rich Internet Applications</a> (WAI-ARIA or simply ARIA, currently at version 1.1), which is a specification on how to increase the a11y of web pages through additions to HTML as roles and ARIA attributes.</p><p>These guidelines are categorized into three levels of compliance:</p><ul><li>A (must support)</li><li>AA (should support) and</li><li>AAA (may support).</li></ul><p>Many of the accessibility laws around the world are based on WCAG levels. For instance, in January 2017, Section 508 adopted conformance with level AA of WCAG 2.0.</p><p>A great summary of the guidelines can be found at <a href="https://webaim.org/standards/wcag/checklist">WebAIM’s WCGA 2 checklist</a>, where each criteria indicates its corresponding compliance level.</p><h4>How hard is it to learn WCAG and WAI-ARIA?</h4><p>I would like to take a moment to share my experience of learning a11y.</p><p>While our training was quite comprehensive, and given by extremely knowledgeable people, we simply sat there for hours while we reviewed the entire WCAG specification, item by item. Their slide deck was humongous, and we moved swiftly through the slides. I will be honest: It was cumbersome, since the WCAG is definitely not small.</p><p>Long story short, we were able to write down many action items, and we immediately started working on these fixes. However, this soon became something repetitive, mechanical, a response to stimuli. Stories in, code out. We were drowning in the sea of a11y.</p><p>Everybody knew how well-versed we became in a11y, so nobody would contest our work. The a11y stories stopped to come in, and we got different priorities. The expectation was that we would carry over what we had learned, which actually happened for quite a while.</p><p>As time passed, some people left, some people joined, and the new management came in. The market moves fast. We changed our focus and our team spirit. Needless to say, we became so involved with the new things that our a11y compliance slipped far into the background.</p><p>It was so bad, that six months later we had another audit, only to discover we were still sitting in a big pile of a11y violations! We soon realized that while we fixed the original audited issues, <strong>most of the new code we wrote was just as bad on a11y</strong>. Not only that, we never adopted a11y as part of our development checklist, and the newcomers were never trained on the subject.</p><p><strong>Conclusion</strong>: We simply allowed it to happen — a11y was being neglected, and the key ideas were not ingrained in us.</p><p>In other words, we were creating <strong>exclusions</strong>, which is what happens when we solve problems using our own biases, according to <a href="https://www.microsoft.com/design/inclusive/">Microsoft Inclusive Design</a>.</p><h4>Experiencing an exclusion</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PrdvH8QWWSO4296p_3eREg.jpeg" /><figcaption>“Exclusion is never the way forward on our shared paths to freedom and justice.” — Desmond Tutu</figcaption></figure><p>Sometimes you need to experience things yourself in order to better understand them. That&#39;s what happily happened to me.</p><p>I donate my platelets regularly, since my blood type is A+, so I can help more people this way. Once, my vein got perforated incorrectly and I got a big and painful bruise on my left arm.</p><p>Typically, regular blood donations last 10 minutes or so, but platelet donations last around 90 minutes. It took us about 20 minutes to notice that I had a blown vein, since my arm was covered with blankets (because blood returns make you feel cold).</p><p>By that time, the damage was done, and we had to interrupt the donation. My arm got quite bloated and very sensitive for a few days. So much that I didn&#39;t feel like using my left arm at all to work.</p><p>Now, I was trying to do everything with my right hand. All of a sudden, I noticed it wasn’t efficient to keep alternating between keyboard and mouse, and I would rather do the whole task at hand using just the keyboard or the mouse.</p><p>Soon, I found myself preferring to use exclusively the keyboard for everything, and then I noticed how many sites are simply not there on keyboard support. Then it came to me: I was experiencing an exclusion, even though it was just a <strong>temporary </strong>one.</p><p>And then, exactly at that moment, I remembered the past me working with a11y and letting these exclusions pass. Oh, man!</p><h4>Levels of exclusions</h4><p>According to <a href="https://www.microsoft.com/design/inclusive/">Microsoft&#39;s Inclusive 101 Toolkit</a>, there are three levels of exclusions:</p><ol><li><strong>Permanent: </strong>experienced by those who have a disability such as loss of limb, sight, hearing, or speech.</li><li><strong>Temporary:</strong> experienced by those who have a short-term injury or are going through certain events for a short time, such as looking into a bright light, wearing a cast, or ordering dinner in a foreign country.</li><li><strong>Situational: </strong>experienced by those whose abilities can dramatically change in specific environments, such as being unable to hear well in a loud crowd, being visually impaired in a car, or new parents doing tasks one-handed.</li></ol><p>It was extremely mind opening for me to have a temporary exclusion, since I had never been faced before with such a challenge at work.</p><p>Nevertheless, I am tremendously privileged since mine was just for a couple of days, while millions of people around the world experience permanent exclusions for their entire lives.</p><h4>Coding for change</h4><p>Finally, it came to me: Implementing a11y means contributing to a <strong>more inclusive world</strong>! Here are a few things we can do as engineers:</p><ul><li>Learning how to write code that supports a11y.</li><li>Adding a11y compliance as part of your development checklist (just like you would work on unit testing and documentation).</li><li>Talking about a11y with your team, to increase the awareness.</li><li>Assessing if your team is producing accessible code, and logging a11y issues as defects to be taken up by the team.</li><li>Questioning business requirements which are not covering a11y and demanding accessible alternatives.</li><li>Sharing your experience, and showing your peers how to adopt a11y in a practical way, which is the very reason why I am writing this article. :)</li></ul><h3>3 pragmatic rules of web accessibility</h3><p>So here am I with my mission to distill a11y into 3 practical rules that will stick to your mind. From these rules, you should be able to derive the rest of the knowledge and find guidance on implementing a11y in your project.</p><p><strong>Disclaimer:</strong> These rules don&#39;t replace the need to learn a11y. They are also not comprehensive. They simply will provide you a basic yet effective foundation, so you can follow the rest of path on your own.</p><p>Again, in order to learn a11y I wholeheartedly recommend taking the <a href="https://www.udacity.com/course/web-accessibility--ud891">Web Accessibility</a> free course on Udacity, by Google:</p><p><a href="https://www.udacity.com/course/web-accessibility--ud891">Web Accessibility | What is Web Accessibility? | Free Courses | Udacity</a></p><p>Now to the 3 pragmatic rules of web accessibility. I hope you can take them with you and apply them every day at work:</p><h4>1) Insist on semantic HTML elements, or DIY</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YNNi0BjugGN3ouENt2g-Dw.jpeg" /><figcaption>&quot;The Semantic Web isn’t inherently complex. The Semantic Web language, at its heart, is very, very simple. It’s just about the relationships between things.&quot; — Tim Berners-Lee</figcaption></figure><p>This one is for me the <strong>golden rule of accessibility</strong>, hands down.</p><p><strong>Semantic</strong> elements are these which convey a certain meaning along with the content they represent, like &lt;button&gt;, &lt;input&gt;, &lt;a&gt;, &lt;h1&gt; and &lt;p&gt;. They provide some context to the user agent (browser, device or assistive technology like a screen reader), so it will know how to interact with and what to expect of these elements.</p><p>They are different than <strong>neutral </strong>elements, such as &lt;div&gt; and &lt;span&gt;, or <strong>presentational</strong> elements like &lt;center&gt; and &lt;big&gt;, which do not provide such context to the user agent.</p><p>Semantic elements are already accessible (and SEO-friendly) for the most part. This means they already cover many a11y aspects out of the box, like:</p><ul><li>handling of <strong>focus</strong> properly through the tab key.</li><li>responding to <strong>keyboard events</strong> (as Enter, Esc, space, arrow keys).</li><li>representing <strong>semantic</strong> information (Name, Role, State and Value) so assistive technology will be able to understand it.</li><li>conforming to <strong>color contrast</strong> requirements with default styling.</li></ul><p>However, when not using a semantic element, <strong>you are supposed to manually code all of these things in order to make it accessible</strong>.</p><p>Which means you would need to do things like:</p><ul><li>add tabindex=&quot;0&quot; so the component will be part of the natural tab order, and use focus(), display: none or aria-hidden to avoid focus traps. Learn about tabindex on <a href="https://developers.google.com/web/fundamentals/accessibility/focus/using-tabindex">Using tabindex</a>.</li><li>attach listeners for expected <strong>keyboard events</strong>. Check the expectations for your component on <a href="https://www.w3.org/TR/wai-aria-practices-1.1/#aria_ex">WAI-ARIA Design Patterns and Widgets</a>.</li><li>use a <strong>role</strong> to provide some semantics and SEO value. Learn all the possible roles on <a href="https://www.w3.org/TR/wai-aria-1.1/#roles_categorization">WAI-ARIA Categorization of Roles</a>.</li><li>provide <strong>ARIA attributes</strong> to describe the state and value. Find out which ARIA attributes apply each role on <a href="https://www.w3.org/TR/wai-aria-1.1/#role_definitions">WAI-ARIA Definition of Roles</a>.</li><li>watch out for the <strong>color contrast</strong> and the <strong>focus indicator</strong>, especially if using outline: 0 (which is not recommended).</li></ul><p>Still on semantic elements, here are a few more things to keep in mind:</p><ul><li>use <a href="https://www.w3.org/TR/wai-aria-practices/examples/landmarks/HTML5.html">sectioning tags</a> to structure your page into sections, otherwise you need to provide landmark roles.</li><li>use <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements">heading tags</a> to organize your text content, so you can express the relationship between sections and their order of importance. For the record: There must be only one &lt;h1&gt; on each page.</li><li>use &lt;label for=&quot;...&quot;&gt; with form fields as &lt;input&gt;, &lt;select&gt; and &lt;textarea&gt;.</li><li>use the right tool for the job, for instance if it’s a link, use &lt;a href=&quot;&quot;&gt; and never &lt;span onclick=&quot;...&quot;&gt;, and if it’s a button, use &lt;button&gt; and never &lt;a href=&quot;#&quot; onclick=&quot;...&quot;&gt;.</li></ul><p>Well, semantic elements seem way more convenient, don’t you think?</p><h4>2) Provide alternatives for images, color, sound and movement</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MhrobCU9QTezLtLUFPGHpQ.jpeg" /><figcaption>&quot;Painting is just another way of keeping a diary.&quot; — Pablo Picasso</figcaption></figure><p>Assistive technology deals best with text. When using anything else, always provide a text alternative, for instance:</p><ul><li>For images, provide a <strong>text alternative</strong>. You can use alt=&quot;description&quot; for <strong>informative images</strong> (those which have a meaning, like a picture or a standalone icon) and alt=&quot;&quot; for <strong>decorative images</strong> (those which don’t have a meaning, like an icon inside a button and right next to its text). This is especially important on image links.</li><li>Still on images, when relying on them for user interaction, provide an <strong>audio alternative</strong>, or explore how to stop relying on them. You can check <a href="https://www.google.com/recaptcha/intro/v3beta.html">Google reCaptcha</a>, for instance.</li><li>For colors, when indicating a validation state, a designated area or simply distinguishing elements, add a <strong>secondary indicator</strong> such as informative text, an icon or even a tooltip.</li><li>Still on colors, find out the <strong>contrast ratio</strong> of your text and check if it meets the standard you are following. For instance, the level AA of the WCAG requires a minimum of 4.5:1 for regular text and 3:1 for large text.</li><li>For audio tracks and video, provide <strong>text captions</strong> or a <strong>transcript</strong> when they are available. For action sounds, provide a <strong>visual alternative</strong>.</li><li>For user movement, any time we expect the user to perform specific gesture movements, make them <strong>optional</strong> or provide <strong>interaction alternatives</strong> through the keyboard.</li><li>For automatic movement, avoid flashes, blinking, moving content, and new windows. When it’s unavoidable, add <strong>controls</strong> to adjust the time, pause or hide this content. Also, use <a href="https://www.w3.org/TR/wai-aria-1.1/#aria-live">aria-live</a> so the screen reader can notify the user whenever an interruption happen.</li></ul><h4>3) Make it a habit to use a11y tools into your work routine</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tfk2GQ_VqsCsAKHbVnGEYA.jpeg" /><figcaption>&quot;We shape our tools and then our tools shape us.&quot; — Marshall McLuhan</figcaption></figure><p>This is perhaps the most efficient rule, so when you let something pass from the two rules above, this one should catch it.</p><p>I am listing here several a11y tools. Give them a try, run them on your website, see what you learn from them and try to stick around with them.</p><p>There are basically 3 types of tools I recommend that you adopt:</p><p><strong>a) For your development checklist</strong></p><ul><li><a href="https://chrome.google.com/webstore/detail/lhdoppojpmngadmnindnejefpokejbdd">aXe chrome plugin</a>: An easy-to-use a11y checker which finds issues and provides suggested fixes.</li><li><a href="https://chrome.google.com/webstore/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh?hl=en-US">Wave</a>: An a11y evaluation tool which provides visual feedback about the accessibility of your web content by injecting icons and indicators into your page.</li><li><a href="https://developers.google.com/web/updates/2018/01/devtools#a11y">DevTools (Accessibility pane, Contrast ratio and Audits)</a>: These 3 DevTools features allow to navigate the accessibility tree and see a11y properties for each element, to verify the color contrast ratio for text elements, and to perform full-page audits on accessibility (and other metrics).</li><li><a href="https://chrome.google.com/webstore/detail/nocoffee/jjeeggmbnhckmgdhmgdckeigabjfbddl">NoCoffee chrome plugin</a>: Simulates the problems faced by people with slight to extreme vision problems.</li><li><a href="https://chrome.google.com/webstore/detail/high-contrast/djcfdncoelnlbldjfhinnjlhdjlikmph">High Contrast chrome plugin</a>: Lets you browse the web with your choice of several high-contrast color filters designed to make it easier to read text, so you can check how your website fares for users that need high-contrast support.</li></ul><p><strong>b) For manually testing with real screen readers</strong></p><ul><li>Mac <a href="https://www.apple.com/voiceover/info/guide/_1124.html">VoiceOver</a> (included in macOS).</li><li>Windows <a href="https://www.nvaccess.org/download/">NVDA</a> (free) and <a href="http://www.freedomscientific.com/Products/Blindness/JAWS?gclid=CjwKCAiA8vPUBRAyEiwA8F1oDDzHAjW9-GfooiNT3sCDcTg_7LNXvHz4XL7osONDyf3Y4k9KRbcuihoCKGMQAvD_BwE">JAWS</a> (paid).</li></ul><p><strong>c) For automated auditing</strong></p><ul><li><a href="https://www.npmjs.com/package/lighthouse">Google Lighthouse</a>: Automated auditor, similar to DevTools Audits.</li><li><a href="https://www.npmjs.com/package/axe-core">aXe</a>: Automated checker for the same a11y rules found on aXe chrome plugin.</li><li><a href="https://github.com/pa11y/pa11y-dashboard">Pa11y Dashboard</a>: A web interface which helps you monitor the accessibility of your websites.</li></ul><h4>Learn more</h4><ul><li><a href="https://www.logicsolutions.com/508-ada-wcag-accessibility-difference/">508, ADA, WCAG: What’s the difference?</a></li><li><a href="http://www.who.int/disabilities/world_report/2011/report/en/">WHO&#39;s World Report on Disability</a></li><li><a href="https://medium.com/@addyosmani/accessible-ui-components-for-the-web-39e727101a67">Accessible UI Components For The Web</a></li><li><a href="https://www.microsoft.com/design/inclusive/">Microsoft Inclusive Design</a></li><li><a href="https://www.udacity.com/course/web-accessibility--ud891">Web Accessibility free course on Udacity, by Google</a></li><li><a href="https://webaim.org/standards/wcag/checklist">WebAIM’s WCGA 2 checklist</a></li><li><a href="https://developers.google.com/web/fundamentals/accessibility/focus/using-tabindex">Using tabindex</a></li><li><a href="https://www.w3.org/TR/wai-aria-practices-1.1/#aria_ex">WAI-ARIA Design Patterns and Widgets</a></li><li><a href="https://www.w3.org/TR/wai-aria-1.1/#roles_categorization">WAI-ARIA Categorization of Roles</a></li><li><a href="https://www.w3.org/TR/wai-aria-practices/examples/landmarks/HTML5.html">HTML5 Sectioning Elements</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d3eb85a1a28" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/pragmatic-rules-of-web-accessibility-that-will-stick-to-your-mind-9d3eb85a1a28">Pragmatic rules of web accessibility that will stick to your mind</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A brief review of Scoping and Hoisting in JavaScript]]></title>
            <link>https://medium.com/free-code-camp/a-brief-review-of-scoping-and-hoisting-in-javascript-e74c38283b65?source=rss-a9cf8b3432bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/e74c38283b65</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Tiago Romero]]></dc:creator>
            <pubDate>Mon, 10 Sep 2018 18:43:19 GMT</pubDate>
            <atom:updated>2018-09-11T02:08:48.722Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZyXTRpRSpg2rfqmzJgpJmw.jpeg" /><figcaption>Hoisting is common to both Mariners and Javascript developers.</figcaption></figure><p>I bet that any JavaScript developer would want a better understanding of the concepts of Scoping and Hoisting. They can silently produce these dreaded unexplainable problems, also known as side-effects.</p><p>In a nutshell, scoping and hoisting effect how the code we write will deal with our declarations (such as var, let, const and function).</p><p>Let&#39;s begin our recap with the first of them: var.</p><h3>Dealing with var</h3><p>When using var to declare your variables, the parent function where you declare your vars inside is your only <em>de facto</em> scope delimiter. This way, the parent function creates and holds the scope for all the local variables declared within itself.</p><p>In other words, inside the parent function, the local variables are born, they do their work and when the function execution ends, they also die off (unless they are passed to some other function that outlives the parent function).</p><p>This is the definition of <strong>Local Scope. A</strong>s opposed to <strong>Global Scope</strong>, when the variables are declared outside your function. They are accessible by everyone and everywhere. They are omnipresent like the air we breathe, or like the window object in the browser.</p><p>Hence, other code blocks as conditionals and loops (such as if, for, while, switch and try) do not delimit scope, unlike most other languages.</p><p>Then, any var inside these blocks will be scoped within their parent function which contains that block.</p><p>Not only that, but during runtime, every var declaration that is found inside such code blocks gets moved to the beginning of its parent function (its scope). This is the definition of <strong>Hoisting</strong>.</p><p>That being so, you shouldn’t declare a var within a block and think this var is not leaking outside, because it might be!</p><p>Here is an example:</p><pre>function stepSum() {<br>  var total = 0;</pre><pre>  for (var i = 0; i &lt; arguments.length; i++) {<br>    var parameter = arguments[i]; <br>    total += parameter;<br>    console.log(`${i}) adding ${parameter}`);<br>  }</pre><pre>  // outside the loop, we can still access vars i and parameter<br>  // even though the were declared within the for loop<br>  console.log(`i=${i}, parameter=${parameter}`);<br>  return total;<br>}</pre><pre>console.log(`total=${stepSum(3, 2, 1)}`);</pre><p>The output is:</p><pre>0) adding 3<br>1) adding 2<br>2) adding 1<br>i=3, parameter=1<br>total=6</pre><p>Here, we can observe that the vars i and parameter are leaking, since they both can be accessed from the parent function. That’s because they were hoisted up there, just if they were declared like this:</p><pre>function stepSum() {<br>  var total = 0;<br>  var i;<br>  var parameter;</pre><pre>  for (i = 0; i &lt; arguments.length; i++) {<br>    parameter = arguments[i]; <br>    total += parameter;<br>    console.log(`${i}) adding ${parameter}`);<br>  }</pre><pre>  console.log(`i=${i}, parameter=${parameter}`);<br>  return total;<br>}</pre><pre>console.log(`total=${stepSum(3, 2, 1)}`);</pre><p>To avoid any confusion, it is a common practice to declare vars in the first lines of the parent function. This is done to avoid false expectations for any var which may get declared somewhere down the function but happened to have hold a value before that.</p><p>This is a source of confusion for programmers coming from languages with block scope (such as C or Java). They usually declare their vars right when they are about to make their first use.</p><h4>Issues with var</h4><p>Let’s consider this code snippet. It is similar to the last one, except it calculates each sum asynchronously:</p><pre>function stepSum() {<br>  var total = 0;</pre><pre>  for (var i = 0; i &lt; arguments.length; i++) {<br>    var parameter = arguments[i];</pre><pre>    setTimeout(function() {<br>      total += parameter;<br>      console.log(`${i}) adding ${parameter}, total=${total}`);<br>    }, i*1000);<br>  }<br>}</pre><pre>stepSum(3, 2, 1);</pre><p>The output is:</p><pre>3) adding 1, total=1<br>3) adding 1, total=2<br>3) adding 1, total=3</pre><p>Why did it happen? It is summing up just the last parameter 1, for three times. And also the step count is always on 3, where we would expect to see 1, 2 and 3. What is wrong here?</p><p>The answer follows: the vars i and parameter got hoisted to the beginning of the stepSum function, and now they are available for the whole parent function. More than that, parameter is actually being defined just once, and then it is being re-assigned on each iteration of the for loop.</p><p>Given that we are using setTimeout calls here, we can expect now that when this function executes for the first time (after a second), the stepSum function will be already finished. So parameter ended up with the value of its last assignment, which is from the last iteration of the for loop, when it was set to 1. The same thing with i finishing up with value 3.</p><p>That’s why these values are being picked up when the 3 setTimeout calls get ultimately executed.</p><p>How can we fix it? Simply by making good usage of scoping and hoisting. We can provide a new function scope to protect i and parameter from being reassigned. This creates a local scope just for them. Perhaps by using something other than var which can also give us a local scope within a block, as we can see next.</p><h3>Dealing with let and const</h3><p>ES2015 introduced let and const which are variables that do respect the block scope. This means they are safe to be declared within a block and won’t leak outside, as the following example:</p><pre>function stepSum() {<br>  let total = 0;</pre><pre>  for (let i = 0; i &lt; arguments.length; i++) {<br>    const parameter = arguments[i]; <br>    total += parameter;<br>    console.log(`${i}) adding ${parameter}`);<br>  }</pre><pre>  // outside the loop, we can no longer access i and parameter<br>  console.log(`i=${i}, parameter=${parameter}`);<br>  return total;<br>}</pre><pre>console.log(`total=${stepSum(3, 2, 1)}`);</pre><p>The output is:</p><pre>0) adding 3<br>1) adding 2<br>2) adding 1<br>Uncaught ReferenceError: i is not defined<br>  at stepSum (&lt;anonymous&gt;:10:20)<br>  at &lt;anonymous&gt;:13:1</pre><p>Ok, so now that we learned how to prevent leaking and protect variables within a block scope, let’s try them out!</p><p>Back to the setTimeout issue above, we can now use let and const to fix our problem:</p><pre>function stepSum() {<br>  let total = 0;</pre><pre>  for (let i = 0; i &lt; arguments.length; i++) {<br>    const parameter = arguments[i];</pre><pre>    setTimeout(function() {<br>      total += parameter;<br>     console.log(`${i}) adding ${parameter}, total=${total}`);<br>    }, i*1000);<br>  }<br>}</pre><pre>stepSum(3, 2, 1);</pre><p>Voilà, now the output is what we expect:</p><pre>0) adding 3, total=3<br>1) adding 2, total=5<br>2) adding 1, total=6</pre><p>Keep in mind that we have created one pair of i and parameter variables for each iteration of the for loop. Compare this to before when we just had one single i and parameter being rewritten each time. This matters a little bit for memory consumption.</p><p>Finally, since we also created the setTimeout callback function within the same scope, they will co-live with the protected values of i and parameter. Block scope will remain preserved even after stepSum finished executing.</p><h3>Dealing with functions</h3><p>Here&#39;s something noteworthy: declaring a function is different than declaring a var and assigning a function to it.</p><p>For instance, here is an example of declaring a function after it was used, to understand how hoisting works. This is valid JavaScript:</p><pre>console.log(`total=${stepSum(3, 2, 1)}`);</pre><pre>function stepSum(...args) {<br>  let total = 0;</pre><pre>  args.forEach((parameter, i) =&gt; { <br>    total += parameter;<br>    console.log(`${i}) adding ${parameter}`);<br>  });</pre><pre>  return total;<br>}</pre><p>The output is:</p><pre>0) adding 3<br>1) adding 2<br>2) adding 1<br>total=6</pre><p>Why did that work? Because the function stepSum was completely hoisted before it was used.</p><p>However, declaring it as a var causes an error:</p><pre>console.log(`total=${stepSum(3, 2, 1)}`);</pre><pre>var stepSum = function(...args) {<br>  let total = 0;</pre><pre>  args.forEach((parameter, i) =&gt; { <br>    total += parameter;<br>    console.log(`${i}) adding ${parameter}`);<br>  });</pre><pre>  return total;<br>}</pre><p>The output is:</p><pre>Uncaught TypeError: stepSum is not a function<br>  at &lt;anonymous&gt;:1:22</pre><p>Why did it break?</p><p>The difference here is that when a function is hoisted, its body is also hoisted. Compared to when a var is hoisted, only its declaration gets hoisted but not its assignment. So the code above would have been similar to this, where we are attempting to use stepSum before the function gets assigned to it.</p><pre>var stepSum;<br>console.log(`total=${stepSum(3, 2, 1)}`);</pre><pre>stepSum = function(...args) {<br>  let total = 0;</pre><pre>  args.forEach((parameter, i) =&gt; { <br>    total += parameter;<br>    console.log(`${i}) adding ${parameter}`);<br>  });</pre><pre>  return total;<br>}</pre><h3>Up for a challenge?</h3><p>Now that you understand this, I would like to leave you a challenge so you can explain what the heck is going on with the code below:</p><pre>function stepSum(...args) {<br>  let total = 0;</pre><pre>  args.forEach((parameter, i) =&gt; { <br>    total += parameter;<br>    console.log(`${i}) adding ${parameter}`);<br>    return;<br>    function total() {}<br>  });</pre><pre>  return total;<br>}</pre><pre>console.log(`total=${stepSum(3, 2, 1)}`);</pre><p>The output is:</p><pre>0) adding 3<br>1) adding 2<br>2) adding 1<br>total=0</pre><p>Why the 0?? I invite you to leave your explanation at the comments section below :)</p><h3>Learn more</h3><p>For more interesting scenarios on scoping and hosting, I suggest reading this clarifying article:</p><p><a href="http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html">JavaScript Scoping and Hoisting</a></p><p>And after that, you can try out your knowledge with some interview questions:</p><p><a href="https://medium.freecodecamp.org/function-hoisting-hoisting-interview-questions-b6f91dbc2be8">Function Hoisting &amp; Hoisting Interview Questions</a></p><p>This article was originally published (pre-ES2015 version) on February 4th, 2014 as <a href="https://coderwall.com/p/jj635w/javascript-hoisting--2">Javascript Hoisting</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e74c38283b65" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/a-brief-review-of-scoping-and-hoisting-in-javascript-e74c38283b65">A brief review of Scoping and Hoisting in JavaScript</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enlighten your coding skills as you would play a videogame]]></title>
            <link>https://medium.com/techspiration-ideas-making-it-happen/enlighten-your-coding-skills-as-you-would-play-a-videogame-ded984ba9b99?source=rss-a9cf8b3432bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ded984ba9b99</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Tiago Romero]]></dc:creator>
            <pubDate>Fri, 27 Nov 2015 17:35:42 GMT</pubDate>
            <atom:updated>2018-09-04T06:05:20.670Z</atom:updated>
            <content:encoded><![CDATA[<h3>Enlighten your coding skills as you would play a video game</h3><p><em>Game your way to coding success</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*iJAKEH3xIStdpfFYIthgyw.png" /></figure><h4>If you don’t use it, you lose it</h4><p>We all know that becoming a solid software developer is not something that happens in a day.</p><p>However, one should not stop learning when he knows enough coding to land a good job. Coding is an exercise like running, swimming, or playing a musical instrument: if you don’t practice enough, you will get rusty.</p><p>It’s worth noting there are several categories of coding problems which we do not usually exercise in our everyday jobs, like algorithms to deal with sorting, searching, compressing, cryptography, artificial intelligence, machine learning, combinatorics, or geometry…</p><p>Not only that, but as time goes by, other paradigms come forth in order to solve problems in a faster and more clever way, like Functional Programming and Reactive Programming.</p><h4>Leveling up</h4><p>That said, there is just one way to keep sharp on software development: <strong>practicing</strong>. Now tell me: do you revel in leveling up while playing videogames, solving a Rubik’s cube, or even doing crosswords?</p><p>So why not taking coding challenges as well?</p><p>I believe that every self-respecting software developer should put aside some weekly time to solve coding challenges. I personally strive for doing at least one short challenge per day. Over time, it starts to get entertaining, fun, and even addictive!</p><p>There are quite a few good websites that can provide great coding challenges to play with, leveling from 101 to top-notch. The beauty of it is that you will learn a lot when you compare your solution with others from the community. I believe that this way I will turn out to be a better developer on the long run. Besides, they end up being great puzzles to play with!</p><p>These are short code challenge websites:</p><ul><li><a href="http://www.codewars.com/">Codewars</a></li><li><a href="http://www.hackerrank.com/">Hacker Rank</a></li><li><a href="http://www.hackerearth.com/">Hacker Earth</a></li></ul><p>If you would rather taking longer and more complex challenges (and sometimes get prizes for it):</p><ul><li><a href="https://www.topcoder.com/">Topcoder</a></li><li><a href="https://code.google.com/codejam">Google Code Jam</a></li><li><a href="https://www.codechef.com/">Code Chef</a></li></ul><p>And if you only want to have fun, there are real videogames that you have to code in order to progress:</p><ul><li><a href="http://codecombat.com/">Code Combat</a></li><li><a href="http://codefights.com/">Code Fights</a></li><li><a href="http://www.kuatostudios.com/games/hakitzu-elite/">Hakitzu Elite</a></li><li><a href="http://play.elevatorsaga.com/">Elevator Saga</a></li></ul><p>Give them a try and rejoice!</p><p><em>Originally published at </em><a href="http://www.avenuecode.com/code-highway"><em>www.avenuecode.com/code-highway</em></a><em> on January 30th, 2015.</em></p><h4>Published in Techspiration + Ideas + Making It Happen.</h4><figure><a href="https://medium.com/techspiration-ideas-making-it-happen"><img alt="" src="https://cdn-images-1.medium.com/max/720/1*n0J_5QvGZeLGFZnFnmsfQw.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ded984ba9b99" width="1" height="1" alt=""><hr><p><a href="https://medium.com/techspiration-ideas-making-it-happen/enlighten-your-coding-skills-as-you-would-play-a-videogame-ded984ba9b99">Enlighten your coding skills as you would play a videogame</a> was originally published in <a href="https://medium.com/techspiration-ideas-making-it-happen">Techspiration + Ideas + Making It Happen</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Security breach warning: update your git client ASAP!]]></title>
            <link>https://medium.com/@themindfuldev/security-breach-warning-update-your-git-client-asap-6714168e8c6a?source=rss-a9cf8b3432bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/6714168e8c6a</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[os-x]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Tiago Romero]]></dc:creator>
            <pubDate>Mon, 22 Dec 2014 21:50:08 GMT</pubDate>
            <atom:updated>2018-09-04T06:00:38.661Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A quick and short guide on updating your git client</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*PbqlEqA4xDBJkoM6dkJ9AQ.png" /></figure><p>A critical security breach with Git clients was discovered last Thursday. It affects all versions of official Git clients, both command-line and graphical tools such as the GitHub app.</p><h4>What is going on?</h4><p>According to GitHub engineers, this breach would allow hackers to hijack your Git tree when cloning/checking out a repository, allowing them to execute any command in the client machine. So, it is strongly suggested that you take 5 minutes of your time to update it ASAP!</p><h4>How to update: Mac OSX</h4><p>If you use Mac OSX, it is recommended that you NOT use the Xcode-provided Git anymore, once it is hard to update in situations like these. Instead, just use <a href="http://brew.sh/">homebrew</a>.</p><p><strong>a) If you already use Homebrew’s git</strong></p><p>If you have installed git through homebrew before, just update it by running:</p><pre>brew update &amp;&amp; brew upgrade git</pre><p><strong>b) If you still don’t use Homebew’s git</strong></p><p>Then first let’s install git from homebrew. As soon as your <strong>homebrew</strong> is installed, just run:</p><pre>brew update &amp;&amp; brew install git</pre><p>Now you need to force your console app to pick up homebrew’s git instead of Xcode’s (which we unfortunately can’t be uninstalled). So all you need to do is to edit your console init file (~/.bash_profile, ~/.bashrc, ~/.zshrc …) and prepend /usr/local/bin to your PATH definition so that it will become something like:</p><pre>export PATH=&quot;/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin&quot;</pre><p>Then, verify that you are using git version 2.2.1 by doing:</p><pre>git --version</pre><p>Also, an updated version of <a href="https://mac.github.com/">GitHub for Mac</a> is available for immediate download.</p><h4>How to update: Windows</h4><ul><li><a href="https://msysgit.github.io/">Git for Windows</a> (also known as MSysGit) has released maintenance version 1.9.5.</li><li>Also, an updated version of <a href="https://windows.github.com/">GitHub for Windows</a> is available for immediate download.</li></ul><h4>Source</h4><p>The following article from Github has more details on this regard:</p><p><a href="https://github.com/blog/1938-vulnerability-announced-update-your-git-clients">Vulnerability announced: update your Git clients</a></p><p><em>Originally published at </em><a href="http://www.avenuecode.com/code-highway"><em>www.avenuecode.com/code-highway</em></a><em> on December 22nd, 2014.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6714168e8c6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Components 101]]></title>
            <link>https://medium.com/@themindfuldev/web-components-101-b2c60163f4c8?source=rss-a9cf8b3432bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2c60163f4c8</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web-components]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[polymer]]></category>
            <dc:creator><![CDATA[Tiago Romero]]></dc:creator>
            <pubDate>Mon, 15 Sep 2014 21:41:31 GMT</pubDate>
            <atom:updated>2018-09-04T05:59:21.346Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Is it possible to abstract low-level constructs of HTML to define high-level semantic components? Yes!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*zinlo-LJcEd9sFj4St4f_Q.jpeg" /></figure><p>Over the past few years a lot of people have been trying to rethink the way the web can/should be used. Currently, front-end developers find themselves in the often-frustrating situation of having to build complex websites with HTML–which can often be a fairly blunt tool–on top of the clunky foundations of Jurassic-age web browser limitations.</p><p>Let’s start simple to illustrate the problem: Imagine that you are developing a website for airline tickets. As you are working, you decide that you would like to include a calendar in your webpage. Unfortunately, there’s no quick and easy way to create a calendar, using HTML. Instead, you will have to employ a variety of different elements to express this single concept. And if you need another calendar on the same page, you would have to repeat all those elements, and so on, for as many iterations as are needed.</p><p>There should be a simpler way to create something as simple and common as a calendar. And in fact there is. There are many 3rd-party libraries, (such as jQuery plugins), which can implement a calendar for you, but although these resources may save on coding time, at the end of the day they will add up to the same unwieldy mess of HTML elements in the page. The problems of coding while being limited to low-level elements are quickly compounded as ideas become more complex.</p><p>But let’s pause for a moment: How about this — once we conceive of ‘calendar’ as a distinct concept, what if we could code calendar as a single element in HTML? Wouldn’t that be great?</p><p>In more general terms: is it possible to abstract low-level constructs of HTML to define high-level semantic components (such as calendars)?</p><p>Yes, it is possible! Or at least, it will be possible soon enough with <strong>Web Components</strong>.</p><p>So what exactly are Web Components? Let’s drink it from the source, aka <a href="http://www.w3.org/TR/components-intro/">W3C specification for Web Components</a>:</p><p>The component model for the Web (also known as Web Components) consists of five harmoniously interacting pieces designed to enable Web application authors to define widgets with a level of visual richness and interactivity impossible to achieve with CSS alone, all with an ease of composition and reuse not possible with today’s existing script libraries.</p><p>The five pieces, at a glance, are:</p><ol><li><a href="http://www.w3.org/TR/components-intro/">Templates</a>, which define chunks of markup that are inert but can be activated for use later.</li><li><a href="http://www.w3.org/TR/components-intro/">Decorators</a>, which apply templates based on CSS selectors to affect rich visual and behavioral changes to documents.</li><li><a href="http://www.w3.org/TR/components-intro/">Custom Elements</a>, which let authors define their own elements, with new tag names and new script interfaces.</li><li><a href="http://www.w3.org/TR/components-intro/">Shadow DOM</a>, which encapsulates a DOM subtree for more reliable composition of user interface elements.</li><li><a href="http://www.w3.org/TR/components-intro/">Imports</a>, which defines how templates, decorators and custom elements are packaged and loaded as a resource.</li></ol><p>These five pieces make it easier to make better things. Take our calendar example. Basically, a Web Component for a calendar would reduce all that HTML clutter to one, beautifully clean line of code:</p><pre>&lt;x-calendar chosen=&quot;2013-06-09&quot;&gt;&lt;/x-calendar&gt;</pre><p>(This is actually an existing open-source calendar web component, available at <a href="https://github.com/x-tag/calendar">https://github.com/x-tag/calendar</a>.)</p><p>As you can see, this encapsulated code is more capable of efficiently and meaningfully representing a high-level component such as a calendar. We no longer need to deal with low-level elements such as divs or spans, now that they have been internalized. It’s cleaner, and easier to maintain.</p><p>Want to know how to use and develop a Web Component? Stay tuned on my next article about Web Components!</p><p><em>Originally published at </em><a href="http://www.avenuecode.com/code-highway"><em>www.avenuecode.com/code-highway</em></a><em> on September 15th, 2014.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2c60163f4c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is all the fuss about with front-end development?]]></title>
            <link>https://medium.com/@themindfuldev/what-is-all-the-fuss-about-with-front-end-development-d2a724b12d19?source=rss-a9cf8b3432bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2a724b12d19</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Tiago Romero]]></dc:creator>
            <pubDate>Mon, 25 Aug 2014 21:39:35 GMT</pubDate>
            <atom:updated>2018-09-04T05:59:05.934Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Evolution of Front-end Development</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kMWmJSRLF8uWN67TDi6Y4g.jpeg" /></figure><p>Many enterprise software developers still wonder why everyone is so concerned with client-side applications, HTML 5, Javascript, and front-end related “stuff.” Such skills are very notable on job postings nowadays, even for enterprise development based on Java, .NET, and Rails (which are server-side technologies). A developer might ask: Why does nobody seem to care anymore that I have a Java architect certification if I don’t know about RequireJS, AngularJS or <em>whatever</em>JS (front-end development tools)?</p><p>The truth is that pretty much every enterprise software developer from the last decade should expect an evolution boom on the server-side development instead of the client-side. Just look at how Java, .NET, and Rails have developed across MVC frameworks, web services, cloud connectivity, security, multi-threading, and persistence. As if this wasn’t enough, server-side development trends towards SOA, ESB, EAI and clusterization are very notable as well. So what is going on?</p><p>About a decade ago, web applications started overtaking desktop applications (usually developed in Java Swing or VB.NET) in order to improve compatibility with the user’s computers. By adopting HTML for the user interface (UI), we no longer need to worry about the user’s operational system, as long as the user can access a web browser. This way, our software can even support mobile devices!</p><p>Now, let’s get back to the server-side enterprise development. While it is continuously evolving, it is still part of a web application bound to the same known limitations for the web such as request, response, session, cookies, and so on.</p><p>Buddy, you gotta trust me when I say the end user doesn’t care that the server-side is perfectly engineered when the client-side is sluggish — all that the user sees is the web application as a whole concept. This means that the user experience (UX) must be prioritized as well, otherwise this user might switch to another vendor with a more effective UI.</p><p>With the web browser as the ultimate UI software, we need to overcome its limitations and provide the best possible UX in order to attract more users. And all they want are fully featured applications that are fast, responsive, and stable — as desktop applications have been in the past.</p><p>This, buddy, is what this fuss is all about — providing the desktop experience to the web user. This is the ultimate goal of every web application. This is the key to win the market.</p><p>All in all, it comes down to a few line items:</p><ol><li><strong>Reducing the page load time.</strong> This can be achieved with a few optimization techniques such as compiling all JS files and CSS files to a single JS file and CSS file, minifying those files, compressing the response using gzip, and adopting a CDN (Content Distribution Network) to deliver such files from a server closer to the end user. All of this can be automatized using a task runner such as Grunt or Gulp.js.</li><li><strong>Reducing the response time from seconds to milliseconds.</strong> This can be achieved by using more AJAX to fetch only the data and leave the rendering to the browser. For this rendering we have Javascript template engines such as Mustache, Handlebars.js, dust.js, or Jade.</li><li><strong>Improving the navigation experience.</strong> This can be achieved by getting rid of page reloads, so the user would see the site as a SPA (Single-Page Application). For that we have Javascript MV* frameworks such as Backbone.js, AngularJS, Ember.js, or React.</li><li><strong>Reducing the Javascript processing time.</strong> This can be achieved by adopting an asynchronous Javascript module loader such as RequireJS or YepNope. Favoring native browser features instead of depending on plugins such as Flash to render animations, audio, and video. This can now be achieved with HTML 5, CSS 3, SVG, and OpenGL.</li><li><strong>Adopting reusable components to improve semantics and save in downloaded content.</strong> A new universe of Web Components is coming out soon, and currently can be achieved with libraries such as Polymer and X-Tag.</li><li><strong>There is much more about optimizing web pages, so do your own research about other techniques available.</strong> Make sure you look at HTTP2 &amp; SPDY, WebSockets for transmitting binary data, localStorage, and offline mode.</li></ol><p>My final advice is that every type of software developer needs to learn more about all these new libraries and stay tuned to the front-end technologies. You won’t regret it — and nor will your resume!</p><p><em>Originally published at </em><a href="http://www.avenuecode.com/code-highway"><em>www.avenuecode.com/code-highway</em></a><em> on August 25th, 2014.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2a724b12d19" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>