<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Epicosity</title>
    <description>The latest articles on DEV Community by Epicosity (@epicosity).</description>
    <link>https://dev.to/epicosity</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F523%2F8ff95c41-f09a-4187-a4ef-c660d6e66f63.png</url>
      <title>DEV Community: Epicosity</title>
      <link>https://dev.to/epicosity</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/epicosity"/>
    <language>en</language>
    <item>
      <title>WCAG Accessibility Guidelines and Tools</title>
      <dc:creator>Elise Gaetz Ferguson</dc:creator>
      <pubDate>Mon, 02 Mar 2020 18:16:50 +0000</pubDate>
      <link>https://dev.to/epicosity/wcag-accessibility-guidelines-and-tools-1fja</link>
      <guid>https://dev.to/epicosity/wcag-accessibility-guidelines-and-tools-1fja</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jqq9HfZg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/739/1%2AXF4L8Lqb17jnbUfktqixWQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jqq9HfZg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/739/1%2AXF4L8Lqb17jnbUfktqixWQ.png" alt=""&gt;&lt;/a&gt;WCAG guidelines for web accessibility from the W3C&lt;/p&gt;

&lt;p&gt;I’ve been working on compiling some information for my company about accessibility, testing, compliance, etc. In the process I was looking for a cross reference of which automated tools checked which specific guidelines. Being as at most automated tools can only cover about 25% of accessibility issues on a website I wanted to know which guidelines might need manual attention.&lt;/p&gt;

&lt;p&gt;Seems like a pretty obvious request? At least I thought so. But even with my mostly “OK” google-fu I did not find what I was looking for. So I ended up creating my own.&lt;/p&gt;

&lt;p&gt;Of course this isn’t a definitive guide. I only have a handful of tools listed. Basically I found the listing for each of the tools and slapped it on a spreadsheet. So this should be fairly accurate at least according to what each automation tool says they check. Your mileage may vary of course. You should be able to do some filtering by various columns to make this data useful to whatever project you’re working on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.google.com/spreadsheets/d/1ZEdiRbPSYBnV7JM_GINgloyWxFzfiauVpW-bbrx-DVA/edit?usp=sharing"&gt;Google spreadsheet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So give it a try and let me know if this was at all helpful in your accessibility adventures!&lt;/p&gt;




</description>
      <category>a11y</category>
      <category>wcag</category>
      <category>frontenddev</category>
    </item>
    <item>
      <title>Craft Troubleshooting Round Up</title>
      <dc:creator>Elise Gaetz Ferguson</dc:creator>
      <pubDate>Tue, 25 Feb 2020 19:27:31 +0000</pubDate>
      <link>https://dev.to/epicosity/craft-troubleshooting-round-up-3cdl</link>
      <guid>https://dev.to/epicosity/craft-troubleshooting-round-up-3cdl</guid>
      <description>&lt;p&gt;So my new mantra is that if something takes me more than a few minutes and a google search to solve, then someone else out there might benefit from me posting the results of my troubleshooting. These things typically aren’t big enough for individual blog posts so they’ve been going on my personal Instagram so far. But I will round them up here for your benefit, lucky you!&lt;/p&gt;

&lt;h3&gt;
  
  
  Honeypot field in Craft CMS Freeform Forms
&lt;/h3&gt;

&lt;p&gt;I was working on accessibility for a site that was using Craftcms Forms plugin. I’ve submitted this to Solspace and they’ll be updating it in a future release but until then …&lt;/p&gt;

&lt;p&gt;Basically the form was not passing accessibility checks for the honeypot field and needed a tabindex of -1 added. So line 632 or so in the plugin I’ve added the code shown below and bam, we pass the accessibility tests.&lt;/p&gt;


&lt;div class="instagram-position"&gt;
  &lt;iframe id="instagram-liquid-tag" src="https://www.instagram.com/p/B76wCRVgtVn/embed/captioned"&gt;
  &lt;/iframe&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  When “entry” doesn’t exist on the homepage
&lt;/h3&gt;

&lt;p&gt;Occasionally when we run some of the Craft CMS updates the homepage there’s an “entry does not exist” error. Depending on the update some of the settings on the homepage section may have changed and require some attention. In this case, we just needed to recheck the “home” icon in the site settings.&lt;/p&gt;


&lt;div class="instagram-position"&gt;
  &lt;iframe id="instagram-liquid-tag" src="https://www.instagram.com/p/B85RLA8gTZL/embed/captioned"&gt;
  &lt;/iframe&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Solspace Calendar not showing repeat toggle
&lt;/h3&gt;

&lt;p&gt;Finally, I had a request to add the ability to repeat an event using Solspace Calendar plugin. Well, what’s going on here? I have other sites using the same plugin that allow repeating events, why isn’t this one? Well, we had just run the latest update that included a new “lite” version of the plugin. Apparently the lite version does not include the repeat toggle so we just need to go into our plugin page and switch from the “lite” version back to our “pro” version that matches our license key.&lt;/p&gt;


&lt;div class="instagram-position"&gt;
  &lt;iframe id="instagram-liquid-tag" src="https://www.instagram.com/p/B9ACvCvgpUX/embed/captioned"&gt;
  &lt;/iframe&gt;
  
&lt;/div&gt;


&lt;p&gt;Well I hope some of these things help you out! Stay tuned, there’s bound to be more troubleshooting around here.&lt;/p&gt;




</description>
      <category>frontenddev</category>
      <category>troubleshooting</category>
      <category>craftcms</category>
      <category>cms</category>
    </item>
    <item>
      <title>Baby Steps into Adobe XD for Front End Development</title>
      <dc:creator>Elise Gaetz Ferguson</dc:creator>
      <pubDate>Wed, 16 Oct 2019 13:01:02 +0000</pubDate>
      <link>https://dev.to/epicosity/baby-steps-into-adobe-xd-for-front-end-development-ge2</link>
      <guid>https://dev.to/epicosity/baby-steps-into-adobe-xd-for-front-end-development-ge2</guid>
      <description>&lt;p&gt;The last big site I developed was designed by a new designer on our team. And when someone new joins the team that means new ideas. So we gave Adobe XD a try instead of the old standard, Photoshop. Of course as it usually goes in development, there wasn’t time for any official training so it was baptism by fire. Who am I kidding? That’s how we learn best, right?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mRMUw1o1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AxagBX3gGnSiZ6in2mVAzFw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mRMUw1o1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AxagBX3gGnSiZ6in2mVAzFw.png" alt=""&gt;&lt;/a&gt;Welcome to Adobe XD one baby step at a time&lt;/p&gt;

&lt;p&gt;So this is just barely scratching the surface of using XD for front end development. We haven’t even begun to get into components and libraries and all that good stuff. Let’s see what baby steps I discovered while working on this site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Selecting Graphics&lt;/strong&gt;  — If you drag the mouse and draw a marquee you can select the graphic you are interested in exporting. If there’s more than one layer on this graphic that needs to be exported, group these items together with Command-G or from the menu, Object &amp;gt; Group.&lt;/p&gt;

&lt;p&gt;Once the graphic is selected and grouped then we can export it with the menu option of File &amp;gt; Export &amp;gt; Selected or Command-E. The export dialog gives you a variety of file types and qualities for export.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PS9PFyUD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/832/1%2AqkNzUB5ZTgxdyQT2Kikm5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PS9PFyUD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/832/1%2AqkNzUB5ZTgxdyQT2Kikm5g.png" alt=""&gt;&lt;/a&gt;To create a spec sheet in the browser&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Share for Development &lt;/strong&gt; — This is a useful tool. If you go to the upper right of the XD window and select the “Share” button and choose “Share for Development” XD will generate a webpage, with or without exported images, that has all sorts of good information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MQBupsBn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/425/1%2AWqyYQUwfmo6xIRlwDN-xsA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MQBupsBn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/425/1%2AWqyYQUwfmo6xIRlwDN-xsA.png" alt=""&gt;&lt;/a&gt;Click the “code” icon to reveal all sorts of good information&lt;/p&gt;

&lt;p&gt;This spec sheet lists fonts, sizes, colors, and layout properties for all the elements that were on the XD file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FlQJvljX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/360/1%2AY4xRZ8ih12dFeLAnXYNHgg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FlQJvljX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/360/1%2AY4xRZ8ih12dFeLAnXYNHgg.png" alt=""&gt;&lt;/a&gt;CSS layout properties&lt;/p&gt;

&lt;p&gt;Simply select an object and the information will be displayed to the right.&lt;/p&gt;

&lt;p&gt;Selecting a color block will automatically copy the Hex color to your clipboard. And selecting a font specification in the right pane will automatically copy the font information to your clipboard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measure Distances — &lt;/strong&gt; Finally, XD makes it easy to measure the distance between objects.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;While in the XD file itself:&lt;/em&gt; If you select an object, hold the “option” key, and move the mouse over another object, you will see the distance in pixels displayed.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;While in the web spec sheet&lt;/em&gt;: Hover over an object and the relative distances will be displayed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NFEcPSDS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/315/1%2A3-0HMPCToY-lI8ee7mtopQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NFEcPSDS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/315/1%2A3-0HMPCToY-lI8ee7mtopQ.png" alt=""&gt;&lt;/a&gt;Measuring distance between objects&lt;/p&gt;

&lt;p&gt;Like I said, I only just scratched the surface of how to use XD for Front End Development but I’m looking forward to learning more.&lt;/p&gt;




</description>
      <category>frontenddev</category>
      <category>css</category>
      <category>adobexd</category>
      <category>xd</category>
    </item>
    <item>
      <title>Trello Automations for Workflow</title>
      <dc:creator>Elise Gaetz Ferguson</dc:creator>
      <pubDate>Wed, 25 Sep 2019 13:01:07 +0000</pubDate>
      <link>https://dev.to/epicosity/trello-automations-for-workflow-11gc</link>
      <guid>https://dev.to/epicosity/trello-automations-for-workflow-11gc</guid>
      <description>&lt;p&gt;Now that 2/3rds of our development team is at least partially remote our white board of project status is a little less useful so we turn to Trello to help track what’s going on.&lt;/p&gt;

&lt;p&gt;Our basic set up has lists for: projects/launch dates, backlog/waiting, a list for each developer, “in proof”, and completed. But the real fun comes with some automations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F770%2F1%2Ak5NXTVfbZhj9gZ-KF7OMmA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F770%2F1%2Ak5NXTVfbZhj9gZ-KF7OMmA.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Power Up — Custom Fields&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We set up a few custom fields using the aptly named power up. The one we use the most is “completed date”. We’re frequently asked “hey, what did you guys do this week?” and being able to filter by the completed date is helpful for throwing together a quick report.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Power Up — Butler&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you have the ability to add multiple power ups, our next choice is Butler. You can do so many things with Butler.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auto complete date (and remove complete date)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the Butler rules we have set up will automatically add the current date to the custom field “completed date” if someone moves a card to the Completed list. And conversely it will remove the completed date if that card is removed from the list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F760%2F1%2AvXqT9JlVUO7HZFznapxXOw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F760%2F1%2AvXqT9JlVUO7HZFznapxXOw.png"&gt;&lt;/a&gt;Butler task to add a completed date&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F769%2F1%2AfiV--UJXwH1ynioKgYiShg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F769%2F1%2AfiV--UJXwH1ynioKgYiShg.png"&gt;&lt;/a&gt;Butler task to remove the completed date&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auto assign card&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The second automation we have set up will automatically assign a user to a card when it’s added to their list. If you have notifications set up, the users will get a reminder when a card is assigned to them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F758%2F1%2AFRU4B4dBP7xP3JiRHYHEFw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F758%2F1%2AFRU4B4dBP7xP3JiRHYHEFw.png"&gt;&lt;/a&gt;Butler task to assign cards&lt;/p&gt;

&lt;p&gt;We’re just getting started seeing what Butler can do for our Trello workflow and look forward to discovering more helpful automations.&lt;/p&gt;




</description>
      <category>remoteworking</category>
      <category>frontenddev</category>
      <category>productivity</category>
      <category>trello</category>
    </item>
    <item>
      <title>ES6: destructuring</title>
      <dc:creator>Tony Nguyen</dc:creator>
      <pubDate>Wed, 18 Sep 2019 13:01:02 +0000</pubDate>
      <link>https://dev.to/epicosity/es6-destructuring-30e9</link>
      <guid>https://dev.to/epicosity/es6-destructuring-30e9</guid>
      <description>&lt;p&gt;Destructuring is a JavaScript syntax that allows us to assign to variables, data from arrays and iterables, like objects. Let’s first look at using the destructuring syntax on objects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Destructuring Objects
&lt;/h3&gt;

&lt;p&gt;In ES5, you would assign properties to variable by individually assigning the value of your object property to the variable.&lt;/p&gt;

&lt;p&gt;ES5&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var band = {
  name: 'Silent Planet',
  genre: 'Metalcore',
  albums: ['The Night God Slept', 'Everything Was Sound', 'When the End Began']
}

var name = band.name;
var genre = band.genre;
var albums = band.albums;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With ES6 destructuring you can reduce that those assignments as long as the variable name that you are assigning a value matches the property name like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let band = {
  name: 'Silent Planet',
  genre: 'Metalcore',
  albums: ['The Night God Slept', 'Everything Was Sound', 'When the End Began']
}

const { name } = band;
const { genre } = band;
const { albums } = band;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can shorten up the syntax by combining all the variable assignments into one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { name, genre, albums} = band;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tthe above syntax will only work if the variable names match the names of the properties you are trying to destructure. If the variable names do not match you can still perform the destructuring assignment with this syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const {name:var1, genre:var2, albums:var3} = band;

console.log(var1); // Silent Planet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that the property name on the left and the variable name on the right. You can think of this as you are taking the property value -&amp;gt; variable. Left to right assignment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Destructuring Arrays
&lt;/h3&gt;

&lt;p&gt;In ES5 in order to extract data from an array you would need to access the array in by getting the value of the item at a certain position in the array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var exampleArray = [1, 2, 3];

var val1 = exampleArray[0];
var val2 = exampleArray[1];
var val3 = exampleArray[2];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the destructuring assignment syntax you can now just write one line to get all values you need the above array;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let [val1, val2, val3] = exampleArray;

console.log(va1, val2, val3); // 1 2 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Destructuring an array looks a lot like when you are destructuring an object but you just replace the curly braces with brackets.&lt;/p&gt;

&lt;p&gt;You can also skip values while using the destructuring syntax if needed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const someArray = [4, 8, 15];

const [first,,last] = someArray;

console.log(first, last);// 4 15
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you need to you could use the rest syntax, which we learned about in my prior &lt;a href="https://dev.to/epicosity/es6-default-rest-and-spread-36ce"&gt;blog post&lt;/a&gt;, to extract all the items remaining in the array into a new array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const someOtherArray = [4, 8, 15, 16, 23, 42];

const [first, second, ...third] = someOtherArray;

console.log(first); // 4
console.log(second); // 8
console.log(third); // [15, 16, 23, 42];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Functions Arguments
&lt;/h3&gt;

&lt;p&gt;One last common use case for destructuring is passing in an object as a functions arguments. Below we have a function that takes in an object with the attributes of a vehicle.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const someFunction = car =&amp;gt; {
  const { make, model, yearBuilt } = car;
  return make;
} 

let car = {make: 'Ford', mode: 'Escort', yearBuilt: 1993};

someFunction(car); //Ford
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use destructuring on your object that was passed into the function. the syntax inside the function body is the same pattern as we have been using throughout this post. However, there is a slightly different, and shorter way to do this below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const someFunction = ({ make, model, yearBuilt }) = {
  return make;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can destructure the object properties out into individual variables right inside your function parameters.&lt;/p&gt;

&lt;p&gt;Thank you for reading and I hope this post helps you use destructuring inside your own code.&lt;/p&gt;




</description>
      <category>javascript</category>
    </item>
    <item>
      <title>ES6: default, rest, and spread.</title>
      <dc:creator>Tony Nguyen</dc:creator>
      <pubDate>Thu, 12 Sep 2019 13:01:01 +0000</pubDate>
      <link>https://dev.to/epicosity/es6-default-rest-and-spread-36ce</link>
      <guid>https://dev.to/epicosity/es6-default-rest-and-spread-36ce</guid>
      <description>&lt;p&gt;ES6 added syntactic sugar to help us write code that is both cleaner and more concise. Today I am going to talk about the feature: default parameters, rest parameters and the spread operator.&lt;/p&gt;

&lt;h3&gt;
  
  
  default
&lt;/h3&gt;

&lt;p&gt;In JavaScript, if not value is passed into a function the the parameter(s) will default to undefined. The default behavior of setting function parameters to undefined can cause error in your functions and this is where default parameters comes in play.&lt;/p&gt;

&lt;p&gt;Default function parameters are used when you need named parameters to be initialized with a value when no value will be passed or when the value of the parameter is undefined. Let's take a look at an example of when you might want to use default function parameters.&lt;/p&gt;

&lt;p&gt;Below is an example of a generic increment function. The function takes in two values and adds them together. The first parameter is the initial number and the second is how much we need to increment or add to that initial number.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function increment(number, increment){
  number + increment;
}

increment(2, 5); // 7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s make our function a little more flexible with default function parameters. Suppose you want that if the user does not input a second parameter for increment parameter, that the function would still run and increment the initial number by one. Let’s try that out with ES5 syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function increment(number, increment){
  if (typeof increment == 'undefined' ) increment = 1;
  return number + increment;
} 

increment(1, 2) // 3
increment(1) // 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We wrote a conditional to check if the increment parameter was undefined, and if it was undefined we assigned the value of 1 to the increment parameter.&lt;/p&gt;

&lt;p&gt;With ES6 syntax you can check for undefined named parameters without using conditionals you needed with ES5. Here it is below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function increment(number, increment = 1){
  return number + increment;
} 

increment(5,5); // 10
increment(5); // 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of writing a conditional in the body of your function, you can just add an equals sign after the parameter you wish to reassign in the case that it is not provided a value. Now not only will your code be more flexible, but you have a more concise function that is easier to read and less prone to error.&lt;/p&gt;

&lt;h3&gt;
  
  
  rest and spread
&lt;/h3&gt;

&lt;p&gt;The rest and spread operators look identical but perform different operations. Both use the three dots ... syntax but rest is used for condensing and spread is used for expanding.&lt;/p&gt;

&lt;h3&gt;
  
  
  rest
&lt;/h3&gt;

&lt;p&gt;The rest operator is used to condense a group of elements down into a single array.&lt;/p&gt;

&lt;p&gt;Let’s create a function that adds three numbers together using the reduce array helper function.&lt;/p&gt;

&lt;p&gt;If you need a refresher on how Array.reduce works check out my last blog post on &lt;a href="https://dev.to/epicosity/javascript-array-helper-methods-40mp"&gt;Array Helper Methods&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function add(x, y, z){
  let numbers = [x, y, z];

  return numbers.reduce((acc, number) =&amp;gt; {
    return acc + number;
  }, 0);
}

add(1, 2, 3); // 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above function works fine when there is a limited number of arguments, in this case only three number can ever be added together. What happens if you were to pass in a fourth or a fifth argument?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;add(1, 2, 3, 4, 5); // 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function, written as it was above, will only accept the first three arguments passed into the function, and will just ignore the rest. So the result is still 6 even though there were additional parameters were passed in.&lt;/p&gt;

&lt;p&gt;Using ES6 rest, we can make the function much more flexible. Now, with rest, the add function can take in an indefinite amount of parameters and return a single result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function add(...numbers){
  return numbers.reduce((acc, number) =&amp;gt; {
    return acc + number;
  }, 0);
}

add(1, 2, 3, 4, 5); // 15

add(2, 4, 6, 8, 10); // 30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can run the add function with as many parameters as you need.&lt;/p&gt;

&lt;p&gt;When you use ...numbers a new array named numbers is created and all the arguments passed into the add() function will be pushed into this array. After all the parameters have been read into the numbers array, the function will continue now running .reduce on the numbers array.&lt;/p&gt;

&lt;h3&gt;
  
  
  spread
&lt;/h3&gt;

&lt;p&gt;Where the rest operator is used to condense elements into a single array, the spread operator is used to do reverse. Spread is used to turn an iterable, like a String or an array, into its individual elements.&lt;/p&gt;

&lt;p&gt;Let’s see how it works by using spread for concatenating arrays. First we’ll look at how it’s done in ES5 before we rewrite it using the ES6 spread syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ES5 array concatenation

const array1 = ['Cersie', 'Jaime'];
const array2 = ['Tyrion'];

const combinedArray = array1.concat(array2);

console.log(combinedArray); // ['Cersie' 'Jaime', 'Tyrion']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In ES5 we had to create a new array and run the Array.prototype.concat()method on one array and passing in another as an argument.&lt;/p&gt;

&lt;p&gt;With ES6 spread you can just use the spread operator by placing ... in front of both arrays inside the &lt;code&gt;[]&lt;/code&gt; brackets to concatenate the arrays.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Array concatenation with spread
const array1 = ['Cersie', 'Jamie'];
const array2 = ['Tyrion'];

const lannisters = [...array1, ...array2];

console.log(lannisters); // ['Cersie' 'Jaime', 'Tyrion']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you see ... in JavaScript code you can tell the difference between rest and spread by these general rules.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If the syntax is used in function arguments of a function declaration or expression then it is the Rest parameter syntax.&lt;/li&gt;
&lt;li&gt;Otherwise it is the Spread operator.&lt;/li&gt;
&lt;/ol&gt;




</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Displaying an RSS Feed in CraftCMS</title>
      <dc:creator>Elise Gaetz Ferguson</dc:creator>
      <pubDate>Wed, 10 Jul 2019 15:45:30 +0000</pubDate>
      <link>https://dev.to/epicosity/displaying-an-rss-feed-in-craftcms-50h9</link>
      <guid>https://dev.to/epicosity/displaying-an-rss-feed-in-craftcms-50h9</guid>
      <description>&lt;p&gt;CraftCMS doesn’t appear to have a built-in way to display RSS feeds and more often than not, clients want to display their recent or related blog posts on their main website.&lt;/p&gt;

&lt;p&gt;The first thing we did to tackle this challenge was install the Craft RSS plugin by &lt;a href="https://plugins.craftcms.com/craft-rss"&gt;Guilty AS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The GitHub page for the plugin has an example of how to display the RSS feed in your templates and it’s pretty straight forward.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{% set blogFeed = craft.rss.loadRss(“https://helgesverre.com/blog/feed") %}
{% if blogFeed %}
&amp;lt;h1&amp;gt;{{ blogFeed.title }}&amp;lt;/h1&amp;gt;
&amp;lt;a href=”{{ blogFeed.link }}”&amp;gt;{{ blogFeed.link }}&amp;lt;/a&amp;gt;
&amp;lt;ul&amp;gt;
{% for post in blogFeed.item %}
&amp;lt;li&amp;gt;&amp;lt;a href=”{{ post.link }}”&amp;gt;{{ post.title }} — {{ post.pubDate }}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
{% endfor %}
&amp;lt;/ul&amp;gt;
{% endif %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just plug in your RSS Feed URL and off you go.&lt;/p&gt;

&lt;p&gt;Naturally you’ll want to arrange the results of the feed in a way that best matches your site’s design.&lt;/p&gt;

&lt;p&gt;You are might want to limit the number of posts you are showing. To do that we set a counter = 0 at the beginning of the block (line 2 below). Then before each “for post in blogFeed.item” loop we check if the counter is less than the number of posts we want to show (line 9). Right before the end of the loop then increment the counter with a +1 (line 17).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{% set blogFeed = craft.rss.loadRss(block.linkUrl) %}
{% set counter = 0 %}
{% if blogFeed %}
&amp;lt;h1&amp;gt;{{ blogFeed.title }}&amp;lt;/h1&amp;gt;
&amp;lt;a href=”{{ blogFeed.link }}”&amp;gt;{{ blogFeed.link }}&amp;lt;/a&amp;gt;
&amp;lt;ul&amp;gt;
{% if counter &amp;lt; 3 %}
{% for post in blogFeed.item %}
&amp;lt;li&amp;gt;
&amp;lt;a href=”{{ post.link }}”&amp;gt;{{ post.title }} — {{ post.pubDate }}&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;
&amp;lt;span&amp;gt;{{ post.description | raw }}&amp;lt;/span&amp;gt;
&amp;lt;/li&amp;gt;
{% set counter = counter + 1 %}
{% endfor %}
{% endif %}
&amp;lt;/ul&amp;gt;
{% endif %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to make this a little more flexible you could create a field in Craft to take in the URL of the blog feed, either per entry or as a global.&lt;/p&gt;

&lt;p&gt;If you really want to get fancy you could create several different type of display options (card, list, etc) and let the user choose how they want to display the information.&lt;/p&gt;

&lt;p&gt;ETA: I recently came back across this article while adding a feed to a client’s site. Turns out the code was a little incorrect and very annoying to not be able to copy and paste so I’m fixing those issues. You may also have to look at your feed directly to figure out what things you can pull in, in this example we had to pull in the full description as raw text rather than html in order to get the image and excerpt.&lt;/p&gt;




</description>
      <category>frontend</category>
      <category>rss</category>
      <category>craftcms</category>
    </item>
    <item>
      <title>Set up Gulp to do “all the things” for your front end</title>
      <dc:creator>Elise Gaetz Ferguson</dc:creator>
      <pubDate>Wed, 19 Jun 2019 13:01:01 +0000</pubDate>
      <link>https://dev.to/epicosity/set-up-gulp-to-do-all-the-things-for-your-front-end-26h1</link>
      <guid>https://dev.to/epicosity/set-up-gulp-to-do-all-the-things-for-your-front-end-26h1</guid>
      <description>&lt;p&gt;Recently I set out to see if I could get gulp to do all my front end “things” for me automatically. I had previously been using the VSCode task runner to transpile my scss or less files. But occasionally I’d run into issues on sites where another developer (or even myself at a previous time) had forgotten we were using a pre-processor and edited the main CSS file instead. And then we just end up with a mess between the pre-processor files and the transpiled files not being in sync. So why not minify? It’s good for site performance and if a developer opens the CSS file they will notice right away that it’s minimized and go look for the less/scss. And heck if I’m doing that why not add in an autoprefixer? And it’s always nice to have a sourcemap file to make it easier when you’re inspecting in the browser.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install all the things
&lt;/h3&gt;

&lt;p&gt;First things first. &lt;a href="https://code.visualstudio.com/docs/languages/css#_automating-sassless-compilation"&gt;VSCode has a little bit on how a person might want to automate some processes&lt;/a&gt; and the first step is installing gulp.&lt;/p&gt;

&lt;p&gt;Once you have gulp installed you’ll want to install the following other pacakges:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/gulp-less"&gt;gulp-less&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/gulp-sass"&gt;gulp-sass&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/gulp-clean-css"&gt;gulp-clean-css&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/gulp-sourcemaps"&gt;gulp-sourcemaps&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/gulp-autoprefixer"&gt;gulp-autoprefixer&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Create a Gulp Task
&lt;/h3&gt;

&lt;p&gt;Now it’s time to create your tasks. You’ll want to create a file called ‘gulpfile.js’.&lt;/p&gt;

&lt;h4&gt;
  
  
  Require all the things
&lt;/h4&gt;

&lt;p&gt;First in your gulpfile.js you will need to require all these nifty packages that you just installed:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q1bBqNKD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A6OtPruSSlhCa1XU-1GhqAQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q1bBqNKD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A6OtPruSSlhCa1XU-1GhqAQ.png" alt=""&gt;&lt;/a&gt;A list of the packages you need to require in your gulpfile.js&lt;/p&gt;

&lt;h4&gt;
  
  
  Where do the things go?
&lt;/h4&gt;

&lt;p&gt;Follow that up with a couple variables which will hold your source and output locations for your front end files:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BGmaD3LT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ArB6nxU5ESvL0owMc2MdO1Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BGmaD3LT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ArB6nxU5ESvL0owMc2MdO1Q.png" alt=""&gt;&lt;/a&gt;File locations for your sources and outputs&lt;/p&gt;

&lt;h4&gt;
  
  
  Optional Options
&lt;/h4&gt;

&lt;p&gt;Optionally you might want to define some options:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--woKVS6Ld--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AroISdbR3miCQ5ZixccgfRw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--woKVS6Ld--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AroISdbR3miCQ5ZixccgfRw.png" alt=""&gt;&lt;/a&gt;Sass and Autoprefixer options&lt;/p&gt;

&lt;h4&gt;
  
  
  Sass Task
&lt;/h4&gt;

&lt;p&gt;Now we need to set up a task to deal with sass files:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f47RoBZs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A9RZrs5iTOA0OKTRxlj-cGA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f47RoBZs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A9RZrs5iTOA0OKTRxlj-cGA.png" alt=""&gt;&lt;/a&gt;Sass Task&lt;/p&gt;

&lt;p&gt;Let’s go line by line and see what’s going on here (this will be similar to the Less task further down the article).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First, we initial the gulp task and give it a name of ‘sass’.&lt;/li&gt;
&lt;li&gt;After the return statement comes the real work:&lt;/li&gt;
&lt;li&gt;We use our ‘sassinput’ variable to define where we want the gulp task to get the source files from, in other words, where are you storing your .scss files?&lt;/li&gt;
&lt;li&gt;Next we initiate the sourcemaps package&lt;/li&gt;
&lt;li&gt;Followed by calling the sass package and utilizing any of the options we might have set up and logging any errors&lt;/li&gt;
&lt;li&gt;The autoprefixer and it’s options come after we transpile the sass, this will simply add some browser prefixes to your final CSS to help with backward compatibility.&lt;/li&gt;
&lt;li&gt;And now we are going to minify the resulting CSS, this example shows the debug options and prints out the starting and ending size of the CSS in the console for your reference.&lt;/li&gt;
&lt;li&gt;Next we write our sourcemap file and in this case we’re saving that in an additional directory called ‘maps’ located in the CSS directory&lt;/li&gt;
&lt;li&gt;And finally we write all these changes to our defined output location.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After all that you should end up with a nice minified, prefixed CSS file as well as a sourcemap file.&lt;/p&gt;

&lt;h4&gt;
  
  
  More for Less
&lt;/h4&gt;

&lt;p&gt;Maybe you use less instead of sass, or you want to have both set up just in case:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nwwi_ArI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ArDSb34W1_MVWWPbFdMhJ6A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nwwi_ArI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ArDSb34W1_MVWWPbFdMhJ6A.png" alt=""&gt;&lt;/a&gt;Similar to the Sass above&lt;/p&gt;

&lt;p&gt;The Less tasks varies only in the input variable ‘lessinput’ the less package (line 5), and the name of the task (line 1).&lt;/p&gt;

&lt;h4&gt;
  
  
  Watch the Things
&lt;/h4&gt;

&lt;p&gt;Now that you have these tasks set up you can do a couple of different things.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You can use VSCode to run these tasks with the built in task runner (&lt;a href="https://code.visualstudio.com/docs/editor/tasks"&gt;check out the VSCode documentation for that&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;You can use gulp to automatically watch for changes to your source directory.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MdpNm-vD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AFNGZgxvnE_M0hgK9VDxBmA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MdpNm-vD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AFNGZgxvnE_M0hgK9VDxBmA.png" alt=""&gt;&lt;/a&gt;Watch tasks for gulp&lt;/p&gt;

&lt;p&gt;The first watch tasks watches for changes in the ‘sassinput’ directory and runs the ‘sass’ tasks if it sees your files change. And the second does the same for the ‘lessinput’.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s get running!
&lt;/h3&gt;

&lt;p&gt;To run this watch task:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save this new ‘gulpfile.js’ to the root directory of your local web project&lt;/li&gt;
&lt;li&gt;In a terminal, or even more handily, in the terminal tab of VSCode, type ‘gulp watchsass’ or ‘gulp watchless’ (depending on what you are working on at the time).&lt;/li&gt;
&lt;li&gt;The tasks will watch your directory for changes and run all the fancy code you just wrote to transpile and minify your CSS every time you make a change and save it.&lt;/li&gt;
&lt;li&gt;And if you want to stop the task, a simple Ctrl-C will take care of that.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--99nThc7j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/281/1%2ASUF7gt9OXbVGuhT4eiyCYg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--99nThc7j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/281/1%2ASUF7gt9OXbVGuhT4eiyCYg.png" alt=""&gt;&lt;/a&gt;VSCode terminal showing the gulp task running&lt;/p&gt;

&lt;h3&gt;
  
  
  Code all the things!
&lt;/h3&gt;

&lt;p&gt;Now that you have everything set up, go forth and code all the things, save your file and rest easy knowing gulp is handling all the nit picky stuff for you.&lt;/p&gt;

&lt;p&gt;What automated tasks have you added to your gulpfile, I’d love to hear?&lt;/p&gt;




</description>
      <category>vscode</category>
      <category>frontenddev</category>
      <category>scss</category>
      <category>less</category>
    </item>
    <item>
      <title>Working Remotely … When Your Team is in the Office</title>
      <dc:creator>Elise Gaetz Ferguson</dc:creator>
      <pubDate>Wed, 12 Jun 2019 13:01:01 +0000</pubDate>
      <link>https://dev.to/epicosity/working-remotely-when-your-team-is-in-the-office-3b14</link>
      <guid>https://dev.to/epicosity/working-remotely-when-your-team-is-in-the-office-3b14</guid>
      <description>&lt;h3&gt;
  
  
  Working Remotely … When Your Team is in the Office
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zWRThbgf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ApEGnac1tSP83bOPCnfEcyg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zWRThbgf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ApEGnac1tSP83bOPCnfEcyg.jpeg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a popular topic these days with more and more businesses allowing employees to work remotely. There’s even a growing number of fully-remote companies. I’ve spent over the last 10 years working remotely for both traditional in-office companies as well as fully-remote companies. I’m currently one of the few remote employees in a traditional in-office company.&lt;/p&gt;

&lt;p&gt;Of course the things you hear from everyone work: have a designated work area, take breaks, get dressed/ready for the day like you were working on site, etc. But here are a few more tips I’ve gathered from doing this for so many years.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Do Work&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use Tools&lt;/strong&gt; : &lt;a href="http://trello.com"&gt;Trello&lt;/a&gt;, &lt;a href="http://skype.com"&gt;Skype&lt;/a&gt;, &lt;a href="http://slack.com"&gt;Slack&lt;/a&gt; etc all of these tools help keep your team organized and in contact while allowing a remote employee to participate easily. A whiteboard list of tasks is great for in-office employees but moving that to Trello (or something similar) will allow the team to view the task list from wherever they happen to be working.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Technologies&lt;/strong&gt; : Ensure ahead of time that video conferences/Skype calls are as easy as pie. Can you hear? Can you see? Can they hear you and see you? It’s important to make sure all this works right off the bat rather than missing out on important meetings due to a crumby microphone on someone’s laptop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Video Conferences&lt;/strong&gt; : Consider having meetings where all employees (in-office or not) are on video conference. We have twice weekly check-ins that work well without the need for everyone on video but there are times when everyone on video would work better particularly with remote client meetings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--I11Gf-hP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AsZG013DAtSrT2u62vtXllg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I11Gf-hP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AsZG013DAtSrT2u62vtXllg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Share All the Details:&lt;/strong&gt; Make sure any video conference links and phone numbers are readily available in the calendar invites so there’s no question on how to connect to the meeting in the minutes before the meeting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get Involved&lt;/strong&gt; : I find that contributing to things like documentation, process improvement, and company intranet help solidify your role on a team. As a remote employee I don’t have the random interruptions during the day and I find that I might have a little extra time to keep track of steps/documentation as I work which can be shared with the rest of the group.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schedules&lt;/strong&gt; : Keep your schedule on a calendar the whole team can see. What are your normal working hours, lunch break, vacation days. Team members will need to know your schedule so they aren’t waiting for a reply when you aren’t around to answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get Backup Work&lt;/strong&gt; : Make sure you have something to work on as backup if you are waiting for a response from a team member. A remote employee can’t stalk a coworker’s desk like you could if you were in the office so you’ll want to make sure you have something productive to work on if you need to wait for a reply. And make sure you follow up to get the information you might be waiting for.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speak Up&lt;/strong&gt; : Make sure, as a remote employee, you speak up in group meetings. If you find it’s difficult to break into conversations in meetings, see about having your team add a meeting facilitator that will ensure everyone has an opportunity to speak without having to deal with lag and interrupting conversations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Video Examples&lt;/strong&gt; : Make videos (&lt;a href="http://vidyard.com"&gt;VidYard&lt;/a&gt;, etc) to record examples if you can’t talk to someone live. Do you need to show a team member how to access some information? Is there a bug you’d like to show someone but can’t do it in person? A quick video is worth 1000 words, right?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Get Social&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Get to the Office&lt;/strong&gt; : Visit the office when possible and attend team building activities in person. It’s important to feel like part of the team both in the production aspects as well as the social aspects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get Musical:&lt;/strong&gt; We’ve started a group playlist on &lt;a href="http://spotify.com"&gt;Spotify&lt;/a&gt; that in-office and remote employees can listen to and help curate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get Creative&lt;/strong&gt; : Participate in events digitally when in person isn’t possible. When our company does events like specific dress up days I try and dress up and take a photo to share. Get creative and try to participate as much as possible even when not in the office.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Experiment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Things to Try:&lt;/strong&gt; There’s a few tips I haven’t tried yet but would be open to experimenting with such as having accountability partners, using a stand-up meeting bot like howdy for slack, and starting photo sharing channel in our slack group.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Are you one of the only remote employees at a traditional in-office company? What are your tips for making it work?&lt;/p&gt;




</description>
      <category>remote</category>
      <category>remoteworking</category>
      <category>frontenddev</category>
      <category>remotework</category>
    </item>
    <item>
      <title>JavaScript Array Helper Methods</title>
      <dc:creator>Tony Nguyen</dc:creator>
      <pubDate>Wed, 05 Jun 2019 13:01:01 +0000</pubDate>
      <link>https://dev.to/epicosity/javascript-array-helper-methods-40mp</link>
      <guid>https://dev.to/epicosity/javascript-array-helper-methods-40mp</guid>
      <description>&lt;p&gt;JavaScript provides a great deal of array methods to help with the manipulation of data. Below I will go over the array helper methods, and why you should use them over the traditional for loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  forEach
&lt;/h3&gt;

&lt;p&gt;The forEach helper function iterates through every item in an array, and runs a provided callback function once on each of those items. forEach essentially replaces the for loop. Let's look at how to use the forEach array helper.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// using a for loop
const numbers = [1, 2, 3, 4, 5];

for (let i = 0; i &amp;lt; numbers.length; i++){
  console.log(numbers[i])
}

// Output
// 1
// 2
// 3
// 4
// 5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Let’s refactor this using a classic function declaration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;numbers.forEach(function(number){
  console.log(number);
});

// 1
// 2
// 3
// 4
// 5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;What’s happening above is we are using forEach to iterate over the numbersarray. Each time forEach reads a value from the numbers array it will run the callBack function on the current value. The callback function will then run console.log() on the current value. It looks something like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Iteration 1: console.log(number[0]) =&amp;gt; 1
// Iteration 2: console.log(number[1]) =&amp;gt; 2
// Iteration 3: console.log(number[2]) =&amp;gt; 3
// Iteration 4: console.log(number[3]) =&amp;gt; 4
// Iteration 5: console.log(number[4]) =&amp;gt; 5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The exact same thing that the for loop does just with much less code.&lt;/p&gt;

&lt;p&gt;Quick note. I, and many others prefer using array helpers with arrow functions and the following examples in this post will be using ES6 arrow function syntax with the array helpers. If you would like a refresher on arrow functions check out my blog post &lt;a href="https://dev.to/epicosity/es6-arrow-functions-299j"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// using forEach with arrow
numbers.forEach( number =&amp;gt; console.log(number));
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Using the forEach, above we console.log() each value inside the numbers array. As you can see, the function is much shorter and performs the same operation.&lt;/p&gt;

&lt;p&gt;Remember — the forEach callback is that it can also take in a second parameter, index. This will keep track of the current index of the number.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;numbers.forEach((number, index) =&amp;gt; console.log(`Number: ${number} is at index: ${index}`));

// Number: 1 is at index: 0
// Number: 2 is at index: 1
// Number: 3 is at index: 2
// Number: 4 is at index: 3
// Number: 5 is at index: 4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You might be wondering what the syntax is inside the console.log above. I am using template literals, another awesome feature in ES6. If you don't know what they are, check out this post about the topic &lt;a href="https://dev.to/epicosity/es6-template-strings-1c3p"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  map
&lt;/h3&gt;

&lt;p&gt;The map helper is one of the most useful array helpers there is. Like forEach, the map helper iterates over an array running the callback function on each element as it iterates through the array. Map differs in that it will return a new array where the value of each element is the returned value of the callback function that was provided to the map helper. Map is used when you want to perform data manipulation without mutating the original data set.&lt;/p&gt;

&lt;p&gt;The map helper below returns a new array that contains the square of each value in the numbers array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1, 2, 3, 4, 5];

// using a for loop
const squared = [];

for (let i = 0; i &amp;lt; numbers.length; i++){
  squared.push(numbers[i] * numbers[i])
}

console.log(squared) // [1, 4, 9, 16, 25]

// using map
const squared = numbers.map(number =&amp;gt; number * number);
console.log(squared)// [1, 4, 9, 16, 25]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  filter
&lt;/h3&gt;

&lt;p&gt;The filter helper iterates over the array and returns a new array that will contain the values that are returned true when passed through the callback function. The callback function in the filter helper can be thought of as a testing function.&lt;/p&gt;

&lt;p&gt;Let’s use the filter helper to return an array containing all of the even values from inside the numbers array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1, 2, 3, 4, 5, 13, 14, 21, 20];

// using a for loop
const filtered = [];

for (let i = 0; i &amp;lt; numbers.length; i++){
  if (numbers[i] % 2 === 0) {
    filtered.push(numbers[i])
  }
}

console.log(filtered); // [2, 4, 14, 20]

// using filter 
const filtered = numbers.filter( number =&amp;gt; {
  if (number % 2 === 0){
    return true;
  }
});

console.log(filtered); // [2, 4, 14, 20]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  find
&lt;/h3&gt;

&lt;p&gt;The find helper returns the value of the first element in the array to pass the test in the provided callback function. Below, we will use find to get the first value in the numbers array that is greater than 10.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1, 2, 3, 4, 5, 10, 13, 14];

// using a for loop
let answer;

for (let i = 0; i &amp;lt; numbers.length; i++) {
  if (numbers[i] &amp;gt; 10){
    answer = numbers[i];
    break;
  }
}

console.log(answer); // 13

// using find
const answer = numbers.find( number =&amp;gt; number &amp;gt; 10);

console.log(answer); //13
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  some
&lt;/h3&gt;

&lt;p&gt;The some array helper will return true if at least one element in the array passes the test in the callback function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1, 3, 4, 5];

// using a for loop
let evenNumber = false;

for (let i = 0; i &amp;lt; numbers.length; i++){
  if(numbers[i] % 2 === 0) {
    evenNumber= true;
    break;
  }
}

console.log(evenNumber); // true

// using some
const evenNumber = numbers.some( number =&amp;gt; {
  if(number % 2 === 0) {
    return true;
  }
});

console.log(evenNumber) // true
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  every
&lt;/h3&gt;

&lt;p&gt;The everyarray helper will return true only if all of the elements in the array pass the testing function. We will use this function to check if all of the values inside the numbers array are less than 10.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1, 2, 3, 4, 5];

let isLessThanTen = true;

for (let i = 0; i &amp;lt; numbers.length; i++){
  if(numbers[i] &amp;gt;= 10) {
    isLessThanTen = false;
    break;
  }
}

console.log(isLessThanTen); // true

let lessThanTen = number =&amp;gt; number &amp;lt; 10;

// every helper
let isLessthan10 = numbers.every(lessThanTen); 

console.log(isLessthan10); // true
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  reduce
&lt;/h3&gt;

&lt;p&gt;To oversimplify the reduce function, you can use the reduce helper to transform an array of values into a single value. Some would say that the reduce helper can be used to get the essence of a set of data. We will use reduce to sum up all of the values in the numbers array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1, 2, 3, 4, 5];

// using a for loop
let sum = 0;

for (let i = 0; i &amp;lt; numbers.length; i++){
  sum += numbers[i];
}

console.log(sum) // 15

// reduce helper
numbers.reduce((sum, number) =&amp;gt; sum + number, 0); // 15
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So, the reduce helper is executing the callback function on each iteration and produces a single result at the end. In the example above that value is sum.&lt;/p&gt;

&lt;p&gt;The reduce helper method can take in 5 arguments:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;accumlator&lt;/li&gt;
&lt;li&gt;currentValue&lt;/li&gt;
&lt;li&gt;currentIndex&lt;/li&gt;
&lt;li&gt;array&lt;/li&gt;
&lt;li&gt;initialValue
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;array.reduce(function(accumlator, currentValue, currentIndex, array), initialValue)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The accumulator and currentValue are required, while the other three arguments are optional. On each iteration, the reduce helper first checks to see if an initial value has been passed into the function. If an initial value has been passed in, then the accumulator's value is set to equal the initial value. If no initial value has been passed in, then the accumulator will be set to the value of the element in the provided array.&lt;/p&gt;

&lt;p&gt;In the code above, we use the accumulator, currentValue, and initialValuearguments to sum up the values inside the numbers array. To better understand how reduce works, let's walk through each iteration.&lt;/p&gt;

&lt;p&gt;If the initial value argument has been passed in, then the function will set the accumulator sum to be equal to the initial value. We pass in an initial value so the sum will be set to 0 on the first iteration. The currentIndex or number is set to the next value in the array. At the beginning of the reducehelper function, that will be 1 or the first value inside the numbers array.&lt;/p&gt;

&lt;p&gt;We will add a console.log to the reduce function to show the value of sum on each iteration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1, 2, 3, 4, 5]
numbers.reduce( (sum, number) =&amp;gt; return sum + number, 0);

// Iteration 1: sum = 0, number = 1; return sum = 1;
// Iteration 2: sum = 1, number = 2; return sum = 3;
// Iteration 3: sum = 3, number = 3; return sum = 6;
// Iteration 4: sum = 6, number = 4; return sum = 10;
// Iteration 5: sum = 10, number = 5; return sum = 15;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So there you have it, you can use reduce to produce a single value from an array of values. However, reduce is really powerful and can do a lot more than sum up values. Take the example below, we have an array that contains a list of people and pets, and their some attributes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let occupants = [
  {name: 'Tony', age: 26, species: 'human'},
  {name: 'Katey', age: 26, species: 'human'},
  {name: 'Marley', age: 5, species: 'canine'},
  {name: 'Harlow', age: 2, species: 'feline'},
  {name: 'Diana', age: 1, species: 'feline'}
];
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Say you need a list of names of the occupants in your home for your landlord to keep track of. You can use reduce on the occupants array to produce a new array that contains each occupant's name as a string.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const occupantNames = occupants.reduce((acc, occupant) =&amp;gt; {
  acc.push(occupant.name);

  return acc;
}, []);

console.log(occupantNames) // ["Tony", "Katey", "Marley", "Harlow", "Diana"]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;JavaScript array helper methods can help you write cleaner, more legible code in less time. Try these helper methods the next time you think about using a for loop.&lt;/p&gt;




</description>
      <category>frontenddev</category>
      <category>es6</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Setting up Photoshop Files for Dev Success</title>
      <dc:creator>Elise Gaetz Ferguson</dc:creator>
      <pubDate>Wed, 29 May 2019 13:01:00 +0000</pubDate>
      <link>https://dev.to/epicosity/setting-up-photoshop-files-for-dev-success-4k8g</link>
      <guid>https://dev.to/epicosity/setting-up-photoshop-files-for-dev-success-4k8g</guid>
      <description>&lt;p&gt;Despite the move to “design in the browser” and design tools like Figma and Adobe XD, there are still quite a few of us out there being provided Photoshop PSDs to be converted into functional webpages on a regular basis. A great portion of my front end developer career revolved around “slicing” Photoshop files and writing HTML and CSS to match. While each designer tends to organize their files in their own way, I have some tips for making your Photoshop files easier for developers to use.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name Layers:&lt;/strong&gt; appropriately named layers and folders make it easy to see what’s on them. How often have you gotten a PSD with labelled very specifically?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fJIgK1c4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/480/1%2AzKqOHe1MztEtG7rHsadn2Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fJIgK1c4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/480/1%2AzKqOHe1MztEtG7rHsadn2Q.png" alt=""&gt;&lt;/a&gt;Rectangle 550 Copy and Layer 686 — helpful names, aren’t they?&lt;/p&gt;

&lt;p&gt;Not very helpful is it? Which rectangle? What’s this layer? Who knows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use Folders:&lt;/strong&gt; group things like Header, Hero, Body, Footer etc. This will keep things organized and make it easier to find the element you are looking for in the future.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6Z5QpM0d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/532/1%2ATsFANiB_kZfjDiW7EZ7dbw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6Z5QpM0d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/532/1%2ATsFANiB_kZfjDiW7EZ7dbw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ensure layers/folders can be turned on and off&lt;/strong&gt; to hide web text and reveal backgrounds or images below: Web safe text will often need to be hidden on a PSD in order to reveal the background below it. If your layers are labelled and grouped appropriately a developer should be able to turn off those layers easily as well as know which layers need to be hidden.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sRgkGoBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/542/1%2A-oisMohFh-VW2tJa2Wo1dA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sRgkGoBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/542/1%2A-oisMohFh-VW2tJa2Wo1dA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Indicate hover states if any and link states:&lt;/strong&gt; if part of the design includes graphics or buttons that change as the user hovers over them, include a layer for those graphic hover states. It is also helpful to indicate text link styles in the sample content of the design and even a list of headings, bulleted lists and other content related items that need styling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c3opuu3b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/346/1%2AuW_7C70azMtKm2C7ERXtIQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c3opuu3b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/346/1%2AuW_7C70azMtKm2C7ERXtIQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do not flatten layers&lt;/strong&gt; : definitely don’t flatten layers especially if you aren’t sure which layers your developer might need to hide/show to get to the graphics/information they might need.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I know this is only a few tips but these small things can really make a difference in time and effort on the development side of things.&lt;/p&gt;

&lt;p&gt;Do you have any development tips for Photoshop files, I’d love to hear them!&lt;/p&gt;




</description>
      <category>design</category>
      <category>frontenddev</category>
      <category>photoshop</category>
    </item>
    <item>
      <title>ES6: Template Strings</title>
      <dc:creator>Tony Nguyen</dc:creator>
      <pubDate>Wed, 22 May 2019 13:01:01 +0000</pubDate>
      <link>https://dev.to/epicosity/es6-template-strings-1c3p</link>
      <guid>https://dev.to/epicosity/es6-template-strings-1c3p</guid>
      <description>&lt;p&gt;ES6 introduced a new syntax for strings called “template string”s or “template literals.” Template strings are not just a cool new way to write strings. They come with new features as well.&lt;/p&gt;

&lt;p&gt;Let’s take a look at the ES5 string and refactor it using a template literal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ES5 string
let myName = 'Tony Nguyen'
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To create a template literal, just use the backtick(`) character instead of the single or double quotes. The backtick the same key as the ~ key usually below the escape key.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;// ES6 template string&lt;br&gt;
let myName = &lt;code&gt;Tony Nguyen&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It really is that simple. Now that you know how to write a template string let’s take a look at some of the things you can do with template strings.&lt;/p&gt;

&lt;h3&gt;
  
  
  String Concatenation
&lt;/h3&gt;

&lt;p&gt;In ES5, in order to concatenate a string you would have to write code that would look like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;br&gt;
// ES5&lt;br&gt;
function printName(fName, lName) {&lt;br&gt;
  return 'Hi '+ fName + ' ' + lName + '!';&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;printName('Arnold','Schwarzenegger'); // "Hi Arnold Schwarzenegger!"&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The printName function above is long and prone to error. I will often times have to write out the return more than once because I forgot to add a space or the plus sign.&lt;/p&gt;

&lt;p&gt;With template strings you can easily concatenate a string in one line. This is because template strings can take in any valid JavaScript expression.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
function printName(fName, lName){&lt;br&gt;
  return&lt;/code&gt;Hi ${fName} ${lName}!`&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;printName('Arnold','Schwarzenegger'); // "Hi Arnold Schwarzenegger!"&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Since template strings can take in any valid JavaScript expression, you can do in-line math with template strings.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;br&gt;
let bench = 440;&lt;br&gt;
let squat = 545;&lt;br&gt;
let deadlift = 710;&lt;/p&gt;

&lt;p&gt;console.log(&lt;code&gt;Arnold has a combined ${bench + squat + deadlift} lbs with his big three lifts.&lt;/code&gt;);&lt;/p&gt;

&lt;p&gt;// Arnold has a combined 1695 lbs with his big three lifts.&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-line Strings
&lt;/h3&gt;

&lt;p&gt;Multi-line strings are also easily made with template strings. In ES5, there were a number of workarounds that would help create multi-line strings but, with template strings, you can just add a new line into the string.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`&lt;br&gt;
// ES5&lt;br&gt;
let greeting = "Hello \nWorld!"&lt;/p&gt;

&lt;p&gt;// ES6&lt;br&gt;
let greeting = &lt;code&gt;Hello&lt;br&gt;
World!&lt;/code&gt;&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Voila, you have created a string with a new line in it.&lt;/p&gt;

&lt;p&gt;This has been a very basic overview of template strings. As you can see, they are a great new syntax that will save you time and frustration when you are working with strings. However, you can do a lot more with them than the examples I have shown above, such as &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates"&gt;tagged templates&lt;/a&gt;. You can learn more about template strings &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals"&gt;here&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>es6</category>
      <category>frontenddev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
