<?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: JasonEricDavis</title>
    <description>The latest articles on DEV Community by JasonEricDavis (@jasonericdavis).</description>
    <link>https://dev.to/jasonericdavis</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%2F132300%2F2ed6cd0b-1f78-420a-b7a9-e2bf487cd0f9.png</url>
      <title>DEV Community: JasonEricDavis</title>
      <link>https://dev.to/jasonericdavis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jasonericdavis"/>
    <language>en</language>
    <item>
      <title>GitHub Action: Add Environment Variables To The Step That Is Using Them</title>
      <dc:creator>JasonEricDavis</dc:creator>
      <pubDate>Sun, 24 Oct 2021 13:16:07 +0000</pubDate>
      <link>https://dev.to/jasonericdavis/github-action-add-environment-variables-to-the-step-that-is-using-them-2d7k</link>
      <guid>https://dev.to/jasonericdavis/github-action-add-environment-variables-to-the-step-that-is-using-them-2d7k</guid>
      <description>&lt;p&gt;For the &lt;a href="https://github.com/jasonericdavis/FF_Picker"&gt;fantasy football picker&lt;/a&gt; project that I am working on, a GitHub Action is used to download, parse and upload the stats to a Supabase database. For the action to connect to the database the action needs to know the database URL and database key both of which should be kept a secret.  &lt;/p&gt;

&lt;p&gt;GitHub Actions have the ability to pass secrets as environment variables and I used the steps listed at &lt;a href="https://docs.github.com/en/actions/security-guides/encrypted-secrets"&gt;here&lt;/a&gt; to pass the secrets as environment variables. Or so I thought. When the action ran the script I had written was unable to connect to the database because the environment variables containing the secrets did not exist. After hours of trying to figure out the problem, I remembered another project that was doing pretty much the same thing that I was doing. So I checked out the way that &lt;a href="https://opensauced.pizza/"&gt;open-sauced&lt;/a&gt; ran its &lt;a href="https://github.com/open-sauced/actions/blob/62ad19d336b0915be6642043be77b1e926976230/.github/workflows/populate-the-supabase.yml#L28"&gt;populate-supabase action&lt;/a&gt; and it dawned on me, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The environment variables have to be set in the step they are being used in.&lt;/em&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After correcting the yaml for the action to set the secrets as environment variables in the step that was running the script the action was able to connect to the database.&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RnsmANPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f843b7go06s1znb40gmv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RnsmANPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f843b7go06s1znb40gmv.png" alt="the correct yaml file"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>githubactions</category>
    </item>
    <item>
      <title>Worth Every Penny</title>
      <dc:creator>JasonEricDavis</dc:creator>
      <pubDate>Sun, 01 Aug 2021 11:43:43 +0000</pubDate>
      <link>https://dev.to/jasonericdavis/worth-every-penny-92b</link>
      <guid>https://dev.to/jasonericdavis/worth-every-penny-92b</guid>
      <description>&lt;p&gt;In my junior year of college, I knew I needed to prepare myself to have a job when I finished school. My goal was to try to get a job at a technology company that summer. &lt;br&gt;
The school that I went to had an annual job fair (yes like once a year) in which only a handful of companies showed up. &lt;br&gt;
Although my school was in an up-and-coming technology area we were lucky if even one technology company showed up to the job fair. &lt;br&gt;
At this point in time the Internet was somewhat commonplace but online job search wasn’t quite a thing. &lt;br&gt;
So with a stack of resumes, I hit the pavement in search of a job. In hindsight maybe my approach was a little naive, but I put forth the effort in the best way that I knew how. &lt;br&gt;
I knew where the technology companies were in my area and I would show up at the front desk dressed ready for an interview and ask about any job opportunities. I even offered to leave my resume. &lt;br&gt;
Sometimes I was able to speak to someone nice enough to not crush my hopes in front of me but never contact me again. Other times I would be told, “We are not hiring”.&lt;/p&gt;

&lt;p&gt;There was one place in particular that I remember to this day. Dressed in my job search attire I walked into the office and did the same spill had done several times before. &lt;br&gt;
This time I was able to speak with someone responsible for hiring. “We don’t have room for anyone at this time” she explained after asking her to consider hiring me. &lt;br&gt;
At this point, I knew getting experience was more important than making money. I had heard the story about how Puff Daddy had worked at the radio station for free before getting his big break. &lt;br&gt;
With this in mind I responded, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I am willing to work for free&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;“We don’t have room for free” was her response. Devastated I walked back to my car thinking, “No room for free?”. How do you not have room for free?&lt;/p&gt;

&lt;p&gt;That rejection hit harder than the others. I could understand that I didn't have the best resume or that I didn't come from a big school but to say they had no room for free meant they thought I would be a waste of “space”. &lt;br&gt;
I was confident that I could be an asset to the company and add value but to them, I wasn’t even worth the free potential.&lt;/p&gt;

&lt;p&gt;What’s the point of this story? That was a pivotal moment in self-confidence. Had I not believed in my worth and abilities I could have easily been demoralized and lost all confidence. &lt;br&gt;
Instead, I used that moment to motivate me to work harder and so that nobody could deny my value. &lt;strong&gt;You are worth every penny&lt;/strong&gt;, don’t let anyone deny your value.&lt;/p&gt;

</description>
      <category>motivation</category>
    </item>
    <item>
      <title>Tips For Estimating</title>
      <dc:creator>JasonEricDavis</dc:creator>
      <pubDate>Sat, 24 Apr 2021 13:44:02 +0000</pubDate>
      <link>https://dev.to/jasonericdavis/tips-for-estimating-2e90</link>
      <guid>https://dev.to/jasonericdavis/tips-for-estimating-2e90</guid>
      <description>&lt;p&gt;No matter what type of job you have you will be asked to provide an estimate of when you will be able to complete a task. You may be asked to estimate how long will it take to create a document, or complete a project. Everyone hates estimates. I don’t think I have ever come across a person that enjoys estimates. If you are new to estimates or have trouble creating estimates, this post will provide some pointers that I use when creating estimates. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Everyone hates estimating. &lt;/li&gt;
&lt;li&gt;You probably won’t have all of the details so use the information that you know. &lt;/li&gt;
&lt;li&gt;Create bucket sizes.&lt;/li&gt;
&lt;li&gt;Try to breakdown larger tasks into smaller tasks to make more precise due dates.&lt;/li&gt;
&lt;li&gt;Practice giving estimates to become better at them. &lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  You don’t need all of the details
&lt;/h3&gt;

&lt;p&gt;One of the biggest complaints that I have heard regarding estimates is not having enough information to give an accurate estimate. Chances are you will not have all of the details when asked for an estimate but chances are you will have a general idea of how long the task would take you.  Having a general idea of something and all of the details are two different things.  So give your estimate based on your general idea, aka “gut feeling”, of how long it will take to accomplish.  You will be surprised how good your gut is at providing estimates. That is not to say that there won’t be things that are overlooked or surprises that can destroy your estimate, but trying to account for theoretical scenarios that more than likely won’t happen will not add any value to your estimation. &lt;/p&gt;

&lt;h3&gt;
  
  
  Have Bucket Sizes
&lt;/h3&gt;

&lt;p&gt;The first thing I do when creating an estimate whether it is in my head, on paper, or on my computer is to put things into buckets. Buckets help me categorize how much effort I think the work will be.  Buckets aren’t meant to provide very precise estimates but to start with a timeframe in which the task can be accomplished.  This helps to know if the task is feasible within the given timeframe or if the task needs to be broken down further. &lt;/p&gt;

&lt;p&gt;These are the buckets that I use:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Small:&lt;/strong&gt;  Represents 1 day to 1 week's worth of work.  Tasks in this bucket are tasks in which I know what needs to be done and how to accomplish the task. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Medium:&lt;/strong&gt; Represents 1 week to 1 month's worth of work. Tasks in this bucket are tasks in which I may know the details but I more than likely only have a general idea of what needs to be done&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Large:&lt;/strong&gt; Represents 1 to 6 month's worth of work.  Tasks in this bucket  I may have a general idea about or I need more information about.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;X-large:&lt;/strong&gt; This bucket is meant for things that either I have no idea how to accomplish and/or need to be broken down a lot more.&lt;/p&gt;

&lt;p&gt;It is important to note that these buckets are specific to the way that I like to breakdown my estimates and your buckets should be specific to you.  Your buckets may have different sizes and rationales. Also, T-shirt sizes may make more sense to you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Be More Precise
&lt;/h3&gt;

&lt;p&gt;While buckets are good for having an idea of when a task can be completed, eventually you will be asked to provide a date of when you expect to complete a task. This is where precision comes in. The smaller the timeframe or the smaller the bucket the easier it is to be more precise about the deadline. It’s much harder to give a specific completion date for tasks that will take months to complete than tasks that can be completed in a couple of days.&lt;/p&gt;

&lt;p&gt;Tasks that take longer than a month I try to break up into several small or medium bucket tasks. From there I can get an idea of a specific date by making a timeline based on how the broken down tasks align.  This also helps to keep track of progress and whether I am ahead or behind schedule.&lt;/p&gt;

&lt;p&gt;I try to avoid Friday deadlines especially if it involves other people, because who wants to be the person asking people to complete a task on a Friday when they should be winding down for the weekend. I also tend to think about uncompleted Friday tasks over the entire weekend when I should be refreshing myself and not thinking about work.  And for that same reason, I try to avoid Monday deadlines also. If given the opportunity I try to make tasks due between Tuesdays and Thursdays.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practice Makes Better, Not Perfect
&lt;/h2&gt;

&lt;p&gt;Estimation is a skill that you don’t become perfect at but rather better at. To become better and get more comfortable at estimating, you have to practice.  Practice by creating personal estimates for yourself. The more you estimate the easier it gets.  &lt;/p&gt;

&lt;p&gt;&lt;span&gt;Photo by &lt;a href="https://unsplash.com/@jeshoots?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;JESHOOTS.COM&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/planning?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

</description>
      <category>development</category>
      <category>process</category>
    </item>
    <item>
      <title>URL Hash</title>
      <dc:creator>JasonEricDavis</dc:creator>
      <pubDate>Wed, 13 Jan 2021 01:07:39 +0000</pubDate>
      <link>https://dev.to/jasonericdavis/url-hash-30lf</link>
      <guid>https://dev.to/jasonericdavis/url-hash-30lf</guid>
      <description>&lt;h2&gt;
  
  
  Many Moons Ago
&lt;/h2&gt;

&lt;p&gt;When I first began to create HTML pages many many moons ago I remember being fascinated that I could have a web page scroll directly to a portion of the page by giving the element an id and then using the hash symbol  &lt;code&gt;#&lt;/code&gt;  , followed by the id as the href value in an anchor tag. OR I could put that same thing at the end of the URL to have the page directly navigate to that portion of the page.  I know that doesn’t sound that exciting but at this time I was also using notepad (not notepad++) to create web pages. Random tidbit my first web page was about Kevin Garnett. &lt;/p&gt;

&lt;h2&gt;
  
  
  Many Suns Later
&lt;/h2&gt;

&lt;p&gt;Fast forward many many suns later (last weekend to be exact) and the hash symbol in a URL is brought to my attention again while working with Twitch’s OAuth authentication. Without getting deep into the details when using the OAuth implicit code flow a http request is sent in order to receive a token that used in subsequent request to the Twitch API. How is the token returned? In the URL of course (sarcasm). A redirect_uri parameter is sent in the authentication request. After the user authenticates the authentication process will redirect the user’s browser to the redirect_uri with the token appended using the hash symbol.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;REQUEST: GET http://twitchauth?redirect_uri=http://comeback_to_this_page
RESPONSE: http://comeback_to_this_page#access_token=TOKEN_NOW_GO_HAVE_FUN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Well now that I have the token how do I get it so that I can use it? Since I was using javascript I simply used the &lt;code&gt;location.hash&lt;/code&gt; function to get the token (of course removing the unnecessary characters also).&lt;/p&gt;

&lt;h2&gt;
  
  
  So what exactly is the hash?
&lt;/h2&gt;

&lt;p&gt;Well the hash is technically a URL fragment that is used to scroll the browser to predefined positions on the page.  The hash is located at the end of the url separated by the &lt;code&gt;#&lt;/code&gt; symbol. I was introduced to hashes as HTML anchors.  Now they are also used to add dynamic functionality web pages. Other places that you might see the url hash in action is single-page webapps, React Router’s &lt;a href="https://reactrouter.com/web/api/HashRouter"&gt;HashRouter&lt;/a&gt; or in URLs used to open apps or webpages on mobile phones. &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
