<?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: Ochuko</title>
    <description>The latest articles on DEV Community by Ochuko (@ochukodotspace).</description>
    <link>https://dev.to/ochukodotspace</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%2F182332%2F03d222ba-2b51-4ffb-8b81-98332e197015.png</url>
      <title>DEV Community: Ochuko</title>
      <link>https://dev.to/ochukodotspace</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ochukodotspace"/>
    <language>en</language>
    <item>
      <title>2025: The Year of Discomfort and Growth</title>
      <dc:creator>Ochuko</dc:creator>
      <pubDate>Fri, 03 Jan 2025 17:17:26 +0000</pubDate>
      <link>https://dev.to/ochukodotspace/2025-the-year-of-discomfort-and-growth-3pm1</link>
      <guid>https://dev.to/ochukodotspace/2025-the-year-of-discomfort-and-growth-3pm1</guid>
      <description>&lt;p&gt;2024 was comfortable... a little too comfortable. For the first time, I understand the saying, &lt;em&gt;"Comfort is the killer of dreams."&lt;/em&gt; There was so much left unaccomplished as I settled into a rot of comfort mid-year. This rot would go on to follow me till the end of the year. I watched as my peers achieved incredible feats while I slipped quietly into the bed of comfort. Unfortunately, I didn't realise this until it was too late in the year, unable to find the zeal to break out of it.&lt;/p&gt;

&lt;p&gt;The past year has taught me that one of the worst things you can do to your dreams is to be comfortable. It reminded me of when I interned at a large company; I had multiple conversations with top management staff, asking for career advice, and one thing they all told me was never to be comfortable. They had all explained how they let go of their dreams because they had settled for comfort, and somewhere along the way, I had forgotten about this.&lt;/p&gt;

&lt;p&gt;Seeing the year fly by with many items on my to-do list left unchecked disappointed me. &lt;em&gt;&lt;strong&gt;How did a year that started so strong turn out like this?&lt;/strong&gt;&lt;/em&gt; &lt;em&gt;&lt;strong&gt;Did I lose discipline?&lt;/strong&gt;&lt;/em&gt; &lt;em&gt;&lt;strong&gt;Did I burn out and never recover?&lt;/strong&gt;&lt;/em&gt; That feeling of disappointment and regret is something I can never forget.&lt;/p&gt;

&lt;p&gt;Another thing I realised was that my full-time job took up way more energy than I wanted it to. I love what I do, but it always feels like a chore, and when the day is over, I just want to rest and get &lt;em&gt;"comfortable."&lt;/em&gt; After all, I spent the last 8 hours doing a &lt;em&gt;"chore"&lt;/em&gt;. Maybe comfort isn't the right word; perhaps I was just lazy. One thing I did know was that when the monthly cheque came in, I was good; I didn't seem to need or want more. I do my &lt;em&gt;"chore"&lt;/em&gt; and get paid. Everybody wins.&lt;/p&gt;

&lt;p&gt;Well, this year will be different! I will commit to discomfort, growth, and competence.&lt;/p&gt;

&lt;p&gt;We may not notice this, but our jobs can become boring if care is not taken. In software engineering, creating APIs that all look the same... building dashboard UIs with all the same elements and components. I wasn't growing. There wasn't a challenge. I had grown accustomed to doing the &lt;em&gt;same thing&lt;/em&gt;, the &lt;em&gt;same way&lt;/em&gt;, over and over again. Thinking back on it, I quickly realised that I only felt alive when battling a challenge or building something I was passionate about.&lt;/p&gt;

&lt;p&gt;That got me thinking: &lt;em&gt;What if I could make my job a battlefield?&lt;/em&gt; 🤔 This is the first step I am taking towards growth this year. What if I could spend most of my day improving my skills and growing more competent? As &lt;a href="https://dhh.dk/" rel="noopener noreferrer"&gt;David Hansson&lt;/a&gt; would put it: don't just make it work or make it fast; &lt;a href="https://world.hey.com/dhh/commit-to-competence-in-this-coming-year-feb7d7c5#:~:text=add%20one%20more%3A-,Make%20it%20beautiful.,-This%20focus%20on" rel="noopener noreferrer"&gt;make it beautiful!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will spend every moment of my job wondering how to make it beautiful. I spend most of my day doing this &lt;em&gt;"chore"&lt;/em&gt;, and what better way to grow my expertise and career? No more code that just works or features that just meet the criteria. It must be beautiful and reek of competence; it must be excellent.&lt;/p&gt;

&lt;p&gt;The next step is defining &lt;a href="https://www.atlassian.com/blog/productivity/how-to-write-smart-goals" rel="noopener noreferrer"&gt;S.M.A.R.T.&lt;/a&gt; goals for myself outside my work schedule. Everything broken down into timelines, with &lt;strong&gt;quarterly&lt;/strong&gt;, &lt;strong&gt;monthly&lt;/strong&gt; and &lt;strong&gt;weekly&lt;/strong&gt; targets, as well as defining daily habits that can help me work towards them. Everything will be tracked and measured, and shortcomings will be recorded and reviewed at intervals.&lt;/p&gt;

&lt;p&gt;No more going through the motions, hoping to make time to work on that side project or continue that course. I have to be meticulous and practice strict time blocking. I have to create a boundary between my full-time job and my personal time so I can change my mindset and lock in on what I need to achieve that day for myself. I have to be consistent and track my progress and growth with realistic and measurable targets.&lt;/p&gt;

&lt;p&gt;2024 was an eye-opening year for me. I would never have thought being comfortable would be a bad thing. I guess in certain situations it isn't, but when it comes to your dreams and aspirations, it's one of the worst things you can do to yourself. I have learned from my experience and hope you can learn from it too.&lt;/p&gt;

&lt;p&gt;I look forward to a year filled with discomfort and growth!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fclg8ohs9gqbmdh1hprwt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fclg8ohs9gqbmdh1hprwt.jpg" alt="A dream doesn't become reality through magic; it takes sweat, determination and hard work. - Colin Powell" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy New Year everyone 🎉🎆! I hope you have a fantastic year ahead!&lt;/p&gt;

&lt;p&gt;Thank you so much if you made it this far; I appreciate the time you spent reading this 🥹. Please feel free to leave comments on some of the strategies you're using to achieve your goals this year, and let me know if you have any questions or suggestions for me. Thank you once again!&lt;/p&gt;

</description>
      <category>growth</category>
      <category>comfort</category>
      <category>productivity</category>
      <category>yearinreview</category>
    </item>
    <item>
      <title>The Battle of the Units: PX vs REM vs EM (font-size)</title>
      <dc:creator>Ochuko</dc:creator>
      <pubDate>Sun, 11 Sep 2022 17:33:36 +0000</pubDate>
      <link>https://dev.to/ochukodotspace/the-battle-of-the-units-px-vs-rem-vs-em-3ka8</link>
      <guid>https://dev.to/ochukodotspace/the-battle-of-the-units-px-vs-rem-vs-em-3ka8</guid>
      <description>&lt;p&gt;In this article I'm going to go through a few CSS units for customizing the &lt;code&gt;font-size&lt;/code&gt; of text when building webpages. There are a lot of other units such as &lt;code&gt;pt&lt;/code&gt;, &lt;code&gt;pc&lt;/code&gt;, &lt;code&gt;ex&lt;/code&gt;, etc. I will be focusing on the 3 most popular units; &lt;code&gt;px&lt;/code&gt;, &lt;code&gt;em&lt;/code&gt;, and &lt;code&gt;rem&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;A lot of developers don't usually understand what the differences between these units are &lt;em&gt;(I didn't either, until much later in my career)&lt;/em&gt;; so I'm going to try to explain them as clearly as possible.&lt;/p&gt;

&lt;p&gt;Let's jump right in! 🚀&lt;/p&gt;

&lt;h3&gt;
  
  
  PX (pixel)
&lt;/h3&gt;

&lt;p&gt;Pixel is probably the most used unit in CSS and are very popular when it comes to setting the &lt;code&gt;font-size&lt;/code&gt; of text on webpages. One pixel (&lt;code&gt;1px&lt;/code&gt;) is defined as &lt;code&gt;1/96th&lt;/code&gt; of an inch in print media. On computer screens however, they are not usually related to actual measurements like centimeters and inches like you may think, they are just defined to be small but visible. What is considered visible is dependent on the device.&lt;/p&gt;

&lt;p&gt;As we know, different devices have different number of pixels per inch on their screens, this is known as &lt;em&gt;&lt;a href="https://www.scientiamobile.com/what-is-pixel-density/#:~:text=Pixel%20density%20is%20a%20calculation,in%20the%20past%20several%20years." rel="noopener noreferrer"&gt;pixel density&lt;/a&gt;&lt;/em&gt;. If we used the number of physical pixels on the screen of a device to determine the size of content on that device, we would have a problem making things look the same across screens of all sizes. That's where &lt;strong&gt;&lt;em&gt;device pixel ratio&lt;/em&gt;&lt;/strong&gt; comes in. It's essentially just a way to calculate how much space a CSS pixel (&lt;code&gt;1px&lt;/code&gt;) will take up on the device's screen that will enable it look the same size when compared to another device.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxnutjculi3foidyiah77.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxnutjculi3foidyiah77.gif" alt="Barney Rubble looking confused"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That might have been a lot to take in 😅, let me simplify a bit. Basically, different screens have different number of pixels (pixel density) and computers perform some calculations to ensure consistency in the size of content being displayed on screens, regardless of the pixel density. &lt;/p&gt;

&lt;p&gt;I didn't do justice explaining this as this isn't the primary focus of this article but you can check out &lt;a href="https://www.youtube.com/watch?v=u0rfDeaxehc" rel="noopener noreferrer"&gt;this video&lt;/a&gt; or &lt;a href="https://www.w3.org/Style/Examples/007/units.en.html#:~:text=The%20px%20unit%20is%20the%20magic%20unit%20of%20CSS.%20It%20is%20not%20related%20to%20the%20current%20font%20and%20usually%20not%20related%20to%20physical%20centimeters%20or%20inches%20either." rel="noopener noreferrer"&gt;this article&lt;/a&gt; for a more in-depth explanation.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Moving on...&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's look at an example below.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A &lt;strong&gt;dash&lt;/strong&gt; of HTML:&lt;/em&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;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;This is a paragraph&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
      Lorem ipsum, dolor sit amet consectetur adipisicing elit.
      Reprehenderit incidunt perferendis iure veritatis cupiditate delectus
      omnis at! Officiis praesentium officia, nemo veniam consequatur
      nostrum sunt aliquid ipsam, corporis quas quaerat. Lorem ipsum dolor
      sit amet consectetur adipisicing elit. Hic quam beatae voluptatibus
      amet possimus iure impedit assumenda distinctio aliquid debitis, autem
      vel ullam aut, quod corporis ratione atque ducimus dolorum.
    &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;A &lt;strong&gt;sprinkle&lt;/strong&gt; of CSS:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;500px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="n"&gt;grey&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;And &lt;strong&gt;voila!&lt;/strong&gt;&lt;/em&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F173zvkn2pdfcbxmpevq8.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F173zvkn2pdfcbxmpevq8.png" alt="Image showing text displayed in different screen sizes"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The top box is how it looks when displayed on a larger screen like a laptop, and the bottom box is how it looks when displayed on a smaller screen, like a phone.&lt;/p&gt;

&lt;p&gt;Notice how the text in both boxes are of the same in size, That's basically how the pixel works. It helps web content (not just text) look the same size across devices.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can test it out for yourself on codepen here: &lt;a href="https://codepen.io/pedoch/pen/vYjEOzO" rel="noopener noreferrer"&gt;https://codepen.io/pedoch/pen/vYjEOzO&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  EM (M)
&lt;/h3&gt;

&lt;p&gt;The EM unit got its name from the uppercase letter &lt;strong&gt;&lt;em&gt;'M'&lt;/em&gt;&lt;/strong&gt; (em) as most CSS units come from typography. The EM unit uses the current &lt;code&gt;font-size&lt;/code&gt; of the parent element as its base. It can essentially be used to scale up or scale down the &lt;code&gt;font-size&lt;/code&gt; of an element based on the &lt;code&gt;font-size&lt;/code&gt; inherited from the parent.&lt;/p&gt;

&lt;p&gt;Let's say we have a parent div that has a &lt;code&gt;font-size&lt;/code&gt; of &lt;code&gt;16px&lt;/code&gt;. If we create a paragraph element in that &lt;code&gt;div&lt;/code&gt; and give it a &lt;code&gt;font-size&lt;/code&gt; of &lt;code&gt;1em&lt;/code&gt; the paragraph &lt;code&gt;font-size&lt;/code&gt; will be &lt;code&gt;16px&lt;/code&gt;. However, if we give another paragraph the &lt;code&gt;font-size&lt;/code&gt; of &lt;code&gt;2em&lt;/code&gt; that will translate to &lt;code&gt;32px&lt;/code&gt;. Let's take a look at the example below.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A &lt;strong&gt;splash&lt;/strong&gt; of HTML:&lt;/em&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;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"div-one"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"one-em"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;1 em based on 10px&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"two-em"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;2 em based on 10px&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"div-two"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"one-em"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;1 em based on 10px&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"two-em"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;2 em based on 10px&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;A &lt;strong&gt;drizzle&lt;/strong&gt; of CSS:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.div-one&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.div-two&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.one-em&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.two-em&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;And &lt;strong&gt;tada!&lt;/strong&gt;&lt;/em&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffen4d12fbnsvro005ugl.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffen4d12fbnsvro005ugl.png" alt="Image showing how EM unit works"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the screenshot above we can see how EM can scale up the size of text and how they are affected by the current font-size inherited from their parent container.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can test it out on codepen here: &lt;a href="https://codepen.io/pedoch/pen/ZEoEZMe" rel="noopener noreferrer"&gt;https://codepen.io/pedoch/pen/ZEoEZMe&lt;/a&gt;&lt;/em&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fth0vwzhcaebtyz0dv45l.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fth0vwzhcaebtyz0dv45l.gif" alt="Meme saying, "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before you get all excited, I must warn you... it's not advisable to use EM especially within complex structured pages. If not used properly, we might run into scaling problems where elements might not be sized properly based on a complex inheritance of sizes in the DOM tree.&lt;/p&gt;

&lt;h3&gt;
  
  
  REM (Root EM)
&lt;/h3&gt;

&lt;p&gt;Last but not least, REM. This works almost the same as EM, but the main difference is that REM only references the &lt;code&gt;font-size&lt;/code&gt; of the root element on the page rather than the parent's &lt;code&gt;font-size&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;The root &lt;code&gt;font-size&lt;/code&gt; is the default &lt;code&gt;font-size&lt;/code&gt; specified either by the user in their browser settings or by you, the developer.&lt;/p&gt;

&lt;p&gt;The default &lt;code&gt;font-size&lt;/code&gt; of a web browser is usually &lt;code&gt;16px&lt;/code&gt; so therefore 1rem will be &lt;code&gt;16px&lt;/code&gt; and &lt;code&gt;2rem&lt;/code&gt; will be &lt;code&gt;32px&lt;/code&gt;. However, in a case where the root &lt;code&gt;font-size&lt;/code&gt; is changed to &lt;code&gt;10px&lt;/code&gt; for example; &lt;code&gt;1rem&lt;/code&gt; will be &lt;code&gt;10px&lt;/code&gt; and &lt;code&gt;2rem&lt;/code&gt; will be &lt;code&gt;20px&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let's look at an example to make things a bit clearer.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A &lt;strong&gt;pinch&lt;/strong&gt; of HTML:&lt;/em&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;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"div-one"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- EM --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"one-em"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;1 em based on container (40px)&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"two-em"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;2 em based on container (40px)&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

  &lt;span class="c"&gt;&amp;lt;!-- REM --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"one-rem"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;1 rem based on root (16px)&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"two-rem"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;2 rem based on root (16px)&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;A &lt;strong&gt;smidgen&lt;/strong&gt; of CSS:&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="nt"&gt;html&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.div-one&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.one-em&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.two-em&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.one-rem&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.two-rem&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;And &lt;strong&gt;boom!&lt;/strong&gt;&lt;/em&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsb3j1z8e4m1r27py4fsm.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsb3j1z8e4m1r27py4fsm.png" alt="Image showing how REM unit works compared to EM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, the paragraphs defined with REM units are completely undisturbed by the &lt;code&gt;font-size&lt;/code&gt; declared in our container and are strictly rendered relative to the root &lt;code&gt;font-size&lt;/code&gt; defined in the &lt;code&gt;html&lt;/code&gt; element selector.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can test it out on codepen here: &lt;a href="https://codepen.io/pedoch/pen/qBYEWjg" rel="noopener noreferrer"&gt;https://codepen.io/pedoch/pen/qBYEWjg&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Verdict:
&lt;/h3&gt;

&lt;p&gt;Now that you understand how each unit works, I'll tell you which unit wins this fierce battle for me and why.&lt;/p&gt;

&lt;p&gt;As mentioned earlier, I would not recommend you use EM due to the possibility of having a complex hierarchy of nested elements. This can cause problems because EM is relative to the &lt;code&gt;font-size&lt;/code&gt; it inherits from its parent, meaning text size can scale uncontrollably if not managed properly.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Bye bye EM👋🏽&lt;/em&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F34gpsygco39r3qm5t5nf.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F34gpsygco39r3qm5t5nf.gif" alt="woman saying "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now PX and REM basically have the same effect on text; as we would get the same result if we used &lt;code&gt;32px&lt;/code&gt; and &lt;code&gt;2rem&lt;/code&gt;. This is because the default root &lt;code&gt;font-size&lt;/code&gt; is &lt;code&gt;16px&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;But REM has an advantage when accessibility comes into the picture.&lt;/p&gt;

&lt;p&gt;When considering accessibility, we want users with limited vision to be able to read content on our websites comfortably. One way they can tweak the size of text on the screen is by using the browsers &lt;code&gt;zoom&lt;/code&gt; functionality.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8rc9g9jn9em6dig3by8.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8rc9g9jn9em6dig3by8.gif" alt="GIFS showing browser zoom functionality"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The zoom functionality &lt;em&gt;(shown above)&lt;/em&gt; works perfectly fine for both PX and REM. However, there's another way this can also be done. This is when the user changes the default font size from the browser's settings. This method allows the text on the user's screen to appear larger or smaller by default based on how they configure it. This frees the users from having to manually zoom every page they visit. Let's see how REM and PX perform with this method.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi46mymresa72taji7n3u.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi46mymresa72taji7n3u.png" alt="texts saying "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first paragraph is set to &lt;code&gt;font-size: 16px;&lt;/code&gt; while the second is set to &lt;code&gt;font-size: 1rem;&lt;/code&gt;. As you can see, they are both the same size.&lt;/p&gt;

&lt;p&gt;At the moment, my browser font size setting is on medium. Let's see what happens when I change it to very large.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb2s0rhzplqmk9ccb76d.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb2s0rhzplqmk9ccb76d.gif" alt="GIF showing me change browser font size settings from medium to large"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The result:&lt;/em&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Folf7l4zihg7kl4qbgv59.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Folf7l4zihg7kl4qbgv59.png" alt="texts saying "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see the text set with REM was scaled appropriately with the new default/base font size we specified in the browser settings. &lt;/p&gt;

&lt;p&gt;This to me is why I would definitely recommend using REM when working with text content on your web pages. &lt;/p&gt;

&lt;p&gt;I think we have a winner!!! 🎉🎉🎉&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdq4bqek14lt3pu9pf43r.gif" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdq4bqek14lt3pu9pf43r.gif" alt="Girl standing, holding a trophy with confetti rain down on her"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; REM does have its short comings when dealing with other use cases like padding. I will cover this in a different article.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you made it this far, I want to say thank you very much. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;I haven't written a lot of articles before and I know I have a lot more to learn so if you have contributions or think I didn't get something quite right, please leave a comment; as this will help me to continue to learn and grow.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Once again, thank you for your time and have a lovely day 👋🏽. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Setting up SSH keys for a new device - GitHub</title>
      <dc:creator>Ochuko</dc:creator>
      <pubDate>Sat, 04 Sep 2021 19:13:31 +0000</pubDate>
      <link>https://dev.to/ochukodotspace/setting-up-ssh-keys-for-a-new-device-github-4f20</link>
      <guid>https://dev.to/ochukodotspace/setting-up-ssh-keys-for-a-new-device-github-4f20</guid>
      <description>&lt;p&gt;I got a new laptop and had to go through the pain for setting up my entire dev environment from &lt;strong&gt;scratch&lt;/strong&gt;. After hours of downloading and installing tools I was ready to go. I tried to pull one of my old repos from GitHub and I got the good ol' &lt;code&gt;Permission denied (publickey)&lt;/code&gt;. That really sucked, not gonna lie, completely forgot about GitHub's SSH keys. Which is why I decided to write this post today.&lt;/p&gt;

&lt;p&gt;I remember the first day I ran into this problem, it took me forever to find a solution. I hope this would make it a little easier for someone out there to get up and running in no time.&lt;/p&gt;

&lt;h3&gt;
  
  
  STEP 1
&lt;/h3&gt;

&lt;p&gt;We'd first start by setting up our own public/private key pair set. This can use either DSA or RSA. Which means basically any key we set up will work, most systems use &lt;code&gt;ssh-keygen&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;First, we'd want to enter the &lt;code&gt;.ssh&lt;/code&gt; directory. Open the terminal and run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ~/.ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we need to generate our own personalised ssh key, by running this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that our key has been generated, we'll need to copy it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: the text that shows up after the command has been run is not what we need.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To copy the key, we'll need to run a command that is specific to whatever OS (and in some cases terminal) is running on the system so pick the one that fits your need.&lt;/p&gt;

&lt;p&gt;Windows (Cygwin/Git Bash):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat id_rsa.pub | clip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows (PowerShell):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Get-Content id_rsa.pub | Set-Clipboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OSX:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat id_rsa.pub | pbcopy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat id_rsa.pub | xclip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  STEP 2
&lt;/h3&gt;

&lt;p&gt;Next, we head over to &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; to add the key to our account. &lt;br&gt;
When we get there, we log in (if you aren't already logged in). Once logged we're logged in we'll see the profile icon in the top right corner of the page, click on it. It will open a menu like this:&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fthykn82iufpkdz5iiwtz.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fthykn82iufpkdz5iiwtz.png" alt="Github's profile menu"&gt;&lt;/a&gt;&lt;br&gt;
Go ahead and select the &lt;strong&gt;Settings&lt;/strong&gt; option.&lt;/p&gt;

&lt;p&gt;In settings there's a side menu on the left, select &lt;strong&gt;SSH and GPG keys&lt;/strong&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsg6bfrmdkgm75y54u3ig.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsg6bfrmdkgm75y54u3ig.png" alt="GitHub settings page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we're in the SSH and GPG keys section, we can now add our new SSH key which we copied earlier.&lt;br&gt;
Top right on the page you'll see a button that says &lt;em&gt;New SSH Key&lt;/em&gt;, click on it.&lt;br&gt;
We'll get a page like this:&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn5yy96yza3lgvcyfa7k5.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn5yy96yza3lgvcyfa7k5.png" alt="Add new SSH page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Title field we'll give the SSH key a good description so we can know which device it belongs too. I normal use the make and year of the device, e.g. MacBook Pro 2020.&lt;/p&gt;

&lt;p&gt;And in the Key field/textarea, that's where we paste the key we copied. Once we've done this, we can now hit the &lt;em&gt;Add SSH Key&lt;/em&gt; button.&lt;/p&gt;

&lt;p&gt;Once that is done, we'll see the key added to our list of keys:&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ak5hr75xn7q450zmthi.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ak5hr75xn7q450zmthi.png" alt="Example of SSH key on GitHub"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  STEP 3
&lt;/h3&gt;

&lt;p&gt;We now need to configure our &lt;code&gt;.gitconfig&lt;/code&gt;.&lt;br&gt;
Open the terminal and run these commands.&lt;/p&gt;

&lt;p&gt;To add our username to our git config we'll run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "example"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Replace &lt;code&gt;"example"&lt;/code&gt; with your own username.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To add our email to our git config we'll run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.email example@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Replace &lt;code&gt;example@example.com&lt;/code&gt; with your own email.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Once this is done, restart the terminal and we should be good to go to. &lt;/p&gt;

&lt;p&gt;I hope this was of help 😊.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;PS: I know some of you use Personal Access Tokens, maybe I'll make a post for those too&lt;/em&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>security</category>
      <category>discuss</category>
    </item>
    <item>
      <title>My First Assessment Test and I Banged It</title>
      <dc:creator>Ochuko</dc:creator>
      <pubDate>Tue, 13 Oct 2020 00:07:06 +0000</pubDate>
      <link>https://dev.to/ochukodotspace/my-first-assessment-test-and-i-banged-it-5c5g</link>
      <guid>https://dev.to/ochukodotspace/my-first-assessment-test-and-i-banged-it-5c5g</guid>
      <description>&lt;p&gt;I finally gathered enough courage to click the link in my email. It had come about a week ago and I knew I was unprepared for it. It was a link to a &lt;a href="https://www.hackerrank.com/"&gt;HakerRank&lt;/a&gt; assessment test from Chili Piper. I had applied for a Front-End developer role. My data structure and algorithm skills were poor, yet I summoned the strength to put myself out there, I mean how bad could it be (&lt;em&gt;unbelievably bad actually&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;I read the instructions and saw there were just 2 questions to be done in 70 minutes, one React (Front-end), the other code (DSA). I said to myself &lt;em&gt;"Of course I'll do the react question first!"&lt;/em&gt; since I had little or no experience in writing data structures and algorithms. To me the only data structure that existed was the &lt;code&gt;Array&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;I started the test and decided to go through the questions as one would do in a regular examination. The react question was quite straight forward. I was to complete a form that accepted name, email, phone number and blog URL. I was told to validate the fields using certain criteria and display "Form is Complete!" if all fields were valid and "Form is Incomplete!" if they weren't. Simple right? I decided to check out the DSA question, just to see if I may have been lucky enough to get an easy HakerRank question, &lt;strong&gt;of course I wasn't&lt;/strong&gt;. The DSA question was titled "Airport Limousine" or something like that, bottom line, I had no idea what they asked me to do, so back to the react question, I guess. I'm quite experienced in React but I still felt the pressure, like I was drowning in the fear of failure or not being good enough.&lt;/p&gt;

&lt;p&gt;Now this is the funny part. I managed to validate all fields successfully except the phone number field. I had about 30 minutes left, I thought to myself &lt;em&gt;"I can definitely find a regex to validate this in 30 minutes"&lt;/em&gt;. I was supposed to make sure that the phone number was 10 digits and that it didn't start with 0 or 1. I was able to complete the former. Here I was searching every possible site for a regex to check if the first digit of a phone number was 0 or 1, I had never seen 30 minutes fly so fast. I was so disappointed. I had come to the end of my very first assessment test ever and I failed to finish. My roommate walked up to me and asks what's up. I narrate my entire story to him and then he made a statement that'll change my life forever. He asked why I was trying use a regex to validate it when I could have just accessed the number like a string and used the indexing property to do the check. My heart dropped instantly. Basically, rather than looking for a regex is should have done something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var phoneNumber = 9237463281;

var phoneNumberString = phoneNumber.toString();

if(phoneNumberString [0] === 1 || phoneNumberString [0] === 0) 
    return false;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I wasted 30 valuable minutes looking for a complicated answer to a simple question. I guess that's what fear does to us, it blinds us from the most obvious answers to our problems. When we're afraid all we see is how hard the problem is, but not how easy the solution could be. I vowed that never would I allow fear to rule me again.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
