<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Oscar Ore</title>
    <description>The latest articles on DEV Community by Oscar Ore (@oscarore007).</description>
    <link>https://dev.to/oscarore007</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%2F385110%2F69fd45b3-1fef-4063-88c2-8703af6c4407.png</url>
      <title>DEV Community: Oscar Ore</title>
      <link>https://dev.to/oscarore007</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oscarore007"/>
    <language>en</language>
    <item>
      <title>The meaning of .this</title>
      <dc:creator>Oscar Ore</dc:creator>
      <pubDate>Mon, 29 Nov 2021 01:27:03 +0000</pubDate>
      <link>https://dev.to/oscarore007/the-meaning-of-this-h4i</link>
      <guid>https://dev.to/oscarore007/the-meaning-of-this-h4i</guid>
      <description>&lt;p&gt;Let's talk about this. &lt;em&gt;This&lt;/em&gt; is determined by the object that it belongs to.&lt;/p&gt;

&lt;h1&gt;
  
  
  Contexts in which the 'this' keyword can be used
&lt;/h1&gt;

&lt;p&gt;The definition of this as the property of an execution context is much more accurate because depending on how it is called at runtime, 'this' can refer to many things. Let's dive deeper.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;this&lt;/em&gt; in the method of an object&lt;br&gt;
First, a method is used to refer to a function that is a member of an object. All methods are functions, but not all functions are methods. Now, when the 'this' keyword is used inside a method, it refers to the owner of the method it is used in. Let's use the example defined above to take a deeper look at 'this' in this context.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;greet : function() {
return "Hi! I am " + this.firstName + " " + this.  lastName + ", a bell boy and I am at your service";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, this which is used inside the greet() method refers to the bellBoy object, which is the owner of that greet() method.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;this&lt;/em&gt; in the Global Context&lt;br&gt;
When the 'this' keyword is used alone, not inside any function or better referred to as being used in the global context, the keyword refers to the global object. The global object refers to the owner of the 'this' keyword in this case. When it is in a browser window, this global object refers to the window object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let y = this
console.log(y)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;this&lt;/em&gt; in the global context.&lt;/p&gt;

&lt;p&gt;Since that is true, if you make a strict comparison between the value of &lt;em&gt;this&lt;/em&gt; and the window object, we get the boolean value of true.&lt;/p&gt;

&lt;p&gt;If you run this javascript file inside your computer using a tool like node, &lt;em&gt;this&lt;/em&gt; keyword refers to an object of type of object.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;this&lt;/em&gt; in a function&lt;br&gt;
Note, we are talking about what the keyword 'this' refers to when it is used in an ordinary function, one not affiliated with any object. Just a function is standing on its own. In such a javascript object, the default value of 'this' is the owner of the function. If the code is not in strict mode and it is not been set to a member of an object, then this defaults to the global object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function function1() {
return this
}
function1() === window
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the example above, the value of the this keyword as used inside this function refers to the window object. This is why the output of the string comparison between function1 and the window object will equal to true because they hold the exact same value.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;this&lt;/em&gt; in a function (Strict Mode)&lt;br&gt;
When in strict mode however, Javascript does not permit default binding, and because of that, it is undefined. Put simply strict mode prevents sloppy code. Thinking it from a programmers' point of view, there is most likely no good reason to want to access the value of this in a function since it will return the window object. In most cases, we access the this keyword because we want to get some other properties from its owner. Strict mode enforces this. So when in this mode, 'this' is undefined.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"use  strict"
function function1() {
return this
}
function1() === window

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As can be seen in the above example, in the strict mode, the value of this inside a function is undefined.&lt;/p&gt;

&lt;p&gt;There are other ways &lt;em&gt;this&lt;/em&gt; is used in JavaScript, here are some more options: &lt;br&gt;
&lt;em&gt;this&lt;/em&gt; in classes&lt;br&gt;
&lt;em&gt;this&lt;/em&gt; as a constructor&lt;br&gt;
&lt;em&gt;this&lt;/em&gt; with a getter or setter method&lt;br&gt;
&lt;em&gt;this&lt;/em&gt; on an object's prototype chain&lt;br&gt;
&lt;em&gt;this&lt;/em&gt; in arrow functions&lt;/p&gt;

&lt;p&gt;Happy Coding! &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>React Mock Interview</title>
      <dc:creator>Oscar Ore</dc:creator>
      <pubDate>Mon, 22 Nov 2021 03:13:41 +0000</pubDate>
      <link>https://dev.to/oscarore007/react-mock-interview-4a2h</link>
      <guid>https://dev.to/oscarore007/react-mock-interview-4a2h</guid>
      <description>&lt;p&gt;Interviews are always a nerve-wracking thing to do! You spend hours upon hours studying Data Structures and Algorithms, Youtube top programming interview questions and answers, and think of all of the possible questions the interviewer can ask you. &lt;/p&gt;

&lt;p&gt;Thanks to Flatiron School, I was able to prepare for a mock interview to go through these same trials and tribulations as my peers. I am writing this blog post to encourage my fellow aspiring software developers to take every interview opportunity that you can, because just like programming, practice makes perfect. Here is how my mock interview went.&lt;/p&gt;

&lt;p&gt;1) The Meet - n - Greet &lt;br&gt;
During the first 10-15 minutes of my mock interview, I introduced myself to my interviewer and told him my story of becoming a software developer. This was a key point for me in my interview process because I can demonstrate my soft skills and how my previous work experience as a sales rep in the tech world can benefit my transition to a developer position. Some of the questions you can expect are: &lt;/p&gt;

&lt;p&gt;Tell me about yourself?&lt;br&gt;
Why do you want to become a software developer? → My personal favorite! This question is a gateway for you to show your passion for software development! &lt;br&gt;
What are your goals in 5 - 10 years * Think about how you can continue to grow in your career field. I mentioned that I would love to be a team lead or senior developer.&lt;br&gt;
 Focus on your strong points, and really show your passion for software development and eagerness to learn. In other words, SELL YOURSELF! &lt;/p&gt;

&lt;p&gt;2) Technical Q&amp;amp;A&lt;br&gt;&lt;br&gt;
During the technical Q&amp;amp;A portion of my interview, I was asked a handful of React questions. Here were some of the questions that I was asked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What is React? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What are the differences between functional and class components?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is the virtual DOM? How does react use the virtual DOM to render what the user sees? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain React state and props.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is prop drilling in React?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is JSX?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can web browsers read JSX directly? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why use React instead of other frameworks?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-How do you create a React app?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How do you create an event in React?&lt;/li&gt;
&lt;li&gt;How do you update the state of a component?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make sure that your answers are clear and straight to the point. The interviewer told me the worst thing a candidate can do is ramble on about a topic that does not relate to the questions at hand. Simply say, " I do not know the answer to the question". Now here is where you can differentiate yourself: don't be afraid to ask questions! These are the times that interviewers want to know how you think. I asked the interviewer, “What are other frameworks that you have used in the past besides React?” He said Angular and Vue.js. They all have pros and cons, and the interviewer actually told me he learned Angular first but recently started to learn React because of his company's tech stack and prefers to use React more than anything now! &lt;/p&gt;

&lt;p&gt;3) Live Coding &lt;/p&gt;

&lt;p&gt;My live coding challenge was to build the following:&lt;br&gt;
Build a React Component that displays the given data&lt;br&gt;
with the functionality of sorting that data and adding rows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import "./styles.css";
import Row from "./row";
import React, { useState } from "react";

// Build a React Component that displays the given data
// with the functionality of sorting that data and adding rows.

const DATA = [
  { id: 0, name: "John", email: "john@gmail.com" },
  { id: 1, name: "Jane", email: "jane@gmail.com" },
  { id: 2, name: "Joe", email: "joe@gmail.com" }
];

export default function App() {
  const [name, SetName] = useState("");
  const [users, SetUsers] = useState(DATA);

  const handleChange = (event) =&amp;gt; {
    SetName(event.target.value);
  };

  const handleSubmit = (event) =&amp;gt; {
    const newUser = {
      id: users.length,
      name: name,
      email: `${name}@gmail.com`
    };
    SetUsers([...users, newUser]);
  };


  return (
    &amp;lt;div className="App"&amp;gt;
      {users.map((user) =&amp;gt; (
        &amp;lt;Row key={user.id} name={user.name} email={user.email} /&amp;gt;
      ))}
      &amp;lt;input type="text" value={name} onChange={handleChange} /&amp;gt;
      &amp;lt;button onClick={handleSubmit}&amp;gt; Push Here! &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, here is what my row.js folder looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";

function Row(props) {
  return (
    &amp;lt;h1&amp;gt;
      {props.name}, {props.email}
    &amp;lt;/h1&amp;gt;
  );
}

export default Row;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All the user has to do is enter their name, and that would autogenerate a gmail account for the user. This is taken care of by the handleSubmit method above. After time was up, my instructor encouraged me to add on the ability to edit and delete users as well. &lt;/p&gt;

&lt;p&gt;Next Steps: &lt;/p&gt;

&lt;p&gt;After the interview, I reflected on what went well and what areas I could improve on! I believed I did very well in the behavior / meet-n-greet section of the interview and used my previous work experience to let my soft skills shine throughout the interview. &lt;/p&gt;

&lt;p&gt;Areas were I could improve on would be just explaining/ discussing my code with other developers and what my thought process was during the technical part of the interview. My interviewer recommended that I solve the technical assessment in chunks. First, work on the process that I know how to do, (Ex: render the user's info on the page). Second, he interviewer recommended that I review typical React questions. Based on his experience, he came across several of the same interview questions. Here is a website that he recommend:(&lt;a href="https://www.simplilearn.com/tutorials/reactjs-tutorial/reactjs-interview-questions"&gt;https://www.simplilearn.com/tutorials/reactjs-tutorial/reactjs-interview-questions&lt;/a&gt;). &lt;/p&gt;

&lt;p&gt;Stay tuned for more! &lt;/p&gt;

&lt;p&gt;Happy Coding! &lt;/p&gt;

</description>
      <category>react</category>
      <category>interview</category>
      <category>career</category>
      <category>beginners</category>
    </item>
    <item>
      <title>React/Redux Final Project</title>
      <dc:creator>Oscar Ore</dc:creator>
      <pubDate>Wed, 01 Sep 2021 05:04:32 +0000</pubDate>
      <link>https://dev.to/oscarore007/react-redux-final-project-1p4i</link>
      <guid>https://dev.to/oscarore007/react-redux-final-project-1p4i</guid>
      <description>&lt;p&gt;The final project. After months of learning the benefits of React and Redux, it was time to build out my final project! Throughout my planning process, I wanted to create an app that met all of the requirements but also would allow me to add on different features as I grow my coding knowledge. A couple of project ideas came to mind, but at the end of the day, I decided to create a workout planning app call Workout Planner. &lt;/p&gt;

&lt;p&gt;The concept is that the user would enter their workout for the day and they could collaborate with other users and help keep each other accountable. This project is still a work in progress, due to the fact that there are so many features that I would like to add on as well. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The project requirements were as followed:&lt;/li&gt;
&lt;li&gt;There should be 5 stateless components&lt;/li&gt;
&lt;li&gt;There should be 3 routes
-The Application must make use of react-router and proper RESTful routing. &lt;/li&gt;
&lt;li&gt;Use Redux middleware to respond to and modify state change&lt;/li&gt;
&lt;li&gt;Make use of async actions and redux-thunk middleware to send data to and receive data from a server&lt;/li&gt;
&lt;li&gt;Your Rails API should handle the data persistence with a database. You should be using fetch() within your actions to GET and POST data from your API - do not use jQuery methods.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once I completed the backend solution of my project it was now time to focus on FrontEnd. &lt;/p&gt;

&lt;p&gt;What I took away from the project overall was how React moved information throughout my application, along with the help of Redux. &lt;/p&gt;

&lt;p&gt;Here is an example of the Redux flow without Thunk: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JhnvMZNo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4lcs2kn6aid78mynnbof.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JhnvMZNo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4lcs2kn6aid78mynnbof.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This image shows you the importance of Redux within an application and how useful it can be with a developer is building out large apps. &lt;/p&gt;

&lt;p&gt;Overall, the project taught me a lot and it showed me what I can do with a bit of hard work and coffee! &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Looping: It's all about Repetition!</title>
      <dc:creator>Oscar Ore</dc:creator>
      <pubDate>Sun, 17 May 2020 20:08:54 +0000</pubDate>
      <link>https://dev.to/oscarore007/looping-it-s-all-about-repetition-4dol</link>
      <guid>https://dev.to/oscarore007/looping-it-s-all-about-repetition-4dol</guid>
      <description>&lt;ul&gt;
&lt;li&gt;  Understanding Looping is a key part of learning how to program. Looping occurs when you tell the program to do a task or something a certain number of times. The decisions are completely up to you. Pretty neat right? There are many types of Looping methods out there but the key takeaway here is that looping allows us to abstract away the actual mechanics of enacting the same lines of code a certain number of times. Here is an example of a loop using the .times method. Check it out: &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;8.times do&lt;/code&gt;&lt;br&gt;
&lt;code&gt;puts “Hey guys! My name is Oscar and I am going to repeat myself eight times.”&lt;/code&gt;&lt;br&gt;
&lt;code&gt;end&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;If you copy and paste the code snippet into IRB in your terminal and hit enter, you should see the following: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Hey guys! My name is Oscar and I am going to repeat myself eight times&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Hey guys! My name is Oscar and I am going to repeat myself eight times&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Hey guys! My name is Oscar and I am going to repeat myself eight times&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Hey guys! My name is Oscar and I am going to repeat myself eight times&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Hey guys! My name is Oscar and I am going to repeat myself eight times&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Hey guys! My name is Oscar and I am going to repeat myself eight times&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Hey guys! My name is Oscar and I am going to repeat myself eight times&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Hey guys! My name is Oscar and I am going to repeat myself eight times&lt;/code&gt;&lt;/p&gt;

</description>
      <category>looping</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Why do I want to become a software engineer?</title>
      <dc:creator>Oscar Ore</dc:creator>
      <pubDate>Wed, 13 May 2020 00:47:29 +0000</pubDate>
      <link>https://dev.to/oscarore007/why-do-i-want-to-become-a-software-engineer-4pag</link>
      <guid>https://dev.to/oscarore007/why-do-i-want-to-become-a-software-engineer-4pag</guid>
      <description>&lt;p&gt;My journey has been anything but traditional. I have been contemplating this decision for quite some time now. But I can tell you this, my “why” is greater than any obstacle that I may face while I embark on this journey to become a Software Engineer. I would love to pursue a passion that is fueled by curiosity, innovation and creativity, all while supporting my family. This is my “why”, but how did we get here? Let’s take a journey.&lt;/p&gt;

&lt;p&gt;I have always been intrigued by technology. Growing up in the era of the internet, we continue to advance our lives thanks to incredible innovation. During the early years of my professional career, I was blessed with an opportunity that changed my life and that’s when my journey began. Living in Austin, TX at the time, I began my career with an IT reseller called SHI. As I grew in my professional career, I wanted a more challenging experience and I was looking to add more creativity in my everyday work activities. Working for an IT reseller, I was constantly introduced to different technologies throughout my day and speaking to many IT professionals, I enjoyed speaking with the developers of the product. They had the ability to solve a problem with lines of code. What an ability to have!&lt;/p&gt;

&lt;p&gt;A light bulb just went off in my head. How can I wield this power? How can I create something out of nothing? This thought process led to hours of research and endless YouTube videos on how to break into the industry. After speaking with many software engineers, ranging from traditional education upbringing (Computer Science majors) to self-learners, I made my decision to attend Flatiron’s online boot camp program. Talk about an exciting transition! I am excited as we start the first week of courses. I am already surrounded by so many like-minded individuals who want to create a better opportunity for themselves and their families.&lt;/p&gt;

&lt;p&gt;I will continue to document my journey throughout my flatiron boot camp experience to encourage, motivate, and inspire others to follow their dreams and to never doubt your capabilities!&lt;/p&gt;

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