<?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 Rider Jensen on Medium]]></title>
        <description><![CDATA[Stories by Rider Jensen on Medium]]></description>
        <link>https://medium.com/@riderjensen?source=rss-2b4f75e6aef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xmkJYrQ-32ajqiepr1sdNg.jpeg</url>
            <title>Stories by Rider Jensen on Medium</title>
            <link>https://medium.com/@riderjensen?source=rss-2b4f75e6aef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 16:18:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@riderjensen/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[Navigation Appearing On Scroll]]></title>
            <link>https://medium.com/@riderjensen/navigation-appearing-on-scroll-a4f288a213bb?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4f288a213bb</guid>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[thoughts]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Tue, 24 Apr 2018 20:36:06 GMT</pubDate>
            <atom:updated>2018-04-24T20:36:06.989Z</atom:updated>
            <content:encoded><![CDATA[<p>Call to actions are one of the most important elements that are included on a page. It is the first thing a user sees and the main action you would like them to take on your site. Often times, a visually busy site can distract a user from what action you actually want them to take. Taking action to reduce this distraction can help reduce user confusion and better help to convey your main message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f1HRu4YeZDn3PAS81QjuNg.jpeg" /></figure><h3>The Goal</h3><p>I wanted to try and help my personal branded website and I wanted to learn something new. The whole idea started when I was researching cryptocurrency for fun and stumbled on this website:</p><p><a href="https://ripple.com/">Global Payments &amp; Financial Solutions for Businesses</a></p><p>I loved the fact that the menu was so unobtrusive and the background on the header was at zero opacity so it blends right in at the top. It occurred to me that this move only increased the effectiveness of the call to action button right at the top. After inspecting the elements on the page, I found out that this was actually built with Bootstrap which was perfect because I also built my site with Bootstrap and was familiar with how it worked.</p><p><strong>The Plan</strong></p><p>What I wanted to do involved a multi-step plan.</p><ol><li>Create a default navigation header</li><li>Display the header</li><li>Detect if the page has scrolled enough or not</li><li>As I scroll on the page, the header background fades into view</li><li>When back to the top, fade the color back out</li><li>Always display the menu on mobile</li></ol><p><strong>Creating and Displaying The Nav Bar</strong></p><p>A default navigation bar actually comes with bootstrap and its very nicely styled. My overall site color scheme involved white and black as the primary colors with some gray as shading so actually changing the colors were not needed. However if you need to, it is easy to change them.</p><p>Displaying the bar wasn’t hard as it is built in to the framework. But the question was how to actually go about doing a fade in on scrolling and how I could add the color back in to the navigation bar and this is where issues started to pop up.</p><p>A front end framework called Greensock Animation Platform or GSAP/GSOCK was another framework that I was semi-familiar with. I decided to use it for my animation on the fading because they have great support through all the browsers and their “plug and play” type of code is very easy.</p><p><strong>Detect If The Page Has Scrolled Or Not</strong></p><p>My first draft of the JavaScript was what you see below. I wanted to make sure that the size of the screen was large enough because I didn’t want this to happen on mobile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*q8pHb0arOeTKUflZt4NNFA.png" /><figcaption>First Draft Of JavaScript Code</figcaption></figure><p>I would check to see if they user has scrolled more than 50 pixels and then the code would kick in to check to see what class was attached to what ID and if we needed to fade or not. A problem that I was running into was that the code was adding the class again and again every single time I scrolled even a little bit and so the effect was only working once when I scrolled the first time.</p><p>I added in the escape characters ( .className.match(/(?:^|\s)navbar-default(?!\S)/))) which checks to see if that class name is already on that document with the ID and if it is then the class name is not added again. But if the class is not there then we add a class to it. The issue is that immediately this would change the color and then my fade effect would take place only after that, setting the opacity back to zero and fading in once again.</p><p>What the user would see would be a nice menu at the top, they scroll and color jumps to the menu bar, disappears in a millisecond and then reappears over a half a second. This was incredibly distracting and s just plain bad design.</p><p><strong>Fading In The Background</strong></p><p>At this point, I had the fading actually down; the issue wasn’t the fade but the stark transition of adding a class that immediately increased opacity to one, changed it back to zero and then faded it into one again. I decided at this point that I wanted to take the menu in another direct, instead of having it add the color and have the menu visible right from page load, I wanted to hide the whole menu. My justification for this is that it is only a one-paged layout and I wanted people to see my CTA immediately upon coming into the site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/114/1*QhSujckLAAPP4VNA-BpbNw.png" /><figcaption>Change In Opactiy</figcaption></figure><p>I thought that by changing the opacity of the added class to zero and then fading it in would work well but this did not work either. Instead, the opacity was set to zero and the navigation bar would never actually show up when scrolling at all. It would show when you were at the top of the page but after that 50 pixel cut off that I had in my JavaScript, nothing would show.</p><p><strong>Fixing The Fade And JavaScript</strong></p><p>In the end, I decided that I was complicating this too much, as I do with most problems. Instead of still working on the old JavaScript and keep trying to iterate, I blasted the file down to its core. I realized that there only needed to really be three total parts to really have this code work.</p><ol><li>Check for the scroll past 50px</li><li>If scrolled past 50px, increase opacity</li><li>If not scrolled past 50px, decrease opacity.</li></ol><p>Anything beyond these three things was just getting in the way. The most simple way to do this was to start out at how I wanted the page to look. I kept the CSS that had my navigation bar at zero opacity originally. I then simply used GSAP to move the opacity to one over the course of half a second.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*gH7hsTOFdvkGV6bZ1epGIQ.png" /><figcaption>The Final Code</figcaption></figure><p>The final touch is to add a simple media query that will make sure the bar is always displaying on mobile. A simple rule of opacity sitting at 1 fixes this issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/265/1*vsrBY73lNdUwL83qAkdPUA.png" /><figcaption>CSS Forcing Opacity</figcaption></figure><p><strong>Conclusion</strong></p><p>Overthinking can be a big problem when coding, especially when trying to do something a little complicated. While needing to accomplish the goal, it is never a bad idea to delete or comment out your old code to start fresh and try from a different perspective. Often times it can be near impossible to force some kind of revelation on how to do something in your code; instead, time and a fresh outlook can help you more than constantly attacking a problem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4f288a213bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All About Me]]></title>
            <link>https://medium.com/@riderjensen/all-about-me-7261bee99880?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/7261bee99880</guid>
            <category><![CDATA[goals]]></category>
            <category><![CDATA[personal]]></category>
            <category><![CDATA[me]]></category>
            <category><![CDATA[about]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Tue, 24 Apr 2018 20:18:16 GMT</pubDate>
            <atom:updated>2018-04-24T20:21:00.806Z</atom:updated>
            <content:encoded><![CDATA[<p>I am a person. I breathe in oxygen, I breathe out carbon dioxide. My heart rate is 72 beats per minute. I blink close to 29,000 times a day. I am a normal person. Just like Neil Armstrong, just like President Obama, just like Bill Gates. Normality isn’t the measure of capabilities in a person but instead it is what drives them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EBHItD1h9pIfpc2_FKOUbg.jpeg" /><figcaption>Catching the Garter</figcaption></figure><blockquote>I like to just think of myself as a normal person who just has a passion, has a goal and a dream and goes out and does it. And that’s really how I’ve always lived my life.<br>-Micheal Phelps</blockquote><p>When I was younger, my dad was in the army and so I moved about every two years until I was 16 years old. I got to visit many countries, meet a lot of different people, and see fantastic things. But mostly I saw the insides of a lot of different houses and lost a lot of friends. I didn’t enjoy moving, in fact I hated it. Traveling is stressful for me now, I don’t yearn to see sights or be places; I love the comforts of home and grounding work. Because it was so hard to maintain relationships moving all the time, I instead started investing myself in work.</p><blockquote>Work gives you meaning and purpose and life is empty without it.</blockquote><blockquote>-Stephen Hawking</blockquote><p>I love working. When I get a project, I want to attack it immediately. There is nothing better than the feeling of finishing a project and moving it into the “done” pile. Doing meaningful work is so crucial to me, I often feel discontent in my job when I do not have enough things to do. It is truly fulfilling when I can get a project assigned where I know the scope of it, I have the skills required to do it, and it is a meaningful project.</p><blockquote>The Iron never lies to you. You can walk outside and listen to all kinds of talk, get told that you’re a god or a total bastard. The Iron will always kick you the real deal. The Iron is the great reference point, the all-knowing perspective giver. Always there like a beacon in the pitch black. I have found the Iron to be my greatest friend. It never freaks out on me, never runs. Friends may come and go. But two hundred pounds is always two hundred pounds.</blockquote><blockquote>-Henry Rollins</blockquote><p>Outside of work, I like to work out. Lifting weights and eating right are two of my favorite things to do. I used to get teased all the time at an old job because I brought the same meal every day for over five months. But you can’t be a hard worker without dedication and I am dedicated. I think many people view work as a chore. They might think its a pain to get a project or have to talk to a client or go work out at the gym. And sometimes it is. Life is tough sometimes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*BVMmi6RdTwcKy3fV_rLfFw.gif" /><figcaption>Me in the foreground deadlifting 335lbs</figcaption></figure><p>My dad loves moving and not just himself either. He has always been one of my role models because he is just so charitable and helpful. Often times we would wake up early on a Saturday morning to go help someone in need move or do some yard work. At the time, I hated it. Whenever we would go to move, people would hand me light boxes, I hated being the weak person keeping the team down from moving the heavy things like dressers and couches. One of the main reasons I even started working out was so that people wouldn’t look at me and try to evaluate whether I could or could not carry something. Instead I trained to be strong enough to lift whatever I needed to. I hate being a burden to any team that I am on because a team is only as strong as its’ weakest link.</p><blockquote>If you are lonely when you’re alone, you are in bad company.</blockquote><blockquote>Jean-Paul Sartre</blockquote><p>I am a very insular person, I like having time to myself to think and work. But interacting with people is something that I excel at as well. Being able to communicate is incredibly important to me because if we are not communicating then I cannot do my work. For example, I had a client once who was very unresponsive and vague with what he wanted and it was a very difficult and frustrating experience and without a doubt my worst client. My goal is to be a tool, I want to be utilized in a purposeful and meaningful way to make the world a better place. When there is a miscommunication, it puts me on edge and it becomes a priority to fix so that I can produce the best work possible. I enjoy it when someone approaches me with a problem that I have the skill set to solve, it is a very fulfilling feeling.</p><blockquote>I’m interested in things that change the world or that affect the future and wondrous, new technology where you see it, and you’re like, ‘Wow, how did that even happen? How is that possible?’</blockquote><blockquote>-Elon Musk</blockquote><p>Communication is key and one of the best ways to do it is through technology. I love being connected and easy to reach. When I see an email with a person asking a question, my curiosity is overflowing, I just like to tackle a problem and solve it. Technology makes this all so much easier. In addition to keeping us connected, it is great to solve problems as well. As a junior web developer, there is so much to learn that I couldn’t do it without technology. Videos on Pluralsight, YouTube, and Udemy. Walk-through articles on Medium. Question and answer on Stack Overflow. There are just so many resources to take advantage of and better myself it is almost overwhelming at times. But one of the greatest joys is struggling and struggling with a concept until almost in an instant it all makes total sense.</p><blockquote>Intellectual growth should commence at birth and cease only at death. <br>― Albert Einstein</blockquote><p>Learning from all of those resources that we have through technology is maybe the largest advantage we have over our ancestors. The wealth of knowledge waiting to be tapped is unfathomable. And the best part about this is that growth doesn’t ever have to stop. At the point when you stop learning, you stop growing as well. It is so important to me that not only am I practicing my skills at work and staying familiar with current things but also that I am learning and growing in other ways. Stagnation is just too simple, too easy to slide into. It takes discipline to learn by yourself but the gain will always be worth it because there is no price on knowledge.</p><p>I am a person. A normal, boring person. There is nothing special about me from the outside. But on the inside, I burn with passion and determination. Everyday I set myself apart by going the extra mile, by completing difficult tasks, and by always learning as much as I can so that I am always growing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7261bee99880" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving Forward With Goals]]></title>
            <link>https://medium.com/@riderjensen/moving-forward-with-goals-96c3fed4a3aa?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/96c3fed4a3aa</guid>
            <category><![CDATA[planning]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[goals]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Wed, 28 Feb 2018 07:16:50 GMT</pubDate>
            <atom:updated>2018-02-28T07:17:15.077Z</atom:updated>
            <content:encoded><![CDATA[<p>My name is Rider Jensen and I am an aspiring web Developer; at least, that is what my Twitter bio says. Web Development is an incredibly interesting field, one that I have only recently delved into. I know the very basics at the time of writing this: HTML, CSS, JavaScript, BootStrap, Wordpress, etc. I had a very hard time finding what I am passionate about in life, it took me a lot of changing majors and taking different classes as is the case with most of us. But why I ended up settling on Web Development was because it is not just a study of facts but a mastery of tools. HTML is a tool, CSS is a tool, JavaScript is a tool. And what these combined tools allow me to do is to use them to do something interesting with anything I want. Web Development is not confined to making only blogs or making only portfolio websites or anything: the whole point is that you can do anything with these tools. And what that allows me to do is burn white hot with passion from project to project because I get to decide how to tackle these amazing projects I get to take on with this set of tools that I have learned.</p><h3>Educational Goals</h3><p>Right now, as I continue my education, my goal is to finish school and focus on back-end development. I am a very technically minded person and while I love front-end development, I still get giddy thinking about the possibility of managing a database. I don’t know much right now, but a few things that I am hoping to learn before I graduate are:</p><ul><li>Ruby On Rails</li><li>Node.JS</li><li>Python</li></ul><p>And then of course there are many front-end tools that I am hoping to learn as well:</p><ul><li>Angular</li><li>React</li><li>jQuery</li></ul><p>While I may be late to the game on a few of these, especially jQuery, I once read a statement from an anonymous user who, in response to a question of “What front-end tool should I learn next?”, he responded:</p><blockquote>“Have you mastered the basics yet? Do you know JavaScript like the back of your hand? jQuery was made to make your life easier and to solve some problems that JavaScript has. But until you actually know what the problems are in JavaScript that jQuery is solving, there is no point in learning jQuery because your understanding of it will not be complete”</blockquote><p>I loved that and I feel like it is incredibly applicable to where I am right now. Front-end tools really make my life easier and make me faster and more efficient. But they were created for a reason and until you learn the underlying language of these tools really well, it may be harder to utilize them to their fullest extent.</p><h3>Entry Level Employment Goals</h3><p>My goal graduation date is the end of the summer, 2019. At that point, I would like to start working at either a firm or freelancing. I can see both have benefits and cons to them of course: freelancing has the freedom to take projects you really love but a firm has stability and steady work for you. If I work for a firm, I would love to help work on mobile applications and work on the user interface interactions. As a freelancer, I would love to work for non-profits because that would be incredibly fulfilling. Either way, I hope I can continue learning and getting better at my craft.</p><h3>Long Term Employment Goals</h3><p>Often it is difficult to tell the future and I believe if you asked ten people if they thought they would be where they are today, nine of them would have had no clue. Life is a moving puzzle and so my only real goal is that I hope to roll with the punches of life. I am sure in ten years, there will be so much new technology that much of what I know now will be completely obsolete. The most important goal to have is to always be flexible and willing to change; Web Development moves so quickly that an unwillingness to learn will be the death of your career. In ten years or twenty years, I hope to look back on myself and laugh at how little I know now because that will show how much I have grown and learned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96c3fed4a3aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Simple Resume]]></title>
            <link>https://medium.com/personal-achievments/a-simple-resume-850d06f06a9b?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/850d06f06a9b</guid>
            <category><![CDATA[resume]]></category>
            <category><![CDATA[personal]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Wed, 28 Feb 2018 06:42:08 GMT</pubDate>
            <atom:updated>2018-02-28T06:42:08.962Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>EDUCATION</strong></h3><p><strong>Bachelor’s Degree of Science in Web Design and Development</strong></p><p>Utah Valley University, Orem UT</p><p>Anticipated Graduation Date July, 2019</p><p><strong>Associates Degree of Science in History and Political Science</strong></p><p>Utah Valley University, Orem UT</p><p>December, 2016</p><h3><strong>EXPERIENCE</strong></h3><p><strong>Coding</strong></p><ul><li>HTML, CSS, JavaScript and Responsive Design</li><li>Bootstrap and Wordpress</li><li>SCSS and SASS</li><li>Greensock Animation Platform</li><li>C++ and C#</li><li>Some experience with using API’s and JSON</li></ul><p><strong>Design</strong></p><ul><li>Adobe Illustrator, InDesign, and other web design tools</li><li>User research, sitemaps, wireframing, userflow, and information architecture</li><li>Prototyping on tools on Invision and Adobe XD</li><li>Infographic Research, Design, and Creation</li><li>User Guides for Onboarding Software</li></ul><h3><strong>INTERNSHIPS</strong></h3><p>National Congressional Internship with Senator Hatch</p><p>Utah State Legislature Internship</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=850d06f06a9b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/personal-achievments/a-simple-resume-850d06f06a9b">A Simple Resume</a> was originally published in <a href="https://medium.com/personal-achievments">Personal Achievments</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Faking Some Of The Back End]]></title>
            <link>https://medium.com/web-development-articles/faking-some-of-the-back-end-385e9797bb5b?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/385e9797bb5b</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Tue, 13 Feb 2018 01:36:05 GMT</pubDate>
            <atom:updated>2018-02-13T01:36:05.299Z</atom:updated>
            <content:encoded><![CDATA[<p>Starting your journey into becoming a full stack developer can be difficult. Knowledge builds on knowledge and it can be difficult to create a website where you have functionality in place to show your great work but you don’t have the skills or time to create it. Let me give you an example:</p><p>If you are a beginner, your learning path often goes HTML, CSS, and then JavaScript. At this point, you have no idea how the back end and front end communicate. Creating webpages and styling them is a no-brainer, you could do it in your sleep. You can easily use Javascript to get user input using text areas and input fields. But what happens when you want to use that information on another page? Each time you change pages, your JavaScript reloads, resetting all of your variables and anything you stored from your user. If you have not learned about cookies yet, this is where sessvars (session variables) comes in handy.</p><p>Sessvars was something that I stumbled on when I was creating a very simple project to showcase my JavaScript skills but I didn’t have any idea about cookies and how to utilize them. In a nutshell, Sessvars is a script that allows you to store variables on the client side, inside of the browser cache. This allows you to get user input from one screen and store the input into a session variable. Then when the user loads into a different page, you still have that information stored in the variable.</p><p><strong>Installation:</strong></p><p>One of the great things about sessvars is the ease of use. You can quickly download the file from github<a href="https://gist.github.com/LC2010/594793"> here</a> and then simply include the required script tag.</p><h4>An example:</h4><p>Working on a capstone for a class, I decided I wanted functioning log in and sign up buttons as well as a functioning cart that I could checkout with. The project can be viewed on my github<a href="https://github.com/riderjensen/dgm2760/tree/master/Module%2015%20-%20Capstone/Project%2015"> here</a> as well as the actual working site<a href="http://riderjensen.com/wowApp/index.html"> here</a>.</p><p>Adding a log in modal through bootstrap was very easy, again the issue was that I needed to take user input and use it through multiple pages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*ojQndqX1PET9PKsN." /><figcaption>Log In Modal For The Site</figcaption></figure><p>Storing the user input was very easy using sessvars shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/0*Lzj1oCeOAPDyihcr." /><figcaption>JavaScript Code To Get The Username And Store It</figcaption></figure><p>Once the code is stored, you can easily perform a check on your JS loading to see if anything is stored in the myObj.name property.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/0*xYa05g1sl3zRedUV." /><figcaption>Checking To See If Anything Is Stored In myObj</figcaption></figure><p>Obviously you could add more checks to your code, looking for something specific to be in the username and password (length, character types, symbols, etc). But when you’re just trying to fake some of the back end to give your site a cohesive feel, this does the trick. Switching pages then keeps your log in information stored so that your account name is always recognized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*IgWUMrYSQZueCxe7." /><figcaption>The Index Page With Someone Signed In</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*BRC2S3miUmYBb7PZ." /><figcaption>The Catalog Page With Someone Signed In</figcaption></figure><p>Besides the log in/sign up function storing a username, I also wanted to be able for the user to browse some of the “books”, select a few, and then use my mock checkout page. These are not really books but simply World Of Warcraft realm names that I loaded through their public API to use as filler information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*uUMyIhTFy5N0AUVg." /><figcaption>Selecting The “Books”</figcaption></figure><p>With the books selected here, they can be transferred into the shopping cart as well as sent to the myObj. I used the following code to accomplish this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/0*sDM6suYvaQs0VsRE." /><figcaption>Checking What Books Are Checked And Moving Them To My Obj</figcaption></figure><p>The first bit of code is to make sure that nothing is in the shopping cart that isn’t supposed to be there (i.e. when users select books, open modal, close modal, change their book selection and reopen the modal). Then a simple for loop looks through all of the “book” options to see which is checked. If they are checked, they are put into the modal and then pushed onto the array in myObj.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*NwzmCQRPWUY7UdjB." /><figcaption>“Books” That Were Checked Are Displayed In The Modal</figcaption></figure><p>From the checkout modal, the check out button takes us to the check out screen. This requires us to switch pages and reloads our JavaScript. However, because we stored our book array into the sessvars.myObj, we can safely bring back the array elements and display them on the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/0*dTwToDfYQUy4_vmF." /><figcaption>Code To Generate HTML In The Check Out From myObj</figcaption></figure><p>Because this was just a mock website, I decided to give every book a random number amount that would display and then a total.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*bH1x1lF75kw9aZKa." /><figcaption>Check Out Screen With Loaded Array</figcaption></figure><p>Most of the information on this website is phony and/or completely made up or even loaded through an API that has nothing to do with the data it is loading. The goal of this website was to not only to flex a little bit of JavaScript but to also create a cohesive site across multiple pages without having to have knowledge of specific back end languages.</p><p><strong>Limitations:</strong></p><p>There are a few issues with sessvars that everyone should be aware of. Sessvars can store a maximum of 2 MB of data which may be limiting depending on what kind of information you are trying to store.</p><p>From my experience, you can only actually store one variable at a time. While there may be a way around this, I personally couldn’t figure out how. If you visit the site, you will notice that you have to log in to get a cart modal to pop up and add things to your cart. However, right when you go to check out, the sessvars remembers the array of books that you selected but no longer remembers your username. Hence, when you are on the checkout page, you will inexplicably be logged out.</p><p><strong>Case Use:</strong></p><p>You can look at the site yourself:</p><p><a href="http://riderjensen.com/wowApp/buying.html">Cozy Corner</a></p><p>You can view the raw code on my github:</p><p><a href="https://github.com/riderjensen/dgm2760/tree/master/Module%2015%20-%20Capstone/Project%2015">riderjensen/dgm2760</a></p><p>Rider Jensen is a student in the Digital Media program at Utah Valley University, Orem Utah, studying Web &amp; App Development. The following article relates to the capstone project in the (DGM 2760 Course) and representative of the skills learned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=385e9797bb5b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/web-development-articles/faking-some-of-the-back-end-385e9797bb5b">Faking Some Of The Back End</a> was originally published in <a href="https://medium.com/web-development-articles">Web Development Articles</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic HTML And CSS Is Still In Vogue]]></title>
            <link>https://medium.com/web-development-articles/basic-html-and-css-is-still-in-vogue-9fa97b84c2a6?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fa97b84c2a6</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css3]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Tue, 13 Feb 2018 01:35:02 GMT</pubDate>
            <atom:updated>2018-02-13T01:35:02.338Z</atom:updated>
            <content:encoded><![CDATA[<p>Mastering the fundamentals to anything is the base on which you build future knowledge. In Web Development, that means knowing HTML and CSS in depth can really benefit you in the long run. At some point, after moving on from the basics and starting to use things like LESS or SASS and frameworks like Bootstrap, your knowledge of HTML will still come into play.</p><h3>Lara Hogan on Twitter</h3><p>Building a lil site for the first time in eons. Friends keep asking me &#39;in what&#39;. HTML AND CSS, THAT&#39;S WHAT</p><p>Yes of course frameworks make your job easier, they take the mundane things (like building your own grid) and make them very simple. But the power of that actual framework can only be utilized by someone with a good understanding of what each element can do and how they work together.</p><p><strong>HTML</strong></p><p>HTML stands for Hypertext Markup Language and it is the standard for creating webpages. HTML is for putting content onto the screen, it describes the structure of the page using elements like &lt;p&gt; which stands for paragraph or &lt;h1&gt; which stands for header one. The different elements are placed on a page to tell the browser where things should go and how their base look should be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*4E7A8N4yNYCU1shLg_nqaQ.png" /><figcaption>An example of some HTML</figcaption></figure><p>In this example, I have a header tag which helps me to separate out my page. I then have a figure tag encapsulated in my header element because this figure goes into my header. Inside of the figure tag goes my image tag and then I end my figure. After that is a simple large header one, inside of it are the words I actually want to display large; the same goes for my header two.</p><p><strong>CSS</strong></p><p>CSS stands for Cascading Style Sheets and it describes how the document is actually presented to the user. Within HTML, all the elements have default values. For example, a &lt;p&gt; tag as a font size of 16px. But what if you want all of your &lt;p&gt; tags to have a font size of 20px? Well this is where CSS comes into play; you can specify your new rules in CSS and whichever rule comes last is the one that is taken.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/126/1*o7xaCKwu55GrDW1X-X12IA.png" /><figcaption>An example of some CSS</figcaption></figure><p>Any browser that you use automatically has some default settings for displaying elements on a page. If you type in some text on your html document, the default sizes will be used as well as the default color of black.</p><p><strong>Using Both</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0nRnAvBhKjX9eJKGR5Tl4A.png" /><figcaption>Regular markup with no CSS written in</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*pS8jheb995WdbxVkR4EWHg.png" /><figcaption>Regular HTML displayed</figcaption></figure><p>While the information is on the page, it is rather boring because there is no CSS. It can easily be spiced up with some CSS. The most important thing to always remember is that the last rule in CSS is the one that counts. For example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*yWmnoxoXUTGTfqtpquH2IQ.png" /><figcaption>Changing the text color of the paragraph tag</figcaption></figure><p>Using this CSS on the previous code we wrote, what will change? Just the “Hello There”?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*Mcq850asEIaYpRT2PmCU8A.png" /><figcaption>HTML with CSS</figcaption></figure><p>Not only did the CSS change the “Hello There” but it also changed the footer information as well that was wrapped in a paragraph element. It is also important to note that the text is not red because our rule for the paragraph element that came after that said the color should be green instead. You can easily overwrite rules in a CSS document so it is important to plan things and organize using classes.</p><p><strong>Organizing</strong></p><p>The planning stages of a website are the most important stages of the whole project. Knowing where content will be laid out and how it will be styled before you start on the actual coding will save hours (and sometimes days) in the long haul. Organizing in HTML is very easy using elements, classes, and IDs.</p><p>Elements are the tags we use in HTML like &lt;h1&gt;, &lt;body&gt;, or &lt;main&gt;. Classes are denoted by placing a statement inside of an opening tag like &lt;h1 class=”myClass”&gt;. IDs are similar to classes except they are written as &lt;h1 id=”myID”&gt;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*Xt_9KCWAORxSJqbpf3gNEA.png" /><figcaption>HTML Elements, Classes, And IDs</figcaption></figure><p>To style this into CSS is very easy now, you simply have to remember a few conventions. An element simply needs to be styled using its’ element tag. When styling for a class, you type the element class plus a period like p.myClass. And for IDs, you use a pound sign instead of a period like p#myID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*TqKGg1sZmHpY8Gmf3D52MQ.png" /><figcaption>CSS Example of Styling</figcaption></figure><p>Though all of our text will be inside of a general &lt;p&gt; tag, each HTML element will now be styled differently depending on the ID and Class that was associated with that tag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*4W83Z8aelMddZhcD2_zUDQ.png" /></figure><p>It is again important to note that our footer is still red because it does not have a class or ID attached to it that is overriding that original CSS statement of the p element’s color being red.</p><p><strong>Specificity</strong></p><p>Elements are used many times within your HTML, classes will be used fairly often on many separate elements, and IDs should only be used once. Each category that you move into this organizing is extra specificity that may not be needed. By doing a few things, you can make sure that your CSS stays beautiful:</p><ol><li>Try to never override your CSS, make sure you go back through it and change what you need to. This will help to avoid bloated stylesheets.</li><li>When making rules, be as general as possible. This will also reduce the amount that you have to repeat your CSS and save you time in the long run.</li><li>It can be very helpful to start with putting in all of your content in plain HTML before styling any of it. This can help you see that changes to the overall page and your HTML as you make minor CSS changes one by one.</li><li>Dont just start throwing in classes and IDs everywhere. Writing down or visualizing what parts of a page will have in common can help you make rules for elements instead of having to make many different classes to accomplish the goal</li></ol><p>HTML and CSS will always be important foundation skills that every web developer and designer needs to know. Even when striving to keep up with fast paced technology and the quickly evolving development horizon, it is important never to forget your roots of HTML and CSS because they will always be necessary. The better you are with your foundation then the better base you have to learn the many frameworks and tools to help you do amazing things.</p><p>Rider Jensen is a student in the Digital Media program at Utah Valley University, Orem Utah, studying Web &amp; App Development. The following article relates to the capstone project in the (DGM 2120 Course) and representative of the skills learned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fa97b84c2a6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/web-development-articles/basic-html-and-css-is-still-in-vogue-9fa97b84c2a6">Basic HTML And CSS Is Still In Vogue</a> was originally published in <a href="https://medium.com/web-development-articles">Web Development Articles</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2D Inside of Unity]]></title>
            <link>https://medium.com/web-development-articles/2d-inside-of-unity-19ca240fb3af?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/19ca240fb3af</guid>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[2d-animation]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Tue, 13 Feb 2018 01:33:45 GMT</pubDate>
            <atom:updated>2018-02-13T01:33:45.179Z</atom:updated>
            <content:encoded><![CDATA[<p>While Unity can be used to great effect for a 3D game, my goal was to create a very simple 2D calculator game. The premise was simple: create a game where the user would input two numbers and perform a math operation on them in order to score and gain points. In my code, I created most of the elements inside of the actual C# script because I found it easier to manipulate these things inside of the script.</p><p>Starting out, there are a few points you may need to know. These are very much basic C# ideas but if you dont know C# in the context of Unity, they may be a bit confusing. void Start() {} is where your program begins execution when the application is started. Anything that you need to happen very first is done inside of that area. Below is an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/0*76NXEp1Bg0BMwxI3." /><figcaption>void Start(){}</figcaption></figure><p>voidUpdate(){} is another useful tool; it updates once per frame</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/0*YnmUICtVAbElEKsH." /><figcaption>void Update(){}</figcaption></figure><p>And the final one I used was void OnGUI(){}. OnGUI makes it really easy to create things on the actual display and I didn’t have to create any assets to do this which was nice. The example below is when I created my two input fields for users to put the two numbers they were using.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/0*-53OG7y5njLswrnQ." /><figcaption>Basic OnGUI fields</figcaption></figure><p>The meat of this program relies on creating a button, parsing user input, checking to see if the input is equal to the number that we generated, and then do various tasks if this proves to be true. Creating the random number is no special feat using Random.Range.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/0*I4yUJQL_ivQm34k0." /><figcaption>Returns a number between 1 and 20 top exclusive</figcaption></figure><p>This is an example of a block of code that would be working for a subtraction effect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/0*Z6_J50Eon6TJP3q9." /><figcaption>Taking user input and subtracting it</figcaption></figure><p>First we check to see if the button is supposed to be showing. Then if the button is supposed to be up and showing, we create our subtraction button and in the meantime, check to see the subtract button is hit on the keyboard. If either the onscreen button is clicked or the button on the keyboard is pressed, we create two doubles and parse them and then subtract them correctly. At this point we now need to see whether or not the number we subtracted to is correct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/0*4KmD-Gwm18Rsgwe_." /><figcaption>Imagination Time</figcaption></figure><p>At this point, we check to see if it is equal and we can do various things. This step is where the imagination can really flow because this is where the game is created. Previously, we are just making UI elements or making numbers or doing basic math operations. But once we have the input from the user and our own generated numbers, we can do whatever we want. In my case, I did a few things:</p><ol><li>Create a new random number immediately</li><li>Change the position of the random number on the x-axis so that it feels more like a game</li><li>Increase player score</li><li>Change all previous operations and this operation to zero so there are no free points scored</li><li>Hide the subtract operation so that it couldn’t be used anymore (until all other ones had been used)</li><li>Increment the runTime variable</li><li>Changed where my number would be starting from on the y-axis</li><li>Added a little sound clip of “blowing up” like the number was destroyed</li></ol><p>These are the things I chose to do with it but you could of course go anywhere. One thing that I thought would also be fun is to not allow users to constantly use the same operation. By checking to make sure all buttons were not showing, I then reset all the buttons, moved number lower and then called a seperate function called “reduceTheDrag()”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/0*_wmyH3Czm2IoalxE." /><figcaption>After all operations are used</figcaption></figure><p>Reducing the drag was one of the main game elements that I used here; in order for it to be a game, the difficulty needed to scale. Each time a user clicked all four operations successfully, I reduced the drag that the number would have coming from the bottom. This would increase the speed at which it traveled across the screen towards my invisible collision object (talked about a bit later).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/0*GBvJAznZw1uRPrrq." /><figcaption>Reducing the drag</figcaption></figure><p>This code effectively changed a long and monotonous play to a race against the clock. Any person can add or subtract things for hours. But with this code, you would eventually have to have computer like speeds to keep up.</p><p>At some point, the game would need to end of course. But at what point? The most logical point was to create a circumstance where when the number that was supposed to be calculated left the user view (i.e. went off screen) then the application would quit. Using OnCollisionEnter(){} from Unity made this very easy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/0*cPk6TZt0G99Ie23u." /><figcaption>Quitting the application</figcaption></figure><p>Creating a simple 2D game can be daunting at first, especially if you don’t know any programming languages. But even having the basics down of the language can help you to do some really cool things with basic if statements and Unity’s interface. Making sure you’re getting all the user input you need and then using that input to do anything you can imagine is what the core of programming is to me; building different games was a great way to introduce this concept of getting input and create programs that do something cool with it.</p><p><strong>Case Use:</strong></p><p>You are welcome to view the full code on my github:</p><p><a href="https://github.com/riderjensen/DGM1600-Missile/tree/master/Assets">riderjensen/DGM1600-Missile</a></p><p>Rider Jensen is a student in the Digital Media program at Utah Valley University, Orem Utah, studying Web &amp; App Development. The following article relates to the capstone project in the (DGM 2780 Course) and representative of the skills learned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19ca240fb3af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/web-development-articles/2d-inside-of-unity-19ca240fb3af">2D Inside of Unity</a> was originally published in <a href="https://medium.com/web-development-articles">Web Development Articles</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SCSS basics]]></title>
            <link>https://medium.com/web-development-articles/scss-basics-279ce9c0acb8?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/279ce9c0acb8</guid>
            <category><![CDATA[scss]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[sass]]></category>
            <category><![CDATA[web-developer]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Tue, 13 Feb 2018 01:32:30 GMT</pubDate>
            <atom:updated>2018-02-13T01:32:30.697Z</atom:updated>
            <content:encoded><![CDATA[<p>CSS can be daunting at times to write, keeping track of your IDs, classes, hex colors, margin sizes, font families, font sizes, etc without overriding any rules you already made can be a very difficult prospect and it gets even harder when dealing with legacy code. SCSS is an easier way to code CSS with extra uses like variables, mixins, nesting, and even operators which will make keeping track of your CSS much easier.</p><p><strong>Installing</strong></p><p>You can easily set up SCSS with your project through a few simple steps. First you can download a client from any of the below listed applications or visit this <a href="http://sass-lang.com/install">link</a>. Personally, I use Koala because it is free and works just great for my needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*Quma7CI-SAIWUdKo6LghWg.png" /><figcaption>Applications offered for SCSS support</figcaption></figure><p>Once Koala is installed, you simply drag your folder with the existing .scss files into the application. From there, you can click the SCSS icon to bring up a menu. I wont go into all the details but you want auto compile on so that whenever you save a SCSS file, it will compile into your CSS file. You may want to also change the output style to compressed to save some load time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*Slb7Oo0RGlSqxR7cTzhK3w.png" /><figcaption>Koala Main Screen</figcaption></figure><p>After getting your settings correct, select the grey icon just to the right of the green SCSS large icon; you will want to navigate to your CSS file and save over that file. Now your auto compile should save to that CSS file. And this is where the fun begins.</p><p><strong>Basics</strong></p><p>SCSS has a number of files that you want to be aware of.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/147/1*5oM9JrZ1PLpnL0KFaMPmNg.png" /><figcaption>SCSS Files</figcaption></figure><p>I always have a large, medium, and small SCSS file. I keep my variables in a seperate file so that I have access to them through all of my files. I also have a reset SCSS so that I know I am coding from the barebones and have full control over the style. And then finally, I import those five files into my styles.scss file so that they are all combined.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*HOTXwpc9oSm2wAmknGfKCQ.png" /><figcaption>A Simple Styles.scss</figcaption></figure><p>The same specificity rules apply to SCSS files as to CSS. Importing my variables here allows access; next I will reset all the rules and then include each file starting from the smallest. Notice the media queries in this file; it makes actually managing those queries much easier and they are always accessible if I need to change one of them quickly. This is one benefit to having them in a separate file.</p><p><strong>Variables</strong></p><p>Declaring variables is easy: simply put a $ before the name and give it a value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*xN0_2rHgAEzM4s2lxbxDzQ.png" /><figcaption>Declaring Variables</figcaption></figure><p>Using these variables is just as easy. Simply make sure your variable file is included and then call it like h1{color:$primaryColor}. The compiler will automatically replace that variable name with the hex value inside of your raw CSS file and that is the magic of SCSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/201/1*1T9jjw4rd_9AgA_Cc0M1rw.png" /><figcaption>Using The Variable In Code</figcaption></figure><p><strong>Mixins</strong></p><p>Mixins are similar to functions/methods in that you can pass a mixin some values and have something happen back. This is all part of the DRY (dont repeat yourself) code style. First you declare a mixin, usually inside of your variables.scss.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*9aWFDTq4dI4eVskAKWdRrw.png" /><figcaption>A Mixin For A Gradient</figcaption></figure><p>Then you can “call” that mixin inside of one of your files and pass it some values. When the compiler runs, it will simply replace the vairbales and the “@include” part with the mixin code that you wrote in your variables.scss.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*mpwb36RuQVyD16kfqs_yaQ.png" /></figure><p><strong>Nesting and Operators</strong></p><p>Another useful function, especially if you lean towards the development side is nesting your SCSS. By nesting, you can more clearly see what is actually being affected by your code and save yourself even more time. When you compile it, the program will automatically put your code into CSS format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*tmUSYkYiVrcixJurNdZdaA.png" /><figcaption>Note That This Code Is Missing A Few Closing Brackets</figcaption></figure><p>In SCSS you can use operators as well, simple ones like +, -, *, /, and %. This can be useful for getting widths or adding some padding together.</p><p><strong>Use Case</strong></p><p>Given an assignment to do a site based off of this image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X9zW2Jc5v1e242pUQVoiUg.png" /></figure><p>View the page where I built it:</p><p><a href="http://riderjensen.com/dgm2740/mod12/">BlueRiver Studios: Home</a></p><p>View the code of how I built it with SCSS and you will see how much easier SCSS is than CSS:</p><p><a href="https://github.com/riderjensen/dgm2740/tree/master/Module%2012">riderjensen/dgm2740</a></p><p><strong>Conclusion</strong></p><p>There is a lot more functionality that comes with SCSS and once you start using it and getting the hang of it, going back to plain CSS can actually be difficult because of how much more time you spend on it. If you’re interested in learning more visit the <a href="http://sass-lang.com/guide">official site</a>.</p><p>Rider Jensen is a student in the Digital Media program at Utah Valley University, Orem Utah, studying Web &amp; App Development. The following article relates to the capstone project in the (DGM 2780 Course) and representative of the skills learned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=279ce9c0acb8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/web-development-articles/scss-basics-279ce9c0acb8">SCSS basics</a> was originally published in <a href="https://medium.com/web-development-articles">Web Development Articles</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flexbox VS Grids]]></title>
            <link>https://medium.com/web-development-articles/flexbox-vs-grids-75173672a739?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/75173672a739</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[flexbox]]></category>
            <category><![CDATA[css-grid]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Tue, 13 Feb 2018 01:31:25 GMT</pubDate>
            <atom:updated>2018-02-13T01:32:51.432Z</atom:updated>
            <content:encoded><![CDATA[<p>A battle of the giants, both make life so much easier but which is better to use for when? The most simple take away is that Flexbox is used for one dimensional layouts while CSS grids will make two dimensional layouts easier.</p><p>An important thought to keep in mind when deciding on one or the other is “what does my content need to do?” If you whant your content to control the way is is displayed then Flexbox may be your answer. But if you want maybe a bit more control and adherence to a set of rules then Grid may be your answer.</p><p><strong>Flexbox</strong></p><p>Setting up Flexbox inside of your CSS is incredibly easy to set up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*B1AnocXo-iQfbjkczwmP1Q.png" /><figcaption>HTML</figcaption></figure><p>Nothing is necessary in HTML but this is the code that I will be flexing out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/165/1*9B6Dh1ca4ycDeT5YnmRvpQ.png" /><figcaption>Flexing Out</figcaption></figure><p>And ta-da! The items are flexed right now, taking the whole span of where they are supposed to be and then choosing how far to go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*r8Av6IgWpryzVmAcat2hkg.png" /><figcaption>The Flexed Menu</figcaption></figure><p>You can declare a flex basis instead of allowing them to flex based on their own discretion and force them into a certain pattern.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/151/1*qp_TRzy1unVaq5kDdd_sMw.png" /><figcaption>Flex Basis</figcaption></figure><p>You do not have to always have them evenly spaced out and can style them more in CSS to move one element farther to one side than another using code like margin-left.</p><p><strong>Grids</strong></p><p>Grids are a little more complex and require some code to work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/233/1*bjSHVGUY1QdQFSDbr0T7Ow.png" /><figcaption>Display Grid</figcaption></figure><p>You must declare a display type just like with Flexbox. But the grid-template-columns let the webpage know how many columns you are expecting to have on your page. 1fr stands for one fraction or simply one column. By declaring “1fr 1fr”, you would then have two columns on which you could organize your items.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*G1TaoyGafxSbssqRkZCuAA.png" /></figure><p>Now to actually organize the content, things get a little worse. Grid-row tells you at what row you are starting this content. Optional on this is a span tag that says how many rows it will span, defaulting to one if nothing is put there. Grid-column says what column you will start this content on again with an optional span tag defaulting to one if nothing is put there. And then you need to ad the Microsoft hack into it to make sure that it has some cross browser support.</p><p>Planning for the grid is paramount, even if you just draw some boxes on a sketchbook and note how many columns you will need. Knowing what content is adhering to the grid and what content isn’t is very important to the overall design of your site and you need to make sure you know what columns and rows you are starting on and what you are spanning to.</p><p><strong>Why one or the other?</strong></p><p>The real answer in the end is that this is not a fight between technologies; it is an integration that is important. Both grids and Flexbox have great possible use on your webpage. I use Flexbox for most of my navigation because it is much easier. But when I need to plan exactly where my content goes, I use grids because it has a greater influence on where things span to and what columns and rows I take up. While grids may be a bit more to write at first, it is actually much easier in the long run when making something two dimensional. The key element is planning it out.</p><p>It is important to keep support in browsers in mind when working with both of these technologies. The vast majority of browsers support CSS grids with only Opera Mini and UC Browser for Android not supporting (<a href="https://caniuse.com/#feat=css-grid">see here</a>). Flexbox however is supported in all major browsers (<a href="https://caniuse.com/#feat=flexbox">see here</a>). But the grid is only being supported more and more because of it’s huge possibilities for aligning content on the pages.</p><p><strong>A Case Study For Both</strong></p><p>You are welcome to see a site a built as a fake mobile application using both CSS Grids and Flexbox:</p><p><a href="http://riderjensen.com/dgm2740/mod13/">Cinema On Demand: Categories</a></p><p>You can view the raw code for it on my github:</p><p><a href="https://github.com/riderjensen/dgm2740/tree/master/Module%2013-%20Capstone">riderjensen/dgm2740</a></p><p>Rider Jensen is a student in the Digital Media program at Utah Valley University, Orem Utah, studying Web &amp; App Development. The following article relates to the capstone project in the (DGM 2740 Course) and representative of the skills learned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75173672a739" width="1" height="1" alt=""><hr><p><a href="https://medium.com/web-development-articles/flexbox-vs-grids-75173672a739">Flexbox VS Grids</a> was originally published in <a href="https://medium.com/web-development-articles">Web Development Articles</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing a Crypto Currency Tracker]]></title>
            <link>https://medium.com/web-development-articles/writing-a-crypto-currency-tracker-e4ad7102dffe?source=rss-2b4f75e6aef------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4ad7102dffe</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Rider Jensen]]></dc:creator>
            <pubDate>Tue, 13 Feb 2018 01:30:07 GMT</pubDate>
            <atom:updated>2018-02-13T01:30:07.422Z</atom:updated>
            <content:encoded><![CDATA[<p>You may or may not have bought into cryptocurrency in the past years, months, or even weeks. Bitcoin was dominating the news cycle for a while and so many people found themselves as new investors. But because the goal is to be so secure with your coins, it can be a hassle to check each coin’s price, how much of it you have, and what you have gained or lost. Using an API and some JavaScript can simplify your process of checking and make it just as easy as loading into a webpage.</p><h3>Choosing an API</h3><p>There are a few different APIs and using an API from a market can be a problem because that shows you what the market is trading at and not necessarily the correct price. If you have your coins on an exchange then it might be best just to use that exchange’s API if they have one. There are two big free ones that I know of, Binance (one of the largest exchanges) and Coin Market Cap. For my API, I chose Coin Market Cap</p><h3>The Beginnings</h3><p>It all starts with a simple request. There are a number of ways to limit what you actually load in using convert, limit, and start. I converted all values to USD and decided to only load the top 200 Cryptocurrencies.</p><p>One of the issues with loading too many is the load time and your sorting functions later on. But you don’t want to load too few because these are ranked on overall “Market Cap” which is value of coin multiplied by amount of coins in circulation. However, the value is very volatile so your coin may be high up one day but much lower the next day. You have have a coin ranked 180 right now, I recommend loading at like 50 more coins after that to account for change in Market Cap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*xz66Mvi3SkFPXoq4EhR2TA.png" /><figcaption>Accessing The Coin Market Cap API</figcaption></figure><p>You can see all the documentation for this API here:</p><p><a href="https://coinmarketcap.com/api/">Most Trusted Cryptocurrency Market Data API | CoinMarketCap</a></p><h3>The Pulling From Objects</h3><p>We will load our object into a variable, anything is fine because it will just be an array of objects, each object will be the information of a coin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*_EOOKiMaQGvkmzDFpxDYfg.png" /><figcaption>Putting The Information In An Array</figcaption></figure><p>cObj now contains all information about the 200 coins that we loaded in earlier. There are a few different options that we can access from these objects:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*Ny-Y6TqeZA7OEXD7YYp06Q.png" /><figcaption>All The Options From The Coin Object</figcaption></figure><p>But our main goal is to take our coins and see that current value of them so that we dont have to always log in to different places or do the math ourselves each time. For that, I made a simple function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*9a8F_LIc3KiH3YF0LZhdMA.png" /><figcaption>Parameters</figcaption></figure><p>Our parameters to this function are going to be four coins that I have as an example and a few other bits that I will need. ericContent and e are two strings that use to mark the different areas where I am going to add this information in HTML. ericArrayName and ericArrayPrice are both empty arrays that I am going to store values into. And finally, ericPurchasePrices is an array of values of when the coin was purchased so that we can compare them to the current prices.</p><h3>The Displaying</h3><p>I won’t go into too much detail on this for loop because the code is all there. This can be a little confusing at first but the goal is to take our symbols that we passed to the array that we own and sort through the object until there is a match.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*j3blFEm1NQ6I0-aug0mN6A.png" /><figcaption>The For Loop</figcaption></figure><p>When the match happens, we start pulling information from that object, adding a class or two for some small styling, and then displaying it on the page through some dynamic HTML displaying. One fun thing is that I create an icon and change it’s class depending on if the current price is more or less than the current price. This will give some immediate visual feedback to the user or yourself on whether they are gaining or not.</p><p>An important note here is that the two empty arrays that we pass in get filled, one with the names of the coins and the other with the prices of the coins in corresponding slots.</p><h3>The Calculations</h3><p>We have about half of our stuff that we currently need so far including the what the name of the currency is, what the purchase price was, and what the current price is. But we have not figured out how much of each coin we hold, our total amount of money, and our percentage gains/losses. These can all come in handy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*5aKJNBh5BnH-7VQtPRVn1g.png" /><figcaption>Our Switch Statements</figcaption></figure><p>In this function, we sort through the names of all the coins and put a simple switch statement inside to deal with each coin we have. For anything large-scale, you would want this pointing to a separate function to do your calculations but since there is only four and wont be any more, I felt okay having inline code on each individual statement even though it was a bit of repetition.</p><p>Our constant values being called like ERIC_VEN are the amount of coins that were purchased. We simply multiply this by the price of the item and we have the total value. Then we search for a paragraph node we made in our forLoop function (remember that string of “e” we passed? it was added to an id on the page with the coin name) and we attach a paragraph plus text to the id. The function to make this paragraph and text can be seen below. Then we simply add the value to a running total price.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*7R7S6bfTA4r6ml8KWTfiXw.png" /><figcaption>Our Paragraph Node Function</figcaption></figure><h3>The Final Parts</h3><p>At this point, we simply need to display the total amount of money and also the percentage of the loss/gain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*EHqilzFPp_LVhqwQfWZ_4Q.png" /></figure><p>Still inside the calculate function but outside and after our loop, we round our total price and display it. We also tell our total gain and loss. And finally calculate the percent lost and add it to the page.</p><h3>Adding The HTML</h3><p>Because of our use of dynamic HTML creation, the actual HTML is very sparse. I did use Bootstrap to make the site look nice with nice functionality without having to spend too much time on it (you may have noticed throughout my code adding classes that correspond to bootstrap). Our raw HTML is incredibly simple as seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*EEv8-5juqUE_x5HNI7xfzw.png" /><figcaption>The Raw HTML Needed</figcaption></figure><h3>Conclusion</h3><p>Beyond this, simple styling is all that is needed to display things nicely. You can view my completed project and see how much money I have lost here:</p><p><a href="http://riderjensen.com/sandbox/crypto/">Crypto Tracker</a></p><p>Feel free to look at my github for the full code</p><p><a href="https://github.com/riderjensen/cryptoTracker">riderjensen/cryptoTracker</a></p><p>Rider Jensen is a student in the Digital Media program at Utah Valley University, Orem Utah, studying Web &amp; App Development. The following article relates to an extra personal project and representative of the skills learned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4ad7102dffe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/web-development-articles/writing-a-crypto-currency-tracker-e4ad7102dffe">Writing a Crypto Currency Tracker</a> was originally published in <a href="https://medium.com/web-development-articles">Web Development Articles</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>