<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Web Dev Junkie on Medium]]></title>
        <description><![CDATA[Stories by Web Dev Junkie on Medium]]></description>
        <link>https://medium.com/@web_dev_junkie?source=rss-6372c86dc2c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vgtcRm3gE39GByOYa9a5hA.jpeg</url>
            <title>Stories by Web Dev Junkie on Medium</title>
            <link>https://medium.com/@web_dev_junkie?source=rss-6372c86dc2c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 18:33:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@web_dev_junkie/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My ADHD Morning Routine]]></title>
            <link>https://medium.com/@web_dev_junkie/my-adhd-morning-routine-d6bc719f65ea?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6bc719f65ea</guid>
            <category><![CDATA[adhd-treatment]]></category>
            <category><![CDATA[neurodivergent]]></category>
            <category><![CDATA[morning-routines]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[adhd]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Thu, 04 May 2023 23:55:32 GMT</pubDate>
            <atom:updated>2023-05-04T23:55:32.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="ADHD Brain" src="https://cdn-images-1.medium.com/max/1024/1*QvevJZB3fQ7IxuC_EWJq2g.jpeg" /></figure><h3>Introduction:</h3><p>In the Summer of 2021 I was persuaded by my wife to see a therapist for my anxiety, within a few sessions my doctor was convinced that many of my issues stemmed from undiagnosed ADHD. To say I was surprised would be an understatement. Since that day, I have tried many different therapies and medications to add more structure to my life. One of the most influential changes, outside of medication, was an overhaul to my morning routine. Before my diagnosis I spent a majority of my morning hitting the snooze button, dreading the day ahead. Now, after a lot of work, I’ve created a routine that sets the foundation for a successful and structured day.</p><h3>The Routine:</h3><p>The following routine and time frames are not set in stone. Depending on my work schedule and what time I get up these can change, but I try to keep the routine itself consistent regardless.</p><h3>6:00am — Get out of bed and avoid my phone or social media for the remainder of the morning</h3><p>This first step is crucial. In order to avoid a day of mindlessly scrolling on my phone I have to set the groundwork early. I try to avoid evening looking at my phone for the first 30 minutes of the day, the only exception is to do something productive.</p><h3>6:00am — Water and Magnesium Supplement</h3><p>I immediately drink a full glass of water with a quality Magnesium supplement. Magnesium has been shown to help relieve some of the most common ADHD symptoms, it can also be helpful with muscle relaxation for any stimulants you might be on for your ADHD. The following is my favorite Magnesium Supplement: <a href="https://amzn.to/42oFgpo">https://amzn.to/42oFgpo</a></p><h3>6:00am — 6:20am Read</h3><p>I like to start my day with a bit of reading. Typically this is just a chapter of any book that I’m currently reading or reading through the days headlines. I continue to avoid my phone as much as possible here, I don’t want the possibility of social media distraction to creep in.</p><h3>6:20am Take Medication</h3><p>This one is pretty straight forward. I’m currently taking Vyvanse prescribed by my doctor. I like to take it as early as I can so it doesn’t affect my sleep at night.</p><h3>6:20am — 7:00am Cold Shower</h3><p>Cold showers have been linked to increased dopamine levels and are just an overall mood booster for me. Obviously it’s best to consult a doctor about this first, but there are many studies that indicate this has long term health benefits outside of it’s affect on my ADHD.</p><h3>7:00am Water with Fish Oil and Vitamin B Supplement</h3><p>I’ve experimented with a lot of supplements over the last two years. This plus the Magnesium seems to be a good stack on top of my medication. My favorite Fish Oil Supplement: <a href="https://amzn.to/4278eKG">https://amzn.to/4278eKG</a>. Favorite B Vitamin Supplement: <a href="https://amzn.to/3HGTD02">https://amzn.to/3HGTD02</a></p><h3>7:00am — 7:30am Breakfast</h3><p>After my shower I go straight to a high protein breakfast. I like to have yogurt mixed with two table spoons of peanut butter followed by two over easy eggs with toast. This eliminates my need for food the rest of the morning and any distraction that comes along with that hunger. I’ve also read some studies on the positive affects of a high protein diet on ADHD.</p><h3>8:00am Begin Work</h3><p>After breakfast I go straight into whatever work that is on my plate that day. I find the sooner I start the better, taking advantage of the momentum I’ve built from my morning routine.</p><h3>Conclusion:</h3><p>This routine has worked incredibly well for me over the last 2 years. Occasionally I like to make adjustments so that it doesn’t get to mundane, but the key components typically remain. I hope this helps you get into a similar routine that you find beneficial!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6bc719f65ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My “Passive Income” Journey]]></title>
            <link>https://medium.com/@web_dev_junkie/my-passive-income-journey-1541eaf00689?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1541eaf00689</guid>
            <category><![CDATA[passive-income]]></category>
            <category><![CDATA[digital-marketing]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[affiliate-marketing]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Thu, 06 Apr 2023 11:59:38 GMT</pubDate>
            <atom:updated>2023-04-06T11:59:38.869Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>Over the last few months I’ve been bombarded with ads and social media posts about “passive income”. Everything from drop shipping stores to building a portfolio of dividend stocks have been covered. I’d be lying if I said I wasn’t a little intrigued. Although, I assume most of these are exaggerated, I’d like to give some of them a try and see what sticks. At this point what do I have to lose?</p><h3>Plan:</h3><p>My plan is to take 3 months and focus completely on one of the many recommended strategies that I’ve come across to create some passive income. I’ll be documenting my journey daily on my blog, medium and twitter account. I also plan to use Chat GPT as a resource to get up and running.</p><h3>Best Passive Income Ideas:</h3><p>This is a list of the ideas I’ve come across so far either through my own research or has been advertised to me from multiple sources. This will be what I work off of every 3 months.</p><ol><li>Drop-shipping Store</li><li>Affiliate Marketing</li><li>Create and Sell an Online Course</li><li>Build a SAAS product</li><li>Buy an existing online store</li><li>Sell a digital product</li><li>Invest in known Dividend Producing Stocks</li></ol><h3>First 3 Months:</h3><p>For the first three months I’ve decided to focus on Affiliate Marketing. In my initial research I’ve determined that this appears to be the simplest strategy with the least amount of overhead/initial investment. When prompting Chat GPT on how to get started here’s what I got:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OHjM1bZYxaGuduHB" /></figure><h3>Conclusion:</h3><p>So here goes nothing! I’ll be kicking off today working on my Affiliate Marketing journey. Let’s so what I can turn this into in 3 months time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1541eaf00689" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Sites to Learn Web Development]]></title>
            <link>https://medium.com/@web_dev_junkie/best-sites-to-learn-web-development-18de43f8d271?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/18de43f8d271</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[100daysofcode]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Sat, 11 Mar 2023 21:39:04 GMT</pubDate>
            <atom:updated>2023-03-11T21:39:04.752Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>For a while I’ve wanted to create a list of my favorite learning resources for Web Development and Programming. This is a post I will be updating often. The web is constantly changing and I’m always looking for new ways to keep my mind sharp with new challenges and technologies. I will break these out into categories based on the language or technology I used it to learn although most sites teach multiple topics.</p><h3>Multiple Web Development Topics</h3><ol><li><a href="https://teamtreehouse.com/">https://teamtreehouse.com</a> (paid, free seven day trial)</li><li><a href="https://www.pntrs.com/t/8-12462-281453-213588?url=https%3A%2F%2Fwww.codecademy.com%2F">https://www.codecademy.com</a> (both paid and free content)</li><li><a href="https://thinkster.io/">https://thinkster.io</a> (both paid and free content)</li><li><a href="https://www.codeschool.com/">https://www.codeschool.com/</a> (both paid and free content)</li><li><a href="https://www.linkedin.com/learning">https://www.linkedin.com/learning</a> (paid)</li><li><a href="https://udemy.com/">https://udemy.com</a> (both paid and free content)</li><li><a href="https://www.theodinproject.com/">https://www.theodinproject.com</a> (free)</li><li><a href="https://www.edx.org/">https://www.edx.org</a> (both paid and free)</li><li><a href="https://www.coursera.org/">https://www.coursera.org</a> (paid)</li><li><a href="https://www.udacity.com/">https://www.udacity.com</a> (paid)</li></ol><h3>Ruby, Ruby on Rails</h3><ol><li><a href="http://paircolumbus.org/">http://paircolumbus.org</a> (free)</li><li><a href="https://launchschool.com/">https://launchschool.com/</a> (paid/boot camp)</li><li><a href="http://exercism.io/">http://exercism.io/</a> (free)</li><li><a href="https://www.codewars.com/">https://www.codewars.com/</a> (free)</li></ol><h3>SQL</h3><ol><li><a href="https://sqlzoo.net/">https://sqlzoo.net</a> (free)</li><li><a href="http://exercism.io/">http://exercism.io/</a> (free)</li></ol><h3>Javascript, React, Angular, Node</h3><ol><li><a href="https://www.freecodecamp.org/">https://www.freecodecamp.org/</a> (free)</li><li><a href="http://exercism.io/">http://exercism.io/</a> (free)</li><li><a href="https://www.codewars.com/">https://www.codewars.com/</a></li></ol><h3>Misc. Web Development Tools</h3><ol><li><a href="http://ryanstutorials.net/">http://ryanstutorials.net/</a> (free)</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18de43f8d271" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serverless Todo API Tutorial]]></title>
            <link>https://medium.com/@web_dev_junkie/serverless-todo-api-tutorial-cf059c196d2a?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf059c196d2a</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[100daysofcode]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 21:11:49 GMT</pubDate>
            <atom:updated>2023-02-04T21:11:49.880Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>A couple of months ago I created a MERN todo application for a tutorial. Lately I’ve been learning and using the serverless framework so I wanted to recreate the backend for that tutorial using serverless rather than expressjs. This tutorial will cover those changes. Once you finish this you can follow along with my MERN Todo Tutorial — Part Two to build the front end.</p><h3>Project Setup:</h3><p>First you’ll need to create a root directory for your api. Once that directory is created you can run ‘npm init’ within the directory and then install all the required npm packages: ‘npm install –save-dev serverless serverless-bundle serverless-offline’ and ‘npm install mongoose’. These are all the packages we will need to run the project locally and use mongoose for mongodb connection.</p><p>From here we will need to create the serverless.yml file and update our package.json to use serverless to run the api locally:</p><p>Update your package.json to the code below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/0*gR4yrOTijJJDmj8q" /></figure><p>Add a serverless.yml file to the root of your directory and put the following code in it. The plugins section tells our serverless project which plugins to utilize. The provider illustrates which platform we will be using, in this case I was using AWS Lambda. The functions section I will explain in more detail as we move along:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/0*FQeyPa4qm4O0-MLO" /></figure><h3>Functions:</h3><p>The primary code in a serverless project are the functions that will be implemented. In AWS case these will be Lambdas which connect to an AWS API Gateway to handle the http integration. I place these functions in the root of my project but if the project gets too large you can separate them out for more organization:</p><p><strong>Get Todos:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/0*awJKvNwEPjgG0yEA" /></figure><p><strong>Create Todo:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lo6Sew7NXbTAghJo" /></figure><p><strong>Update Todo:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oz1w7bA054m6a0-O" /></figure><p><strong>Delete Todo:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/0*TWjEW9rLTWn3cpwe" /></figure><p>For the Todo model I’m using the same code from my previous MERN project. I’ve also created a ResponseWrapper class for handling the return values from the lambda. This is also in the root directory of the serverless project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/0*mdY3KuTn0lWG9cZK" /></figure><p>In order to wrap everything up we have to finish the serverless.yml file. As you’ll see in the code we will be outlining all of our functions in the file so that serverless knows how to handle our api endpoints:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/0*eib2WwgoI8kEOgsg" /></figure><h3>Conclusion:</h3><p>With all of these pieces in place we’ve successfully built a simple todo API with all of the CRUD functions we need to make it work with our Todo ReactJS front end. You can find the repository <a href="https://github.com/WebDevJunkie/todo-app">here</a> the serverless api code is in the ‘serverless-api’ directory. The front end react code can be found in the ‘todo-client’ directory. Serverless also has some fantastic documentation on how to use their framework <a href="http://serverless.com/framework/docs">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf059c196d2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guide to React/Redux]]></title>
            <link>https://medium.com/@web_dev_junkie/guide-to-react-redux-e413d74ea154?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e413d74ea154</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[100daysofcode]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Fri, 03 Feb 2023 12:54:43 GMT</pubDate>
            <atom:updated>2023-02-03T12:54:43.826Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>I’ve been spending the last couple of months learning the ins and outs of React. So far I really enjoy the library and what it has to offer as a front end javascript framework. One thing I’ve noticed in my learning is that many tutorials/resources push Redux as a state handler right off the bat. For beginners this can really increase the learning curve. In some cases it may even scare off those new to the framework. For those individuals I would suggest finding resources that don’t pull in Redux. Learn the basics of React stateless and statefull components, props, JSX, etc… For those who have some React experience and want to begin including Redux in projects for handling state here is a high level look at how Redux works.</p><h3>Store:</h3><p>The store is at the base of every React/Redux application. This is simply where the applications state lives. Setting up a store is easy with Redux. You simply import createStore from the Redux library:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/0*FDGsTenjgcoKStxo.png" /></figure><p>When creating a store you need three pieces. The Reducer, Initial State and any middleware you want to include. With that simple statement you can configure a store.</p><h3>Reducers:</h3><p>Reducers and Actions, in my experience, are a topic where many developers new to the framework get a little tripped up. A Reducer is simply a function which takes the current state and an action. Each action has some sort of payload (In the example below the payload is either the todo you are adding/updating or the list of todos to display to the end user) and a type. The Reducer has one function. Take the action and manipulate the state according to the type that was sent in:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/0*639gNVmuxW98dzVm.png" /></figure><h3>Actions:</h3><p>Actions are what were explained in the Reducers section. These are simply a javascript object with a payload and a type. Most React developers build functions which return actions this way you don’t have to hard code them throughout your code base:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/0*uhtHbn7v3KIZ9FJX.png" /></figure><p>Any time you want to manipulate the state in the Redux store you simply dispatch the action that you want in order to change the state.</p><h3>Conclusion:</h3><p>This is a very high level look at React/Redux. There’s many more layers to this conversation which will be easier to explore now that you know the Action/Reducer/Store data flow in Redux.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e413d74ea154" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MERN Todo Tutorial Part Two (Client)]]></title>
            <link>https://medium.com/@web_dev_junkie/mern-todo-tutorial-part-two-client-709e27c43669?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/709e27c43669</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[100daysofcode]]></category>
            <category><![CDATA[mern-stack]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Sun, 29 Jan 2023 21:30:55 GMT</pubDate>
            <atom:updated>2023-01-29T21:30:55.281Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>In the first part of this tutorial I showed you how to build the back end. This included the NodeJS/Express API and it’s connection to a Mongo Database. We created a simple CRUD API for creating, reading, updating and deleting Todos. In this part we will build the front end with React JS.</p><h3>Tutorial:</h3><p>We are going to start this project in the root of our ‘todo-app’ directory. We are going to use the ‘create-react-app’ CLI tool that Facebook created. The nice thing about this tool is it takes a lot of the guess work out of how to create and provision your project. It comes with many technologies out of the box. For a quick guide on how to install ‘create-react-app’ follow this <a href="https://create-react-app.dev/docs/getting-started/">link</a>. Once that’s installed run the command ‘npx create-react-app todo-client’ from within our main ‘todo-app’ directory. This will create our React App. You can run it by entering ‘npm start’ from within the ‘todo-client’ directory that was created.</p><h3>Cleanup:</h3><p>There are a few things we need to clean up from the project that was created. In the ‘src’ directory you can delete the App.css and App.test.js files. We won’t be using these for this tutorial. Within the App.js replace the entire file with the following code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/0*IzbT8vnAS6zlDYdc" /></figure><h3>List Todos:</h3><p>To start we are going to create a React Component which will list all todos pulled from our API. Create a ‘components’ directory within our main ‘src’ directory. Within the ‘components’ directory create a ‘Todos’ directory. This is where all of our react components relating to Todos will live. Now create a ‘TodoList.js’ file and put the following code into it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/0*-ix_50e7k7-2Bahe" /></figure><p>For this to work you’ll need to install axios. Axios is a javascript library which gives developers a promise based HTTP client. This is what we will use to interact with our API. Install this in our ‘todo-client’ by running ‘npm install axios’. At this point I realize that I hadn’t configured CORS in my API. CORS (Cross Origin Resource Sharing) is a mechanism that tells a browser to give a web application running on one origin access to resources on a different origin. Since our API is running separately from our front end we need to set this up. Fortunately it’s very easy in express. Add the following code to your server.js file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*ig4qp4VSkFfWKbiX" /></figure><p>The line you’ll see that configures cors is ‘app.use(cross())’ which we installed with ‘npm install cors’</p><p>Next we will make the todo form. Within our components/Todos directory create a ‘TodoForm.js’ file and put the following code into it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/0*sqF7rhDpX5M2xP-5" /></figure><p>In our Todo Form component we are using the useState hook to manage the state of the component. on the change of each input it updates the local state to reflect what’s been entered into the input/textarea. The on submit action takes what’s in the current state and posts it to the API to create a new todo. With this form created we need to add it to our main ‘App.js’ component so that it’s accessible.</p><h3>Delete and Complete:</h3><p>The last two pieces of functionality we will add is the ability to complete and delete a todo. In order to do this we will need to break out our todos into their own component. From within our components/Todo directory create a ‘Todo.js’ file and write the following code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*M_m8k27_64q19jvd" /></figure><p>In order for this to work we need to add the ‘Todo’ component to the ‘TodoList’ component. We also need to add deleteTodo and completeTodo methods to the base TodoList component which will hit the API and perform those function when the check box is checked or the delete button is clicked:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*KpSby4tY8xmqsg7t" /></figure><p>Now when you run your React App and Todo API together you should be able to add, update and delete todos from your application. This is a very basic CRUD ReactJS application. As these applications grow there’s many considerations we have to make as developers like how to handle state, how to handle routing and many other challenges. Here is <a href="https://medium.com/@web_dev_junkie/mern-todo-tutorial-part-one-api-5c10981e1ed8">part one</a> of this tutorial.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=709e27c43669" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MERN Todo Tutorial Part One (API)]]></title>
            <link>https://medium.com/@web_dev_junkie/mern-todo-tutorial-part-one-api-5c10981e1ed8?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c10981e1ed8</guid>
            <category><![CDATA[100daysofcode]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[mern-stack]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Sat, 28 Jan 2023 21:11:12 GMT</pubDate>
            <atom:updated>2023-01-28T21:11:12.399Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>I’ve been wanting to put together a MERN stack tutorial for some time now. Mainly because it helps me continue to learn and could helps those new to the stack understand how it all works. So here it goes. Hope this helps any newbies! If you get stuck and need to see the main repository here’s the link <a href="https://github.com/WebDevJunkie/todo-app">https://github.com/WebDevJunkie/todo-app</a></p><p>MERN is a stack of technologies to build progressive web apps using only Javascript. It stands for:</p><p><strong>M</strong> — MongoDB — A popular no sql database</p><p><strong>E</strong> — Express — A simple web framework for building web application in NodeJS</p><p><strong>R</strong> — React — A front end javascript framework for progressive web apps</p><p><strong>N</strong> — NodeJS — A javascript run time built to run javascript on the server</p><p>For part one we will start with the back end (Mongo, Express and NodeJS). This will be a JSON RESTful API for viewing, adding, updating and deleting todos in our application. For this tutorial it is expected that you have some javascript knowledge and have node and npm installed on your machine.</p><h3>Tutorial:</h3><p>To start off this project we are going to make a main directory where everything will lived called ‘todo-app’. In this directory created a subdirectory called ‘todo-api’. This is where all the code for our todo api will live. Inside this directory run ‘npm init -y’ which will initialize our ‘package.json’ where all of our npm package information will live. From here run ‘npm install express’ this will install the express web framework which we will be using to build our JSON API. Create a file called ‘server.js’ in our api directory and put the following code into it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*ssx8FxxI1O4Hz89y" /></figure><p>This code simply creates our express server and assigns port 5000 to listen to requests. The /test route is just a test to verify everything is running properly. If you run ‘node server.js’ within your api directory you should be able to visit <a href="http://localhost:5000/test">localhost:5000/test</a> and get the ‘Test Passed’ message as a response.</p><p>From here we will set up the routes. In your api directory create a ‘routes’ subdirectory to hold any routes we will be creating for our API. Within the ‘routes’ subdirectory create a ‘todo.js’ file and put the following code in the file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*Jra0t1gkRgEVWQii" /></figure><p>As you can see a route has been created for each CRUD action. Now we will need to import these routes to our main ‘server.js’ file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*68HJxSOEfVcPM22-" /></figure><p>Now when you run ‘node server.js’ you should be able to visit each one of those endpoints and test to see that your routes are working.</p><p>From here we will be setting up mongo. I’ll be using <a href="https://www.mongodb.com/">https://www.mongodb.com</a> to create my mongo database. They offer free plans and don’t require a credit card to open an account. Follow along on their site and create a free cluster. All we will need is the connection string that is created in the ‘Connect’ option on your cluster. We will use this to connect to the database.</p><p>For this we will need to install mongoose. Mongoose is an object modeling library built for NodeJS. Simply put, it makes interacting with MongoDB much easier for developers. To install this simply enter ‘npm install mongoose’.</p><p>Create a ‘db.js’ file in the root of your API directory and put the following code into it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*8pSev-Y75rxe2Mcg" /></figure><p>This is a simple function which makes a connection to our mongo database. You’ll notice I have created a ‘config.js’ file where I’ve stored my MongoDB connection string. Your connection string will have a username and password so I suggest doing something similar and not adding it to any public repository for your security.</p><p>Once this is created you can import into your main ‘server.js’ file and run it like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/0*rClq3dhDUYoKXsse" /></figure><p>Now when you run your server you should see the message: ‘MongoDB is connected…’ to indicate that you’ve successfully connected to your database.</p><p>Next we will create our mongoose model. Create a directory called ‘models’ within your API directory. Inside your ‘models’ directory add the file ‘Todo.js’ and put the following code into it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*w4gfypnott6cw3_W" /></figure><p>What this does is creates a Todo model in mongoose which will interact with MongoDB and create a Schema for adding, updating and deleting todos within our database. With this created we can now update our todo routes to view, add, update and delete todos from our API:</p><p>Inside our ‘routes/todo.js’ file update your routes to match what’s below:</p><p>Get All Todos:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*Lmhx-ihBGi6Zes4f" /></figure><p>Get Single Todo:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*RACmwEy4J-SwSuUa" /></figure><p>Create Todo:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/0*a4qq-8_uAotGEFS1" /></figure><p>Update Todo:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*6M3Q0TRCnOc5MV67" /></figure><p>Delete Todo:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/0*bYxgcL0gIVteK-Lj" /></figure><p>With our routes finished this completes our back end API. You should be able to test all of the end points created in postman and verify that you can add, view, update and delete todos. In part two we will build the front end with ReactJS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c10981e1ed8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Guide to HTTP Status Codes]]></title>
            <link>https://medium.com/@web_dev_junkie/a-guide-to-http-status-codes-916d7a423edd?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/916d7a423edd</guid>
            <category><![CDATA[https]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[100daysofcode]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Wed, 25 Jan 2023 23:02:58 GMT</pubDate>
            <atom:updated>2023-01-25T23:02:58.231Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I3U4FFMw58hKv6pUJ5gJxg.png" /></figure><h3>Introduction:</h3><p>We’ve been doing a ton of API development at work which has lead to many arguments about when and where to use certain HTTP status codes. This has inspired me to develop a complete list of HTTP status codes with a description of where and when to use them. Feel free to chip in if any of these are off. This is a working list which I will be adding too.</p><h3>200 Success Codes:</h3><p>These status codes indicate that a request was made, received and everything went as expected. These can contain no content on return or sometimes it may contain the result of the action.</p><ol><li>200 — This is the standard 200 OK response. When this is returned from a get request it will generally contain the requested resource. In a post request this should send back the result of the action the client took.</li><li>201 — This is generally sent back on a post request. This indicates that the resource the client sent was created.</li><li>202 — The request by the client was accepted but further action by the server may or may not have been completed.</li><li>204 — The request was received and accepted with nothing to return. This is a ‘No Content’ status.</li></ol><h3>300 Redirection Codes:</h3><p>These status codes typically indicate a redirection. It generally means that the resource you are looking for has changed location. This indicates to the client that there is further action that needs to be taken to complete the request.</p><ol><li>300 — This status code indicates on a get request that there are more then one option to choose from for that resource.</li><li>301 — This status code communicates to the client that the resource has been moved permanently to another location. It includes a URI of where that resource has been moved to (This is a simple ‘Redirect’)</li></ol><h3>400 Client Error Codes:</h3><p>In most cases these status codes are used when the client has made a mistake in their request. Typically they are the result of the client requesting a resource that doesn’t exist or the client is unauthorized to make the request they are trying to make.</p><ol><li>400 — This status code is the result of the client making an error in it’s request.</li><li>401 — This status code indicates that the request is unauthorized. The client has not passed the correct credentials to access the resource it is requesting.</li><li>403 — This is similar to a 401 unauthorized. It indicates that the client is forbidden from accessing the resource requested. Additional permissions are required.</li><li>404 — The resource requested does not currently exist.</li></ol><h3>500 Server Error Codes:</h3><p>These status codes typically indicate that there was an error on the server during the request that was made by the client. The response should include an explanation of the error and how it might be resolved.</p><ol><li>500 — This is the most basic internal server error message. This indicates the the server encountered an error and has nothing more to communicate about the error it encountered.</li><li>501 — This code implies that the server does not understand the request being made.</li><li>502 — The server acts as a proxy to another service for the request made and the upstream server gave an invalid response to the request.</li><li>503 — This indicates that the service is currently unavailable. Either something has brought the server down or it is down for maintenance.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=916d7a423edd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Programming Language for Beginners]]></title>
            <link>https://medium.com/@web_dev_junkie/best-programming-language-for-beginners-3f6783dc53dd?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f6783dc53dd</guid>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[100daysofcode]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 23:04:17 GMT</pubDate>
            <atom:updated>2023-01-23T23:04:17.345Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pGs13bUbRpnB2fOyNiEKQQ.jpeg" /></figure><h3>Introduction:</h3><p>One of the most common questions I hear from aspiring programmers is “Which programming language is best for beginners?”. The problem many beginners run into when asking this question is the preferences of the person they are asking get in the way. Every developer has a language they think is superior to others. This is common because once a programmer finds their niche they want others to follow in their footsteps to help prop up the decisions that they made earlier in their career. Ego and self promotion make finding the right answer a challenge. I like to take a different approach when asked this question.</p><h3>The Long Answer:</h3><p>My first answer depends on what your goals are as an aspiring programmer. Are you trying to change careers? Are you in a role that you think some programming knowledge will help? Do you want to get into big data/data science? Answers to these questions can really help narrow down which programming language is right for you. So let’s start at the top.</p><p>If you are looking to change careers and become a web developer there are many options to choose from. If you are interested in enterprise software C# is a great place to start. With it’s popularity in the Microsoft community and the .NET MVC framework it’s becoming the standard choice for big business web development. Another good place to start is JavaScript. Whether you plan on developing the front end or back end JavaScript is fast becoming the choice for startups and established businesses. With front end frameworks like React and Angular paired with Node.js running JavaScript server side you truly can’t go wrong with JavaScript as your first programming language. Last but not least is one of my favorites, Ruby. Ruby is a programming language built for developer happiness and productivity. It’s fun to learn and, when paired with the Rails MVC framework, is a very powerful tool for web developers.</p><p>Data Science has become one of the fastest growing fields in computer science. Whether you plan on working with large sets of marketing data or analyzing industry financial statements, this field has plenty of career potential. If this is the path you would like to follow consider Python, R or SQL. Python is an excellent language built to be compact and readable. It’s not only a great language for Data Scientists to learn it’s considered one of the best languages for beginners due to it’s readability. SQL is a language built do query Databases. It isn’t a full fledged programming language but it is a great way to learn about how databases work and how to interact with them using code.</p><p>If you are considering learning a programming language to advance your career there are many options. Marketers are beginning to learn HTML, CSS and Javascript to advance their careers. These languages are great for developing landing pages/marketing funnels which is why it’s popular in the marketing field. Many businesses have some sort of database which means learning SQL could go a long way to advancing your career. Truthfully, there is no wrong answer here. Programming can come in handy in all lines of business whether it’s used to automate repetitive tasks, analyze data or create web sites. Picking up a new skill in programming can go a long way.</p><h3>The Short Answer:</h3><p>The short answer to this question is any language is great for beginners! Okay I guess that’s a little to broad. But the truth is many of the modern day object oriented languages would be a great place to start for any beginner. Whether you start with Ruby, C#, JavaScript, Python or many others, learning the basics about functions, classes and data structures makes picking up other languages much easier. To many people get caught up in where to start that they never actually buckle down and learn. Pick a language and begin putting in the work. Eventually it will pay off. If you have any questions or recommendations of your own, feel free to comment below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f6783dc53dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Project Ideas for Web Dev Beginners]]></title>
            <link>https://medium.com/@web_dev_junkie/project-ideas-for-web-dev-beginners-b1b0a3f717fe?source=rss-6372c86dc2c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1b0a3f717fe</guid>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Web Dev Junkie]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 00:05:40 GMT</pubDate>
            <atom:updated>2023-01-23T00:05:40.908Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O7bJr5PHPidncReYeFRpgw.png" /></figure><h3>Introduction:</h3><p>So many new programmers struggle from stepping out of the tutorial comfort zone. When I first started to learn I had the same issue, being constantly stuck in the tutorial loop, afraid to step out and work on something independently. This step is crucial in taking your learning to the next level. For that reason I decided to make a post on the best project ideas for new developers to try on their own.</p><h3>Project Ideas:</h3><p>Small:</p><ol><li>Tribute Page — Create a simple HTML/CSS tribute page. Add some JavaScript and make the page interactive for a tougher challenge</li><li>Personal Portfolio — Create a simple HTML/CSS/JavaScript portfolio page which displays other projects you’ve worked on</li><li>Product Landing Page — Create a landing page for one of your favorite products or services</li></ol><p>Medium:</p><ol><li>Recipe App — Create a web app for storing and searching your favorite recipes. Add functionality like the ability to share, like and comment on recipes</li><li>Movie App — Create a web app which displays the latest movies and gives users the ability to review/rate those movies</li><li>Password Generator — Create an app which generates secure passwords. Add functionality which allows users to select the strength of the passwords that are generated</li></ol><p>Large:</p><ol><li>Chat Application — Create an app which users can log in and chat other users</li><li>News Aggregator — Create a web app which scans the web for news stories and presents them to the user in a clean UI</li><li>Native App IOS / Android — Turn one of the Medium or Large projects into a native IOS or Android smartphone app</li></ol><h3>Conclusion:</h3><p>Building apps and software on your own is a very important part of the learning process. Use these ideas to kick start your creative process and get building!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1b0a3f717fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>