<?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 Kevin Michael Johnson on Medium]]></title>
        <description><![CDATA[Stories by Kevin Michael Johnson on Medium]]></description>
        <link>https://medium.com/@kevin-michael805?source=rss-7a875f7cf2e8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZeSmArXI8472QgON.jpg</url>
            <title>Stories by Kevin Michael Johnson on Medium</title>
            <link>https://medium.com/@kevin-michael805?source=rss-7a875f7cf2e8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:18:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kevin-michael805/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[Creating Your First Angular App — Par 2]]></title>
            <link>https://kevin-michael805.medium.com/creating-your-first-angular-app-db05a6e51d95?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/db05a6e51d95</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Mon, 18 Oct 2021 18:03:26 GMT</pubDate>
            <atom:updated>2021-10-18T19:50:29.048Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u3mgmYMq4ofTd4lBtZtbxQ.png" /></figure><p>Hello, and welcome back! Today I wanted to go through Part 2 of creating your first Angular app. In my last blog, I broke down how to properly install Angular and get started with the use of Components. If you didn’t read that blog I suggest you do so first, but let me also give a quick recap of where we are.</p><p>To start, make sure you have Angular installed and you’ve created a new project. Next, make sure you’ve removed the boilerplate code in your app.component.html file and added a header as shown below. For this example, we are creating a grocery list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*K5Xpn_OAU6obpObcsr5H5A.png" /></figure><p>Once that is done we are going to create our first component called grocery list and add it to our app component page.</p><p>First type into your terminal:</p><p>ng g component component/grocerylist.</p><p>Once that is done you should have a new folder that is titled grocerylist with the correct css, html, specs.ts, and ts files. It should look like this below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*11PlU0kvhsWRJOB-hRYzPQ.png" /></figure><p>Now to add this specific component to our app we are going to navigate back to our app.componet.html file and add it to our grocerylist component. To do so we simply need to add &lt;app-grocerylist&gt;&lt;/app-grocerylist&gt;. Once we’ve done that correctly the p tag from our grocerylist component should then be displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*o7-Tr2y4xBGoguJAI8X5rA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*soyBvnKM3htqQ6-YdA314Q.png" /></figure><p>Awesome! If you have the same as above in your browser. you are just where we left off. So let’s now build out a little functionality.</p><p>Let’s start in our grocerylist-component.html file. There we will add a few items. We are going to create a class of item for each of our grocery items. In that class we will have classes of id, content, and delete(to remove the item). Once completed our code and page should look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*jSuPE7KW_SBJKy0Nxq-jdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m12VuFWi_6KtsK7DeBAqQA.png" /></figure><p>Great! Okay, let’s keep it going. The next thing we want to do is create a model for our grocery items and put them into an array format. To do so first right-click on the app folder and name your folder models, and inside the folder create a file called Item.ts.</p><p>Now let’s hop into the Item.ts file. Here all we need to do is export our class which will be Item, and add the values of content and completed. For those, we will put string and boolean. It should look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*EMxXnQ47aq0MBhKjo-Xvkw.png" /></figure><p>Now we will want to import this into our grocerylist component with the below line of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*LY-3k_JlSx3LaohSXcLenw.png" /></figure><p>Now that we have the Item imported we can create an array of items inside of our GrocerylistComponent. As shown here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*Mp1aa9SfaOpsFbAcXVPyTA.png" /></figure><p>Great, now let’s keep going. Inside of ngOnInig(): we are going to add our array. To start we have to use the keyword of this followed by . and the name of our created array which is items. Next, we will create the array with the proper properties from the model, which are content and completed. Once finished your code should look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*_WngLU3SBmVY0G5_jhJNPw.png" /></figure><p>So far so good! Now we need to physically loop through the array and get it populating on our app. To do this let’s navigate to the grocerylist.component.html file. Here we can use a function known as *ngFor which is defined by Angular as:</p><h3>NgForOf</h3><p>DIRECTIVE</p><p>A <a href="https://angular.io/guide/structural-directives">structural directive</a> that renders a template for each item in a collection. The directive is placed on an element, which becomes the parent of the cloned templates.</p><p>To use this we will add it next to our class item as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*chlAha958jhSGAB4q96ROQ.png" /></figure><p>Next, we need to make sure the proper content is being pulled out. To do that we will go into our classes for id and content and using our template string we will add i for id and item.content for content. As shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*qXlQtEveZA1vTj1mct1kiA.png" /></figure><p>Here is what our page should look like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*QmbAVgbesMJtvi0YKuiIlg.png" /></figure><p>Finally, let’s create the functionality for the remove button. To do so we will start by adding a new function called deleteItem. Here we will use the filter method to look through the ids that are being passed. If i doesn’t equal the correct id it will not be returned, but we will return any not equal to the id which will remove the deleted item. The code should look something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*0aJ-GKmhJ3QmwU7g2txwuA.png" /></figure><p>Now lastly we will add this onto our delete class by using the (click) method and passing the deleteItem function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*1sGTODyOGkOgjR8Xhw0NKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*tSfmjGJePss90zBHkElJtA.gif" /></figure><p>And there you have it! We started with downloading Angular and ended up with a very basic grocery list app. Now hopefully you can see the potential that Angular has and why it’s become such a popular framework! Thanks again everyone, and Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db05a6e51d95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First Angular App Part 1]]></title>
            <link>https://kevin-michael805.medium.com/angular-components-101-967c5fe2f083?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/967c5fe2f083</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Mon, 11 Oct 2021 23:41:59 GMT</pubDate>
            <atom:updated>2021-10-18T18:05:01.425Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-bcIWb7TZdcXDzkE.png" /></figure><p>Hello! As many of you probably know, Angular is one of the most popular JS frameworks out there at the moment. It’s really the only one to rival the dominance of React at the moment. So, with that, I thought it would be a great idea to walk through the basic steps of creating your first Angular app! What we will walk through and the steps it takes will be mostly meant for beginners to the world of coding. Most of you with any type of experience will breeze through this, but that doesn’t mean it’s not worth doing for a little refresher.</p><p>So with that, let’s get started!</p><p>First I’m going to go ahead and open up my VS code and in the Terminal is where I’m going to download Angular. To do we will type in -</p><p>npm install -g @angular/cli. Once that is done your VS code (or specific text editor you are using should begin the download as shown below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*cI4lPFnmV523uQau" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/0*1ns6SSXpzfzfI6YI.png" /></figure><p>Once the download is complete we can then create our first boilerplate Angular app by typing -</p><p>ng new project-name. You can see below I’ve named my project with the simple name of angular_project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*CpbBXPM57heuKuli" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/0*LXHsBrE0uUE6hena.png" /></figure><p>Once that is completed it will ask you a few questions. First, it will ask if you want routing, which in this case we will say no, and the second question asks about the format you would like for your stylesheet. Most of the time, as I’ve done here you will select good old CSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*cAL7GeuFSBJU8m-1" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/0*mHUeLSnlcpXttR18.png" /></figure><p>Perfect! We should now have our boilerplate of files for our first Angular project.</p><p>Now to get the app up and running in our browser we are going to type -</p><p>ng serve — open. As shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*St5UMBgpioTIFc9I" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*wEOZ4wtcnDzdedJQ.png" /></figure><p>Once done you should have your boilerplate page up and it should be like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*gwx9LonVhpQi7BXX" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ugk-xEFxiaLHirm0.png" /></figure><p>If you’ve gotten this far and you’re new to the world of frameworks, great job! I know it doesn’t seem like we’ve done a lot so far but properly setting up and installing items is a big part of an engineer’s job. Okay so let’s now jump into creating our own content for our Angular app!</p><p>One thing I would love to point out is that in the boilerplate app for Angular they actually give you instructions and guidelines on how to add new Components, Materials, Dependencies, and many more. As you can see below as I click on New Component I get the command to use in the terminal to create a new component. Pretty cool!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*obtE1emXivPXDt-O" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1Mqgxj_Reb0Ws1Xf.png" /></figure><p>Now in the file structure, you are mostly going to be working out of the src folder — app folder. To start let’s jump into the app.component.html file. It should be filled with code. This is what’s producing everything we see on our boilerplate page. To start fresh let’s just go ahead and delete it all.</p><p>Now that we have a clean slate we can start with something simple to make sure our app is property working. I’ve gone ahead and created a div with a simple title of Our First Angular App as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*2igriRRCMaXnZ-fd" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/0*gK4rhY64YQr3eO1Y.png" /></figure><p>This code should then produce this in our browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*FycTwiK3qmZMmEPC" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/0*7qVaqZjxGQXN6-U3.png" /></figure><p>If you have this, great job! Okay now let’s take it a little bit further and create our first component! The first thing that I’m going to do is change the title and format it properly as an h1. For this app we are going to create a simple Grocery List. So I’ve gone ahead and created a Header with an h1 of Grocery List.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*uV00HmlXacAB7D5n" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/0*NS0TbO9ZGeNr3R7G.png" /></figure><p>Now let’s create our first component. To do that we are going to type into our terminal</p><p>ng g component component/grocerylist.</p><p>Once that is done you should have a new folder that is titled grocerylist with the correct css, html, specs.ts, and ts files. It should look like this below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/58/0*mceCvd3rLNDgk5S7" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/0*qk269_GjeLjoBail.png" /></figure><p>If you look in your grocerylist.component.html file you will see a simple p tag that says grocerylist works! Just like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*NbapydJJP_uI2fK3" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/0*8qGlIcTVawziqsx9.png" /></figure><p>Now to add this specific component to our app we are going to navigate back to our app.componet.html file and add it to our grocerylist component. To do so we simply need to add &lt;app-grocerylist&gt;&lt;/app-grocerylist&gt;. Once we’ve done that correctly the p tag from our grocerylist component should then be displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*cjQrtKn6faQFIzkX" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/0*HLX0uhSDIRQPRehD.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*1BygnszfvR4lDs5I" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/0*DEvPFEMGrJ0IL-xc.png" /></figure><p>And there you have it! We’ve successfully created our first Angular app and we’ve got a working header and our own added component! I know it doesn’t seem like much but if you’re a beginner pat yourself on the back. It might not look like much but getting this far shows your ability to understand the basics of creating an Angular app. Next time we are going to take it a step further and build out a bit of functionality. For now, Happ Coding Everyone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=967c5fe2f083" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Portfolio — Skills Section]]></title>
            <link>https://kevin-michael805.medium.com/building-a-portfolio-skills-section-72383c4f3fb6?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/72383c4f3fb6</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Mon, 04 Oct 2021 16:45:37 GMT</pubDate>
            <atom:updated>2021-10-18T20:38:34.388Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Portfolio — Skills Section</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cHgKArv4dRu3PnYfGE58Yw.jpeg" /></figure><p>Hello everyone and welcome back! As a new programmer, I know the importance of having a solid portfolio to show off to your prospective clients and employers. We work in a particular industry, one that requires you to really show off your skills to be considered for a position. It’s not like most jobs where a resume will do. For us, we have to be able to put our money where our mouth is. For that reason, in this blog, I’m going to be going over how to build a simple skills section that looks great and should catch the eye of any employer.</p><p>Previously I did a blog about creating a great project-looking section so be sure to check that out as well! Alright, let’s get started!</p><p>I’ve created a react app and removed all the boilerplate code. I’ve gone ahead and created 3 components, Header, Body, and Footer. These will be the 3 sections of my app that I will need. The Body is where we will be working to create our Skills section. To start this is what my Home.js file looks like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/0*D83tootUylQVU0f8" /></figure><p>As you can see, I’ve imported all of the components and added them to my Home.js file.</p><p>No moving on to our skills section. First, we will need to create 4 files in our Skills folder which will be created in our components folder. Now in the skills folder we will have a total of 4 files. which should also be in our main Body folder. We will need to create 2 js files, one will be our index.js file and the second will be our skillscard.js file to help create and separate the individual projects. We will also need 2 css files so style them both. I’ve named them skillscard.css and skilss.css. Once you are complete your Projects folder should look like this below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*pebb68RZSil1MVuuMuLAUQ.png" /></figure><p>Now we need to get the actual information into our app. To do that I’ve created a file called skills.js ( You can have this anywhere in your file structure, but I recommend putting it in a folder named data or something similar to help make it known what the folder is for.)</p><p>In this file, we will be exporting an array of different skills. Each skill will have a name and an icon. We will be getting all of our icons from Devicon. All you will need to do is create two properties, one for the name and the second for the icon which you will copy from devicons. Here is an example of the &lt;i&gt; tag you will copy for JavaScript.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*VAdSDAPCTQmDBbc10IF0rw.png" /></figure><p>Now in our skills.js file we will start with export const SkillsData = and then add the array. Once completed your skills array should look something like this for the frontend and backend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*Tx7rRL6-fDvheWfZYWtwhA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*iCleHyOSACXqp_81LkW8VA.png" /></figure><p>Great! Now, lets move to our index.js file in our skills folder. Here we will import our SkillsData array and properly map through it to create an individual card for each skill. Similar to my previous blog about projects, the code should look like this below attached to the skills-container class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*Cp1dtNJbVEaiU461UkWfow.png" /></figure><p>We first will create a const and call it data so we can reference the imported in SkillsData array. Next, we map through each item in our array and return a skills card for each skill. We will go over the skills card next.</p><p>In our skillcard.js file, we are going to start by creating a function called SkillCard. That function is going to return a div for each skill that references the skill.icon as well as the skill.name that we have listed in our SkillsData array.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*6Ohvw1RuYD5AhGWfhOxf5Q.png" /></figure><p>And there you have it. Overall very simple and not too complicated. This shows you how to properly use React components to create individual sections in your app. When it’s all completed your Skills section will look something like this (Of course you will need to add the CSS which I’ve added below as well). Hopefully, that helps some of you get started on a great-looking portfolio. Combined with my previous blog about creating a projects section, you’re halfway there to making a full-blown portfolio website!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_C3oCoZVoOM2oklDpPPP2A.png" /></figure><p>Happy Coding Everyone!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/0*sEsiqJyDrqTark9V" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/0*0WGRoZkR39MfxnHP" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/0*8_r4LIdahKdwY35K" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72383c4f3fb6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSS Styling]]></title>
            <link>https://kevin-michael805.medium.com/css-styling-3114a1e62f5d?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3114a1e62f5d</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Tue, 28 Sep 2021 02:21:24 GMT</pubDate>
            <atom:updated>2021-10-05T01:29:10.729Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*rM8t0CGxBDN6eaJGgJyJwA.jpeg" /></figure><p>There is a lot to learn in the world of CSS. Some of it is fun and some of it is not so much. One of the fun properties of CSS in my mind is animations! This is how we make our pages interact and come to life for the user. There are a lot of different things you can do, but for today I wanted to start off with some very simple animations to get your mind thinking!</p><p>Now to get started I have just some really basic HTML and CSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/0*nrDG7kr7koz9oFiy" /></figure><p>I have a parent and a child div, and as you can see the parent is outside the child so the child is inside the div. As seen below, the parent is the larger black square, and the child is the cream square inside of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/0*0_ekVp66AVeI74Kt" /></figure><p>Now to start, whenever you hover over the parent all I’m doing is transforming the child. Essentially I’m moving it all the way to the right side of the parent and back again depending on if it’s hovered or not ( which is outlined with this code specifically, with the outcome below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/0*doCUhs7alwVj2bod" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/0*JKkoUZ0kmTxGFW1z" /></figure><p>Now as you can see above we are getting the transition, or animation that we want, however, right now this doesn’t look the best. The motion isn’t smooth and it simply looks like it’s jumping around. To fix this we need to use animation.</p><p>In CSS there are two different ways to animate. The first one is you can use the transition property which is simple</p><p>and works great for doing simple animations. Then there’s the full animation property which is a bit more complex but is great for making more complex multi-step animations. In this case, we’re going to get started with the simple transition property and then move on to the animation property. How do you go about writing a transition? Great question! All you need to use is the transition property in CSS. Now, remember, do not put the transition property on the hover (that is a common mistake, as shown above). Where you need to put it is on the child itself. To write a transition you define it in CSS with, you guessed it, transition!</p><p>As you can see there are multiple transition properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/0*w_VLOXydhrFLVM-u" /></figure><p>By default, the transition property is going to transition all of the properties on your element. For this example, we want to transform or transition our transform here so we’re going to write transform. What this does is tells our CSS we’re only wanting to animate this one single property and nothing else. Then what we need to do is specify</p><p>how long this animation will take, which we have specified as 1 second here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/0*J9NC3TaKI_qRGPbC" /></figure><p>Once completed this is our final result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/0*d_OSBgYezJH5pLjd" /></figure><p>Looking much better already! Now the last two things that we can do with this transition property specify a delay as well as a timing function. The timing function is going to determine how your animation is going to play out. For example, one thing we can use is, ease-in-out. What this is going to do is start your animation out slow and also end slow, with the middle being slightly faster. The end result will be something like this below (difficult to see the change because it’s subtle).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/0*FN-_YxVdxjn32SHC" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/0*RzKsW10M82MPlkai" /></figure><p>Awesome! So now we’ve played around with the transition and timing a bit. The last thing we can do is add a delay, which we can do by simply adding the time of that delay to the end of the written property after ease-in-out. For this example let’s delay it 3 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/0*ODxcDxL7C4hDhLej" /></figure><p>Notice the delay below as it transitions forward and transitions back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/0*W3WXZSxFW92knfHI" /></figure><p>Great work! Now, like I said just the very basics of the transition function, but hopefully, you can already see its full potential! Now, if we wanted to do more complex things, such as, taking the cube (child div),</p><p>and move around in a circle, I couldn’t do that with the transition. In order to do that I would need to use the more complex animation property.</p><p>To make this current transition and turn it into an animation all we need to do is write out the word animation! Again, so easy right!? Now with animations, you write it in the place where you want it to happen, which in our case is on the hover. We are going to first write animation as our property and then the first thing an animation will need</p><p>is a name. This can be anything since we will define it later. For this example, we are going to use the name circle since we are trying to get the child box to move all the way in a circle.</p><p>Next, we are going to use a little thing called keyframes. Per, MDN Web Docs:</p><p>The <strong>@keyframes</strong> CSS <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule">at-rule</a> controls the intermediate steps in a CSS animation sequence by defining styles for keyframes (or waypoints) along the animation sequence. This gives more control over the intermediate steps of the animation sequence than <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transitions">transitions</a>.</p><p>Now to use them we simply define them below in our CSS. There will be 4 positions of our child as it moves around, so we need to define all 4 of them. We do that by using the point in the transition by percentage, and the action we would like it to take. In this instance we have the 0% position which is the start, 33% which should be the next position which will move the square down. To do that we write transform: translateY(100%). This will transform the div and flip the Y position to the bottom. Next, we have the 66% position and we need that to keep the square on the bottom and move it over, so we write the same for the Y which is translate&amp;(100%), and add the X to move it over with translateX(100%). Finally, we want our final position at 100% to simply translate(100%), which will return the square to its correct position on top but move it to the right. When this is all done your code should look like this and your animation should flow around in a circle as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/0*m3GqisbaLuFjWrG1" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/0*vzUJcxl26tmzUYZD" /></figure><p>If you were able to follow along and get the same result, Well done! Now as I’ve said a few times already, this is just a simple example of Transition and Animation in CSS, but hopefully, it opened up your eyes to everything else that could be done. Thanks again for reading and Happy Coding Everyone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3114a1e62f5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Portfolio — Projects Section]]></title>
            <link>https://kevin-michael805.medium.com/building-a-portfolio-projects-section-15c7429ff2b4?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/15c7429ff2b4</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Mon, 20 Sep 2021 20:16:44 GMT</pubDate>
            <atom:updated>2021-09-20T20:16:44.383Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Portfolio — Projects Section</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O5RRiIGzR5Lmi8dx" /></figure><p>Hello everyone and welcome back! As a new programmer, I know the importance of having a solid portfolio to show off to your prospective clients and employers. We work in a particular industry, one that requires you to really show off your skills to be considered for a position. It’s not like most jobs where a resume will do. For us, we have to be able to put our money where our mouth is. For that reason, in this blog I’m going to be going over how to build a simple projects section that looks great and should catch the eye of any employer. I did this in react as you will see, and I suggest any new developer to really try and master everything react has to offer, as it has quickly become a go-to framework. With that said, Let’s jump right in.</p><p>To start, I’ve already created a react app and removed all the boilerplate code. If you need help getting started with how to build a react app, please check out my previous blog that goes into that in great detail. Okay, so as I was saying, I’ve gone ahead and created the app and I’ve also created 3 components, Header, Body, and Footer. These will be the 3 sections of my app that I will need. The Body is where we will be working to create our Projects section. To start this is what my Home.js file looks like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/0*WCTPyDIXjZ7b7Uwg" /></figure><p>As you can see, I’ve imported all of the components and added them to my Home.js file.</p><p>Now moving on to our projects section. First, we will need to create 4 files in our Projects folder, which should also be in our main Body folder. We will need to create 2 js files, one will be our index.js file and the second will be our projectcard.js file to help create and separate the individual projects. We will also need 2 CSS files to style them both. I’ve named them projectcard.css and projects.css. Once you are complete your Projects folder should look like this below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/184/0*WY-jF0iAPnfLOljq" /></figure><p>Great! Now let’s get into coding. The first thing we are going to do is get all the information about our projects into our app. To do that I’ve created a file called projects.js ( You can have this anywhere in your file structure, but I recommend putting it in a folder named data or something similar to help make it known what the folder is for.)</p><p>In this file, we will be exporting an array of 3 projects. Each project will have an; id, about, tags, demo, GitHub, and image. Once you’ve completed this array it should look something similar to mine below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LpA-dnGDKakd60q_" /></figure><p>I’ve named this array ProjectData and will now import it into our projects/index.js file so we can access the data. Below is the start of that index.js file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/0*M7cH5xKuNjVCWecp" /></figure><p>Let’s go through this. First, at the top we have to import react like always, I’ve also imported my CSS file and the ProjectData array that we just created. Great! Now we have access to it, we just need to now put it in motion. First, we are going to create our Projects function and then immediately create a variable that we can assign to ProjectData. I’m calling that data in this example. Now we need to return something like always. Within that return, I’ve created 2 divs. One is a simple label that we will use as our title for this section in our body. The second div is where we will access the individual projects. To do that I’m going to map over the data variable, and with each project passed through we are simply going to return the project id for now, to make sure it’s working. When we check our browser we see this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VRQxa0RQg3NtqP4B" /></figure><p>Awesome! That’s exactly what we should see. Not very exciting but it’s correct. Ok now let’s start breaking down the elements we need and coding them out. When we are done it should look something like this below. Keep in mind this is the final version with the CSS added. I will show you the CSS at the end but as you are going it will of course not look like this until it is styled properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8IFdNnqP0ipWXFnF" /></figure><p>As you can see I’ve labeled everything that we need; the title, demo link, GitHub link, tags, about section, and the image. Okay, perfect so let’s start creating these. First, we need to create the function for each project card (which we will have 3 of). I’ve done that below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/0*6yZ3lNBAOmsx664s" /></figure><p>For our projectcards, we are going to have the title at the top. I’ve gone ahead and created a div for the project-card, and created a label for the title. Once we’ve done this we then need to make sure that we have imported the ProjectCard onto our main index.js file. I’ve done that below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/0*CaVWzaUtLCH5M4nY" /></figure><p>As you can see we have the proper imports at the top so we can access them. Then I’ve removed our placeholder of project.id and replaced it by returning our individual ProjectCards. Once we have that done our browser should now be showing the Titles of each project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZkLDFYntGtwvGX0o" /></figure><p>Perfect! Okay, now we can simply start working on each section. Next, we have the links to our demo and our GitHub. That code is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/0*XfYV0jqmZCHKDaV6" /></figure><p>Let’s break this down a little. First, we have a new div which we will call project-links. Keep in mind the classNames are very important to have and understand easily. This is what we will reference in our CSS to get it looking just the way we like.</p><p>Next, we will pull the demo info from our array and if there is a link present we will make a button for that specific project. We do the exact same thing for the Github information. Once this is done we should get something that looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2-JDgK0-yGMUYTfq" /></figure><p>Fantastic! Things are starting to look better. Next, we need to add our about section. That is an easy one, we simply need to add a &lt;p&gt; tag for paragraphs, and reference the project.about data. That is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*S5Kc2x_3h9Gl_qfj" /></figure><p>With that, we then have our about section also added to our projects in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CnSJB1Rx71mp7UJc" /></figure><p>The second to last thing is our tags, which I’ve added to the code below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/0*VyWQ9zAPEplMGNW1" /></figure><p>For the tags, we are going to create a new div and then map through the tags listed for each project. For each of the tags we map through, we are then going to return a label with that specific tag information as shown above. Once we have that our browser is looking even better!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HZ5LVtPM6lfM7Wka" /></figure><p>Finally, we need to add in the photo which I’ve added to our code below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/0*Ij6AFZ7sqJyECfLN" /></figure><p>To start we will need an &lt;img&gt; tag. Then our source(src) is going to be the data pulled from the project.image location in our array. Once we have this completed our browser will look like this below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AjtHG8QpmM9327UA" /></figure><p>Perfect! We have everything that we need to be added and now all we have to do is style. Because this blog is focused more on the JavaScript portion I will not be going over the CSS but I’ve included it below for you to see. When all is said and done your projects section should look just like this below!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DraALr1T1A_P8s3E" /></figure><p>Stylish if I may say so myself! Well, there you have it. A quick and simple breakdown of how to use react components and how to break up sections to easily code and design a great-looking web page. As promised I have the CSS here as well. Happy Coding Everyone!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/0*K8m8QY3yK79aIjic" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/0*8TvrsuyerLazpITq" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/0*2MTJ8c1Ey2f0jtw1" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15c7429ff2b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t try to Memorize Code — Try this!]]></title>
            <link>https://kevin-michael805.medium.com/dont-try-to-memorize-code-try-this-ce50d2ac8c1e?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce50d2ac8c1e</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Mon, 13 Sep 2021 22:55:29 GMT</pubDate>
            <atom:updated>2021-09-14T21:25:56.026Z</atom:updated>
            <content:encoded><![CDATA[<h3>Don’t try to Memorize Code — Try this!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AgNY8fKVjHRppB8sEU_Vcw.jpeg" /></figure><p>Welcome, everyone! Hope your week is off to a great start. If you’ve read any of my previous blogs you know that memorizing code (or attempting to) is a topic that I’ve brought up a few times, and just as I’ve mentioned before, it’s not a good idea. Trying to memorize absolutely everything is just too much, and it’s okay to acknowledge that. Instead, I thought I would talk a bit about a different strategy for new developers who are struggling to comprehend everything that’s thrown at them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*1tJQ2fzfjqF5Mxqb" /></figure><p>Memorization is simply a terrible technique when trying to learn to program. It’s a good technique if you need to learn biology or history or if you need to learn random facts to be exact. However, with programming, there’s too much to memorize. If you really broke it down there are probably millions and millions of functions and methods and names, which takes memorizing all of it off the table. So stop trying to do it! And also don’t feel bad about it. So what should you do? Instead what you need to do is focus on the concepts of programming. There aren’t nearly as many concepts that you run into while programming to understand a language like JavaScript.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*4Mg7EsyXSOVEJnFp" /></figure><p>Think about it. If you understand how setting variables work, how functions work and how objects work, well you now know 50% of what you need to know to write a program. But be careful. Too many young programmers will get lost in the weeds when trying to learn these concepts because when they attempt to learn functions you also learn about built-in functions, and there is a lot.</p><p>So what does the beginner programmer do? They try and learn them all, they try to memorize all of them from the start. Instead what you need to do is focus on how these functions work and the concept of functions as a whole as opposed to individual functions. Listen, no matter what you’re going to forget about some random functions or you won’t remember the name of certain built-in functions. All that is okay. All that is stuff you can easily reference and find out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*sihPAveqS3yniTFw" /></figure><p>Also, imagine all of the functions that you will hardly use at all. You don’t need to memorize these because you just aren’t going to be using them very often. So when you do need to use them, you can just look them up. The important part is that you know what to look up and then how to implement it. In the world of programming, we are very lucky to have everything documented very well. Also, you don’t have to worry about trusting the documentation or trying to collaborate with other sources to make sure it’s accurate. What you look up in the documentation for a language is going to be correct 99% of the time. To be blunt. memorization is not really a skill that you need as a programmer and it’s something too many new programmers try to do, and it’s usually just a bunch of waste of time.</p><p>Let’s say you want to try to do something with a function that does a specific thing. Well, good luck trying to remember exactly which built-in function may do that. Like we’ve said, there are just too many to remember them all. So instead you’re going to google it and find it, or you’re going to build the function yourself because there is no built-in function for what you’re looking to do. None of that requires any memorization. What it requires is the understanding of the concepts you can build that function yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/0*EaHgkgPAwVRp27LP" /></figure><p>With programming, it’s an ever-evolving field. Things are always changing and being added. Using memorization as a technique really only works when you’re trying to memorize a small enough set of ideas. Instead, you need to focus on constantly learning. One thing about programming that most people don’t realize is that it’s a field that you constantly are learning in. You never get to a point where you’re done learning because something is always going to be new that’s coming out or there’s always going to be new things you can discover that have been around for a long period of time. If you want to become a better programmer instead of memorizing what you should do is focus on your skills of learning. Learn what type of learner you are. Do you learn from reading? Videos? Hands-on experience (usually the best way for programming, get the reps. Make yourself a better learner because as a programmer you’re going to spend more time learning than anything else. If you can become a quicker and more efficient learner you’re going to drastically increase the speed that you can become a programmer and learn new programming skills.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/0*3ZtQQ05B79sDmGJd" /></figure><p>Think about it this way. Imagine we are learning math. When we are kids we start with simple word problems. Mark has 10 books and he’s read 3 of them. That means he has 7 books left to read. As we’re learning how subtraction works we start with real-life scenarios that are simple to grasp the fundamental concept. Once we have that it’s much easier to subtract 20 from 65 or 100 from 145, whatever it is. We can easily solve those problems because we understand the concept, not because we’ve spent hours and hours memorizing the possible subtraction outcomes of every number.</p><p>I know this is a pretty basic concept but it’s an important one. If you’re new to the world of programming stop memorizing everything! Trust me it’s okay, the information is out there for you. Happy Coding Everyone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce50d2ac8c1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating your first React Application]]></title>
            <link>https://kevin-michael805.medium.com/creating-your-first-react-app-b02e577abee0?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b02e577abee0</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Tue, 07 Sep 2021 02:29:39 GMT</pubDate>
            <atom:updated>2021-09-08T17:18:04.097Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Dd3Eu6pg90atWy02" /></figure><p>Hello everyone! Today I wanted to give a quick rundown (as I did previously) for creating a react app, but then expand on it with the use of React Router and Link! Let’s get started.</p><p>Again, let’s refresh and start by creating our react app. The first thing we want to do is open up our terminal. Then navigate to where you would like to store your project, and type in npx create-react-app project-name. As it shows below I created my app with the name project-name just to make it easy to visualize.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/0*6S6PDHAJLSEqJBcO" /></figure><p>This can take a few minutes so be patient. Once it’s complete go ahead and open your project in your text editor. To get it up and running, you can type npm start into your terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*Pt4Q8ZF9bEmG6Bdd" /></figure><p>Once you’ve done that you will see the React base framework load in your browser on localhost:3000, or whichever port you are using. You will know everything is working properly when you see the spinning React logo as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*34yr4dTWSQGH5o1R" /></figure><p>Great! Now we have our app created and up and running. Now we can clean up a bit of the files that were given to us when we first created the app.</p><p>Right off the bat we can get rid of 4 files that we will not be using (if you would like to know what these files are for, you can again do a quick google search, however for the purpose of this quick overview we’re simply going to get rid of them. The files will be listed in the src folder and shown below. Feel free to delete them now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/0*H0R5RRYCO_UNm6xl" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/148/0*mQpWwbZSA33jJbud" /></figure><p>Next, let’s go into our App.js Folder and clean that up as well. You can simply delete all the code inside the single &lt;div&gt; as shown here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/0*tpxYo6gRgB9IrTGj" /></figure><p>You can then replace it with an h1 tag as a simple placeholder, as I’ve done here with, Welcome to our Company Home Page!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*fcyM-vlzIBJUs28O" /></figure><p>Now that you’ve done that your app should no longer show the spinning React logo and script, it should only show your h1 tag like mine here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HLtE0VgpxchxkEia" /></figure><p>Awesome! We’re almost done with setting up our React app. Next, create a folder that will hold our components.</p><p>Our components will need to be stored in the src folder, so first navigate to that folder and right-click to create a new folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/0*g7duChhZ-UXPuo3A" /></figure><p>Great, we now have our components folder! Inside that, we are going to create new files for each component that we need. For this app, we will create a simple company website, which we will build using 3 components. We will have the home page, the contact page, and the store page. They will be bare-bones but the ideas and concepts are what we are getting out of this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/0*4Wwg-v4vDUnuzz2Z" /></figure><p>Proceed to create the following 3 files so the folder looks like shown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/201/0*W2DEDCG6vr1cvA3-" /></figure><p>Now to make things easier for us let’s install the extension shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*S7pY3hcNwjzsqs5k" /></figure><p>Once you have that installed you will then have access to multiple shortcuts to make your life easier, including an auto-fill feature for starting React functions. For demonstration, I’ve gone into my Home.js file and typed rfce. This will bring up the shortcut as shown here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*uHT3ju_t779330c9" /></figure><p>Once you hit enter, the React function framework will auto-populate for you. It even includes the import line at the top, and names your function based on the file name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/0*jCZMf--WYQrsBMAC" /></figure><p>Now let’s just add a simple h2 tag and call it a day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*9FJMttc0cz71FZEC" /></figure><p>Great! Now we have our first component with a simple h2 inside which will be displayed. Now let’s go ahead and do the same thing for our other two components, Contact, and Store. We can add simple h3 tags to these to help show our progress in our production build. When you’re done they should look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/0*_ENpdxdUYEzvKeoG" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/0*ob-IxybQLkQbLYME" /></figure><p>If everything looks good let’s go ahead and move on. Now our next couple of steps are important, this is when we bring in react-router and the ability to link to different pages. First, we need to make sure we’ve installed react-router. To do so type the following into your terminal. Once it’s downloaded you can check in your package.json file to see if it was correctly downloaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/0*6mANUhiO3UJ54x6e" /></figure><p>Once the react-router has been downloaded we can then add and import it into our app. First, navigate to the index.js file. Here we simply need to import BrowserRouter from react-router-dom at the top of the file as shown below. As well as wrap the router around our app in our code, again as seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/0*NOFdbfDES16xauEn" /></figure><p>Fantastic! We are getting close. Now let’s move over to our App.js file. Here we will need to do a few things. First, we will import Route from react-router-dom at the top. Second, we will create the routes for each of our pages.</p><p>To do so we will write &lt;<em>Route</em> exact path=”/” component={Home}. We start with &lt;Route followed by the path, which is simply the single / for our Home page, followed by the component we are grabbing which is that Home component. Once you’ve imported Route and added all 3 routes your page should look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/0*ufdpXqUaCViJOr2R" /></figure><p>Perfect! Now to allow the user to click on each link to navigate to the page. As we have it set up now the user would have to physically type in /Contact to get to the contact page. In order to correct this, we need to create a NavBar with Links.</p><p>First, create the NavBar.js file. Here we are going to need to import react like always, but we also need to import Link, which is another feature that react-router provides. This is what will allow our users to navigate from page to page. To start your file should look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/0*24s1GZwAGeFAI6DC" /></figure><p>Now that we have that, let’s start adding the Links to our NavBar. First, remove the div since we will be using a &lt;ul&gt; for this one. Within that list your first Link should look like this:</p><p>&lt;li&gt;&lt;<em>Link</em> to=”/”&gt;Home&lt;/<em>Link</em>&gt;&lt;/li&gt;</p><p>As you can see it is written similar to the path, we have the to=”/” to navigate to our Home page, and then we have the Home text for our user to see. Once you’ve done all 3 it should look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/0*KJ9DsYazFpmJOxL2" /></figure><p>Great, we are almost done! The final thing we need to do is have this NavBar added to our app so it can be displayed. Let’s go ahead and navigate back to our app.js file, and there we will import the NavBar at the top, and then simply add it into our code like so.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*ke1pdozzGRTlRZ0L" /></figure><p>There you have it! Now we’ve gone from creating our first app to creating our first components with react, and finally adding the functionality to navigate across pages. As you can see on our app, we can click each link and it will take us to where we want to go!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/0*qAJ2aSrGrhOmH7No" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/0*0DSoWh0vSlzZpTjO" /></figure><p>Of course, this is just the simple bare bones of what you can do, but it should open up a lot of eyes for those who are new to react and can now see its potential! Thanks for reading and Happy Coding Everyone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b02e577abee0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking down Event Handlers and Event Listeners]]></title>
            <link>https://kevin-michael805.medium.com/breaking-down-event-handlers-and-event-listeners-47da34b75ae3?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/47da34b75ae3</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Mon, 30 Aug 2021 21:11:00 GMT</pubDate>
            <atom:updated>2021-08-30T21:11:00.746Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/820/0*D7jBVVnx39yiuy0h" /></figure><p>Hello again! Today I wanted to go over a fairly simple topic, but one that gets discussed a lot. It may be because the two things can almost be used interchangeably but also because people often confuse them for each other. I’m talking about event handlers and event listeners in JavaScript.</p><p>I wanted to go ahead and share with you all the main difference between event handlers and event listeners in Javascript. In Javascript, an event can be a button click, or simply a mouse hover, and it is important that our program responds to that specific event by doing the appropriate thing. That could be making the font of the text slightly bigger with a mouse hover, or a complete change of the page with the click of the mouse on a dedicated button.</p><p>In this blog, you will learn the two ways to handle events and add them to your script. With Javascript, this is handled in two different ways. I bet you can guess the two? That’s right, it’s handlers and listeners! To explain this best I think it’s easiest to show specific examples. Let’s look at the example of using the onclick event. The onclick event occurs when the user clicks on an element that has been defined in your HTML. Let’s go ahead and do that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*o1IOEYbO2NRU7T79" /></figure><p>The first thing that we need to do is create a button and then add the class btn. The class is what we will be referencing in our script file so we can tie the listener to the correct element.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6HR7R8wYGyDN28lR" /></figure><p>Next, let’s go ahead and jump over to our index.js file. First, we need to go ahead and create a button variable which we’ve done on line 1. We will use the document.querySelector to get the class of the button that we’ve defined in our HTML as btn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xTmXgUMKD-jXhrkX" /></figure><p>Next, we’re going to use the button variable and we are going to use the onclick event handler. Now, remember the onclick attribute will run when a mouse clicks on the element the handler is attached to. Lastly, let’s go ahead and return the console.log. Now when we go ahead and click the button the onclick event handler is triggered and we can see the output in the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hWNqEw8vacKvTwkZ" /></figure><p>Nice, we got it firing! So that’s an event handler in a nutshell. Fairly simple concept.</p><p>With this next example, we’re gonna use event listeners which are the other option for handling events. Listeners are directly assigned to an object, just like handlers, and they “listen” for events and get triggered when an event occurs. Things it will be listening for could be; mousedown, mouseup, click, dblclick, mousemove, mouseover, mousewheel, mouseout, and many others. Each one means its own thing of course. Here are some common examples and definitions of the events below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G-28Vp1GdpekDpkY" /></figure><p>Now that we’ve gone over what a listener is, let’s take a look at an example. First, we are going to simply repeat the previous example by assigning an event listener to a button to listen for specific events. In this instance, we are going to assign it to look for the ‘click’ event. In our code, we are going to change the onclick to addEventListener and then we’re going to ask it to look for the click event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*koV6pP96_qSUv9u1" /></figure><p>Once we have done that we can click on the button and notice in our terminal the console.log is returning the correct string, just as it did with the event handler. Perfect!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yxEYKjPO7ey6E5Cq" /></figure><p>Now comes the difference between the two. You can only have one event handler for a specific event type but you can have multiple event listeners for that same event. Let’s take a look at what happens when you add two onclick event handlers to the same object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kZ3WCBQqfpOtMSMW" /></figure><p>As you can see the first onclick handler is completely ignored and a single click will only result in the second handler firing.</p><p>Now if we use addEventListener we get a different result. Let’s repeat this same thing but we are going to use event listeners.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HInN8zsxXxZ7InPd" /></figure><p>As you can see from above, when we click the button you can see in the console, the program has triggered multiple event listeners of the same event, and we can see that with the two separate outputs.</p><p>So there you have it! A brief breakdown of the syntax and uses of both event handlers and event listeners. Now the key difference to remember between them is that a single element can only have one handler attached to it, however, that same element can have multiple listeners. So that brings us to our final question, which method should you use? The answer is like a lot of things in the program and that is it will depend on a case by case basis.</p><p>If you only ever want to attach a single type of event to an element, feel free to use an event handler. Now if you need to attach more than one event to an element or you may need to in the future, then adding a listener to the element is going to be needed. For the most part, using addEventListener is going to be the way to go most of the time. Hopefully, that was helpful for some, or a simple refresher for others! Happy Coding Everyone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47da34b75ae3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Helpful Tips for New Developers]]></title>
            <link>https://kevin-michael805.medium.com/helpful-tips-for-new-developers-5a36064dd34?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a36064dd34</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Mon, 23 Aug 2021 20:54:40 GMT</pubDate>
            <atom:updated>2021-08-23T20:54:40.676Z</atom:updated>
            <content:encoded><![CDATA[<p>Helpful Tips for New Developers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*UhRJhqJ-8WbC9rmd" /></figure><p>Hello again everyone! Hopefully, you are all having a wonderful week. Today I wanted to share some tips that I find to be most helpful as a new developer. As we all know there is a lot of stuff that you need to know as a software engineer, and sometimes it can be overwhelming. It’s also hard getting started in a brand new field just as I have. But remember you are not alone! There are plenty of others out there that are going through the same things you are. That’s why I wanted to take a few moments and go over a few tips that I always remind myself of when things get tough. They’ve helped me out a bunch and hopefully, they can do the same for you!</p><p>Now before we jump in I want to preface this with the fact that these are my tips and they might not work for everyone. You may find some of them useful, and you may find some of them to be completely wrong for you. That’s okay. The important thing is to hopefully get something out of this. Maybe it will only be a single tip but it’s something!</p><p>Okay, my number 1 tip is to not worry about memorizing everything! This is a big one which is why I’m starting off with it. I think a lot of people think that they have to know how to build everything off the top of their heads without the need for any research or a single glance at posted documentation. Well, let me tell you, even the most senior of senior developers at the biggest companies around the world still have to look up some of the most basic stuff, and if they have to do it from time to time then it’s certainly okay for a Jr. developer like yourself to also have to look stuff up. The key is that you have to know where to find what you’re looking for. That could be in some of your previous projects or you know where to go in the documentation to find it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/0*k8WnDZiJeSz7Qmg5" /></figure><p>When it comes down to it, your ability to locate the solutions is what’s most important. No one cares if you had to look on Stack Overflow for how to do a simple loop, as long as that loop functions properly in your code, all is good! Don’t ever feel like a failure for looking something up. Rather, feel like a success when you know where to look, find it, and properly implement it. Remember the documentation is there to help, so let it!</p><p>My number 2 tip is understanding how you learn best and sticking to that. We all learn differently. Some learn from doing it over and over, some learn from reading books or listening to audio, or maybe you learn from seeing others do it. Whichever way works for you, trust it. If you don’t know what type of learner you are, that should be priority number 1 for you. Below I have the 12 types of learning styles (I know what you are thinking, 12!!! I know I couldn’t believe that there were that many either). Obviously, some of these don’t fit with learning coding (Touching your screen isn’t going to help..skip that one), but it’s interesting to see how we all learn differently and find different methods that work better for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*in8Gw-TyLK3tuhML" /></figure><p>As you all know we work in an industry that is constantly evolving its technology and constantly changing. That fact is not going to change anytime soon. The more comfortable you are with learning, the faster you will pick up new technologies and new libraries. You’re never going to stop learning in this career, so the faster you realize that the faster you will improve.</p><p>My tip number 3 is learning how to read the documentation for the language you are working in. I know I mentioned this briefly in my first tip about not needing to memorize everything, but it deserves its own spot on the list because if you can’t memorize it, then you need to know where to find it. Reading the documentation on StackOverflow and other resources is a skill. It is something that takes time to learn and master. It is not the same as reading a book or a setup manual for some new Ikea desk. It will take time and can often become frustrating when you don’t understand the documentation. I can’t tell you how many times I thought if I can’t understand the documentation, how am I ever going to understand the actual code. It took me a while to realize that wasn’t a fair point. I just didn’t understand how to read it properly to start. But once I did, wow did it make a difference.</p><p>Also, not every language’s documentation is the same. Some of them are great and some aren’t the best, but that’s what you have to work on is how to read the documentation, how to use the documentation, and how to implement it.</p><p>Tip number 4, if you’re a Jr. developer you have to create a very visual portfolio website. This is a big one. You have to showcase your work. A resume with bullet points, or links to your Github account are all great, but you need to give them something to look at. They need to be able to really see your work in action to fully understand it and appreciate it. Showing off your code is important, but you also want to showcase the finished product. A profile website is a perfect way to do this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*PcIyO0hilTVwAMZ9" /></figure><p>Now it’s important that the website is visually pleasing. It should stand out and it should show your style. With that said I also think that every developer should have a basic level of design skills. I’m not saying you need to be a professional designer but you should have some understanding of design in my opinion. You can write the best code and produce an amazing project, but if you don’t know how to make it look good it’s not going to matter. Every single one of us who goes to a website that looks clunky and dated, or bland and boring, will typically leave that website. Now that website might be based on an amazing idea that can help you with something important, but since it looks like garbage you’re not going to give it a chance. I know how superficial that may sound but it’s the world we live in. In short, don’t forget about styling and CSS, they are just as important.</p><p>My final tip, tip number 5, is to not be afraid to do some contracting and freelancing work! If you haven’t worked as an engineer in a professional setting, that doesn’t mean you aren’t an engineer. You don’t need a company and a salary to work. Of course, if you can I would do a full-time job first and start contracting and freelancing on the side, but if you are having a hard time finding that first full-time job, don’t be afraid to do software engineering work on the side. This will help you gain confidence and continue to build and sharpen your skills. Some great sites out there would be Upwork, Guru, Fiverr, and even craigslist! You would be shocked to find out how much work is out there right now and free to bid on. After finishing this blog you could go check out the sites and be freelancing in a matter of hours, it’s that easy.</p><p>So there you have it! Some of my favorite tips for new developers. These are just a few, stay tuned for my next blog and I’ll be sharing a few other of my favorites tips! Happy Coding Everyone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a36064dd34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coding Interviews — Things to Avoid!]]></title>
            <link>https://kevin-michael805.medium.com/coding-interviews-things-to-avoid-1e2ae3f8a7c2?source=rss-7a875f7cf2e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e2ae3f8a7c2</guid>
            <dc:creator><![CDATA[Kevin Michael Johnson]]></dc:creator>
            <pubDate>Mon, 16 Aug 2021 23:53:37 GMT</pubDate>
            <atom:updated>2021-08-16T23:53:37.470Z</atom:updated>
            <content:encoded><![CDATA[<h3>Coding Interviews — Things to Avoid!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ut_WRchDimPDKD9Y" /></figure><p>Hello everyone! If you are reading this you are probably getting started out in the world of coding. Maybe you are self-taught or went to a coding Bootcamp like myself. Others may have a degree in computer science and right out of college. Regardless of how you got here, the next step is landing that first job! Now when it comes to interviewing for software engineering jobs everyone is going to have to go through the technical aspect of the interview. We call these coding challenges most of the time. It’s when you can really show your work and skills in real-life scenarios and not just on a piece of paper like your resume.</p><p>These can be hard for some to master, and easier for others. But, regardless of how easy the solutions come to you, there are always going to be key things to avoid doing. In this blog, I wanted to share with you some of my top things to avoid doing while completing a coding interview. Let’s get started with the first one!</p><h3>1) Losing Track of Time</h3><p>Tip number 1 for you is to not forget about the clock. Coding challenges are almost always timed so this is an important one. If you lose track of the time and can’t complete a challenge it shows your inability to manage your time properly, or it can also simply show that you just can’t figure out the solution. Both aren’t good things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*biakXbpiltx6eRSX" /></figure><p>Also, you may be asked a question and you might think that’s the only question they will ask so you take your time, but actually, there’s usually at least two that they want to ask if not more. If you can pay attention to the time and not let it slip away, you may have the opportunity to answer more questions which gives you the opportunity to show off more of your skills.</p><p>Remember the interviewer probably set aside a specific amount of time for the interview. If you finish early they aren’t just going to sit around for the rest of the time, they will probably take that time to test you more. If you sit around and focus too much on that 1 question you may end up getting it right, but you weren’t able to show anything else. This is of course a fine line to walk because you don’t want to rush, but it’s something to always keep in mind.</p><h3>2) Not Making a Plan</h3><p>Tip number 2 is to make sure that you plan before you actually code. What I mean by that is when you look at the problem try to see it as a whole and not just piece by piece. Look at the big picture. This is important because if you notice one part of the problem and just leave it to come back to, what you may end up with is once you’re done and you go back to it, you realize that you need to now change your whole approach and your whole logic to the solution to make that one extra part also fit in. Not good.</p><p>You don’t ever want to have to tear down your work and start over, all because there is one edge case to the question that now doesn’t fit. This is going to not only waste a lot of time but will also show the interviewer that you aren’t looking at the problem as a whole. This is something that they will likely be looking for from the start, so it’s important to go into each question with a plan and with all the pieces understood so you can work effectively and never need to rework anything to fit your logic.</p><p>A great way to do this is to first write step by step in pseudocode of what exactly you’re going to do before you actually start coding the problem in the language that you pick. Pseudocode is always a great place to start. Great engineers will often talk out the problem and plan their solution first before ever writing a line of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/0*gui2_p5ZVh450l50" /></figure><h3>3) Implementing the Easiest Solution</h3><p>Tip number 3 is all about showing your best work. For example, when you receive a question you might already know the simple solution. You may have worked it out in your head in the first 30 seconds and you know you can write the code quickly. This might lead you to want to go ahead and just implement that solution to gain confidence in the interview and show you can solve the problem, but there can be a very big problem with doing this. As software engineers, we all know there are multiple ways to solve a lot of different problems, and it’s likely the first thing you come up with is not the most optimal. Because of this, it’s smarter to take a step back and look for the most optimal way to solve the solution and not just the fastest.</p><p>What you can do is first just say the solution that you have in mind but then continue with saying you want to think about the more optimal solution. First showing that you can solve the problem at a minimum is important, but what will help you stand out is your ability to solve it multiple ways and be able to distinguish why a specific way is more optimal than the others. Faster is not always better. Now I know this in a way contradicts my first tip of paying attention to the time but there is a difference. What I’m talking about here is working smarter, not necessarily slower. Remember, it’s okay to give the easy answer upfront, but don’t stop there if you don’t have to. Always give the most optimal solution that you have.</p><h3>4) Not Reading the Instructions!</h3><p>The number 4tip is to read the instructions all the way through before jumping right in when you’re in a technical coding interview. Why you may ask? Because there are often times when the interviewer will ask a specific question that is a little more nuanced than you might first think. This has happened to me in the past. I thought I knew the problem because I rushed through the instructions, and I ended up solving a problem that wasn’t really even asked.</p><p>This is a common trick that a lot of companies use, and it’s no different for coding challenges. They want to make sure you take the time to fully prep before getting started. Remember, prepping to solve the solution and understanding the problem are all part of the process. It is no less important than the solution itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*jwnso8kNnxmzleJ-" /></figure><p>You may hear a problem that you think you know right away and jump into solving that problem, but there may be a component added on top to slightly tweak it, and if you don’t notice that it’s a strong indication that you don’t value the preparation part of solving the problems put in front of you. With that said, make sure that anytime you start a coding interview you actually take the time to fully understand what is being asked of you. This may seem like a simple one and an obvious one but it’s a very important one! To put it simply, read the instructions all the way through.</p><p>There you have it! Some of my top things to look out for, focus on and avoid during coding challenges. Most of these may not seem very groundbreaking, and that’s because they aren’t, and they’re not meant to be. These are just simple reminders of tried and true practices that have gotten me through coding challenges in the past. Happy Coding Everyone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e2ae3f8a7c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>