<?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: Nick Corona</title>
    <description>The latest articles on DEV Community by Nick Corona (@coronaisme).</description>
    <link>https://dev.to/coronaisme</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%2F305741%2F5a83cdc8-cd41-4ec7-b68f-d7f0a032b7ce.jpeg</url>
      <title>DEV Community: Nick Corona</title>
      <link>https://dev.to/coronaisme</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/coronaisme"/>
    <language>en</language>
    <item>
      <title>Working with a matrix + nested loops</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sat, 26 Dec 2020 21:56:47 +0000</pubDate>
      <link>https://dev.to/coronaisme/working-with-a-matrix-nested-loops-1igl</link>
      <guid>https://dev.to/coronaisme/working-with-a-matrix-nested-loops-1igl</guid>
      <description>&lt;p&gt;Hello! Happy holidays to whomever might be reading this =). Today I am going to write about nested loops. I have been coding for about a year now, and I have dealt with nested loops often. However, I still find them a bit difficult sometimes to picture what I am doing. Considering how often I think they are used though, with matrices and whatnot I think that it could be valuable to go over how I think about them and visualize moving through a matrix. &lt;/p&gt;

&lt;p&gt;So to start out, I think that it is important to go over what we are working with when using nested loops. Let me clarify something before anyone gets confused. Nested loops can be used for a lot of different things. However in this blog post I will be examining nested loops as pertaining to a matrix, ie, an array of arrays. I think that thinking about a matrix can be useful in visualizing how a nested loop can move through things. &lt;/p&gt;

&lt;p&gt;So a common problem one might encounter that would possibly call for a nested loop would be transposing a matrix. In this particular example we are flipping the row and column index of a matrix over its diagonal. Something like this. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LvNpVLim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w56ciw9vha98aqisq06j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LvNpVLim--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w56ciw9vha98aqisq06j.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first time I used matrices was when I took linear algebra. To be honest I actually liked the class. It was pretty fun in an academic way. But to this day I am not entirely sure why using matrices is that important. Now it has definitely been a while since I took linear, and I am sure the professor said something as to a practical application but for now I assume that it can be useful in calculations that might be above my head. &lt;/p&gt;

&lt;p&gt;Lets talk about how we use a nested loop to transpose a matrix. Imagine a matrix written out as an array of arrays. We might have something like [[1,2,3],[4,5,6],[7,8,9]]. Sometimes it makes it a bit easier to me to visualize by making it look more matrix-like : &lt;br&gt;
[&lt;br&gt;
[1,2,3],&lt;br&gt;
[4,5,6],&lt;br&gt;
[7,8,9]&lt;br&gt;
]&lt;br&gt;
What we want to do is be able to make a nxn matrix transpose over the diagonal so in this case we would want : &lt;br&gt;
[&lt;br&gt;
[1,4,7],&lt;br&gt;
[2,5,8],&lt;br&gt;
[3,6,9]&lt;br&gt;
]&lt;br&gt;
The way we go about this would be using a nested loop. The first thing I did was to make a result array. It is possible to change the original matrix, but I thought it might be easier/better to just make a new one. Then we make our first loop. Our first loop will start with the first element in our array which is the first array within the array ([1,2,3]) this will deal with our &lt;em&gt;rows&lt;/em&gt;. The loop will go through each element within this array. Before we make the inner loop we need an array holder to make our inner arrays. Then we make our inner loop which will go through the length of the whole array, our &lt;em&gt;columns&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;As we run through the loop we start with the first element of our row and col. Which in this case is 1, and this gets pushed into the inner placeholder array. So far we have our outer array and one inner array which at the moment contains just 1. Then we move to the first element of the second row and push that into our placeholder array. So now our placeholder array has 1, 4. Finally we move to the first element of (in this case) our last row. That gets pushed in and now we have our first new row completed : [1,4,7]. &lt;/p&gt;

&lt;p&gt;This will continue now with the next element which would be like going down the next column. Eventually using this method any size matrix would be transposed. If any of that didnt make sense maybe this picture will help. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QZLeFyVJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uklz0fco0z8obqa4r4r0.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QZLeFyVJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uklz0fco0z8obqa4r4r0.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>VSCode keyboard shortcuts</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sat, 19 Dec 2020 23:02:51 +0000</pubDate>
      <link>https://dev.to/coronaisme/vscode-keyboard-shortcuts-3979</link>
      <guid>https://dev.to/coronaisme/vscode-keyboard-shortcuts-3979</guid>
      <description>&lt;p&gt;Hello! Today I am going to write about some useful vscode shortcuts and how they can be quite helpful in coding. This will be aimed at MAC users. However for PC / Linux Users for the most part you just need to switch the command key to control. Also I swear I am not being paid or something by VSCode but if you dont use it as your editor, I would definitely recommend it. It is a great editor and these keybinds will help you code faster and more efficiently. When I reference a keybind I will be typing within an array so you know which buttons are required to be pressed. &lt;/p&gt;

&lt;p&gt;When I first started coding I didnt think it would be that useful to learn the keybinds. I was concentrating more on the actual code I was writing. This was probably a good thing, I would definitely suggest paying attention more to important things than making your coding quicker. However, at a certain point I think it is useful if not important to hone your craft and become better at little things. Just like when we code and try to make DRY code, being quicker and more efficient while coding is important too. Especially if we are making or trying to make careers out of this.&lt;/p&gt;

&lt;p&gt;The idea behind alot of these keybinds it to keep our hands off the mouse or trackpad as much as possible. It is similar to when we learn how to type and we learn of the "home row". Hand placement goes a long way for faster typing just like being able to navigate our editors and whatnot is much quicker without having to use the trackpad. &lt;/p&gt;

&lt;p&gt;There are alot of useful keybinds that vscode has implemented that I find quite useful all the time in coding. I think the one that I use the most by far is the [command + d]. With vscode we can have the cursor over a word or variable and pressing [command + d] will select that variable or word. Pressing [command + d] again will then select the next time in your code (going down) that the word/variable was used. This is very useful for someone like me who is changing variable names often. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsbkj2aleg29buxc1jbjf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsbkj2aleg29buxc1jbjf.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another similar one is a multiple line selector. This one can be used with your trackpad or mouse if you want or not. The command is [option + &lt;em&gt;click&lt;/em&gt;] for using a trackpad/mouse or you can also do [option + shift + (up or down arrow)] if you want to just go up or down. This can be quite useful if you are changing multiple lines of code, or deleting multiple lines (hopefully not!). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv4ecye8nwpx0jyfx6ofj.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fv4ecye8nwpx0jyfx6ofj.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we have the terminal opening shortcut, this one is super useful as well. For those of you who were not aware, vscode has its own terminal. In order to bring it up you can use the command [command + `]. I use this all the time as well. It is super useful especially when writing code in react or building a backend with ruby on rails. But it can also be useful when writing any code, having the terminal up can help with a variety of things. If you are writing in JavaScript you can use node in the terminal to check certain functions or things without having to use the chrome dev tools. &lt;/p&gt;

&lt;p&gt;The command that goes hand in hand with the terminal opener is [command + shift + 5]. This will split the terminal into two. When writing react code or ruby on rails code having the double terminal is almost required in my opinion. It allows you to not only have your liveserver open and running but also allows you to use your rails console to make sure your stuff is working. Also you can do git commits real easy and often, which is recommended. &lt;/p&gt;

&lt;p&gt;There are so many other useful ones. I often use [command + /] which will comment out an entire line. I use this often when debugging and trying to track down where I messed up. It also works well with react JSX code. There is also the [command + option (left or right arrow)] this will navigate between your vscode tabs. Finally maybe my favorite one is [option (up or down arrow]. When your cursor is on a specific line, this command will move the whole line up or down. I use this one all the time, especially when I have a whole bunch of code blocks and I misplace my return or what have you. There are a whole bunch of other nice ones and I would suggest you check out this image that shows all of them! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1ihrzbbhxyvjd35osuc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1ihrzbbhxyvjd35osuc7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Java vs Javascript</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sat, 12 Dec 2020 23:05:15 +0000</pubDate>
      <link>https://dev.to/coronaisme/java-vs-javascript-3bpg</link>
      <guid>https://dev.to/coronaisme/java-vs-javascript-3bpg</guid>
      <description>&lt;p&gt;Today I am going to write about a couple languages that often get confused because of the obvious similarity in name. Java and JavaScript. Java is a language that was developed in the mid 90's by James Gosling while working with Sun Microsystems. On a slight side note, anyone around my age(29) or younger might not quite remember Sun. However, I always remember it because it was a main sponser of a youth soccer team I was on for a couple years, and I remember vividly someone telling me of Sun and how they were bought out by Oracle, the huge company that everyone knows today. Anyways, Java was developed to be simple, dynamic and perhaps most importantly, object oriented. The name Java was chosen because they wanted something cool and smooth to say, another top contender for the name was Silk. &lt;/p&gt;

&lt;p&gt;Javascript on the other hand was created by Brandon Eich while working at Netscape. At the time Netscape and Sun made a partnership and wanted a scripting language to accompany Java. They wanted a language that could be used both on client and server side. The crazy part from what I have read is that JavaScript was not originally taken very seriously. Many thought the "web" would not be a very serious platform for deployment. Imagine that. 25ish years later I am sure there are still plenty of programmers out there that were there during this. I wonder how much they chuckle when they think of that. &lt;/p&gt;

&lt;p&gt;I myself have been fascinated by programming ever since I heard of it. When I was much younger I tried to take some Java classes and did so-so. I never really got to sink my teeth into it though, because I was too busy chasing girls and playing video games, I didnt have time to do something pragmatic, gimme a break. Eventually I come to decide I really want to code and I went with JavaScript as my language to start with. So personally I love it.&lt;/p&gt;

&lt;p&gt;Java and JavaScript &lt;em&gt;do&lt;/em&gt; have some similarities. They are both object oriented. This of course, just means that they are structured around reusable objects. One of the cool differences though is that JavaScript can be used to make dynamic webpages that are very interactive with the user. What this entails is that there is no need for a virtual machine like java in order to complete certain tasks that javascript can do within the browser. &lt;/p&gt;

&lt;p&gt;Recently I have been trying to brush up on my Java so I have done some exercises and whatnot. A couple things I have noticed that were quite glaring were the variable declarations. They are very declarative, instead of writing something like 'let c = 9' (JS) in java you would write something like 'int c = 9'. In Java while declaring the variable we must also declare the type of variable. &lt;/p&gt;

&lt;p&gt;Another cool difference is that Java code needs to be compiled into bytecode and be ran by a Java Virtual Machine in order to run. This can make changes to Java code a bit more ardous than JavaScript which is often executed in the same syntax as written and therefore can be changed quickly if need be. Another big thing about Java is that it is class based. In order to write any Java code a class must be instantiated. In JavaScript the code is prototype based and inherits from built in classes. &lt;/p&gt;

&lt;p&gt;One thing to acknowledge as well is something I mentioned earlier about the bytecode compilation that Java works with. This can sometimes cause things to take a little longer but it is also arguably more secure. Because of JavaScripts connivence in being in a readable syntax, it makes it easier for people of malicious intent to mess with things. All in all I am having a lot of fun learning Java, but I still think Javascript is my heart. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Stack and Queue</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sat, 05 Dec 2020 21:23:26 +0000</pubDate>
      <link>https://dev.to/coronaisme/stack-and-queue-2ipb</link>
      <guid>https://dev.to/coronaisme/stack-and-queue-2ipb</guid>
      <description>&lt;p&gt;Today I am going to be writing about two data structures used with lists. In my experience I have seen these structures used most often with arrays and linked lists. They are called a stack and a queue. Stacks and queues have come up quite often in my experiences with coding, on a couple levels. I have built my own stacks and queues to achieve certain goals and I have encountered them with things that I havent built. I mean one of the most popular coding resources out there is called stack overflow for a reason.&lt;/p&gt;

&lt;p&gt;The reason why I am talking about this today is because I was dealing with a problem earlier that I was taking a really long time to figure out. It was a rather simple problem, but for some reason I was struggling to make a solution. I honestly think I was just tired. The problem was as follows: 2 input strings would be applied to my function, and within these strings could be any number of hashtags('#'). These hashtags represented backspaces. The goal of the problem was to see if the two strings were the same after the backspaces had been applied. So you might have string1 = "a#a' and string2 = 'aa#'. When the backspace is applied to both strings you would have string1 = 'a' and string2 = 'a' as well. The output is a boolean true or false. &lt;/p&gt;

&lt;p&gt;For a while I played around with some stuff and I think I would have eventually got it, using another method but it was turning into a lot of code. I was sure there was a more elegant way to write the function so I looked at some of the other solutions to get some insight. And boom I saw a stack method. I had totally spaced on even thinking about using a stack, and the solution was brilliant. While I dont necessarily recommend looking at solutions to solve algorithms, I think it this situation it helped me. There are many patterns in algorithms and I think that sometimes just being able to recognize where you can use a solution method is useful. &lt;/p&gt;

&lt;p&gt;So stacks and queues. They are both similar, but not so similar in how they function. Their rules of functionality are the most important parts. A stack worths with LIFO and a queue works with FIFO. These anagrams stand for Last In First Out and First In First Out. They are very commonly used or else I would have just written out the rule. A queue(FIFO) works just like a line. You join a line at the last place and when you come up to the register or whatever, you are then served and &lt;br&gt;
then exit the queue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M3R8Ig_T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e8n2nsnizb7ckc12mphi.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M3R8Ig_T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/e8n2nsnizb7ckc12mphi.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A stack, however, is generally a bit more difficult for people to understand, but I find I see it more often (thats just me though). I think a good way to imagine it is with my oreo analogy. You buy a pack of oreos. If you are like me, you might just call it and eat the whole pack like a beast. Or as a reasonable person you might limit yourself. So you say, I am going to eat only 5 oreos. Also being a programmer, you arent just going to grab 5 and toss em on the counter. Instead, you take one out, put it down, take another and put it on top. Once your fifth oreo is added to the stack you then eat the last one that was placed on the stack, and finally the last oreo eaten was the first one that started the stack. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jRuafA8m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dblq6jq3pcgl00xzzd2m.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jRuafA8m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dblq6jq3pcgl00xzzd2m.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So back to my algorithm problem. Using a stack to create a built string without the backspace hashes or the corresponding characters of the string that they would delete was perfect. Going through the string, the function would check whether or not we saw a hashtag, if we havent, the character is pushed in, but once we see a hashtag we pop off the last character put in. It is quite nice and I will be sure to remember this methodology in the future. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9gM3hIT_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zkm89t98hkkyimd7ukf4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9gM3hIT_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zkm89t98hkkyimd7ukf4.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lastly, I want to talk about a stack overflow. This might come up often in your errors. The call stack for functions is something programmers should be familiar with. When we are executing multiple functions we develop what is called a call stack. Imagine this situation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TYjAO5iQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ery23nt6vhn3zvku3xq7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TYjAO5iQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ery23nt6vhn3zvku3xq7.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First we will hit the one function, this will be added to the call stack. Inside it will execute the two function, this will also be added to the call stack. Then we execute everything inside the two function. Once it is complete it is removed from the call stack. Then we are back to the one function which is then completed and removed from the call stack. Then the call stack is once again empty and our functions have been executed. If we hit a stack overflow it generally means we are using too much memory in the call stack. So if a function within the call stack is taking too long we hit an overflow and break our program. &lt;/p&gt;

</description>
      <category>computerscience</category>
    </item>
    <item>
      <title>Understanding Code</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sat, 28 Nov 2020 22:31:37 +0000</pubDate>
      <link>https://dev.to/coronaisme/understanding-code-2cn2</link>
      <guid>https://dev.to/coronaisme/understanding-code-2cn2</guid>
      <description>&lt;p&gt;Hey all, I hope that everyone who read or has read by blogs before had a good thanksgiving ( or just a regular thursday if you are not from the US ). During thanksgiving my father was talking to me about coding. He is close to retirement and I think that he is thinking of things to do now that he is going to have more down time. He was wondering what I thought might be a good language to learn to start coding. He doesnt want to actually code but he wants to be able to "understand the logic". &lt;/p&gt;

&lt;p&gt;I thought it was kinda funny, but I had a couple glasses of wine so of course I jumped right in to that conversation. He brought up C++ and Python. Both of which are languages that I am not extremely versed in. Luckily python is pretty easy to understand. We talked about some things that I think are kind of interesting and I am going to share them now as "food for though". I also would like to pose a question or two for the general audience of this blog to maybe think about or voice in on.&lt;/p&gt;

&lt;p&gt;So when he said that and mentioned the two languages the first thing I thought about was the possibility that python, being newer and sort of more "hot", would be possibly easier to learn for someone like myself. But my dad is 63 and what might be easier and prettier, therefore possibly simpler to understand for me might not be as easy to understand for him. Things in python like indentation for blocks might seem really intuitive but I dont know how declarative it might be for understanding a code block and scope. &lt;/p&gt;

&lt;p&gt;While I dont know much about C++ I sort of made the assumption that it might be more strict, similar to Java. In a sense I thought that this might be better for someone like my father to learn the logic. While abiding by stricter rules it might be harder at first, but it will ingrain itself more thoroughly. &lt;/p&gt;

&lt;p&gt;At the end of the day I told him that even though I learned Javascript first, which isnt a strict language by many others standards, I can still read a lot of different codes in different languages and figure out what they mean. I think thats what he really wants, to just be somewhat literate in coding so that he can at least somewhat understand what is going on if he were shown some sort of function or whatever.&lt;/p&gt;

&lt;p&gt;So I guess the question I would pose is what makes a coding language the most general? What makes a coding language versatile? It seems like a lot of languages are built for a purpose. Not exactly a single purpose but a direction maybe would be a better word. Eventually in my talk with my father I sort of got to this point, it doesnt matter. It doesnt matter what language you learn, because unlike real languages, there are things that are written in whatever language you choose that will be "universal". &lt;/p&gt;

&lt;p&gt;Understanding this pattern I think is what is really needed for understanding what code means is trying to do in any language. Whether or not you can write the code without a lot of referencing to documentation is one thing. But as long as you understand what data structures are in play, how conditionals work and whatnot, it really makes it so that you can understand any language. &lt;/p&gt;

&lt;p&gt;So eventually I had to wonder if you even need to know a language at all? If you can understand what the data structures are, how conditionals work, etc, the rest is often just syntax filler. Of course, this wont always work with more complicated stuff, but you could probably get the gist of what the function or code would do. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>JavaScript eval() method</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sun, 22 Nov 2020 05:51:52 +0000</pubDate>
      <link>https://dev.to/coronaisme/javascript-eval-method-p0k</link>
      <guid>https://dev.to/coronaisme/javascript-eval-method-p0k</guid>
      <description>&lt;p&gt;Today I am going to talk about an interesting method that I have discovered recently. Unfortunately, I dont think I will be able to use it often. But I will get to that in a sec. First of all I was making a small calculator component for practice. I am attempting to make more components for practice. My job search has been a struggle a bit because (I am assuming) I have no experience nor a computer science degree. My most desired role at the moment would be a front end focused role with a company working with React. Knowing this, he offered me some advice. In his opinion, as long as I can pump out react components that work well and look good quickly and efficiently, I shouldn't have a problem eventually finding a job.&lt;/p&gt;

&lt;p&gt;Considering that making and adding to components are things that I like doing and want to do anyways, I figured I would take his advice. My normal approach was more algorithm / learning new things, but honing even more things that I think I already know decently well doesnt seem like a bad idea. I play a lot of video games and one that I play is called league of legends. A lot of pros recommend people to get really good at one or two champions rather than having a wide champion pool when learning the game and I think having that focus at a higher level rather than being a jack of all trades is certainly not a bad idea. &lt;/p&gt;

&lt;p&gt;Anyways, the component I was making was a calculator and it came out pretty good, I think. I didnt make it super fancy with CSS, but I might later for the practice. At the same time I dont really see the point of a super snazzy calculator so I am not sure what else I would do to &lt;em&gt;bedazzle&lt;/em&gt; it.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4tdIwo9G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3knzc5d7bxv73vxvdtkv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4tdIwo9G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3knzc5d7bxv73vxvdtkv.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Trust me it works =). When I was making it, I wasnt sure how to approach the functions to solve the problems/expressions. To be honest I have been thinking about it the last couple days just a bit, thinking that I should maybe do it again with different functionality. At first obviously I thought I would have to make a function for multiply, divide, etc to eventually pull out results. That would be pretty easy if we knew we were going to do just 2 + 3 or whatever, but I wanted to have the option to put down a larger expression. Nothing ridiculous, but something like 2 + 3 + (6 * 5) / 3. &lt;/p&gt;

&lt;p&gt;Now this isnt that crazy either really, but I wasnt (am still not quite, but Ill probably try some stuff later) about how to go about separating the numbers, using correct order of operations etc. So I looked some stuff up and found out about the eval() javascript method. It is an interesting method, basically it takes in a string and will evaluate it. It doesnt necessarily have to be numbers, but it works quite well with numbers, but there is a downside. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4tdIwo9G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3knzc5d7bxv73vxvdtkv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4tdIwo9G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3knzc5d7bxv73vxvdtkv.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pretty cool huh? And super useful for the calculator that I was building right? Well, react gave me a bit of a warning, saying that I shouldnt use eval. So I did some research and this is what I found out. The string that is passed to eval is controlled by the user. A user with the knowledge could possibly try to run code on the app that could be malicious. This could cause many problems as I am sure you could imagine.  Eval is also slow because it has to use the JS interpreter to convert the string. When I learned this I was pretty bummed out because it seems pretty useful. On MDN though, they recommend an alternative: window.Function. While I do want to make a calculator version more like what I explained above, I think I will soon try to figure out how to use window.Function in the same way that I used eval to make my calculator more safe. &lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Work methods</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sat, 14 Nov 2020 23:08:10 +0000</pubDate>
      <link>https://dev.to/coronaisme/work-methods-1p47</link>
      <guid>https://dev.to/coronaisme/work-methods-1p47</guid>
      <description>&lt;p&gt;Today I am going to talk about systems of work methodologies within software engineering. I think that it is important to go about work, whatever type it might be, with a plan. Whether its sports or construction the most effective work areas have a good plan behind them.&lt;/p&gt;

&lt;p&gt;In our coding too we will have plans. When you think about it coding, is like setting up a work site. You need to first think about what you are doing, what your goals are and how you are going to get to those goals. You will separate concerns and make things happen piece by piece. Whether you are building a full application or just trying to solve an algorithm, a plan is an important part of getting success.&lt;/p&gt;

&lt;p&gt;So it makes sense then, that while we are working in software development, there would be general plans and makeups of how we go about our work. The plans can be constructed to work towards specific goals or they can be more general. Today I will talk about a couple different methodologies that I have recently and not so recently learned about. &lt;/p&gt;

&lt;p&gt;In my limited experience the most common method is AGILE. The key point to agile methodology, as far as I understand it, is the breaking up of pieces of a project to eventually put back together to make a result. One of the good parts of this style is that you are quite efficient. Because you are working on bits of things at a time, you lower your risk to the whole. Also because of this you can see things that might be better or worse for your project earlier. Agile work methods often involve lots of communication, not just between the devs, but with the users as well. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uAzuIGdO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jhk269ucsk2ev78h7po1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uAzuIGdO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jhk269ucsk2ev78h7po1.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A form of agile methodology that I have heard a lot of people talk about as well is called scrum. Within scrum, there is a lot of time boxing and regularity. You use the system more than the system uses you. There will generally be sprints and meetings. During meetings, you will talk about things like that you are planning to do, what you are stuck on and what you have accomplished. During the sprints, you code and do work. &lt;/p&gt;

&lt;p&gt;Personally I have worked with scrum, and I found it to be pretty fun and cooperative. In the morning we would meet up and talk about what we might be stuck on and what we were planning to do in the day. At first this was a bit annoying, because I would just want to get to what I needed to do, but I found later that it helped me gather my thoughts a bit to talk about it. Also it was nice to know where everyone else was at and what they were working on / struggling with. It made it very open to ask for or give help. Then we would work in sprints and keep having breaks and meetings. I think it worked well, because you wouldnt get too lost in a problem and you are constantly refreshing your mind. &lt;/p&gt;

&lt;p&gt;There is another fairly common type of agile methodology. It is called feature driven development. Working in a feature driven development team would focus very much on the function of whatever we are building ( or the feature =) ). The consideration of the model of the project is very important and the speed of development is encouraged. The process will generally go with a domain object model, then the though of features will be addressed. Then the team would plan and finally code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1PlOFFZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dnpn6dl9mqdiovjd2su5.GIF" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1PlOFFZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dnpn6dl9mqdiovjd2su5.GIF" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Vanilla JS</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sun, 08 Nov 2020 00:40:34 +0000</pubDate>
      <link>https://dev.to/coronaisme/vanilla-js-1gk9</link>
      <guid>https://dev.to/coronaisme/vanilla-js-1gk9</guid>
      <description>&lt;p&gt;Today I am going to talk about vanilla javascript. Vanilla javascript is sort of a funny term to me. As a PC gamer, when I think of vanilla something I think of vanilla wow, which was the original version of the game world of warcraft. I think with vanilla javascript though, the term is more about javascript as it is, without any additional frameworks or libraries. I hear sometimes from experienced developers that it is quite important to be very strong with vanilla javascript. In all honesty I dont know why, but I can imagine certain reasons. &lt;/p&gt;

&lt;p&gt;Generally when people make web applications they will inevitably use a framework like react or vue. Frameworks like these can make things quite simple and easy to read. React being so declarative and component driven can make things very easy to establish what x component is doing or why y is doing something in x component. Using vanilla javascript we can still do a lot of things that we might consider using react for. &lt;/p&gt;

&lt;p&gt;So how do we even start a vanilla js app? There is no handy create-react-app for us to get started. For the most part we have to create everything from scratch. I guess to be fair there are things that we can use to at least set up an index.html page, but it is pretty easy to look up what you need to set up that. Once we get that index.html set up we need to remember to add the src file to our actual javascript code. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pi7ELRpi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/66r8gbrentgij1su41nx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pi7ELRpi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/66r8gbrentgij1su41nx.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point we can start writing javascript code to manipulate the DOM. For those that need a reminder the DOM is the Document Object Model. It is essentially the document we see with HTML or XML and can be modified with scripting languages such as javascript. Generally what we are going to do with our javascript is make functions or other such additions that will modify the HTML for our document. In order to do this we need to be able to reference tags of our html document. &lt;/p&gt;

&lt;p&gt;We might use a command such as document.getElementById("myElement"). This will give us access to the myElement &lt;/p&gt; or &lt;p&gt; or whatever. Then once we have it we can modify it. For example, we might want to grab a div from the code above. If you saw the code, it is a farm, old mcdolands farm. So it would make sense that in the barnyard div we might want some pens with animals in them. Once we have the element, we can make a function to create a pen. &lt;/p&gt;

&lt;p&gt;We can make a function that might take in an array of animals for example, and then with that array we will create separate pens for each animal. So when we use document.getElementById we might set that to a variable like, "barn" or whatever you want. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SOogD2IK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3a4er46ekishl7kpwwsy.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SOogD2IK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3a4er46ekishl7kpwwsy.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we can say barn.innerHTML += our pen making function. This will alter the html to have what our function provided. Next we will want an event listener on when our document loads. So we will use window.addEventListener. What we listen to can be a whole bunch of things but for this we will use "DOMContentLoaded". Once the page is loaded the changes will be rendered with the HTML. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K8nT0ac8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ymuknk5sajx4buqt2x5j.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K8nT0ac8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ymuknk5sajx4buqt2x5j.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We also might want a form to create more animals. First we would want to create a renderForm function which would essentially be HTML code that will provide the form for which we will add animals or whatever. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iosN1kcH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f7hpvj98yq1zyz83f2u7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iosN1kcH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f7hpvj98yq1zyz83f2u7.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then as we see in the previous picture, we can add an event listener for a submit and this will help us create more animals and pens. Eventually we build up a whole page that can create animals from the form with pens around them. Vanilla javascript is pretty simple and its awesome. But in my experience it can make for a lot of code in one spot unless we want to source a whole bunch of files in our index.html. Thanks for reading. &lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Webpack and Babel</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sat, 31 Oct 2020 19:41:09 +0000</pubDate>
      <link>https://dev.to/coronaisme/webpack-and-babel-5bkf</link>
      <guid>https://dev.to/coronaisme/webpack-and-babel-5bkf</guid>
      <description>&lt;p&gt;Toady I am going to talk about webpack and babel. They are things that as Javascript programmers we use every day and maybe dont pay too much attention to. But they are very important for what we are doing with coding. Webpack and Babel are essential for modern programming. Sometimes with javascript when we are writing out some app or webpage would have in our index.html a whole bunch of scripts at the beginning of the code. We want to source files that are our own or external helpers for our code to run. This can be not only annoying and time consuming, but inefficient for our code. A lot of these sources would need to be loaded separately which would decrease performance. &lt;/p&gt;

&lt;p&gt;Webpack is a bundler. As the name suggests we bundle all our sources together into one file and we no longer need all these script tags. Now we dont need to worry about multiple issues coming up and from where with all our script tags, it will all be gathered from one source. Also webpack will compress the files and make the code easier and cheaper to manage. &lt;/p&gt;

&lt;p&gt;So we generally dont pay too much attention to webpack because things like create-react-app will have it all pre done for us and our package.json is ready to go with the basic package. However, without this it is not too hard to get a webpack up and running. First you need node, and once you have node you can use the node package manager to install webpack. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zueHuqFn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w8y9z1kbcuouxslgbg6a.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zueHuqFn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w8y9z1kbcuouxslgbg6a.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then you would want to run webpack and attach it, most likely, to your root file. Then when you run your program webpack will run with it and bundle what you need. &lt;/p&gt;

&lt;p&gt;Now when you want to use webpack or add things to your webpack it is quite simple. Using webpack can be done in a variety of different ways. We use it all the time without even thinking about it (or at least I do). Any time you might be trying to use an image&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XYPSlV0O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/13xhtkpwqczqk2bgkph7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XYPSlV0O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/13xhtkpwqczqk2bgkph7.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...and you use require, you are using webpack. You might remember using this require() function with many things, such as modules, or as I showed in the image, images. If you are coding in node, I am sure you are familiar with requiring axios. For me it is similar to using import with react files.&lt;/p&gt;

&lt;p&gt;Now another one that comes up often when talking about webpack is something that is actually a part of webpack. Babel. Babel happens to be important enough of a part of webpack that it often gets its own mention. It is very important. Babel is a compiler for Javascript. One of the things that it will do is make your fancy javscript code work like older javascript code if it has to. All that cool ES6 syntax doesnt always work with old environments and browsers, but we luckily decided as coders to find a way to automize this instead of having to watch out for this always ourselves. Babel will convert ES6 code to older versions automatically for us. &lt;/p&gt;

&lt;p&gt;Not only that, but while using react, we (ok maybe just me) take JSX for granted. We (I) just know that it works and we run with it. But really its thanks to Babel. Babel understands how JSX can be converted and will make it converted to javascript in the browser. Essentially babel will translate all our code to make it functional with whatever environment we might want to use. Thanks for reading. &lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Recursion</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sun, 25 Oct 2020 00:04:29 +0000</pubDate>
      <link>https://dev.to/coronaisme/recursion-5eal</link>
      <guid>https://dev.to/coronaisme/recursion-5eal</guid>
      <description>&lt;p&gt;Today I am going to talk about something that I have found comes up with programming all the time, and to this day, even though I can implement it (sometimes). I often find it incredibly difficult to map out in my head and wrap my head around. Recursion. Now I have asked a lot of people why they use recursion and I have never gotten a good answer. It almost as if it is a fancy way of getting a function to work. To talk about recursion we have to understand it on an extremely basic form and then I will attempt to explain it using examples and comparing it to iteration. &lt;/p&gt;

&lt;p&gt;Just in case the reader is not aware, iteration is the way that we often solve many problems with programming. Many problems will be based around a list of things or a data set. We might be finding something, replacing something, removing something, adding something, you get the idea. But the point is that there will often be many things that we have to look through or examine in order to get our expected result. Using iteration we wait for it...&lt;em&gt;iterate&lt;/em&gt; through a list or a set and when we get to whatever we need we do whatever we need to do. &lt;/p&gt;

&lt;p&gt;There are problems with iteration though. Regular iteration requires us to know our boundaries, the beginning and the end of a list/set. This is where recursion &lt;em&gt;can&lt;/em&gt; come into play. And this is where I get annoyed sometimes with the answers that I get from people for their reasoning behind using recursive algorithms. When I first learned programming I learned how to iterate through lists or sets first by using a for loop. Then we get to this problem that I just mentioned and the way we get around not knowing our boundaries is by using a while loop. &lt;/p&gt;

&lt;p&gt;A while loop will continue running until you either break your machine or you hit what your while loop constraint is. So boom boundary problem solved. But then you learn farther down the programming road about recursion. In simple terms a recursive function is one that calls on itself. So what does that mean? How does that even work? Well, let me do my best to explain. Lets imagine we have a simple function where we want to add all the digits of a big number. So we have something like 54321 and we want to add 5 + 4 + 3 + 2 + 1. &lt;/p&gt;

&lt;p&gt;This seems pretty simple right but what if the number was like 124897589379483759843257918471983714. Well you get the idea. The point is there is a way to do this with recursion that is super simple. First what we need is a &lt;em&gt;base case&lt;/em&gt;. This is a case where our recursion will end. Then we need our &lt;em&gt;recursive case&lt;/em&gt;. This is where we will need to call our function on itself again. Now observe this function :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EX5SbwJE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9fnlws5nasvz29hkzoma.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EX5SbwJE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9fnlws5nasvz29hkzoma.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What this function does, is that it will first check the base case. Is our number 0? No, so we hit the recursive case. Our number % 10 will give us the last digit on the number. Then we add it to our recursive call on our own function which now has our number divided by 10 which will remove that last digit. This will keep calling itself until it is out of numbers in our x. &lt;/p&gt;

&lt;p&gt;If that didnt make sense this is another example. In this case we want to raise our x to the power of n. We could do this iteratively by making a loop from 1 to n and multiplying our x by itself until the loop runs through, or we can make a recursive function. This function would work very similarly to our plus function except it would do the multiplication. It checks whether or not our number is 1, which will end the recursion, and if its not it will call upon itself and reduce our n by 1 until we are finally at 1 and we are finished. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XfuWldw4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t6h53tb5kzuwsc3gohe7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XfuWldw4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t6h53tb5kzuwsc3gohe7.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While these examples of recursion seem pretty basic, I have always found it pretty hard to think of problems in a recursive manner. To this day, I havent heard a solid answer on why one might use recursion. In fact, many places I see online say that many languages would prefer to not use recursion. If you find out(or just already know) a clear reason why, let me know!&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>ES6 continued(for..of loops, spread, rest and object deconstructing)</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sat, 17 Oct 2020 19:43:34 +0000</pubDate>
      <link>https://dev.to/coronaisme/es6-continued-for-of-loops-spread-rest-and-object-deconstructing-fb6</link>
      <guid>https://dev.to/coronaisme/es6-continued-for-of-loops-spread-rest-and-object-deconstructing-fb6</guid>
      <description>&lt;p&gt;Today I will be writing more about some handy ES6 features. To reiterate a bit from my last blog ES6 stands for ECMAScript 6. ECMAScript is basically another name for Javascript and javascript does update the language and features of the language roughly every year. Sometimes, like with ES6 the update can be rather robust. Today I will be focusing on some big changes that I did not talk about last week, namely: spread and rest operators, object deconstructing, for...of loops and maybe some others. &lt;/p&gt;

&lt;p&gt;The for...of loop is a nice iterator that ES6 has given us. It will iterate over each element and apply the logic inside the loop to each element. It is important to remember that this style of loop will not work with objects, for objects we should use a for-in loop. The for...of loop has many neat applications. So for example we might have an array of numbers and we want to put all the odd numbers in a different array. Obviously for this we can use a regular for loop but the for...of loop is not only a bit quicker, but we also dont have to worry about the length of the array. If the array is of an unknown size, but we do know it is an array, we can use a for..of loop. There could be an argument here to use a while loop with an unknown length array but I try not to as much because of infinite loop errors. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KXwOCpy3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m2ctnsdygpvbnoqhmi26.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KXwOCpy3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m2ctnsdygpvbnoqhmi26.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next I will talk about the rest and spread operators. These can be a bit tricky sometimes. Mainly because they use the same icon, the ellipsis(...). The rest operator can be used when we want to pass an unknown amount of parameters. For example we are going to have a function call that will take in an arbitrary amount of numbers, right in the call. We can do something similar to the above for...of example except that instead of passing an array we are passing the arbitrary amount of numbers, we dont know how many. The rest operator will take care of that and basically combine all the parameters. Keep in mind, however, that this is how we use the rest operator if it is the only parameter. If there are other parameters, the rest operator will take everything after the final parameter before the rest operator. Also there can only be one rest operator used as a parameter. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fMzCNSe0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/435mix95pajscim0y3wf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fMzCNSe0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/435mix95pajscim0y3wf.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And with multiple parameters I made the example just a touch different to show what I meant with multiple parameters :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FfJoyLXw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hmq78gxaw4589uaukfty.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FfJoyLXw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hmq78gxaw4589uaukfty.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next we have the spread operator. I honestly love the spread operator. I feel like I overuse it, but I don't know, it just seems so handy. The spread operator will basically do the opposite of the rest operator. It will &lt;em&gt;spread out&lt;/em&gt; an array rather than combine it. The cool part of the spread operator is that it makes what is like a copy of an array. This is super useful in my opinion. Because we oftentimes want to not mutate our original data set we can use the spread operator to do operations to sets of data without worrying about the original array. Using the spread operator also can help with concating, pushing, and other things like that.&lt;/p&gt;

&lt;p&gt;One that I use myself very often is a quick way to make your own unique function. I have often brought up the question of why javascript does not have a built in unique method. Ruby, another language that I have learned, does. Using the spread operator and a Set (which was described in a different blog) we can make a very quick and easy unique function that we can use on data sets easily. Concating names or items in lists can also be used often with the spread operator. We will oftentimes use the spread operator in react for immutability and the spread operator is seen often when setting state.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9WQq8tCX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4dxkfe1zxjnautj74dav.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9WQq8tCX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4dxkfe1zxjnautj74dav.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another cool part of ES6 was object destructing. It is basically an easy way to pull from arrays or objects. This is also something that I have used a lot, especially with react. Using object destructing on props has become a frequent part of my react coding. Essentially what well do is assign one or more variables to an object or an array. That array or object will then be destructed and we will have access to them via the variable(s). I used this with props often when for example you might have passed props of, for example, an animal to another component. Instead of writing props.name, props.species over and over, we can just destruct the props at the top with the attributes from them that we want and then use them without having to write props.whatever a million times. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CISuzxh6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a9qqyfyjnc0d8asvovh0.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CISuzxh6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a9qqyfyjnc0d8asvovh0.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>ES6 features</title>
      <dc:creator>Nick Corona</dc:creator>
      <pubDate>Sat, 10 Oct 2020 21:05:42 +0000</pubDate>
      <link>https://dev.to/coronaisme/es6-features-4669</link>
      <guid>https://dev.to/coronaisme/es6-features-4669</guid>
      <description>&lt;p&gt;Recently I have been trying to brush up on my knowledge of es6 features, especially compared to es2015 and before. The reason for this is that it has come to my attention more so than in the past that I should have a good understanding of not just how to write code with the most up to date patterns but also how to change "legacy" code to newer patterns. Also why one would want to do this etc. For those who don't know, 'legacy' code is code that is written with older patterns and modicums. ES6 and ES2015  are short for ECMAScript (6 or 2015) and ECMA stands for European Computer Manufacturers Association. Essentially it is the fancy name for the standard for Javascript. &lt;/p&gt;

&lt;p&gt;Something that might not be that obvious if you are just coding around yourself and self teaching is that languages themselves are updated. We don't necessarily think about this I think on an intuitive level because we think of coding languages as languages, which overall don't really "update". Either way, they do, and now every year Javascript comes out with some updates or features. The reason why we see ES2015 and ES6 so much is that there happened to be a lot of big changes in the update from ES2015 to ES6. We see a lot of these changes in code and sort of take them for granted, but we have to understand that a lot of Javascript code out there is written pre ES6 and it might be a big enough code base that it is not worth changing or would be too hard to change. &lt;/p&gt;

&lt;p&gt;During the interviews that I have had, I have definitely gotten the questions frequently of the difference between var, let and const. This is one of the changes ES6 gave us. Previous to ES6 we used var to declare variables. Variables declared with var are function scoped and will be hoisted. Basically what that means is that within a function if a variable is declared by var when we try to access var anywhere in our code the scope will be hoisted to the top and we will have access to that var. The variable let is block scoped which means it creates a scope within its { } and they will not be hoisted, so essentially they wont be global as long as you declared them within a block. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qsAChumt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/04m3srjzxunjkheyhiv1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qsAChumt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/04m3srjzxunjkheyhiv1.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then const is a variable that is read only and also block scoped. I have been told to use const as much as possible because if you try to re assign a const you will hit an error and this will make it easier to not reassign the variables by accident. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xs4092gb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0uof01b3lqkyxk7l1oyq.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xs4092gb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0uof01b3lqkyxk7l1oyq.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Besides these variable types I think the thing I use the most with ES6 are arrow functions. Sometimes I think I use them when I dont have to, but they just look cooler. The arrow functions do of course have practical uses as well. One thing that they can do that is pretty cool is that they can implicitly return if there is only one parameter. What I mean by this is you can write a one line function without {} or a return and the function can return your output. The other practical usage of an arrow function is how it handles the 'this' keyword. With an arrow function the this keyword is not provided. The this keyword is taken from the outer function of which it is defined. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2ADJQytR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yjk93ceo42f571c7598y.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2ADJQytR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/yjk93ceo42f571c7598y.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another cool addition with ES6 was template literals. Template literals for me are extremely handy, especially when I am using react. Template literals are basically a way to concat without having to use +'s or .concat(). You can build up a string using back ticks (&lt;code&gt;&lt;/code&gt;) and within that if you want to put variables or something in there you just use ${put something here} and continue on with your string. &lt;/p&gt;

&lt;p&gt;There are a lot of other cool features with ES6 that I will talk about later in another blog. For...of loops, the rest and spread operator, and object destructuring. These are big tools that I use often and these amongst many other features are why ES6 is such a big deal. These changes make our lives as developers a lot easier, but with many code bases we wont be dealing with this so it is important to know the difference and how to use older code like ES2015. &lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
  </channel>
</rss>
