<?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: Brian </title>
    <description>The latest articles on DEV Community by Brian  (@brianmcoates).</description>
    <link>https://dev.to/brianmcoates</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%2F146163%2F42f37927-11e6-46cf-8ac6-77f7a438faa9.jpeg</url>
      <title>DEV Community: Brian </title>
      <link>https://dev.to/brianmcoates</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brianmcoates"/>
    <language>en</language>
    <item>
      <title>Javascript Promises</title>
      <dc:creator>Brian </dc:creator>
      <pubDate>Mon, 23 Dec 2019 22:33:22 +0000</pubDate>
      <link>https://dev.to/brianmcoates/javascript-promises-34d0</link>
      <guid>https://dev.to/brianmcoates/javascript-promises-34d0</guid>
      <description>&lt;p&gt;Was working with javascript promises in a project and at one point I needed to know how .then worked with having a promise inside of it.&lt;/p&gt;

&lt;p&gt;Here is what I found promises have to resolve before the .then will fire. If you want to have a promise inside a then you can do that but it needs to be a resolved promise. Here is some example code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;new Promise(function(resolve, reject) {

  setTimeout(() =&amp;gt; resolve(1), 1000);

}).then(function(result) {

  alert(result); // 1

  return new Promise((resolve, reject) =&amp;gt; { // (*)
    setTimeout(() =&amp;gt; resolve(result * 2), 1000);
  });

}).then(function(result) { // (**)

  alert(result); // 2

  return new Promise((resolve, reject) =&amp;gt; {
    setTimeout(() =&amp;gt; resolve(result * 2), 1000);
  });

}).then(function(result) {

  alert(result); // 4

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



&lt;p&gt;Also here is some documentation on promises from javascript.info &lt;a href="https://javascript.info/promise-chaining"&gt;https://javascript.info/promise-chaining&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>promises</category>
    </item>
    <item>
      <title>Event Sourcing Pattern</title>
      <dc:creator>Brian </dc:creator>
      <pubDate>Mon, 23 Dec 2019 22:15:08 +0000</pubDate>
      <link>https://dev.to/brianmcoates/event-sourcing-pattern-9pa</link>
      <guid>https://dev.to/brianmcoates/event-sourcing-pattern-9pa</guid>
      <description>&lt;h1&gt;
  
  
  Event Sourcing Pattern and how it works
&lt;/h1&gt;

&lt;p&gt;I recently learned about the event sourcing pattern while working on a ruby api and as I was learning it I was able to draw a neat little graphic that helped me learn. Here it is and I hope you it helps you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iX0no4_e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0zyh9ds0x20gbii2tsgz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iX0no4_e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0zyh9ds0x20gbii2tsgz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>patterns</category>
      <category>javascript</category>
      <category>python</category>
    </item>
    <item>
      <title>Alternative to the spread operator</title>
      <dc:creator>Brian </dc:creator>
      <pubDate>Mon, 02 Dec 2019 17:53:10 +0000</pubDate>
      <link>https://dev.to/brianmcoates/alternative-to-the-spread-operator-10be</link>
      <guid>https://dev.to/brianmcoates/alternative-to-the-spread-operator-10be</guid>
      <description>&lt;h1&gt;
  
  
  Alternative to the spread operator.
&lt;/h1&gt;

&lt;h3&gt;
  
  
  TLDR: Object.assign(object, object)
&lt;/h3&gt;

&lt;p&gt;I was doing some work on a serverless function and I didn't have ES6 support so I had to figure out how to supplement the spread operator. Below is an example of the spread operator with some objects that hold some food.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const moreFood = {
'pizza': '🍕',
 'steak': '🥩',

}

const food = { 'chocolate': '🍫', 'icecream': '🍦', 'pizza': 'pizza', ...moreFood }

//results

{
'chocolate': '🍫', 
'icecream': '🍦',
'pizza': '🍕',
'steak': '🥩',
}

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



&lt;p&gt;One of the alternatives to the spread operator is the Object.assign function. Here is the same function using the object.assign function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const moreFood = {
'pizza': '🍕',
 'steak': '🥩',

}

const food = { 'chocolate': '🍫', 'icecream': '🍦', 'pizza': 'pizza' }

Object.assign(food, moreFood)

//results

{
'chocolate': '🍫', 
'icecream': '🍦',
'pizza': '🍕',
'steak': '🥩',
}

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



&lt;h3&gt;
  
  
  Side note:
&lt;/h3&gt;

&lt;p&gt;If there is a duplicate key like in the example with pizza both the spread operator and the Object.assign function both will take what the right objects says pizza is.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>es6</category>
    </item>
    <item>
      <title>Mocking Modules with Jest</title>
      <dc:creator>Brian </dc:creator>
      <pubDate>Fri, 11 Oct 2019 18:43:15 +0000</pubDate>
      <link>https://dev.to/brianmcoates/mocking-modules-with-jest-32gi</link>
      <guid>https://dev.to/brianmcoates/mocking-modules-with-jest-32gi</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pAams6VA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/v42b0n0zxxr39kwuignc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pAams6VA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/v42b0n0zxxr39kwuignc.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The other day I posted how frustrated I was with mocking a custom module with Jest. &lt;a href="https://twitter.com/brianmcoates/status/1182097590126628864"&gt;https://twitter.com/brianmcoates/status/1182097590126628864&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G2u8zFBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9fy6okstimgwv2o413k0.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G2u8zFBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9fy6okstimgwv2o413k0.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What I found was in Jest when setting up a custom mock you need to pass the function you are wanting to mock to jest.mock() not the mock that you have created but the actual custom module which is ultimately a function.&lt;/p&gt;

&lt;p&gt;If you are also using a function on your MOCK to set the context in your tests you will need to import the actual function you are mocking in your tests that you are writing.&lt;/p&gt;

&lt;p&gt;Below is an example of importing and using a custom module in one of my tests.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import uuid from '../utilities/uuid';
jest.mock('../utilities/uuid');
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you aren't setting context or needing to set up the function in anyway you can just get away with doing nothing! IF you make sure your mocks are living in the right place.&lt;/p&gt;

&lt;p&gt;The key here is you have to place your mock adjacent to your custom module. There is an example below and here is the Jest documentation on that as well. &lt;a href="https://jestjs.io/docs/en/manual-mocks.html"&gt;https://jestjs.io/docs/en/manual-mocks.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;.&lt;br&gt;
├── utilities&lt;br&gt;
│   ├── &lt;strong&gt;mocks&lt;/strong&gt;&lt;br&gt;
│   │   └── uuid.js&lt;br&gt;
│   └── uuid.js&lt;br&gt;
├── node_modules&lt;br&gt;
└── views&lt;/p&gt;

&lt;p&gt;Hope this was helpful. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>testing</category>
      <category>jest</category>
    </item>
    <item>
      <title>Refactoring Conditionals for More Readable Code</title>
      <dc:creator>Brian </dc:creator>
      <pubDate>Tue, 24 Sep 2019 02:19:49 +0000</pubDate>
      <link>https://dev.to/brianmcoates/refactoring-conditionals-anl</link>
      <guid>https://dev.to/brianmcoates/refactoring-conditionals-anl</guid>
      <description>&lt;p&gt;The today I was writing some code and it just felt weird when I started to write this long conditional. I asked a coworker of mine did he have any ideas to what we could do to make this more readable. We did the following&lt;/p&gt;

&lt;p&gt;Before&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  class GetStuff

    def fetch(current_url)
      response = handle_response(query).try(:first)
      return nil if !enabled?(response) &amp;amp;&amp;amp; !postable?(response) &amp;amp;&amp;amp; current_url == response.global_banner.first.button_url

      response
    end

    private

    def enabled?(value)
      return false if value.nil?
      value.enabled
    end

    def postable?(value)
      Time.at(value.post_date) &amp;lt; Time.now &amp;amp;&amp;amp; value.enabled
    end
  end

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



&lt;p&gt;After&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
  class GetStuff

    def fetch(current_url)
      @current_url = current_url
      @response = handle_response(query).try(:first)

      return nil unless show?

      @response
    end

    private

    def show?
      return false if @response.nil?
      enabled? &amp;amp;&amp;amp; postable? &amp;amp;&amp;amp; is_current_page?
    end

    def is_current_page?
      false if @current_url == @response.global_banner.first.button_url
    end

    def enabled?
      @response.enabled
    end

    def postable?
      Time.at(@response.post_date) &amp;lt; Time.now &amp;amp;&amp;amp; @response.enabled
    end
  end

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



&lt;p&gt;We did a couple of things here we removed some reverse logic here.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;!enabled?(response) &amp;amp;&amp;amp; !postable?(response) &amp;amp;&amp;amp; current_url == response.global_banner.first.button_url
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We don't need the ! anymore. I don't know about you but the less I have to think about if this thing is true reverse it the better.&lt;/p&gt;

&lt;p&gt;We also simplified the variables being passed through to methods by making some instance variables.&lt;/p&gt;

&lt;p&gt;Before&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def fetch(current_url)
 response = handle_response(query).try(:first)
 return nil if !enabled?(response) &amp;amp;&amp;amp; !postable?(response) &amp;amp;&amp;amp; current_url == 
  response.global_banner.first.button_url

 response
end

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



&lt;p&gt;After&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def fetch(current_url)
 @current_url = current_url
 @response = handle_response(query).try(:first)

 return nil unless show?

 @response
end

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



&lt;p&gt;We have a gaurd clause that is protecting us against a empty response from a server. We already had this but it wasn't really clear what it was doing and that it was protecting everything.&lt;/p&gt;

&lt;p&gt;Before&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return nil if !enabled?(response) &amp;amp;&amp;amp; !postable?(response) &amp;amp;&amp;amp; current_url == response.global_banner.first.button_url

def enabled?(value)
  return false if value.nil?
  value.enabled
end

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



&lt;p&gt;After&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def show?
  return false if @response.nil?
  enabled? &amp;amp;&amp;amp; postable? &amp;amp;&amp;amp; is_current_page?
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Things are more readable and the methods explain why we have the checks in place and what is this condional doing. I feel like this is self documenting code.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ruby</category>
      <category>rails</category>
      <category>refactoring</category>
    </item>
    <item>
      <title>What do CSS right initial and right auto do?</title>
      <dc:creator>Brian </dc:creator>
      <pubDate>Wed, 01 May 2019 19:59:16 +0000</pubDate>
      <link>https://dev.to/brianmcoates/what-do-css-right-initial-and-right-auto-do-2opp</link>
      <guid>https://dev.to/brianmcoates/what-do-css-right-initial-and-right-auto-do-2opp</guid>
      <description>&lt;p&gt;Was doing code review today and saw some code that intrigued me.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.button {
    position: fixed;
    right: initial;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;right: initial&lt;/code&gt; was interesting I dug more into what initial does and found out it sets that attribute to what the browsers default settings is. There is a really good article on &lt;a href="https://css-tricks.com/getting-acquainted-with-initial/"&gt;css tricks about this&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;So what is the initial value for the right attribute? I did some investigating and found out that the default value is auto (for chrome at least). That confused me because I always used &lt;code&gt;position: fixed&lt;/code&gt; and then just positioned it wherever I wanted with the left, right, top, bottom. I never thought about what would happen if the right attribute was auto (which is it by default). I set up a code pen to demonstrate. What is interesting is when you scroll.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/FlaminSeraphim/embed/oOrGaO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;MDN describes what the right attribute does very well here. &lt;/p&gt;

&lt;p&gt;"When position is set to absolute or fixed, the right property specifies the distance between the element's right edge and the right edge of its containing block."&lt;/p&gt;

&lt;p&gt;When &lt;code&gt;right: auto&lt;/code&gt; is set the browser will calculate what the right attribute needs to be set to so that the left side of the child element is right next to the left side of the parent element, because it is positioned fixed when you scroll you can scroll past the containing div but the positioning of the fixed element stays the same.&lt;/p&gt;

&lt;p&gt;I hope that you learned something helpful alongside me today.&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Hidden Characters</title>
      <dc:creator>Brian </dc:creator>
      <pubDate>Wed, 17 Apr 2019 16:02:07 +0000</pubDate>
      <link>https://dev.to/brianmcoates/hidden-characters-485f</link>
      <guid>https://dev.to/brianmcoates/hidden-characters-485f</guid>
      <description>&lt;p&gt;The other day a bug was reported to my team. On windows machines and android devices we were getting this character.&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985270824_image.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985270824_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On android we would be getting just blank squares&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985338254_image.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985338254_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When we would go and look in the code we couldn’t find anything.&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985435353_image.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985435353_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We were able to cmd + shift + right arrow and it wouldn’t select anything but you could delete the character. Then my boss told me about the bare bones editor and how it has a setting you can turn on to see hidden characters.&lt;/p&gt;

&lt;p&gt;Here is the setting to run on hidden characters&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985640216_Screen%2BShot%2B2019-03-07%2Bat%2B12.42.05%2BPM.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985640216_Screen%2BShot%2B2019-03-07%2Bat%2B12.42.05%2BPM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After then we were able to see this hidden | character. &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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985864777_image.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985864777_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you selected them and did a search and can see what the editor interprets them to be. unicode 2028.  &lt;a href="https://www.compart.com/en/unicode/U+2028" rel="noopener noreferrer"&gt;https://www.compart.com/en/unicode/U+2028&lt;/a&gt;&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985984011_image.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_CBD5FD7C06F427E5ED25F8374D3BA4322F37A0714B5C35ADCD3068E21CD15805_1551985984011_image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was able to then search our whole site to make sure that there wasn't any more of these hidden characters hanging around. We aren’t sure exactly how these characters got added but it could have been a copy and paste from microsoft word or outlook or an old design tool we used in the past.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extras
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://teespring.com/hidden-characters#pid=794&amp;amp;cid=103544&amp;amp;sid=front" rel="noopener noreferrer"&gt;I made a couple of designs one for a sticker click here to go get one.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fq38orydxwnmvv7axstng.jpg" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fq38orydxwnmvv7axstng.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://teespring.com/hidden-characters-t#pid=369&amp;amp;cid=6513&amp;amp;sid=front" rel="noopener noreferrer"&gt;And another for a T shirt if you would like to buy one click here.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frrmofj9uisdej6jebaxs.jpg" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frrmofj9uisdej6jebaxs.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also if you are already using vscode I found a couple of plugins that are supposed to help find hidden characters.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=nachocab.highlight-dodgy-characters" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/items?itemName=nachocab.highlight-dodgy-characters&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=wengerk.highlight-bad-chars" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/items?itemName=wengerk.highlight-bad-chars&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>utf</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
