<?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: Jolene Kearse</title>
    <description>The latest articles on DEV Community by Jolene Kearse (@pharaohnutz).</description>
    <link>https://dev.to/pharaohnutz</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%2F290663%2Fa7688331-ec29-424d-8e3c-ccde80ef04f6.png</url>
      <title>DEV Community: Jolene Kearse</title>
      <link>https://dev.to/pharaohnutz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pharaohnutz"/>
    <language>en</language>
    <item>
      <title>Don't Forgo the 'Basics' When Learning Shiny New Things ✨</title>
      <dc:creator>Jolene Kearse</dc:creator>
      <pubDate>Sun, 01 Jan 2023 19:34:10 +0000</pubDate>
      <link>https://dev.to/pharaohnutz/dont-forgo-the-basics-when-learning-shiny-new-things-51f0</link>
      <guid>https://dev.to/pharaohnutz/dont-forgo-the-basics-when-learning-shiny-new-things-51f0</guid>
      <description>&lt;p&gt;We've all done it... Discovered a brand spanking new (to us anyway 😜) technology, which gets us all riled up. Maybe you follow a tutorial and come up with &lt;em&gt;this awesome thing&lt;/em&gt; or &lt;em&gt;that creative use&lt;/em&gt; and can't wait to implement them. You forge ahead only to lose momentum as you hit a &lt;em&gt;I can't believe I forgot how to do this&lt;/em&gt; wall.&lt;/p&gt;

&lt;p&gt;This happened to me after learning a bit about &lt;strong&gt;Firebase&lt;/strong&gt;. The deeper in I got, the more ideas💡I had. I was going to have my first full-stack app and it was going to be amazing!🤸‍♀️&lt;/p&gt;

&lt;p&gt;Hold up!✋Before I could dive into the &lt;strong&gt;backend&lt;/strong&gt;, there was the whole &lt;strong&gt;frontend&lt;/strong&gt; to create. I wanted &lt;strong&gt;modals&lt;/strong&gt; to pop up to sign up, and log in and out...&lt;/p&gt;

&lt;p&gt;But I'd forgotten how to do that! 🤦‍♀️ I had done it once or twice in the past, but it was definitely not &lt;em&gt;routine&lt;/em&gt; for me. &lt;/p&gt;

&lt;p&gt;So, my full charge ahead was halted, but it was still a great learning experience. I had to &lt;em&gt;uncheck&lt;/em&gt; ☑️ that item on my &lt;em&gt;'I got this down pat'&lt;/em&gt; list.   &lt;/p&gt;

&lt;p&gt;It did give me experience coding modals and overlays. And the way I see it 👀, there were two added bonuses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;My impatience to get to the shiny new thing 🎁 motivated me to deal with this task, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It was a better memory 🧠 test, when I finally got back to Firebase!   &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember there is so much to learn and new knowledge only gives you more chances to practice your skills!  &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>css</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>What I learned making Scrimba's Colour Tool 🍭</title>
      <dc:creator>Jolene Kearse</dc:creator>
      <pubDate>Tue, 03 May 2022 21:12:37 +0000</pubDate>
      <link>https://dev.to/pharaohnutz/what-i-learned-making-scrimbas-colour-tool-4lhi</link>
      <guid>https://dev.to/pharaohnutz/what-i-learned-making-scrimbas-colour-tool-4lhi</guid>
      <description>&lt;p&gt;After completing &lt;a href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/" rel="noopener noreferrer"&gt;freeCodeCamp's JavaScript Algorithms and Data Structure's Certification&lt;/a&gt;, I was looking to apply &lt;strong&gt;JavaScript&lt;/strong&gt; to a &lt;strong&gt;Frontend&lt;/strong&gt; project. I remembered &lt;a href="https://scrimba.com/learn/javascriptcolortool" rel="noopener noreferrer"&gt;Scrimba's Build a color tool in vanilla JavaScript&lt;/a&gt; and decided to give it a go! &lt;/p&gt;

&lt;p&gt;While &lt;strong&gt;Scrimba&lt;/strong&gt;'s beauty is it's interactive screencasts you can pause and code within, I wanted to work in VS Code. Only returning to the videos once I had completed the challenges.&lt;/p&gt;




&lt;p&gt;I had a sweet reunion with &lt;strong&gt;CSS&lt;/strong&gt; styling, after the &lt;em&gt;at times&lt;/em&gt; brain-breaking exercises of my JavaScript bootcamp.&lt;/p&gt;

&lt;p&gt;Then it was on to &lt;strong&gt;functions&lt;/strong&gt; with the first real challenge of the course: &lt;strong&gt;Validate a Hex Code with JavaScript&lt;/strong&gt;. I immediately thought of &lt;strong&gt;regex&lt;/strong&gt;, and, surprise, surprise, mine worked!&lt;/p&gt;

&lt;p&gt;I got cocky, thinking I'll be able to nail it out of the park. However, it was the things I struggled that taught me great lessons from this course. I'll outline 6 things I learned in this article&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 1: Don't be afraid to use the learning materials
&lt;/h2&gt;

&lt;p&gt;One part of the color tool was displaying the altered hex code in &lt;em&gt;text&lt;/em&gt; on the page. I could show the user the correct colour to the screen with &lt;strong&gt;bracket notation&lt;/strong&gt;, but had a pesky problem with the text displaying the hex code with &lt;code&gt;NaN&lt;/code&gt; rather than the &lt;code&gt;0&lt;/code&gt; I wanted. This lead to some, shall we say, &lt;em&gt;odd&lt;/em&gt; codes like &lt;code&gt;NaN7NaN&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then I remembered I had &lt;em&gt;training wheels&lt;/em&gt;! I un-paused the video and found the solution: &lt;code&gt;.substring()&lt;/code&gt;! Not only was the proper colour showing, but the returned hex was correct and not gobbledygook! &lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 2: KISS - Keep It Simple Stupid
&lt;/h2&gt;

&lt;p&gt;When converting RGB to hex, you need to place a zero in front of either of the red, green or blue values if it came back with only one character, so &lt;code&gt;9&lt;/code&gt; would be &lt;code&gt;09&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I thought one of the new methods I had learned would do the job. I spent hours reading documentation and trying to cobble together complex series of functions with: &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;filter&lt;/code&gt;, &lt;code&gt;reduce&lt;/code&gt;.  None worked until I remembered about &lt;strong&gt;ternary operators&lt;/strong&gt;. Solved with one simple line: &lt;code&gt;pair.length === 1 ? "0" + pair : pair;&lt;/code&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 3: Scope is important
&lt;/h2&gt;

&lt;p&gt;My next problem occurred through one of my stretch goals: creating a copy button. I tried out solution after solution, even the deprecated &lt;code&gt;document.execCommand('copy')&lt;/code&gt;, but nothing worked. All my tests were getting &lt;code&gt;undefined&lt;/code&gt;. Somehow when I was spinning my wheels, I &lt;em&gt;actually&lt;/em&gt; thought of scope. And when I read my code, there was my &lt;code&gt;alteredHex&lt;/code&gt; imprisoned within a function. Again a one-liner, &lt;code&gt;let alteredHex;&lt;/code&gt; placed above my function saved the day!&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 4: Account for asynchronous events
&lt;/h2&gt;

&lt;p&gt;I thought I was &lt;em&gt;finally&lt;/em&gt; done my project... Hahaha! &lt;/p&gt;

&lt;p&gt;The copy to clipboard function was &lt;em&gt;working&lt;/em&gt;, but with a &lt;em&gt;catch&lt;/em&gt;. Users would have had to click the copy button twice as the function seemed to be always one step behind.  I even thought of a &lt;em&gt;hacky&lt;/em&gt; solution like calling the function twice, then remembered asynchronous events:&lt;br&gt;
&lt;code&gt;copyBtn.addEventListener("click", async () =&amp;gt; {&lt;br&gt;
    await navigator.clipboard.writeText(alteredHex);&lt;br&gt;
    alert(&lt;/code&gt;Hex code ${alteredHex} was copied to your clipboard&lt;code&gt;)&lt;br&gt;
});&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 5: Don't forget the basics
&lt;/h2&gt;

&lt;p&gt;I used this project mainly to practice my JavaScript, but I neglected the basics! When working on &lt;strong&gt;accessibility&lt;/strong&gt; for my page, I found I had completely forgotten to add &lt;code&gt;:focus&lt;/code&gt; and &lt;code&gt;:hover&lt;/code&gt; states. &lt;/p&gt;

&lt;p&gt;I learned this when CSS was my focus, but lost sight of this important principle. While it didn't take too much to add them, I did feel like a fool for saving it until the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 6: 'Simple' is never simple
&lt;/h2&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%2Frl1doeln7wnbrode2ina.png" 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%2Frl1doeln7wnbrode2ina.png" alt="gradients for both lighten and darken" width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wanted to add a gradient to my range slider as a visual clue. I thought it would be an easy thing; I know gradients, right? &lt;/p&gt;

&lt;p&gt;Partly correct, it was easy to add a dark to light gradient, but what happens when the user switches to darken the colour? Now it's just a pretty gradient that doesn't help the user ahem, &lt;em&gt;use&lt;/em&gt;, it.&lt;/p&gt;

&lt;p&gt;The solution took a fair bit of research, but I found out I could declare the dark to light gradient in the root, then switch it in JavaScript with:&lt;br&gt;
&lt;code&gt;root.style.setProperty("--gradient", "linear-gradient(90deg, rgba(213,213,219,1) 0%, rgba(87,90,94,1) 60%, rgba(0,0,0,1) 100%)");&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;While I had 'learned' JavaScript basics, I'm just starting to apply it to frontend development. And it's awesome! Working on this project not only gave me a portfolio project, or, even just, practice working with the DOM. It taught me to about how to approach projects, and how important concepts, &lt;em&gt;that I had breezed over during my JavaScript certification&lt;/em&gt;, really are &lt;strong&gt;important&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
