<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Yaphi Berhanu</title>
    <description>The latest articles on Forem by Yaphi Berhanu (@yaphi1).</description>
    <link>https://forem.com/yaphi1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1871%2Fbfd67f37-202a-4563-a8e9-55f63007093f.png</url>
      <title>Forem: Yaphi Berhanu</title>
      <link>https://forem.com/yaphi1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/yaphi1"/>
    <language>en</language>
    <item>
      <title>What I wish I knew when learning Node.js</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Sun, 26 Aug 2018 21:32:42 +0000</pubDate>
      <link>https://forem.com/yaphi1/what-i-wish-i-knew-when-learning-nodejs-1jba</link>
      <guid>https://forem.com/yaphi1/what-i-wish-i-knew-when-learning-nodejs-1jba</guid>
      <description>&lt;p&gt;&lt;em&gt;This &lt;a href="https://simplestepscode.com/learning-node-js-tips/" rel="noopener noreferrer"&gt;article&lt;/a&gt; originally appeared on &lt;a href="https://simplestepscode.com/" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt; which aims to help people &lt;a href="https://simplestepscode.com/learn-javascript/" rel="noopener noreferrer"&gt;learn JavaScript and actually remember it&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When I first learned Node.js, nothing turned out the way I had hoped.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I wanted:&lt;/strong&gt;&lt;br&gt;
A simple app that can save a piece of text to a database and read it again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I got:&lt;/strong&gt;&lt;br&gt;
A dark terminal with "hello world running on port 3000" and no idea where to go next.&lt;/p&gt;

&lt;p&gt;There were so many questions and so few answers; so many steps and such little direction.&lt;/p&gt;

&lt;p&gt;Ultimately I found myself wondering:&lt;br&gt;
What pieces are needed to create a Node.js app, and how do they fit together?&lt;/p&gt;

&lt;p&gt;This is the article I wish I had.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here are the points I'll cover
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What is Node.js really?&lt;/li&gt;
&lt;li&gt;How much command-line knowledge do I need?&lt;/li&gt;
&lt;li&gt;What is npm and how do I use it?&lt;/li&gt;
&lt;li&gt;What is package.json?&lt;/li&gt;
&lt;li&gt;What is all this require() stuff I'm seeing?&lt;/li&gt;
&lt;li&gt;How does Node.js work? Why do I need to write my own server, and what does that even mean?&lt;/li&gt;
&lt;li&gt;What is routing, and why do I need it? Why are we using Express.js?&lt;/li&gt;
&lt;li&gt;What does "Listening on port 3000" mean?&lt;/li&gt;
&lt;li&gt;How do I get my Node.js app to show an HTML file instead of command line text that says "Hello world"?&lt;/li&gt;
&lt;li&gt;Which database should I use?&lt;/li&gt;
&lt;li&gt;How does the front-end interact with the back-end?&lt;/li&gt;
&lt;li&gt;How do I get my project up on the internet?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is Node.js really?
&lt;/h2&gt;

&lt;p&gt;Node.js is a program that lets you run JavaScript outside your web browser.&lt;/p&gt;

&lt;p&gt;For example, you can use Node.js on the back end of your site to save info to a database and retrieve that info. You can also use Node.js to run JavaScript programs on your own computer to automate tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much command-line knowledge do I need?
&lt;/h2&gt;

&lt;p&gt;You'll need to be able to do the following through your computer's command line:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;see which folder you're in&lt;/li&gt;
&lt;li&gt;navigate to another folder&lt;/li&gt;
&lt;li&gt;see what's inside a folder&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's my favorite tutorial to get up to speed quickly:&lt;br&gt;
&lt;a href="https://learnpythonthehardway.org/book/appendixa.html" rel="noopener noreferrer"&gt;https://learnpythonthehardway.org/book/appendixa.html&lt;/a&gt;&lt;br&gt;
(Don't get confused by the mention of Python. Note that this link is an appendix specifically about the command line, not Python.)&lt;/p&gt;

&lt;h2&gt;
  
  
  What is npm and how do I use it?
&lt;/h2&gt;

&lt;p&gt;npm is a package management tool that lets you quickly download and install convenient, pre-made, reusable code packages that you want to use in your project. You can use these packages like building blocks to help make your apps.&lt;/p&gt;

&lt;p&gt;Installing a package is as easy as typing "npm install whatever" in the command line.&lt;/p&gt;

&lt;p&gt;If you have code snippets you think would help other people, you can also upload your own packages to the npm registry, where packages are held.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is package.json?
&lt;/h2&gt;

&lt;p&gt;Package.json is a file containing info about your project such as the name, the description, and which packages it relies on.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is all this require() stuff I'm seeing?
&lt;/h2&gt;

&lt;p&gt;Remember those useful code packages you installed through npm?&lt;/p&gt;

&lt;p&gt;If you want to use a package in your project, Node.js has a built-in function called require() that lets you include whatever package you want.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does Node.js work? Why do I need to write my own server, and what does that even mean?
&lt;/h2&gt;

&lt;p&gt;First off, a server is a computer or a program that aims to give you what you want when you request something over a network.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For example, let's say you enter google.com into your browser's address bar. You're basically sending a request that says, "I want to see google.com."&lt;/li&gt;
&lt;li&gt;This request will be sent over the internet to Google's servers.&lt;/li&gt;
&lt;li&gt;Google's servers will respond with, "Okay, here's google.com," and it will send you the web page.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In that scenario, your computer is called the "client" and Google's computers are called the "servers".&lt;/p&gt;

&lt;p&gt;To use a real-world comparison, it's kind of like how a restaurant client might order food through a waiter, and then the kitchen prepares the food and serves it back to the client through the waiter, who is basically the network connection between the kitchen (server) and the client (customer).&lt;/p&gt;

&lt;p&gt;In this analogy, the request is your order, and the response is the food (or in some cases a "Sorry, we don't have that.")&lt;/p&gt;

&lt;p&gt;In Node.js, you write your own server. That means you write a program to handle requests from a user's computer. So if someone requests "I want yoursite.com," your server can look at that request and respond with, "Okay, here's yoursite.com".&lt;/p&gt;

&lt;p&gt;The reason you write your own server is that it gives you flexibility in what people can request and what you send back. To go back to the restaurant analogy, it's like writing what's on the menu.&lt;/p&gt;

&lt;p&gt;Asking "Why do I have to write a server in Node.js?" is like a restaurant asking "Why do we have to decide what's on the menu?"&lt;/p&gt;

&lt;p&gt;Here are some practical examples of how your Node.js server might handle requests for a social media site:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;yoursite.com - This URL might send the home page.&lt;/li&gt;
&lt;li&gt;yoursite.com/users/yaphi - This URL might send a user's profile data in a convenient JSON format.&lt;/li&gt;
&lt;li&gt;yoursite.com/profile - This URL might show your profile, but only if you're logged in; otherwise it will show a login page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;See how that flexibility is useful?&lt;/p&gt;

&lt;h2&gt;
  
  
  What is routing, and why do I need it? Why are we using Express.js?
&lt;/h2&gt;

&lt;p&gt;Routing is the process of determining what URL route you use to get to a particular resource. For example, yoursite.com/about can route to your site's "About" page. Another example: yoursite.com/analytics/page_load_speed can route to some data about average page load speed.&lt;/p&gt;

&lt;p&gt;Express.js is a JavaScript framework that has pre-written code to make it easier to write routes in Node.js. It does other stuff too, but routing is one of the most common use cases to start with. You can install it through npm.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does "Listening on port 3000" mean?
&lt;/h2&gt;

&lt;p&gt;First, what is a network port?&lt;/p&gt;

&lt;p&gt;This is easier to explain with an analogy.&lt;/p&gt;

&lt;p&gt;Let's say a bunch of countries are delivering items to one another by airplane. The items are being sent and received through airports.&lt;/p&gt;

&lt;p&gt;Networks such as the internet work the same way.&lt;/p&gt;

&lt;p&gt;Data is sent from your computer to a server through a port. Think of a network port as if it's an airport for sending data.&lt;/p&gt;

&lt;p&gt;Your computer has a bunch of ports it uses to send and receive data. You have to tell your program which port to wait at, so it knows what to expect. This is like how you have to tell someone which airport to go to if they're waiting for an item to arrive there.&lt;/p&gt;

&lt;p&gt;When your Node.js app says it's listening on Port 1337, that's the port where it's waiting for requests and responses. It's like saying that your app is standing at Airport 1337, ready to send and receive items.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I get my Node.js app to show an HTML file instead of command line text that says "Hello world"?
&lt;/h2&gt;

&lt;p&gt;A lot of tutorials leave you with that command line "Hello world" message, even though sending an HTML file is the same number of steps!&lt;/p&gt;

&lt;p&gt;When you get to the part that says res.send, just use res.sendFile('whatever.html') instead of res.send('hello world'). That way, your server will respond with an HTML file instead of command line text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which database should I use?
&lt;/h2&gt;

&lt;p&gt;Just start with MongoDB and use mlab's free hosting to get set up. I actually spent years not learning backend programming because I was so afraid of picking the wrong database.&lt;/p&gt;

&lt;p&gt;Once you learn one, you can pick up the others quickly because the concepts are similar. You connect to the database, then you write, read, update, or delete. (Yes there are more concepts to learn, but focus on the core for now.)&lt;/p&gt;

&lt;p&gt;I spent years agonizing over the choice, and eventually I just did it, and learned the basics in a couple of afternoons. Then I tried PostgreSQL and picked that up in another afternoon.&lt;/p&gt;

&lt;p&gt;Don't agonize over this decision. Just pick MongoDB with mlab and get it over with.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does the front-end interact with the back-end?
&lt;/h2&gt;

&lt;p&gt;AJAX and fetch are two different JavaScript techniques that let you make requests from your web page and handle the responses that come back from your server.&lt;/p&gt;

&lt;p&gt;Use AJAX or fetch depending on your browser compatibility needs. Fetch is more convenient and modern, but AJAX is more compatible.&lt;/p&gt;

&lt;p&gt;Don't get scared of the names like I once did. These are not entire languages; they are techniques that often take one to five lines of JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I get my project up on the internet?
&lt;/h2&gt;

&lt;p&gt;Just use zeit.co to deploy your project. It's free and easier than the other options.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final things to note
&lt;/h2&gt;

&lt;p&gt;When creating a Node.js project expect some setup. This can be an adjustment for someone who is used to typing front-end code, saving it, and running it directly in the browser. The setup time will get smaller as you get comfortable with which packages you prefer and which common setup tasks you can automate or eliminate.&lt;/p&gt;

&lt;p&gt;Get used to spending a lot of time following documentation. This can be an adjustment if you're used to coding everything off the top of your head. It's okay to rely on documentation since there's no way to automatically know how every package in the world works.&lt;/p&gt;

&lt;p&gt;I hope this article has given you a basic idea of what's involved in a Node.js project.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Space Ghost: My Halloween Debugging Horror Story</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Wed, 01 Nov 2017 06:14:55 +0000</pubDate>
      <link>https://forem.com/yaphi1/space-ghost-my-halloween-debugging-horror-story-12p</link>
      <guid>https://forem.com/yaphi1/space-ghost-my-halloween-debugging-horror-story-12p</guid>
      <description>&lt;p&gt;Yesterday I faced a nasty bug.&lt;/p&gt;

&lt;p&gt;I needed to integrate some third-party code that would dynamically insert a script onto a page.&lt;/p&gt;

&lt;p&gt;It was billed as a simple copy and paste, but these things rarely are.&lt;/p&gt;

&lt;p&gt;I pasted the code in the console, and it didn't work. Nice. Time to lace up my Troubleshoot Boots™.&lt;/p&gt;

&lt;p&gt;So what was the problem?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Was it the way the URL was being inserted (.src vs setAttribute)? - No&lt;/li&gt;
&lt;li&gt;Was it the script url itself? - No&lt;/li&gt;
&lt;li&gt;Was it a cross-origin issue? - Nope&lt;/li&gt;
&lt;li&gt;Was it the site I was using this code on? - No&lt;/li&gt;
&lt;li&gt;Was it the browser? - No&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, I asked myself, had basic script insertion stopped working altogether.&lt;/p&gt;

&lt;p&gt;I rewrote my test case for the code from scratch just to make sure nothing was mistyped. Then something crazy happened. The new code worked.&lt;/p&gt;

&lt;p&gt;The crazy part? It was exactly the same as the non-working code.&lt;/p&gt;

&lt;p&gt;Baffled, I put both versions of the code into a diff checker.&lt;/p&gt;

&lt;p&gt;Then I saw the problem: &lt;a href="https://en.wikipedia.org/wiki/Zero-width_space" rel="noopener noreferrer"&gt;invisible spaces&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The integration code came from a PDF, which had automatically inserted unwanted zero-width spaces, meaning that the code would break while the offending characters would stay invisible.&lt;/p&gt;

&lt;p&gt;Once I deleted the spooky space ghosts, the problem went away.&lt;/p&gt;

&lt;p&gt;Key takeaway:&lt;br&gt;
If you ever need to paste code from a PDF, an HTML page, an Excel sheet or anything that's not a plain text file, run it through some kind of validator to make sure there aren't any unwanted characters.&lt;/p&gt;

&lt;p&gt;I hope this helps in case you run into a similar issue.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post originally appeared on &lt;a href="https://simplestepscode.com/" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>debugging</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Learn faster with this trick from PokÃ©mon Go and Cognitive Science</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Wed, 04 Oct 2017 03:27:05 +0000</pubDate>
      <link>https://forem.com/yaphi1/learn-faster-with-this-trick-from-pokmon-go-and-cognitive-science-63h</link>
      <guid>https://forem.com/yaphi1/learn-faster-with-this-trick-from-pokmon-go-and-cognitive-science-63h</guid>
      <description>&lt;p&gt;Reduce the distance between milestones, and you'll go much farther. That's what I learned from a seasonal update to PokÃ©mon Go's reward systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1pv5kpvezb5r1xr6wf7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1pv5kpvezb5r1xr6wf7b.png" alt="Shorten your milestones and you'll go farther." width="600" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PokÃ©mon Go rewards you for hitting certain walking distance benchmarks. However, the distances were long for relatively small rewards.&lt;/p&gt;

&lt;p&gt;Then a temporary update cut the benchmark distances in half.&lt;/p&gt;

&lt;p&gt;Suddenly I found myself outside walking a lot more, and my friends had the same experience. Now that each milestone was more reachable, I was more motivated to move. I felt like each step mattered, so I was more willing to take steps.&lt;/p&gt;

&lt;p&gt;The end result was that I traveled a much greater total distance than in the past.&lt;/p&gt;

&lt;p&gt;This was a eureka moment.&lt;/p&gt;

&lt;p&gt;I could apply this principle to other things, like learning certain coding skills (or really learning anything).&lt;/p&gt;

&lt;p&gt;As an example, I had wanted to get good with HTML5 canvas for a while, but that sounded like a big goal so I let it sit. Eventually I tried shrinking the distance between milestones.&lt;/p&gt;

&lt;p&gt;I told myself to code one circle. And I did. That was the momentum I needed. Soon I had built up to a glowing laser-pong game, gravity physics, an arrow flying through the air with an accurate trajectory, and more.&lt;/p&gt;

&lt;p&gt;According to cognitive science, here are the main benefits of shorter milestones in learning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Motivation:&lt;/strong&gt; Small steps help you stay motivated because each step feels more acheivable and therefore is more likely to get done. [&lt;a href="https://www.psychologytoday.com/blog/brain-wise/201310/use-small-steps-motivate" rel="noopener noreferrer"&gt;Psychology Today&lt;/a&gt;]&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Retention:&lt;/strong&gt; Small steps improve retention because it's easier to remember stuff when there's less of it at a time. [&lt;a href="http://hilt.harvard.edu/blog/principles-multimedia-learning-richard-e-mayer" rel="noopener noreferrer"&gt;Harvard guest lecture&lt;/a&gt;, &lt;a href="http://lifehacker.com/study-less-study-smart-the-best-ways-to-retain-more-1683362205" rel="noopener noreferrer"&gt;Lifehacker&lt;/a&gt;]&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Motivation and retention are common stumbling points for learners, so it's great to have a trick that can address both points.&lt;/p&gt;

&lt;p&gt;If there's something you want to learn, try shortening your milestones. You might amaze yourself.&lt;/p&gt;

&lt;p&gt;Now I'm curious to hear from you:&lt;br&gt;
What's something you've been wanting to learn, and what steps have helped you make progress?&lt;/p&gt;




&lt;p&gt;This article originally appeared on &lt;a href="https://simplestepscode.com/learn-faster-with-pokemon-go-trick/" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt;, which helps people learn JavaScript and actually be able to use it. Feel free to check it out if you're curious to see more content like this.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>tutorials</category>
      <category>learning</category>
    </item>
    <item>
      <title>JavaScript project ideas and practical uses</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Mon, 28 Aug 2017 14:20:20 +0000</pubDate>
      <link>https://forem.com/yaphi1/javascript-project-ideas-and-practical-uses</link>
      <guid>https://forem.com/yaphi1/javascript-project-ideas-and-practical-uses</guid>
      <description>&lt;p&gt;&lt;em&gt;This &lt;a href="https://simplestepscode.com/javascript-project-ideas/" rel="noopener noreferrer"&gt;article&lt;/a&gt; originally appeared on &lt;a href="https://simplestepscode.com/" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt; which tries its best to help people &lt;a href="https://simplestepscode.com/learn-javascript/" rel="noopener noreferrer"&gt;learn JavaScript and actually remember it&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Over and over, I hear people want JavaScript project ideas.&lt;/p&gt;

&lt;p&gt;I've decided to start an ongoing list, and I'd love for you to jump in and share project ideas. The ideas don't need to be inhumanly creative or anything like that. If possible, I'd prefer plain JS, but don't restrict yourself if some framework or tool is required.&lt;/p&gt;

&lt;p&gt;Also, before you attempt JavaScript projects, &lt;a href="https://simplestepscode.com/dangers-of-projects/" rel="noopener noreferrer"&gt;read this article&lt;/a&gt; to make sure you don't fall into the trap of attempting something too huge too soon and giving up.&lt;/p&gt;

&lt;p&gt;Here's the list of JavaScript projects so far:&lt;/p&gt;

&lt;h2&gt;
  
  
  UI stuff
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Autocorrecting text box&lt;/li&gt;
&lt;li&gt;Form validator&lt;/li&gt;
&lt;li&gt;Collapsible navigation menu&lt;/li&gt;
&lt;li&gt;Countdown clock&lt;/li&gt;
&lt;li&gt;Modal dialog box&lt;/li&gt;
&lt;li&gt;A site that lets people design their own UI elements (buttons, mastheads, etc.)&lt;/li&gt;
&lt;li&gt;Customize greeting if people came from a certain site&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  E-commerce
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Price estimator&lt;/li&gt;
&lt;li&gt;Front end of an interactive online store&lt;/li&gt;
&lt;li&gt;Shopping cart front end&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Finance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Tip calculator&lt;/li&gt;
&lt;li&gt;Cost splitter&lt;/li&gt;
&lt;li&gt;Investment calculator&lt;/li&gt;
&lt;li&gt;House or car payment calculator&lt;/li&gt;
&lt;li&gt;Savings calculator&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tools and utilities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Page that grabs data from somewhere on the web and puts it in a useful format&lt;/li&gt;
&lt;li&gt;Random name picker&lt;/li&gt;
&lt;li&gt;Unit conversion calculator&lt;/li&gt;
&lt;li&gt;Secret message encoder/decoder&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Fun and games
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic quiz&lt;/li&gt;
&lt;li&gt;Rock-paper-scissors game&lt;/li&gt;
&lt;li&gt;Pong game&lt;/li&gt;
&lt;li&gt;Madlibs&lt;/li&gt;
&lt;li&gt;A mario-style game&lt;/li&gt;
&lt;li&gt;A zelda-style game (more likely a 2d one until 3d performance improves on the web)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Social applications
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Social network front end&lt;/li&gt;
&lt;li&gt;Real time chat app (using socket io)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  API stuff
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Gif search, video search, etc&lt;/li&gt;
&lt;li&gt;Something with maps (like a store locator)&lt;/li&gt;
&lt;li&gt;Something with geolocation (e.g.: find XYZ near you)&lt;/li&gt;
&lt;li&gt;Real-time feed of tweets about a subject of your choice&lt;/li&gt;
&lt;li&gt;Text-to-speech&lt;/li&gt;
&lt;li&gt;Combinations of any of the above&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Console tricks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Scrape a page through your console and get info easily without having to copy, paste, and format each thing by hand (great for research)&lt;/li&gt;
&lt;li&gt;Change colors of your favorite sites to see what they'd look like&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope you've enjoyed this, and feel free to let me know if you have other suggestions.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>discuss</category>
      <category>webdev</category>
      <category>tutorials</category>
    </item>
    <item>
      <title>Web development portfolio tips from an interviewer’s perspective</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Tue, 22 Aug 2017 02:21:28 +0000</pubDate>
      <link>https://forem.com/yaphi1/web-development-portfolio-tips-from-an-interviewers-perspective</link>
      <guid>https://forem.com/yaphi1/web-development-portfolio-tips-from-an-interviewers-perspective</guid>
      <description>&lt;p&gt;&lt;em&gt;This article originally appeared on &lt;a href="https://simplestepscode.com/portfolio-tips/" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A lot of people have asked me what makes a good web development portfolio.&lt;/p&gt;

&lt;p&gt;I can't speak for everyone, but I'll tell you what I've looked for when evaluating candidates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The main thing I look for is: can you do the work (or reasonably learn to)?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's talk about your portfolio's content and design.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your portfolio's content
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The basics
&lt;/h3&gt;

&lt;p&gt;The content is the most important part, so start with this.&lt;/p&gt;

&lt;p&gt;Once you get the baseline out of the way (name, title, contact, etc.), you'll want some projects that show key skills. I personally like to include CodePen demos because they're a great way to showcase your code as well as the results.&lt;/p&gt;

&lt;p&gt;The convenient thing about web development is that you don't need to wait for someone to give you permission to do a project; you can just create whatever showcases your skills. Just in case, here are some &lt;a href="https://simplestepscode.com/web-development-project-ideas-from-experts/" rel="noopener noreferrer"&gt;project ideas&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next, you can have a quick bio and some relevant experience. If you don't have professional experience, then just show your personal projects, and as long as those show the necessary skills, you should be fine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should you link to your GitHub account?
&lt;/h3&gt;

&lt;p&gt;GitHub is a good way to show some code samples, but not a great way to show projects. If you're depending on employers to download and set up your stuff from GitHub, there's a good chance it'll get skipped. Make the reader's life easy by linking to a usable or viewable version of the project.&lt;/p&gt;

&lt;p&gt;Short answer: Link to your GitHub account if it's interesting, but don't make it the only view of your work.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are some common mistakes?
&lt;/h3&gt;

&lt;p&gt;The most common problems I see are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Listing skills that they don't have&lt;/li&gt;
&lt;li&gt;Layout mistakes on their portfolio (like content going way off the side of the browser window)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to avoid these mistakes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;If you've been following along up to now, you should have projects covering all or most of the skills you've listed. That's a good way to show you can do what you say you can do.&lt;/li&gt;
&lt;li&gt;Test your portfolio at different browser widths to make sure the layout doesn't break. Lots of layout mistakes come down to misusing or misunderstanding the &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Box_model" rel="noopener noreferrer"&gt;CSS box-model&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, here's a &lt;a href="https://simplestepscode.com/responsive-web-development-basics/" rel="noopener noreferrer"&gt;primer on responsiveness&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your portfolio's design
&lt;/h2&gt;

&lt;p&gt;If your content is strong (and it should be if you've followed the previous steps here), then the design doesn't need to be overly difficult.&lt;/p&gt;

&lt;p&gt;In terms of design, it's better to do something simple and get it right than do something complicated and have it turn out terrible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Priority number 1: your design should make your content as simple as possible to see, understand, and navigate.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After that, here are some tips to make it look nice:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Read &lt;a href="https://medium.com/@erikdkennedy/7-rules-for-creating-gorgeous-ui-part-1-559d4e805cda" rel="noopener noreferrer"&gt;this article&lt;/a&gt; about design for developers. It helped me a lot so hopefully you'll like it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you're stuck figuring out layout, just use a big masthead with some text overlayed on a photo (from Pexels or some other free photo site), and then put a content section after that. (See the article in the previous point for how to do this.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you're stuck picking a font, just use Work Sans, which you can find on Google Fonts. I like it because it's versatile (the thin versions look sleek while the thicker versions can look more friendly depending on how they're used).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You can win without formal experience if your personal projects show relevant skills.&lt;/li&gt;
&lt;li&gt;Avoid layout mistakes on your portfolio.&lt;/li&gt;
&lt;li&gt;Don't be afraid to use a popular design structure (masthead, main content, etc).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this article has been helpful!&lt;/p&gt;

&lt;p&gt;If there's anything you'd like to add, feel free to let me know in the comments.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>portfolio</category>
      <category>interview</category>
      <category>career</category>
    </item>
    <item>
      <title>Understanding "this" in JavaScript</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Mon, 14 Aug 2017 17:50:43 +0000</pubDate>
      <link>https://forem.com/yaphi1/understanding-this-in-javascript</link>
      <guid>https://forem.com/yaphi1/understanding-this-in-javascript</guid>
      <description>&lt;p&gt;&lt;em&gt;This &lt;a href="https://simplestepscode.com/javascript-this/" rel="noopener noreferrer"&gt;article&lt;/a&gt; originally appeared on &lt;a href="https://simplestepscode.com/" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt; which tries its best to help people &lt;a href="https://simplestepscode.com/learn-javascript/" rel="noopener noreferrer"&gt;learn JavaScript and actually remember it&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, the &lt;code&gt;this&lt;/code&gt; keyword answers the following question:&lt;br&gt;
&lt;strong&gt;Which object does our function belong to when it's called?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If that makes no sense, that's okay! It will make more sense after some quick background info and examples.&lt;/p&gt;
&lt;h2&gt;
  
  
  First, what is an object?
&lt;/h2&gt;

&lt;p&gt;An object is a set of data stored in name-value pairs (also called key-value pairs).&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;purple&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;topSpeed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;9001&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;magic school bus&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Waluigi&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An object can store many things including strings, numbers, arrays, functions, or even other objects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next, what is a method?
&lt;/h2&gt;

&lt;p&gt;A method is a function that belongs to an object.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;purple&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

    &lt;span class="na"&gt;makeNoise&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;vroom&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In that example, &lt;code&gt;makeNoise&lt;/code&gt; is a method of our car object, and we can call it like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;car&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;makeNoise&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  So where does &lt;code&gt;this&lt;/code&gt; come in?
&lt;/h2&gt;

&lt;p&gt;In JavaScript, &lt;code&gt;this&lt;/code&gt; just means the object our function belongs to.&lt;/p&gt;

&lt;p&gt;In the following example, &lt;code&gt;this&lt;/code&gt; will be our car object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;currentSpeed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

    &lt;span class="na"&gt;goFaster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentSpeed&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;speed before: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;car&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentSpeed&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;car&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goFaster&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;speed after: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;car&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentSpeed&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you try the example, you'll see that the &lt;code&gt;goFaster&lt;/code&gt; function increases &lt;code&gt;currentSpeed&lt;/code&gt; by 10.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's a useful example of the &lt;code&gt;this&lt;/code&gt; keyword?
&lt;/h2&gt;

&lt;p&gt;Let's say we want to have some elements turn red and have a red border when clicked on.&lt;/p&gt;

&lt;p&gt;The following code is too repetitive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"first"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;first text&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"second"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;second text&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;firstDiv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;first&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;secondDiv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;second&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;firstDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onclick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="nx"&gt;firstDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;firstDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;border&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1px solid red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;secondDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onclick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="nx"&gt;secondDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;secondDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;border&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1px solid red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What a pain!&lt;/p&gt;

&lt;p&gt;What if we just want one function that could say, "Hey. See this div? Change this div."&lt;/p&gt;

&lt;p&gt;That would be much better than rewriting the function for each div.&lt;/p&gt;

&lt;p&gt;Our &lt;code&gt;this&lt;/code&gt; keyword can help us:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"first"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;first text&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"second"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;second text&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;firstDiv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;first&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;secondDiv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;second&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;turnRed&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;border&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1px solid red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;firstDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onclick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;turnRed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;secondDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onclick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;turnRed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See how much neater that is?&lt;/p&gt;

&lt;p&gt;But wait... I thought &lt;code&gt;this&lt;/code&gt; was supposed to refer to the object our function belongs to. Our &lt;code&gt;turnRed&lt;/code&gt; function doesn't seem to belong to any objects, right?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's the key point:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;The &lt;code&gt;this&lt;/code&gt; keyword is only set each time you run the function, not when you first declare the function.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So in the above example, our &lt;code&gt;onclick&lt;/code&gt; methods are set to &lt;code&gt;turnRed&lt;/code&gt;. The &lt;code&gt;onclick&lt;/code&gt; methods belong to their corresponding divs, so in each case, &lt;code&gt;this&lt;/code&gt; means "this div".&lt;/p&gt;

&lt;p&gt;What happens if you call &lt;code&gt;turnRed()&lt;/code&gt; by itself?&lt;/p&gt;

&lt;p&gt;If a function doesn't belong to another object when it's called, then it belongs to the &lt;code&gt;window&lt;/code&gt; object by default.&lt;/p&gt;

&lt;p&gt;That means &lt;code&gt;this&lt;/code&gt; will refer to the window, and an error will happen because you can't put CSS styles directly on the window.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick recap so far
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In JavaScript &lt;code&gt;this&lt;/code&gt; is which object our function belongs to when it gets called.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;code&gt;this&lt;/code&gt; keyword is set when you run a function, not when you first declare it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unless otherwise specified, &lt;code&gt;this&lt;/code&gt; gets set to "window" by default.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How can I see what &lt;code&gt;this&lt;/code&gt; is?
&lt;/h2&gt;

&lt;p&gt;If you ever get stuck, you can always check what &lt;code&gt;this&lt;/code&gt; is by logging it to the console.&lt;/p&gt;

&lt;p&gt;Conveniently, &lt;code&gt;console.log()&lt;/code&gt; doesn't interfere with the value of &lt;code&gt;this&lt;/code&gt; so you won't have to worry that &lt;code&gt;console.log(this);&lt;/code&gt; would say "console".&lt;/p&gt;

&lt;p&gt;When in doubt, log it out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can &lt;code&gt;this&lt;/code&gt; change?
&lt;/h2&gt;

&lt;p&gt;Yeah!&lt;/p&gt;

&lt;p&gt;Sometimes, &lt;code&gt;this&lt;/code&gt; is inconvenient. Maybe you want it to refer to one thing, but it refers to something else.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind" rel="noopener noreferrer"&gt;Bind&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call" rel="noopener noreferrer"&gt;call&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply" rel="noopener noreferrer"&gt;apply&lt;/a&gt;, and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions" rel="noopener noreferrer"&gt;ES6 arrow functions&lt;/a&gt; let you decide what you want &lt;code&gt;this&lt;/code&gt; to be.&lt;/p&gt;

&lt;p&gt;For now, you have enough to remember, but I've linked to those concepts in case you want to know more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;this&lt;/code&gt; is whatever object your function belongs to when you run it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don't overthink it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you ever get stuck, just &lt;code&gt;console.log(this);&lt;/code&gt; and you'll see what &lt;code&gt;this&lt;/code&gt; is.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this was helpful, and feel free to check out &lt;a href="https://simplestepscode.com/learn-javascript" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt; for more JavaScript tips.&lt;/p&gt;

&lt;p&gt;If you have any questions, please feel free to leave them in the comments, and I'll do my best to answer.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>tutorials</category>
    </item>
    <item>
      <title>JavaScript array push, pop, shift, unshift: how to remember the difference</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Mon, 07 Aug 2017 00:05:25 +0000</pubDate>
      <link>https://forem.com/yaphi1/javascript-array-push-pop-shift-unshift-how-to-remember-the-difference</link>
      <guid>https://forem.com/yaphi1/javascript-array-push-pop-shift-unshift-how-to-remember-the-difference</guid>
      <description>&lt;p&gt;When you're adding and removing stuff from the beginning and end of a JavaScript array, it can be tough to remember which method does what. Here are some tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unshift&lt;/strong&gt; and &lt;strong&gt;shift&lt;/strong&gt; make the whole array &lt;strong&gt;shift&lt;/strong&gt; sideways (by adding and removing items from the beginning).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Push&lt;/strong&gt; and &lt;strong&gt;pop&lt;/strong&gt; do NOT make the array shift sideways (because they add and remove items at the end).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In each of those pairs (push/pop and unshift/shift), &lt;strong&gt;the longer word makes the array longer&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're curious, I made &lt;a href="https://simplestepscode.com/array-push-pop-shift-unshift/" rel="noopener noreferrer"&gt;a quick animation to illustrate these points&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope this helps!&lt;/p&gt;




&lt;p&gt;Note that this is more of a memorization trick than a full explanation, so feel free to check out MDN for full details and examples of &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push" rel="noopener noreferrer"&gt;push&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop" rel="noopener noreferrer"&gt;pop&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift" rel="noopener noreferrer"&gt;shift&lt;/a&gt;, and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift" rel="noopener noreferrer"&gt;unshift&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>tutorials</category>
    </item>
    <item>
      <title>When your entire knowledge gets judged because you didn't know that one random fact</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Wed, 26 Jul 2017 13:51:24 +0000</pubDate>
      <link>https://forem.com/yaphi1/when-your-entire-knowledge-gets-judged-because-you-didnt-know-that-one-random-fact</link>
      <guid>https://forem.com/yaphi1/when-your-entire-knowledge-gets-judged-because-you-didnt-know-that-one-random-fact</guid>
      <description>&lt;p&gt;&lt;em&gt;This &lt;a href="https://simplestepscode.com/judged-on-trivia/" rel="noopener noreferrer"&gt;article&lt;/a&gt; originally appeared on &lt;a href="https://simplestepscode.com/" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt; which tries its best to help people &lt;a href="https://simplestepscode.com/learn-javascript/" rel="noopener noreferrer"&gt;learn JavaScript and actually remember it&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's say you know a lot about a topic.&lt;/p&gt;

&lt;p&gt;Suddenly a piece of trivia about that topic comes up in conversation.&lt;/p&gt;

&lt;p&gt;It's something you don't know.&lt;/p&gt;

&lt;p&gt;People see this, and they assume you know nothing about the entire topic just because you didn't know that one random fact.&lt;/p&gt;

&lt;p&gt;Frustrating, right?&lt;/p&gt;

&lt;p&gt;It can also go the other way. You might hear someone mention a buzzword and assume they have a vast pool of knowledge, when the truth might be that they read a paragraph on Wikipedia yesterday.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So why does this happen?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It happens because the brain likes shortcuts, so it's easy to assume the part you see represents the whole story.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now why would this matter to you?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It matters because this pattern of assumptions can have consequences that go far beyond looking silly in some random conversation.&lt;/p&gt;

&lt;p&gt;There are two types of situations where the effects can be particularly bad:&lt;/p&gt;

&lt;p&gt;1) When you're learning&lt;br&gt;
2) When you're in an interview or other important meeting&lt;/p&gt;

&lt;p&gt;Let's look at both of those.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 1: Assumptions can wreck you when you're learning
&lt;/h2&gt;

&lt;p&gt;When people confidently throw around the latest buzzwords, you might see that surface and assume these people have vast pools of knowledge about the subjects. Often this is not the case. Since you have no way of knowing that, it's easy to feel like you have to know everything about every buzzword before you can get started. This discourages a lot of people from learning JavaScript. It can also lead to &lt;a href="https://en.wikipedia.org/wiki/Impostor_syndrome" rel="noopener noreferrer"&gt;impostor syndrome&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What to do:
&lt;/h3&gt;

&lt;p&gt;First, remember that everyone knows different amounts about different things, and it's impossible to know everything.&lt;/p&gt;

&lt;p&gt;Don't let a fear of looking foolish stop you from asking questions. In fact, the smartest people aren't afraid to ask the "stupid" questions.&lt;/p&gt;

&lt;p&gt;Also, when you hear people throwing around buzzwords, don't assume you need the entire combined knowledge of all of them just to get started. Instead, take it a step at a time, and focus on learning what makes sense for your goals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2: Assumptions can embarrass you in an interview or other important meeting
&lt;/h2&gt;

&lt;p&gt;Miss one small thing or phrase something in a way you didn't mean, and your audience might assume you know nothing.&lt;/p&gt;

&lt;p&gt;To use an embarrassing personal example, I once phrased a question in a way that made a hiring manager think I didn't know what jQuery was even though I had been using it for years.&lt;/p&gt;

&lt;h3&gt;
  
  
  What to do:
&lt;/h3&gt;

&lt;p&gt;The good thing about these sorts of situations is that you generally have an idea of the topics you'll be discussing, so you have time to prepare. The best thing to do is to prepare some talking points that will show your best skills in a way that ties them into what's relevant to your audience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;It's natural to assume things about other people's knowledge and how it relates to your own. The important things to remember are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don't get discouraged from learning.&lt;/li&gt;
&lt;li&gt;Keep asking questions.&lt;/li&gt;
&lt;li&gt;When there's something important like an interview, prepare a baseline of topics to cover so your audience will at least get an accurate, positive overview of what you know and how it's relevant to them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this has been helpful!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>career</category>
    </item>
    <item>
      <title>When that “simple” JavaScript tutorial is super complicated</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Tue, 18 Jul 2017 16:37:14 +0000</pubDate>
      <link>https://forem.com/yaphi1/when-that-simple-javascript-tutorial-is-super-complicated</link>
      <guid>https://forem.com/yaphi1/when-that-simple-javascript-tutorial-is-super-complicated</guid>
      <description>&lt;p&gt;&lt;em&gt;This &lt;a href="https://simplestepscode.com/how-to-use-tutorials/" rel="noopener noreferrer"&gt;article&lt;/a&gt; originally appeared on &lt;a href="https://simplestepscode.com/" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt; which tries its best to help people &lt;a href="https://simplestepscode.com/learn-javascript/" rel="noopener noreferrer"&gt;learn JavaScript and actually remember it&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“For some reason JavaScript tutorials often start with â€˜In this tutorial we will  write a simple...’ and, 12,000 lines later you can't remember what it was you were trying to learn.”&lt;/p&gt;

&lt;p&gt;– &lt;a href="https://twitter.com/perrydBUCS" rel="noopener noreferrer"&gt;@perrydBUCS&lt;/a&gt; in a comment on &lt;a href="https://dev.to/yaphi1/what-are-your-biggest-struggles-in-learning-javascript/comments/dd8"&gt;dev.to&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is really well said, and it illustrates the key problem with a lot of tutorials: they promise simplicity at the beginning, and then they end up being so long and complicated that the readers give up.&lt;/p&gt;

&lt;p&gt;Let's talk about how you can get around this problem and get the most out of a tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tip #1: Start with the smallest possible piece
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsimplestepscode.com%2Fimg%2Ficons%2Fpuzzle.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsimplestepscode.com%2Fimg%2Ficons%2Fpuzzle.svg" title="puzzle icon" alt="puzzle icon" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A lot of tutorials group a bunch of concepts into one big step. For example, they might ask you to perform an animation when a button is clicked.&lt;/p&gt;

&lt;p&gt;If you follow along with the tutorial at this point, you'll end up typing (or pasting) a lot of stuff and not remembering it.&lt;/p&gt;

&lt;p&gt;Instead, break the first step down into even smaller steps. First show a button. Next make the button do something simple (like maybe just saying hello when clicked). After that, try to create the animation on its own. Once you have a working button and a working animation, you can put the pieces together, and you'll understand how they work.&lt;/p&gt;

&lt;p&gt;It also helps if you strip out unnecessary styles or markup in order to stay close to the bare essentials of what makes the code work. (Key word: unnecessary. If some of the styles and markup are necessary, keep them.)&lt;/p&gt;

&lt;p&gt;In general, smaller pieces are easier to understand, easier to work with, and easier to remember. This approach will make a huge difference in how you learn.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tip #2: Experiment before moving on
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsimplestepscode.com%2Fimg%2Ficons%2Fexperiment.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsimplestepscode.com%2Fimg%2Ficons%2Fexperiment.svg" title="experiment icon" alt="experiment icon" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're learning new concepts, don't just follow a tutorial as written. Experiment with each step. For example, if the tutorial shows you one type of animation, try another type too. If something needs to happen when a button is clicked, try making different things happen when that button is clicked.&lt;/p&gt;

&lt;p&gt;Adjust, experiment, play, break things. You'll learn so much in such a short time this way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tip #3: Try each step on your own first
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsimplestepscode.com%2Fimg%2Ficons%2Frunning.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsimplestepscode.com%2Fimg%2Ficons%2Frunning.svg" title="running icon" alt="running icon" width="487" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When possible, try something on your own before looking at the tutorial. You might struggle, but you'll think deeply about the problem you're trying to solve and the issues to be aware of. This will prepare you to understand the tutorial much better because you'll understand why certain steps are included.&lt;/p&gt;

&lt;p&gt;It isn't always possible to try solving the problem before looking at the tutorial, but it's something to consider in case it makes sense for your situation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsimplestepscode.com%2Fimg%2Ficons%2Fkey.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsimplestepscode.com%2Fimg%2Ficons%2Fkey.svg" title="key icon" alt="key icon" width="512" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next time you see a tutorial, try these tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Break it down into the smallest possible pieces.&lt;/li&gt;
&lt;li&gt;Experiment before moving to the next step.&lt;/li&gt;
&lt;li&gt;Try to solve some pieces on your own first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When trying these tips myself, here's what happened:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instead of doing ten tutorials and learning zero things, I would do one tutorial and learn ten things.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I hope this will happen for you too.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was reprinted from &lt;a href="https://simplestepscode.com/how-to-use-tutorials/" rel="noopener noreferrer"&gt;Simple Steps Code&lt;/a&gt; which tries its best to help people &lt;a href="https://simplestepscode.com/learn-javascript/" rel="noopener noreferrer"&gt;learn JavaScript and actually remember it&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you hated this article, feel free to visit my site and yell at me. However, if you have kind comments, put them here on dev.to :)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>tutorials</category>
    </item>
    <item>
      <title>What are your biggest struggles in learning JavaScript?</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Thu, 13 Jul 2017 15:30:20 +0000</pubDate>
      <link>https://forem.com/yaphi1/what-are-your-biggest-struggles-in-learning-javascript</link>
      <guid>https://forem.com/yaphi1/what-are-your-biggest-struggles-in-learning-javascript</guid>
      <description>&lt;p&gt;What are/were your biggest struggles in learning JavaScript?&lt;/p&gt;

&lt;p&gt;This question can refer to specific code issues (like working with arrays) or learning issues (like following a tutorial but not remembering afterwards).&lt;/p&gt;

&lt;p&gt;I'd like to hear it all!&lt;/p&gt;

&lt;p&gt;Also, if you're more experienced, but you still remember your struggles with JS, feel free to chime in.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>About to learn JavaScript? Projects can ruin you.</title>
      <dc:creator>Yaphi Berhanu</dc:creator>
      <pubDate>Thu, 06 Jul 2017 22:32:06 +0000</pubDate>
      <link>https://forem.com/yaphi1/about-to-learn-javascript-projects-can-ruin-you</link>
      <guid>https://forem.com/yaphi1/about-to-learn-javascript-projects-can-ruin-you</guid>
      <description>

&lt;p&gt;Projects are a great way to get better at JavaScript. However, people often attempt big ones too soon. They say things like, "I'll just code up a quick slideshow," and then when that proves overwhelming, they give up, thinking they're just not cut out for JavaScript.&lt;/p&gt;

&lt;p&gt;This problem is important to me because I've seen it stop too many people from learning JavaScript.&lt;/p&gt;

&lt;p&gt;The problem happens because a new coder doesn't always have experience determining what's easy. They'll pick a project like a slideshow not realizing that it involves a whole bunch of concepts (animations, arrays, functions, variables, DOM manipulation, timing, etc). Then they end up thinking, "If I can't even do this easy thing, then I can't do JavaScript at all."&lt;/p&gt;

&lt;p&gt;Alternatively, some people will take on a project too early and succeed anyway. Because there were too many concepts at one time, they often end up remembering nothing.&lt;/p&gt;

&lt;p&gt;The solution I've found to work best is to start with concepts first. Show text on a page. Add two numbers together. Change the color of a div. Respond to a button click. Once you gather a bunch of concepts, you can keep them as Lego blocks in your bag of knowledge. You can put the pieces together and make a whole lot of things. As a result, you'll be able to build a lot of exciting projects, you'll remember everything better, and you won't be nearly as overwhelmed.&lt;/p&gt;

&lt;p&gt;I hope this helps, and for anyone who's interested, I've written a &lt;a href="https://simplestepscode.com/learn-javascript/"&gt;quick road map of JavaScript concepts to get you doing practical things quickly&lt;/a&gt;.&lt;/p&gt;


</description>
      <category>javascript</category>
      <category>learnjavascript</category>
      <category>javascripttutorial</category>
      <category>javascriptprojects</category>
    </item>
  </channel>
</rss>
