<?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: Robert Kedzior</title>
    <description>The latest articles on DEV Community by Robert Kedzior (@robkedzior).</description>
    <link>https://dev.to/robkedzior</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%2F259709%2Fb57e5a07-ee9a-42e3-968d-261aa6896d85.png</url>
      <title>DEV Community: Robert Kedzior</title>
      <link>https://dev.to/robkedzior</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/robkedzior"/>
    <language>en</language>
    <item>
      <title>Learning things is like meeting a new person</title>
      <dc:creator>Robert Kedzior</dc:creator>
      <pubDate>Sun, 05 Jul 2020 14:28:20 +0000</pubDate>
      <link>https://dev.to/robkedzior/learning-things-is-like-meeting-a-new-person-1i96</link>
      <guid>https://dev.to/robkedzior/learning-things-is-like-meeting-a-new-person-1i96</guid>
      <description>&lt;h1&gt;
  
  
  Recently a thought crossed my mind, on how learning new things is like meeting a new person.
&lt;/h1&gt;

&lt;p&gt;For the last couple of days, I've been reading about design patterns in C#. I've red through a couple of articles, listened to a few podcasts and watched some videos.&lt;/p&gt;

&lt;p&gt;I really felt like I understood the idea and I knew about them quite a lot, but I came to a conclusion that unless I apply and use those patterns in real life scenarios, I won't really know on when It's best to use and how they will affect the structure and behaviour of my code. Whether they will make the code simpler to understand and edit, or whether they will overcomplicate the code and actually make it harder to work with. I didn't know how these patterns will behave in certain situations.&lt;/p&gt;

&lt;p&gt;I thought about this as about meeting a new person or someone that you know a lot about, but have never met them in real life. Sometimes you may read a lot about someone, or read a lot of opinions about a person, which influence on how you think that person will be, behave or act in some situations. But only after you meet the person in real life and spend some time with them, you begin to know them, understand and learn on how they will actually behave and what their strong sides are and how to utilise them. &lt;/p&gt;

&lt;p&gt;I feel it's similar with learning new things and I try to get a hands-on exeprience and implement them myself when reading about concepts, patterns or ideas about writing code.&lt;/p&gt;

&lt;p&gt;What are your thoughts on this? &lt;/p&gt;

</description>
      <category>learning</category>
    </item>
    <item>
      <title>Netlify post processing snippets</title>
      <dc:creator>Robert Kedzior</dc:creator>
      <pubDate>Tue, 05 Nov 2019 11:34:05 +0000</pubDate>
      <link>https://dev.to/robkedzior/netlify-post-processing-snippets-31gg</link>
      <guid>https://dev.to/robkedzior/netlify-post-processing-snippets-31gg</guid>
      <description>&lt;p&gt;This is something that I've come across whilst developing my personal blog with Gatsby. &lt;/p&gt;

&lt;p&gt;I was thinking about adding Google AdSense to my website, so I had to find a solution to inject &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag into my &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag. My first thought was to use &lt;strong&gt;react-helmet&lt;/strong&gt; to inject the AdSense script.&lt;/p&gt;

&lt;p&gt;So I added the code which looked like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Helmet&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;
        &lt;span class="na"&gt;data-ad-client&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ca-pub-5792152581969239"&lt;/span&gt;
        &lt;span class="na"&gt;async&lt;/span&gt;
        &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Helmet&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unfortunately, the output couldn't be properly verified by google checks, so I had to find an alternative way to do this.&lt;/p&gt;

&lt;p&gt;After doing some research I've stumbled across &lt;strong&gt;StackOverflow&lt;/strong&gt; response, which mentioned &lt;strong&gt;Netlify&lt;/strong&gt; post processing html injection.&lt;/p&gt;

&lt;p&gt;If you go to &lt;strong&gt;Netlify -&amp;gt; Settings -&amp;gt; Build &amp;amp; Deploy -&amp;gt; Post processing&lt;/strong&gt;, you will see this screen&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nkUGpgU0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jb88f5j2eix5regmsn2w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nkUGpgU0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jb88f5j2eix5regmsn2w.png" alt="Alt Text" width="880" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking on the &lt;strong&gt;add snippet&lt;/strong&gt; button you will see this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iE1XtaHb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jm4phdtu6ytnv22mv86g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iE1XtaHb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jm4phdtu6ytnv22mv86g.png" alt="Alt Text" width="880" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the dropdown you can select where you to inject the script, then you type in the &lt;strong&gt;title&lt;/strong&gt; of you snippet, and then the &lt;strong&gt;HTML&lt;/strong&gt; of you snippet, for example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;async&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will now be injected into the page section that you selected in the dropdown.&lt;/p&gt;

&lt;p&gt;This has worked great for me, and I personally really like this feature. Expecially for site generator like &lt;strong&gt;Gatsby&lt;/strong&gt; which doesn't include a default &lt;strong&gt;index.html&lt;/strong&gt; file where you can include your scripts.&lt;/p&gt;

</description>
      <category>html</category>
      <category>gatsby</category>
    </item>
  </channel>
</rss>
