<?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: Drew Pellum</title>
    <description>The latest articles on DEV Community by Drew Pellum (@apellum).</description>
    <link>https://dev.to/apellum</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%2F693362%2Fb6c9690c-c432-4dc8-a2d3-f29cd5b773db.png</url>
      <title>DEV Community: Drew Pellum</title>
      <link>https://dev.to/apellum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/apellum"/>
    <language>en</language>
    <item>
      <title>Important things to know when creating authorization with sessions</title>
      <dc:creator>Drew Pellum</dc:creator>
      <pubDate>Thu, 04 Nov 2021 18:54:54 +0000</pubDate>
      <link>https://dev.to/apellum/important-things-to-know-when-creating-authorization-with-sessions-3mcn</link>
      <guid>https://dev.to/apellum/important-things-to-know-when-creating-authorization-with-sessions-3mcn</guid>
      <description>&lt;p&gt;When creating authorization, there are some important setup steps to make sure that your sessions save.&lt;/p&gt;

&lt;p&gt;Setup&lt;/p&gt;

&lt;p&gt;The backend setup is crucial if you want to be able to save your sessions.&lt;/p&gt;

&lt;p&gt;Cors: Make sure that you have enabled the cors gem and also set up cors.rb&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%2F95b8l0kye62x1iacsjt6.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%2F95b8l0kye62x1iacsjt6.png" alt="Cors"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is important to make sure that “credentials” are true.&lt;br&gt;
You also need to make sure that your application.rb file is set up&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%2F4m6ngqmcd8g8s1uzy96r.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%2F4m6ngqmcd8g8s1uzy96r.png" alt="application.rb"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The important lines of code are lines 25, 26, 30, and 33. Lines 25 and 26 must be above 30 and 33.&lt;/p&gt;

&lt;p&gt;Make sure to create your session routes and create your session controller.&lt;/p&gt;

&lt;p&gt;Your session custom routes will need to be a post and a destroy.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;post ‘/login’, to: ‘sessions#create’&lt;/code&gt;&lt;br&gt;
&lt;code&gt;delete ‘/logout’, to: ‘sessions#destroy’&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the sessions controller your create method will look something like this&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%2F3jhwo8u6cowf3mrw3kvp.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%2F3jhwo8u6cowf3mrw3kvp.png" alt="Sessions Controller"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On your front-end, you will need to use withCredentials: true in your fetches&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%2F18zk0z3oqkig5forozfa.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%2F18zk0z3oqkig5forozfa.png" alt="withCredentials"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this set up, you should be able to refresh the page and stay logged in&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Local Storage for handling in React</title>
      <dc:creator>Drew Pellum</dc:creator>
      <pubDate>Thu, 04 Nov 2021 18:49:49 +0000</pubDate>
      <link>https://dev.to/apellum/using-local-storage-for-handling-in-react-1ipj</link>
      <guid>https://dev.to/apellum/using-local-storage-for-handling-in-react-1ipj</guid>
      <description>&lt;p&gt;Wanting to store data, but not necessarily wanting to POST/GET?&lt;/p&gt;

&lt;p&gt;Awesome. This can be done by using local storage.&lt;/p&gt;

&lt;p&gt;I ran into this issue when I was trying to make transactions in my ski resort app. I wanted to use variables that I was already using in my “Sale POST”.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Something to note&lt;/strong&gt;* If you are looking to make a transaction model in Rails, it will not work. Rails already has methods associated with “Transaction”. So you will need to name it something else. In my case, I used Sale.rb for my model.&lt;/p&gt;

&lt;p&gt;In my “Sale POST”, I used set items like this.&lt;/p&gt;

&lt;p&gt;I set my state to :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const [sale, setSale] = useState({&lt;br&gt;
customer_id: JSON.parse(localStorage.getItem(‘customer_id’)),&lt;br&gt;
user_id: currentUser.id,&lt;br&gt;
product_ids: []&lt;br&gt;
})&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;On the customer I was using, I was able to pull the set customer from local storage. I stored this on a click in my code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const handleAddCustomerToCart = (customerToAdd) =&amp;gt; {&lt;br&gt;
const customerInCart = customers.find((customer) =&amp;gt; customer.id === customerToAdd.id)&lt;br&gt;
setCartCustomer(customerInCart)&lt;br&gt;
localStorage.setItem(‘customer_id’, customerToAdd.id);&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Storing an item to localStorage is easy. You need to use the code &lt;code&gt;localStorage.setItem()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Inside of the setItem function, you need to name what you are saving to local storage. In the case above, I used ‘customer_id’. You also need to save a value to this key. For me, it was a value passed into my click function with an id.&lt;br&gt;
Some other important localStorage functions include: &lt;code&gt;removeItem and getItem&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I used getItem in my sale state to pull the id from local storage.&lt;/p&gt;

&lt;p&gt;I also used removeItem in my sale post. After posting a transaction, I cleared the cart and removed the customer associated.&lt;/p&gt;

&lt;p&gt;These are some beneficial ways to store data when you don’t necessarily need to post to a server.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Becoming a confident developer with practice</title>
      <dc:creator>Drew Pellum</dc:creator>
      <pubDate>Thu, 04 Nov 2021 18:47:38 +0000</pubDate>
      <link>https://dev.to/apellum/becoming-a-confident-developer-with-practice-4kb3</link>
      <guid>https://dev.to/apellum/becoming-a-confident-developer-with-practice-4kb3</guid>
      <description>&lt;p&gt;When I first began coding I was overwhelmed and unsure if I was going to be able to do this. One of my first blogs was about feelings of incompetence in coding.&lt;/p&gt;

&lt;p&gt;After writing this bog, I started to follow my directions of practicing more. This led to me putting concepts together and beginning to understand more. I also noted that I didn’t have to know everything. This was important too. There are so many ways to write code and there are so many different languages that I will never know it all, because I have resources to help. I can learn from the internet, mentors, books, peers, and even people in my current position one day.&lt;/p&gt;

&lt;p&gt;My biggest breakthrough was when we started to learn Ruby. Some of the variables and concepts we had been learning were visible to me in the back end. I was able to add a pry and test out what my code was doing before sending it to react.&lt;br&gt;
By understanding the back end, I was able to focus on new ideas in React and implement them.&lt;/p&gt;

&lt;p&gt;As I was coding my own projects more, specifically my final project I felt more comfortable stepping outside of my comfort zone and trying to create things I had never tried or seen how to do before.&lt;/p&gt;

&lt;p&gt;Becoming a software developer is a journey not a race. It doesn’t take a day, but you can learn something new each day and take it with you to the next. It is like building a skyscraper. It starts with a foundation. In this case the foundation is learning the basics. Once there is a strong foundation of the basics, you can begin the architecture to build large extravagant buildings that serve many purposes.&lt;br&gt;
Moving forward, I know it is important to continue learning and to ask when you don’t know how to do something. Coding is ever evolving and there are new tools available every day. It is important to research when something doesn’t make sense and to always refine your craft.&lt;/p&gt;

&lt;p&gt;My schooling is ending, but my journey is just beginning. I have much to learn and to refine. I have more comfort zones to step out of. There are mistakes to be made, code to be broken and fixed again and broken so that it can be fixed once again. There is more modern styling that I can learn and implement each time I create a new web application.&lt;/p&gt;

&lt;p&gt;I can’t wait to build something incredible and say that it all started because I wanted to learn.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The importance of using Git correctly and how to use it.</title>
      <dc:creator>Drew Pellum</dc:creator>
      <pubDate>Thu, 04 Nov 2021 18:38:12 +0000</pubDate>
      <link>https://dev.to/apellum/the-importance-of-using-git-correctly-and-how-to-use-it-1dpn</link>
      <guid>https://dev.to/apellum/the-importance-of-using-git-correctly-and-how-to-use-it-1dpn</guid>
      <description>&lt;p&gt;Yeah, we know you can store your code in Github, but what are the other benefits? &lt;/p&gt;

&lt;p&gt;The primary benefit of GitHub is its version control system, which allows for seamless collaboration without compromising the integrity of the original project.&lt;/p&gt;

&lt;p&gt;What does this mean? &lt;/p&gt;

&lt;p&gt;Git allows you to create new branches of code to work on without updating the main branch.&lt;/p&gt;

&lt;p&gt;This is cool, but why is that important?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Bugs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When pushing only to the main branch, you can have typos in your code. This can break the code that is already working. Not ideal buddy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Updating Code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Yeah, it's cool to have code that always works, but if it never updates, then it will get left behind. Each day is an opportunity to learn what best practices in the industry are and you can make improvements to your code. &lt;/p&gt;

&lt;p&gt;Technology is ever evolving and it becomes more advanced each day. Without updating your code, you don't give yourself the opportunity to use this new technology.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Customers&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the tech world, there is always a way to improve a product. Customers give feedback on how they use your product and how they would like to use it in the future. Product managers take the feedback and prioritize features to start working on. It allows us to make our code more valuable and potentially increase profit in the future. By adding these features, customers are more willing to recommend your product to others increasing profit even more.&lt;/p&gt;

&lt;p&gt;Now that you know why git is important and how it allows you to control your versions, how do you use it?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a new branch in the terminal&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;git branch&lt;/code&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This allows you to see the current branch you are using.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;git branch &amp;lt;new-branch-name&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will create a new branch off of the one you are currently using.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;git checkout &amp;lt;branch-name&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This allows you to checkout the new branch you created.&lt;/p&gt;

&lt;p&gt;You can also switch branches using &lt;code&gt;git switch &amp;lt;branch-name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now that you've created a new branch, you can start adding new code or update code that you've already written.&lt;/p&gt;

&lt;p&gt;With that being said, make sure that you are git committing your new code with messages.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git add .&lt;/code&gt; &lt;br&gt;
&lt;code&gt;git commit -m "Message Here&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git push&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After you've pushed to your new branch, you can merge to the main branch. Make sure that it is working code FIRST.&lt;/p&gt;

&lt;p&gt;You can merge to main by making a pull request. On your github page you can select pull-request and make a new pull request by following the steps in the gif below.&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%2Fsxh3nzoz8dvteixhmyfm.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%2Fsxh3nzoz8dvteixhmyfm.png" alt="Pull Request from Git"&gt;&lt;/a&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%2Fjjuislpnmdlns5qlip70.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%2Fjjuislpnmdlns5qlip70.png" alt="Go to Pull Request Page"&gt;&lt;/a&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%2Fsv57mpabe871iauzaxpv.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%2Fsv57mpabe871iauzaxpv.png" alt="Create Pull Request"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After doing this, you can merge the pull request into your main branch for production.&lt;/p&gt;

&lt;p&gt;Now that you've merged into main what do you do with the code in visual studio?&lt;/p&gt;

&lt;p&gt;You can pull!&lt;/p&gt;

&lt;p&gt;Switch to main by &lt;code&gt;git switch main&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Pull&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git pull&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now you have the active code in main branch and you can start the process all over again.&lt;/p&gt;

&lt;p&gt;Following this guide will allow you to reduce mistakes that will create outages and bugs. It will also teach you important skills for a job. Many job postings require knowledge of git and it is important for them to have developers that won't cause setbacks or outages. They want to know that you will be able to help them with their main goal of delivering high quality products to their customers as fast as possible. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>My Coding Journey</title>
      <dc:creator>Drew Pellum</dc:creator>
      <pubDate>Sun, 31 Oct 2021 22:56:50 +0000</pubDate>
      <link>https://dev.to/apellum/my-coding-journey-2oli</link>
      <guid>https://dev.to/apellum/my-coding-journey-2oli</guid>
      <description>&lt;p&gt;My Background: I have a bachelors degree in exercise science.&lt;br&gt;
Why is this important? It led me to where I am today!&lt;/p&gt;

&lt;p&gt;After graduation, I was unsure of what was next for me, so I went to work for my dad while I figured that out.&lt;br&gt;
After working for my dad at his restaurant for several months, I started applying for any and every job. I was applying to jobs in the outdoor industry (one of my biggest interests) along with ski resorts (now my favorite hobby snowboarding).&lt;br&gt;
While I was doing this, I accidentally accepted two jobs. First, as a snowboard instructor with Winter Park Ski Resort. The other offer came after as a call center agent with Vail Resorts.&lt;/p&gt;

&lt;p&gt;I decided that I had to call and turn down one of the offers, so I let Winter Park know that I would not be arriving in Colorado to be a snowboard instructor. However, I did go to Colorado to work at Vail starting in November of 2017.&lt;/p&gt;

&lt;p&gt;In my time at Vail, I was presented the opportunity to become the supervisor of my office shortly after the summer program started in July of 2018. Doing this helped to teach me lots of valuable skills in managing a team, creating training workflows, along with dealing with difficult customers.&lt;br&gt;
I knew that my ceiling could be so much higher after gaining all these skills and showing how I could implement them into my work, so I started to look at more options.&lt;br&gt;
My skills were still limited to customer service, but I found a startup that had awesome culture and could introduce me to many more options.&lt;br&gt;
I accepted a job with Zen Planner (Fitness Member Management Software) in May of 2019 as a customer advocate. In this role, I taught users of the software how to use it and helped with issues. This was very rewarding because I was solving problems all day and letting the customers get back to what they were best at (Running their gyms and coaching).&lt;br&gt;
As soon as I started, the parent company Daxko acquired a fitness app called SugarWOD. Little did I know this acquisition would help me to pivot and change my career trajectory.&lt;br&gt;
I began working with SugarWOD doing part time email customer support in September of 2019 and was given the opportunity to go to events with the team.&lt;br&gt;
In February of 2020, I went with the team to Wodapalooza (a CrossFit competition in Miami) and had a blast. I was able to watch the event, interact with customers and users of the app, along with talking about a product I had so much knowledge about.&lt;br&gt;
Things began to change&lt;br&gt;
In march of 2020, COVID hit and my industry was taken by surprise. I began working for SugarWOD full time and it was the best move I’ve ever made. SugarWOD was actually built perfect for this. With all these gyms moving remote, they could use SugarWOD as a way to get the workouts to their athletes and keep them engaged. The tool helped with retention for gyms and helped athletes to communicate outside of the gym.&lt;br&gt;
With SugarWOD, I started training with product managers and I had an opportunity to apply for a product manager opening with SugarWOD. I made it to the second part of the interview which was a project to create a roadmap for the product. I didn’t get the job, but it introduced me to working with developers, product managers, and what an incredible product looks like.&lt;br&gt;
Over the next months, I worked with features and became an apprentice as a product manager. I realized that it would take a lot of time to become a product manager and there is a huge responsibility that comes with being a product manager and creating the vision for the company.&lt;br&gt;
This is how my journey led me to Flatiron and starting to code. I downloaded Codecademy and began learning HTML and CSS. I did some work with Javascript, but most of my experience was watching the SugarWOD developers in code reviews. I decided to make the plunge and start working toward a career in Software Development!&lt;/p&gt;

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