<?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: RR Joson</title>
    <description>The latest articles on DEV Community by RR Joson (@rrjoson).</description>
    <link>https://dev.to/rrjoson</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%2Fuser%2Fprofile_image%2F51108%2F2e78ace9-407a-47eb-b3c8-56de4f4150b8.jpeg</url>
      <title>DEV Community: RR Joson</title>
      <link>https://dev.to/rrjoson</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rrjoson"/>
    <language>en</language>
    <item>
      <title>Keep your repository clean by automatically deleting GitHub branches</title>
      <dc:creator>RR Joson</dc:creator>
      <pubDate>Tue, 17 Sep 2019 11:10:27 +0000</pubDate>
      <link>https://dev.to/rrjoson/keep-your-repository-clean-by-automatically-deleting-github-branches-4d9g</link>
      <guid>https://dev.to/rrjoson/keep-your-repository-clean-by-automatically-deleting-github-branches-4d9g</guid>
      <description>&lt;p&gt;Have you ever found your GitHub repo having too many branches? Was it because you and your teammates keep forgetting to delete a branch after it gets merged?&lt;/p&gt;

&lt;p&gt;You can fix this in 3 easy steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On GitHub, navigate to the main page of the repository.&lt;/li&gt;
&lt;li&gt;Under your repository name, click  "Settings".&lt;/li&gt;
&lt;li&gt;Under "Merge button", select or unselect "Automatically delete head branches"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, the next time you merge a branch, it will get automatically deleted. Keeping your repository from having too many branches.&lt;/p&gt;

&lt;p&gt;Thanks for reading. Did this help you out? If it did, I hope you consider &lt;a href="https://twitter.com/intent/tweet?text=%22Keep%20your%20repository%20clean%20by%20automatically%20deleting%20GitHub%20branches%22%20by%20@rrjoson%20%23DEVcommunity%20https://dev.to/rrjoson/keep-your-repository-clean-by-automatically-deleting-github-branches-4d9g"&gt;sharing&lt;/a&gt; it. You might help someone else out. Thanks so much!&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href="https://help.github.com/en/articles/managing-the-automatic-deletion-of-branches"&gt;https://help.github.com/en/articles/managing-the-automatic-deletion-of-branches&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>github</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to use GitHub wiki to speed up code reviews</title>
      <dc:creator>RR Joson</dc:creator>
      <pubDate>Thu, 12 Sep 2019 07:49:51 +0000</pubDate>
      <link>https://dev.to/rrjoson/how-to-use-github-wiki-to-speed-up-code-reviews-4kcm</link>
      <guid>https://dev.to/rrjoson/how-to-use-github-wiki-to-speed-up-code-reviews-4kcm</guid>
      <description>&lt;p&gt;When doing code reviews, you might find yourself having to point out inconsistencies in your team's coding style that a linter can't catch. Things like naming variables, file structure, etc. And sometimes having to do this and having to explain why a coding style is preferred over another can affect the time a PR gets merged.&lt;/p&gt;

&lt;p&gt;One of the ways you can address is to create a GitHub wiki. If you have a standard for naming arrays as &lt;code&gt;nameList&lt;/code&gt; instead of &lt;code&gt;names&lt;/code&gt;, document it there. If your team prefers to import lodash functions like &lt;code&gt;import _get from 'lodash/get;'&lt;/code&gt; instead of &lt;code&gt;import get from 'lodash/get';&lt;/code&gt;, add it there. But make sure that you have discussed the pros and cons with your team before you put it there.&lt;/p&gt;

&lt;p&gt;The result is a faster code review process because of two reasons. First, you can use that wiki as a guide when doing code reviews. Second, when a new developer comes in and a coding style was not followed, you can just refer to the wiki without having to explain why a coding style is preferred over the other.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>tips</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>A better way to add URL params</title>
      <dc:creator>RR Joson</dc:creator>
      <pubDate>Tue, 10 Sep 2019 02:00:18 +0000</pubDate>
      <link>https://dev.to/rrjoson/a-better-way-to-add-url-params-366l</link>
      <guid>https://dev.to/rrjoson/a-better-way-to-add-url-params-366l</guid>
      <description>&lt;p&gt;Let's say you are building a filter component for a search page. To achieve this, you might use template strings to build you url params.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;urlParams&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`?checkin=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checkin&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;checkout=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checkout&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This might look ok but it can get a bit difficult to read when it gets more values.&lt;/p&gt;

&lt;p&gt;An alternative way is to use &lt;a href="https://github.com/sindresorhus/query-string"&gt;query-string&lt;/a&gt;. It provides a stringify function that allows you to pass an object and it generates the url params for you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;queryString&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;query-string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;urlParams&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;queryString&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; 
   &lt;span class="na"&gt;checkin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checkin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;checkout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;checkout&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The result is a way of generating your URL params without having to manually add &amp;amp;. It is also easier to read when you have to pass multiple values.&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Fastest way to optimize your images for the web</title>
      <dc:creator>RR Joson</dc:creator>
      <pubDate>Mon, 02 Sep 2019 01:34:43 +0000</pubDate>
      <link>https://dev.to/rrjoson/fastest-way-to-optimize-your-images-for-the-web-14cm</link>
      <guid>https://dev.to/rrjoson/fastest-way-to-optimize-your-images-for-the-web-14cm</guid>
      <description>&lt;p&gt;Ever wonder what's the fastest way to optimize your images on the web?&lt;/p&gt;

&lt;p&gt;What if you don't have to manually create optimized images for every screen size and screen density? What if you can optimize images on the fly? What if you can provide advanced image formats like WEBP? What if you can just pass a single URL and get a list of optimized image urls back?&lt;/p&gt;

&lt;p&gt;If you are using Filestack, then check out &lt;a href="https://github.com/filestack/adaptive"&gt;filestack-adaptive&lt;/a&gt;. It allows you to pass in an unoptimized image URL like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://cdn.filestackcontent.com/5aYkEQJSQCmYShsoCnZN
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And get a list of optimized image URLs that you can use in a picture element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://cdn.filestackcontent.com/resize=width:180/5aYkEQJSQCmYShsoCnZN 180w, 
https://cdn.filestackcontent.com/resize=width:360/5aYkEQJSQCmYShsoCnZN 360w, 
https://cdn.filestackcontent.com/resize=width:540/5aYkEQJSQCmYShsoCnZN 540w, 
https://cdn.filestackcontent.com/resize=width:720/5aYkEQJSQCmYShsoCnZN 720w, 
https://cdn.filestackcontent.com/resize=width:900/5aYkEQJSQCmYShsoCnZN 900w, 
https://cdn.filestackcontent.com/resize=width:1080/5aYkEQJSQCmYShsoCnZN 1080w, 
https://cdn.filestackcontent.com/resize=width:1296/5aYkEQJSQCmYShsoCnZN 1296w, 
https://cdn.filestackcontent.com/resize=width:1512/5aYkEQJSQCmYShsoCnZN 1512w, 
https://cdn.filestackcontent.com/resize=width:1728/5aYkEQJSQCmYShsoCnZN 1728w, 
https://cdn.filestackcontent.com/resize=width:1944/5aYkEQJSQCmYShsoCnZN 1944w, 
https://cdn.filestackcontent.com/resize=width:2160/5aYkEQJSQCmYShsoCnZN 2160w, 
https://cdn.filestackcontent.com/resize=width:2376/5aYkEQJSQCmYShsoCnZN 2376w, 
https://cdn.filestackcontent.com/resize=width:2592/5aYkEQJSQCmYShsoCnZN 2592w,
https://cdn.filestackcontent.com/resize=width:2808/5aYkEQJSQCmYShsoCnZN 2808w, 
https://cdn.filestackcontent.com/resize=width:3024/5aYkEQJSQCmYShsoCnZN 3024w" 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So the next time you find yourself manually optimizing images for the web, check out filestack-adaptive.&lt;/p&gt;

</description>
      <category>html</category>
      <category>performance</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why you should avoid using div when creating custom buttons</title>
      <dc:creator>RR Joson</dc:creator>
      <pubDate>Sun, 01 Sep 2019 05:23:01 +0000</pubDate>
      <link>https://dev.to/rrjoson/how-to-create-buttons-with-custom-styling-bfk</link>
      <guid>https://dev.to/rrjoson/how-to-create-buttons-with-custom-styling-bfk</guid>
      <description>&lt;p&gt;Let's say you need to create a signup button with custom styling. You might try to create a div element and add your CSS and add an onClick handler. Instead of using a div element, a good practice is to use a button element instead of a div. &lt;/p&gt;

&lt;p&gt;This is because using a button element provides built-in keyboard accessibility. Another reason why you might want to use semantic HTML for your buttons is that it is good for SEO. Search engines give more importance to keywords inside buttons compared to divs. &lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>a11y</category>
    </item>
  </channel>
</rss>
