<?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: Jim Reevior</title>
    <description>The latest articles on DEV Community by Jim Reevior (@hirozed).</description>
    <link>https://dev.to/hirozed</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%2F5152%2F7d00ad67-469d-4db6-92d4-f433ed17a57a.jpg</url>
      <title>DEV Community: Jim Reevior</title>
      <link>https://dev.to/hirozed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hirozed"/>
    <language>en</language>
    <item>
      <title>How I Created a Web Presence as a Web Developer</title>
      <dc:creator>Jim Reevior</dc:creator>
      <pubDate>Mon, 09 Aug 2021 01:06:21 +0000</pubDate>
      <link>https://dev.to/hirozed/how-i-created-a-web-presence-as-a-web-developer-10pj</link>
      <guid>https://dev.to/hirozed/how-i-created-a-web-presence-as-a-web-developer-10pj</guid>
      <description>&lt;h1&gt;
  
  
  How I Created a Web Presence as a Web Developer
&lt;/h1&gt;

&lt;p&gt;It was time for a refresh. My current site was several years old. In fact, I lost the Hugo config to be able to add new content. So, with some help from &lt;a href="https://ashleykolodziej.com"&gt;Ashley&lt;/a&gt; - a fantastic front-end designer and developer - we created a site that has whimsy and shows who I am and my skills.&lt;/p&gt;

&lt;p&gt;Announcing &lt;a href="https://hirozed.com"&gt;hirozed.com&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Why hirozed.com?  I’ve been using the hirozed handle for as long as I remember.  “Hiro” originated from Hiro Protagonist, the (ahem) protagonist of &lt;a href="https://en.m.wikipedia.org/wiki/Snow_Crash"&gt;Neil Stephenson’s Snow Crash&lt;/a&gt;. My memory of Hiro Protagonist was of a genius hacker, who in the metaverse was a sword-wielding protector of the domain.&lt;/p&gt;

&lt;p&gt;“Zed” is in honor of Zeddicus Zu'l Zorander, aka “Zedd”, from &lt;a href="https://en.m.wikipedia.org/wiki/The_Sword_of_Truth"&gt;Terry Goodkind’s Sword of Truth&lt;/a&gt; series. Zedd is a wizard of the first order, and mentor to the main character.&lt;/p&gt;

&lt;p&gt;I loved these two books, so when I was thinking of a handle that wasn’t just my first initial/last name, these two characters stood out. They spoke to what I aspired to be in my life.  Maybe not a genius hacker, but quite good in my profession, as well as a mentor to those around me.  I was in my 20’s when I invented my username, but I think I might have gotten close to the spirit of my online handle 20-plus years later.&lt;/p&gt;

&lt;p&gt;So, the answer to the above question I posed to myself is: hirozed is me online.&lt;/p&gt;

&lt;p&gt;Now, as for what runs the site.  It is a static site, using &lt;a href="https://jigsaw.tighten.co/"&gt;Jigsaw&lt;/a&gt; as the framework.  Jigsaw uses Laravel’s &lt;a href="https://laravel.com/docs/8.x/blade"&gt;blade templating&lt;/a&gt;.  Since one of my goals this year is to learn Laravel, it was the perfect fit for my site. &lt;a href="https://github.com"&gt;GitHub&lt;/a&gt; is where I've decided to store my repos, and &lt;a href="https://netlify.com"&gt;Netlify&lt;/a&gt; watches for changes to my main branch and rebuilds my site.&lt;/p&gt;

&lt;p&gt;I have a bigger ambition than a single page site -- I want to start blogging.  However, all attempts at headless CMSs seemed to complicate what I wanted for a straightforward low-maintenance environment.  Since I was going to publish on both &lt;a href="https://blog.hirozed.com"&gt;Hashnode&lt;/a&gt; and &lt;a href="https://dev.to/hirozed"&gt;Dev.to&lt;/a&gt;, I decided to make Hashnode my primary blog site.  They allow for a custom domain (hello &lt;a href="https://blog.hirozed.com"&gt;blog.hirozed.com&lt;/a&gt;) and I can take the same markdown content and create a post on Dev.to, referencing the original post there.&lt;/p&gt;

&lt;p&gt;I decided that I still could use a CMS for maintaining content. Using &lt;a href="https://netlifycms.org"&gt;Netlify CMS&lt;/a&gt;, I can keep my content on my own repo and will give me a bare-bones environment view a preview of my post. There are several templates using different static site generators.  I chose the Nuxt.js template, which turned out to be easy to configure and stayed out of my way.&lt;/p&gt;

&lt;p&gt;What I genuinely enjoy about Netlify CMS is there is a built-in editorial workflow. The workflow will create a branch for a new post and assign it to Draft status.  When a post is ready for a once-over, set the status to "In review".  Finally, when the post is complete, assign it to "Ready" and the CMS will merge the post into the main branch.  During this entire process, a preview of the posts' branch will be available to view and share using Netlify's &lt;a href="https://www.netlify.com/products/deploy-previews/"&gt;deploy preview&lt;/a&gt; feature.  It will create a staging site for the specific branch.&lt;/p&gt;

&lt;p&gt;The final piece of my blogging infrastructure is an NPM utility called &lt;a href="https://www.npmjs.com/package/cross-post-blog"&gt;cross-post&lt;/a&gt;.  This will take the content from the main blog (in this case, the url for my CMS environment) and post to Hashnode and Dev.to.  This post is my first attempt at this, so I’m crossing fingers.&lt;/p&gt;

&lt;p&gt;I’ve also added links to &lt;a href="https://work.hirozed.com"&gt;Polywork&lt;/a&gt; and &lt;a href="https://read.cv/hirozed"&gt;read.cv&lt;/a&gt;.  These are two services that show what I’ve done and where I’ve been in different formats.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://howivscode.com/hirozed"&gt;How I VSCode&lt;/a&gt; is a service which allows you to share the extensions and themes I use on my editor of choice.  VSCode will be a blog post for a future time, but basically, the large ecosystem and wide adoption are definite benefits.&lt;/p&gt;

&lt;p&gt;The widgets at the bottom of the site are based on a library called &lt;a href="https://github.com/anuraghazra/github-readme-stats"&gt;GitHub readme stats&lt;/a&gt;.  It is a set of scripts hosted on &lt;a href="https://vercel.com"&gt;Vercel&lt;/a&gt; that generates stats based on your GitHub info. It is meant for custom Readme files that you show on your GitHub page, but it works just as well on my site. The second widget is also from the same repo but pulls the information from &lt;a href="https://wakatime.com"&gt;Wakatime&lt;/a&gt;. Wakatime silently watches your code editors, in a non-creepy way, and gathers statistics on what language you are working in, how long you have spent on a project, and other metrics. I've been using it for years, and I find it a great metric on what other languages I've interacted with beyond PHP.&lt;/p&gt;

&lt;p&gt;The final piece I want to talk about is the hirozed “brand”.  I pestered my sweet, patient partner Ashley to come up with an avatar that I could use.  I have an affinity for red pandas, so I wanted something based off of that.  Once she finally relented, she invented the perfect embodiment of hirozed.  My avatar is that of a nerdy red panda in the shape of a keycap, The banners she created, take that one step further and spell out my online persona also in keycaps.  I now have brand colors, which I have attempted to incorporate wherever I can.  Overall, I now have a sense of identity online.&lt;/p&gt;

&lt;p&gt;I hope that my ramblings about my new online center of the web was interesting.  If you have any questions, please let me know and I’ll try to answer as best as I can.&lt;/p&gt;

</description>
      <category>php</category>
      <category>html</category>
    </item>
    <item>
      <title>TIL: IntersectionObserver Class in JavaScript</title>
      <dc:creator>Jim Reevior</dc:creator>
      <pubDate>Sun, 18 Apr 2021 17:24:42 +0000</pubDate>
      <link>https://dev.to/hirozed/til-intersectionobserver-class-in-javascript-53e2</link>
      <guid>https://dev.to/hirozed/til-intersectionobserver-class-in-javascript-53e2</guid>
      <description>&lt;p&gt;Okay, this was a few days ago, but 🤷🏻‍♂️.&lt;/p&gt;

&lt;p&gt;Over the last week, I've been devouring &lt;a href="https://www.udemy.com/course/the-complete-javascript-course/" rel="noopener noreferrer"&gt;The Complete JavaScript Course&lt;/a&gt; as a way to 1. Get over my fear of JavaScript (that's a post for a later time) and 2. Ensure my current carrer as a WordPress developer doesn't stay stuck in the pre-Gutenberg world (that's also another tale for another time).  The course itself was fantastic, and has put me in a better place mentally and emotionally to take on JS/Gutenberg projects.&lt;/p&gt;

&lt;p&gt;There was one section that I wanted to write about today.  It's a feature that I’d never heard of before and would solve some past issues I've seen at work regarding components of a websites sliding into view and triggering an action.&lt;/p&gt;

&lt;p&gt;It’s the ✨ IntersectionObserver ✨ class.&lt;/p&gt;

&lt;p&gt;The JavaScript &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver" rel="noopener noreferrer"&gt;IntersectionObserver&lt;/a&gt; class (which is part of the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API" rel="noopener noreferrer"&gt;Intersection Observer API&lt;/a&gt;) can be used to indicate when a portion of a website scrolls a specified distance down the page or within reach of an element:&lt;/p&gt;

&lt;p&gt;From there, you can do wonderful things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set the navigation bar to stick to the top of the page when scrolling past a certain point.&lt;/li&gt;
&lt;li&gt;Lazy load images when or before the come into view.&lt;/li&gt;
&lt;li&gt;Ease sections into view on scroll.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://assets.hirozed.xyz/viewport.png" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.hirozed.xyz%2Fviewport.png" class="article-body-image-wrapper"&gt;&lt;img alt="Screen capture of browser to illustrate the nav reaching a portion of the page." src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.hirozed.xyz%2Fviewport.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is an example of a sticky navigation from the class’s Github repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/jonasschmedtmann/complete-javascript-course/blob/master/13-Advanced-DOM-Bankist/final/script.js#L137-L156" rel="noopener noreferrer"&gt;The Complete JavaScript Course - section 13: Advanced DOM and Events&lt;/a&gt; credit &lt;a href="https://codingheroes.io/" rel="noopener noreferrer"&gt;Jonas Schmedtmann&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sticky navigation: Intersection Observer API&lt;/span&gt;

&lt;span class="c1"&gt;// Get the first section of content based on the .header class&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;header&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.header&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Get the height of the navigation bar&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;navHeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;nav&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getBoundingClientRect&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Add or remove the sticky class to the nav bar,&lt;/span&gt;
&lt;span class="c1"&gt;// based on the entries retrieved from the IntersectionObserver class.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stickyNav&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// There is only one header, so we don't need to loop,&lt;/span&gt;
  &lt;span class="c1"&gt;// and can deconstruct the array.&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// This is where the magic happens.&lt;/span&gt;
  &lt;span class="c1"&gt;// When the header is past the viewport, add the sticky class.&lt;/span&gt;
  &lt;span class="c1"&gt;// Else, when it comes back into view, remove the class.&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isIntersecting&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;nav&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sticky&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nx"&gt;nav&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sticky&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Calling the IntersectionObserver class.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;headerObserver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;IntersectionObserver&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stickyNav&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;root&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Declaring null uses the entire viewport.&lt;/span&gt;
  &lt;span class="na"&gt;threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;//  The percentage of the header to come into view.&lt;/span&gt;
  &lt;span class="na"&gt;rootMargin&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;span class="nx"&gt;navHeight&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;px`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// The offset based on the nav bar's height.&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Get some popcorn, the fun is about to start.&lt;/span&gt;
&lt;span class="nx"&gt;headerObserver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;observe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;header&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also want to point out &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect" rel="noopener noreferrer"&gt;&lt;code&gt;getBoundingClientRect&lt;/code&gt;&lt;/a&gt;. This function provides the size of an element and where it's located in relation to the viewport.  In the example above, Jonas only uses the height value, but you can grab the size and the distance from the viewport as well.&lt;/p&gt;

&lt;p&gt;Learning about the Intersection Observer API was an unexpected and exciting piece of the huge amount of information I downloaded into my brain. I can see using the API as a much more reliable method for detecting when sections of the site come into and out of view, and replacing a placeholder with a higher quality image.  Causing text to zoom in when the container div scrolls into view.  The possibilities are endless!&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Hi, I'm Jim Reevior</title>
      <dc:creator>Jim Reevior</dc:creator>
      <pubDate>Wed, 22 Feb 2017 18:38:31 +0000</pubDate>
      <link>https://dev.to/hirozed/hi-im-jim-reevior</link>
      <guid>https://dev.to/hirozed/hi-im-jim-reevior</guid>
      <description>&lt;p&gt;I have been coding for a number of years.&lt;/p&gt;

&lt;p&gt;You can find me on Twitter as &lt;a href="https://twitter.com/hirozed" rel="noopener noreferrer"&gt;@hirozed&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I live in the Boston area.&lt;/p&gt;

&lt;p&gt;I work for &lt;a href="https://www.statnews.com" rel="noopener noreferrer"&gt;STAT News&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I mostly program in PHP as as WordPress backend dev.&lt;/p&gt;

&lt;p&gt;I am currently learning more about JavaScript &amp;amp; front end..&lt;/p&gt;

&lt;p&gt;Nice to meet you.&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
