<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dario Arteaga on Medium]]></title>
        <description><![CDATA[Stories by Dario Arteaga on Medium]]></description>
        <link>https://medium.com/@daartv?source=rss-2f4934e2361d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fw1poIIY-_ca33BZhDiODw.jpeg</url>
            <title>Stories by Dario Arteaga on Medium</title>
            <link>https://medium.com/@daartv?source=rss-2f4934e2361d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 20:59:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@daartv/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Javascript Function Parameters: Positional vs Named.]]></title>
            <link>https://medium.com/@daartv/javascript-function-parameters-positional-vs-named-f7089dc02dbd?source=rss-2f4934e2361d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7089dc02dbd</guid>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <dc:creator><![CDATA[Dario Arteaga]]></dc:creator>
            <pubDate>Tue, 10 Mar 2020 15:00:32 GMT</pubDate>
            <atom:updated>2020-03-11T09:08:29.539Z</atom:updated>
            <content:encoded><![CDATA[<p>This is about to be my first actually “educational” post so bare with me, it’s bound to suck, but I’m trying to give (a teeny tiny bit) back to the community so any constructive feedback is very much appreciated.</p><p>Let’s imagine we’re building a website/app/just an algorithm for displaying a price on a shopping kart, if you’re trying to modularize your code, you probably have a utility function for this that might look like:</p><pre>const totalPrice = 5;<br>const tax = 3;</pre><pre>const getPriceWithoutTax = (totalPrice, tax) =&gt; totalPrice - tax;</pre><pre>getPriceWithoutTax(totalPrice, tax) //Outputs: 2<br>getPriceWithoutTax(tax, totalPrice) //Outputs: -2 reversed order!</pre><p>This is a function that takes in <strong>Positional Parameters,</strong> so that means that our price parameter will always be the first parameter you pass into the function when invoking it and the tax parameter will always be the second.</p><p>This is all fine and dandy, in fact, this is the way probably all of us learned how to define functions and parameters, and there’s nothing wrong with it, although you could make an argument that this function does not adhere to <strong>functional programming, </strong>after all, I’m passing the same parameters but not getting the same output, the order of the parameters in itself has become a third implicit parameter.</p><p>What if there was a way to just add those parameters in any order and the function knows which one is which, so that you don’t have to remember the order of them? This is especially useful when you have more than a few of them being passed and also will nudge you to be more consistent with your variable naming.</p><p>Let me present: <strong>Named Parameters</strong></p><pre>const totalPrice = 5;<br>const tax = 3;</pre><pre>const getPriceWithoutTax = ({ totalPrice, tax }) =&gt; totalPrice-tax;</pre><pre>getPriceWithoutTax({ totalPrice, tax }) //Outputs: 2<br>getPriceWithoutTax({ tax, totalPrice }) //Outputs: 2 </pre><p><strong>A Whole New World from Aladdin OST starts playing</strong></p><p>This way, I can forget about the order, we’re leveraging object shorthands and object destructuring to basically just pass one object into the function with property names that match the ones that are being destructured in the function definition.</p><h3>But what if the variable I want to pass into the function is already named different than in my function definition, you ask?</h3><p>Let’s consider a submit function and <em>let me show you the world</em> 🎵</p><pre>const valid = true;<br>const password = &#39;password&#39;</pre><pre>const submit = ({ isValid, password}) =&gt; {<br> if (isValid) {<br>   sendThisToSomeAPISomewhereSomehow(password)<br> }<br> errorOut(&#39;this password is not valid&#39;)<br>}</pre><pre>submit({isValid: valid, password}) // Will submit successfully<br>submit({ password, isValid: valid}) // Still submits successfully</pre><p>You can just make your differently-named variable, the value of that key, this is something you might encounter if you’re starting to implement this pattern and you’re working on a codebase that hasn’t been doing this, also notice how password can just be a shorthand because that parameter does match exactly</p><p>But like I said, a lot of the value of this pattern is nudging you to always name a variable you might be using in several places the same way in order to mantain some kind of rails for your train of thought, something like this was actually what inspired me to write this article; I’m so used to it that I was very confused when I saw a function call take in the parameter (isValid) and when checking the function definition on another file, the parameter was defined as valid</p><h3>Additional Notes:</h3><p>You can also make hybrids of this two patterns, I like to stick to all Named Parameters and only have one positional parameter as the last one in case I have a callback or if the function only takes in one parameter. Something like this:</p><pre>const doThingsAndThen = ({ thing1, thing2 }, cb) =&gt; {<br>  sendThings(thing1 + thing2) // There&#39;s only one parameter<br>  cb()<br>}</pre><p>But if you want, make an argument about why some of these are better, this is one I stumbled upon a while back.</p><pre>// Positional parameters are REQUIRED parameters and named ones are // OPTIONAL ones</pre><pre>const parseText = (text, validationType, {hasMask}, callback) =&gt; {<br> // Validate depending on if it&#39;s an email, or a credit card number<br> // and don&#39;t apply a mask unless that&#39;s true<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7089dc02dbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack Reactor-Week 5]]></title>
            <link>https://medium.com/@daartv/hack-reactor-week-5-2fd7688868df?source=rss-2f4934e2361d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2fd7688868df</guid>
            <category><![CDATA[hack-reactor]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Dario Arteaga]]></dc:creator>
            <pubDate>Tue, 11 Apr 2017 06:29:54 GMT</pubDate>
            <atom:updated>2017-04-11T06:29:54.770Z</atom:updated>
            <content:encoded><![CDATA[<p>Week 5: This week everyone is drained, it’s normal to feel tired because no one can keep this pace for that long without actually feeling drained.<br><strong>Authentication<br>Deployment</strong></p><p>The good thing is that it’s almost over, you only have Authentication and Deployment to go before you into MVP and build your own app from scratch, no matter how bad or good it is, it’s your app and you will learn from guiding yourself through problems and bugs.<br><strong>Tip: </strong>Set a big scope for your MVP, you don’t want to be finished too early and not know what else to do, this Full Stack exercises are invaluable</p><p>This is a short post because -spoilers- I passed the tech assessment and now I’m deep into the thesis, so my time is limited.</p><p>As a final tip, I’ll just say that being approachable is the best thing you can do, try to be nice to everyone, no one makes it alone in Hack Reactor, you’ll need people and they will need you, your cohort will be your family at the end of it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2fd7688868df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack Reactor-Week 4 AKA Hell Week]]></title>
            <link>https://medium.com/@daartv/hack-reactor-week-4-aka-hell-week-f6eb863e0bf8?source=rss-2f4934e2361d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6eb863e0bf8</guid>
            <category><![CDATA[hack-reactor]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Dario Arteaga]]></dc:creator>
            <pubDate>Tue, 11 Apr 2017 06:25:45 GMT</pubDate>
            <atom:updated>2017-04-11T06:25:45.531Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Week 4:</strong> This week is when if you’re not keeping up, you might fall behind pretty quickly. This is Server Week.<br><strong>NodeJS<br>Asynchronous nature of dealing with request through network<br>ExpressJS<br>Databases</strong></p><p>That Node sprint started pretty well, I had a partner that didn’t attend on the first day so I had to guide myself with the tests, luckily; on the second day of the sprint my partner came with a lot of work done and it covered all the work I had done and some more with a lot of improvements, I really think that if it wasn’t for this particular sprint with <strong>her as a partner I wouldn’t have made it.</strong><br>Then came the worst sprint for me in entire 6 weeks.<br>Web Historian. I think that another thing about how hard this week was for me was that I got sick, I had been attending Hack Reactor everyday, even Sundays, and staying pretty late for a few weeks now, so I guess my body decided to tell me that I needed to relax, because I was also stressing about falling behind and I didn’t know how to help myself, you really want to make sure that you get help on this week, don’t be afraid if telling your Tech Mentor or an HiR or whoever is helping you at the moment that you don’t understand what you’re doing, how to do it or even why do you want to do it. This is the week where people really fall out and get themselves on a road to fail the assessment, I was one of them.<br>The database sprint was pretty good and it’s actually ok not to finish it because it’s so long, the important thing is that you learn how to query a database and make sure that you know how to build a schema both in your mind and on the actual DB.<br><strong>Tip:</strong> If you need help at this point, get it, ask for it, make sure that your tech mentor and your counselor know it, they are there to help you with that; also, if you need to take a break because of health reasons, take it, in the long run, if you’re feeling miserable while working it will prevent you from learning and make you really frustrated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6eb863e0bf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack Reactor-Framework Week]]></title>
            <link>https://medium.com/@daartv/hack-reactor-framework-week-ea9f2f6d6959?source=rss-2f4934e2361d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea9f2f6d6959</guid>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[hack-reactor]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Dario Arteaga]]></dc:creator>
            <pubDate>Tue, 11 Apr 2017 06:23:36 GMT</pubDate>
            <atom:updated>2017-04-11T06:23:36.457Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Week 3:</strong> This is Framework Week and those will be your topics.<br><strong>Backbone and the MVC concept<br>React<br>AngularJS</strong></p><p>For me, Backbone was pretty weird, I was being guided by the test instead of actually understanding what I was doing, luckily my partner had a really good grasp on what she was doing and she was kind enough to explain things to me. Then came React and I also had a pretty good pair and that’s why right now I really love React, he actually explained I was in a good place, we finished our sprint early and I felt pretty satisified by what I learned from that.<br>Angular was a horrible thing though, I didn’t understand it well, I still want to take some time to understand it but I’ll do that with an Udemy class way ahead, I barely finished that sprint and me and my partner got pretty frustrated.<br><strong>Tip: </strong>Make sure you’re really understanding Backbone, it will help you a lot to really understand what the problem is that React and Angular solve and how they do it, even if you’re not confident with one framework at least one of them should feel good, and don’t worry if one or two of them are not your area of expertise, you’re not supposed to master a Framework in just 2 days, you’re supposed to get familiar with it and know as much as you can, but that will be just a little part.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea9f2f6d6959" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack Reactor-Week 2]]></title>
            <link>https://medium.com/@daartv/hack-reactor-week-2-9d3ed4ef693f?source=rss-2f4934e2361d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d3ed4ef693f</guid>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[hack-reactor]]></category>
            <dc:creator><![CDATA[Dario Arteaga]]></dc:creator>
            <pubDate>Tue, 11 Apr 2017 06:22:13 GMT</pubDate>
            <atom:updated>2017-04-11T06:22:13.622Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Week 2: </strong>So in this week you get 3 sprints which main topics are:<br><strong>JQuery and Inheritance Patterns<br>Algorithms<br>Ajax requests and some more JQuery.</strong></p><p>It was mostly good, I struggled with all of them, actually finishing the JQuery one with help on Sunday, the Algorithm one(N-Queens) with the solution video and the AJAX request ones I was not particularly proud of, but it worked.<br>It went down like this, we did a little app to make dancers on a screen, with different behaviors and make them line up.<br>Then came N-Queens which made us deal with recursion, decision trees and some logic-intense thinking.<br>Next was a client that would do AJAX requests to a server, it was cool because you could make your chatroom with your cohort and you also have to make sure that you escape Cross Script Attacks, which basically means escape people using any kind of text input on your client to make some piece of Javascript run<br><strong>Tip:</strong> If you’re starting to struggle, stay a bit later, not that late, and come in on Sunday and review/finish your work, but just for a few hours, like I said, you want to ease into it, that’s how I made sure that my anxiety attacks were manageable and short.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d3ed4ef693f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hack Reactor-First impressions]]></title>
            <link>https://medium.com/@daartv/hack-reactor-first-impressions-b0d00690a30f?source=rss-2f4934e2361d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0d00690a30f</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[hack-reactor]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <dc:creator><![CDATA[Dario Arteaga]]></dc:creator>
            <pubDate>Tue, 11 Apr 2017 06:20:47 GMT</pubDate>
            <atom:updated>2017-04-25T04:45:28.164Z</atom:updated>
            <content:encoded><![CDATA[<p>So if you haven’t read my previous post about me, you should, but I you really want the TL;DR version, I’m from Venezuela, 25 years old, suffer from crippling anxiety attacks that I can’t really control and decided to attend Hack Reactor, which requires me to push my limits on a intensive course for 6 days a week, 11 hours a day.</p><p>So I’m gonna throw something out there, I took the interview for Hack Reactor three times, got rejected twice and then got accepted on the third and last attempt.</p><p>I got the precourse done, struggled with it, and then I move all the way to San Francisco from Venezuela. It was pretty intimidating.</p><p><strong>Day 0:</strong> Just before starting the course, we got emails from our cohort counselor, every cohort has one and the one that we got assigned happens to be one of the most approachable guys I’ve met, so I decide that I wrote an email to him and let him know that I’m prone to anxiety attacks and that I’m feeling nervous about my future and overall performance in Hack Reactor, he reassured me and told me that he would keep an eye on me to make sure things are going well for me, which was great.</p><p><strong>Day 1: </strong>This is so scary, even though it was just a review from the precourse, I was so nervous that I started to scratch a little mosquito bite I had on my chin until it started bleeding. But I made it through, at the end of the day I was so tired that I barely did anything other than fall asleep at the end of the day.</p><p><strong>Week 1: </strong>So the week finished pretty well, I finished all my sprints, managed to get my self-assessment fixed because a little problem had me not pass the tests assigned to it, and I was feeling better, the first Sunday after starting the program feels taking a breath after being underwater for way too long, One thing I’m thankful of is that people from my cohort were also pretty nice to me so it wasn’t awkward for long. We did a sprint(two-day long assignations) for <strong>review</strong>, and then we started on a four-day sprint about <strong>data structures </strong>that were challenging but felt manageable.</p><p><strong>Tip: </strong>Go home at 8, this is gonna be 12 weeks long and you need to ease into the routine of being all the time at HR, if you overexert yourself from the beginning it will impact your performance, I promise, also, if you suffer from anxiety, or even if you don’t, but you feel like you are scared, talk to your counselor, let them know how you feel from the beginning and they will make sure you get the feedback you need to set yourself for success.</p><p><strong>Hacking Tip: </strong>Practice recursion and data structures, they are not always part of your day to day but they will help you in situations and having a good grasp on them is the best way to make sure you are being as efficient as possible, Trees and Hash Tables are the ones that will really help you on real world situations in my experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0d00690a30f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[var me = {name: ‘Dario’, anxiety: ‘true’};]]></title>
            <link>https://medium.com/@daartv/var-me-name-dario-anxiety-true-c5b6d1d4d7aa?source=rss-2f4934e2361d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5b6d1d4d7aa</guid>
            <category><![CDATA[hack-reactor]]></category>
            <category><![CDATA[anxiety]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Dario Arteaga]]></dc:creator>
            <pubDate>Tue, 28 Mar 2017 04:38:14 GMT</pubDate>
            <atom:updated>2017-03-28T04:38:14.942Z</atom:updated>
            <content:encoded><![CDATA[<p>A little context about me:</p><p>I’m 25 years old, I’m from a country in South America called Venezuela and a few years ago I heard about this new concept that was becoming popular in San Francisco known as “Coding Bootcamps”, by that moment in time I was studying Electronic Engineering in Computer Sciences which was mostly just an Electronic Engineering degree with some programming lessons attached to it which was the thing that got me interested in coding.</p><p><strong>And I also suffer from anxiety.</strong></p><p>I know what you might think at this point: <strong><em>”Well, don’t we all?”</em></strong><br>And you would be right, anxiety is a feeling that we’ve all experienced, a few days before a big test, before a job interview, when you might get some bad news but you’re hoping you won’t, it’s a feeling that we’ve all had at certain <strong>situations.</strong></p><p>And that’s the main difference between regular people and people like me that experience what’s called an anxiety attack: <strong><em>The situation might or might not be a stressful one when I get anxious.</em></strong></p><p>Does that mean that I’m walking around all the time with anxiety? Yes and no, the thing is that something can trigger an anxiety attack for me without me realizing what was the specific thing that pulled that trigger, it might have been something as silly as someone mentioning something that vaguely relates to a thing that makes me anxious in a conscious level, but even if I didn’t make the association consciously, I still get anxiety and in some cases I don’t even realize what triggered it and this attacks are like amped up versions of what a normal person feels, it can be literally paralyzing to get one of this attacks, you might even feel the need to get out of whatever place you’re in at the moment, in some cases you even pick small bad habits of self harm (Biting your nails too short, biting your lips) and without some sort of treatment/therapy it can become a pretty hindering condition.</p><p>So that’s me, now that you have this information about me, you might be thinking:”Wait, if you’re this prone to having crippling rushes of anxiety, why would you put yourself in a situation in which you would be demanded to spend <strong>11+ hours</strong> a day, <strong>6 days</strong> a week(sometimes Sunday too depending on a few things) at an enclosed space, constantly pushing yourself to the limit?” and that’s a fair question, one that I actually asked myself a lot of times and finally answered to myself.</p><blockquote><strong>I don’t want anxiety to define who I am or what I do</strong></blockquote><p>So this is how I decided to get into one of the -if not the most- demanding of bootcamps. Hack Reactor.</p><p>I’ll share in another post how I managed to get through the first 7 weeks of Hack Reactor, but trust me, if I was able to do it. Anyone can.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5b6d1d4d7aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>