<?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 Liliana Barrera on Medium]]></title>
        <description><![CDATA[Stories by Liliana Barrera on Medium]]></description>
        <link>https://medium.com/@barrera.jimnlil?source=rss-f4f11ecf2388------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*D0zwnAQcv2YSB7w0v0EpkQ.jpeg</url>
            <title>Stories by Liliana Barrera on Medium</title>
            <link>https://medium.com/@barrera.jimnlil?source=rss-f4f11ecf2388------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 10:06:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@barrera.jimnlil/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[GitHub Cloning for Dum-Me!]]></title>
            <link>https://medium.com/@barrera.jimnlil/github-cloning-for-dum-me-d957ccc91af1?source=rss-f4f11ecf2388------2</link>
            <guid isPermaLink="false">https://medium.com/p/d957ccc91af1</guid>
            <dc:creator><![CDATA[Liliana Barrera]]></dc:creator>
            <pubDate>Wed, 21 Jun 2023 02:37:40 GMT</pubDate>
            <atom:updated>2023-06-21T02:37:40.227Z</atom:updated>
            <content:encoded><![CDATA[<p>It took me a while to get these steps in the correct order and clear enough for <em>me</em> to understand. I’m sharing that simple wisdom with you!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*LAvq0HNIu_Z5D_pd0B-WOg.jpeg" /></figure><p>Cloning has become a weekly part of my learning journey at Devslopes Coding Academy. And it seems that every week I’m googling how to clone a dang repo — without the word “dang” — and then, push it to <em>my </em>remote repo on GitHub. Finally, I had enough. I decided to write a step-by-step ‘How to Clone’ cheat sheet for me to reference until it’s etched in my brain, and now, for others to reference. Disclaimer: I am a novice at using GitHub. Let’s begin.</p><h3>Cloning</h3><p>This is relatively easy. You go onto GitHub and find the repository you want to clone. Under the code tab, you’ll see a green ‘Code’ dropdown button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pqDSyNuVHzUkO5g_-D3Taw.png" /><figcaption>Code tab and green code dropdown.</figcaption></figure><p>Click on the drop-down arrow to reveal your choice of HTTPS or SSH keys. Depending on the confidentiality or security requirements of your project you will choose one or the other. I am working with school projects and exercises — no FBI classified code — so I usually go with the easier of the two: HTTPS. You will click on the copy icon, the two overlapping squares/paper next to the HTTPS address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g9syaz-YpedJcPAn-BSAAQ.png" /><figcaption>HTTPS</figcaption></figure><p>Now, assuming you’re using GitBash, you open up a new terminal. You make sure you’re in the correct directory by typing cd &#39;your directory&#39; for me, this is always desktop . e.g. cd desktop Next, you would type, still inside the GitBash terminal: git clone &#39;paste the https address&#39; This will clone the remote repository you want to store locally. If all goes well, you will get great messages from GitBash like, “done”. At this point, you want to go into, so to speak, this file saved on your desktop. So you type, still in GitBash, cd &#39;repo name you just cloned&#39; . Type git remote -v to see your cloned repository. You’re in your cloned repository!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zFGsH7uzdqCMW9IIlTLXwA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jeshoots?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">JESHOOTS.COM</a> on <a href="https://unsplash.com/s/photos/stressed?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Really, that’s it if you’re just wanting to clone to your local machine. But life is rarely that simple. Like me, now you want to push this cloned repository into your own separate remote repository. This is what I have had to do for my coding academy projects.</p><h3>Create a Remote Repository on GitHub</h3><p>In order to keep this article under 500 pages, I will link the GitHub document on how to create a repository.</p><p><a href="https://docs.github.com/en/get-started/quickstart/create-a-repo">Create a repo - GitHub Docs</a></p><p>All I suggest you do is give your repository a name for now. Don’t worry about adding a ReadMe, or making it private. Then, click “Create Repository”. Again, if you need to add a ReadMe or make it private, GitHub Docs is the way to go.</p><h3>The Bear</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ryOkEYJda61yQYkw2W4zgA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/es/@marcojodoin?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Marc-Olivier Jodoin</a> on <a href="https://unsplash.com/images/animals/bear?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>So far things have been pretty easy, don’t you think? This next part has been, for me, the formidable bear. I have spent hours trying to figure out the steps on how to rename your <em>cloned </em>remote, add <em>your new </em>remote repository so you can push changes, and change branches from master to main! Hours, I say, hours. (deep sigh) And now I bring all that to you. (smile)</p><p>Okay. So far, you have cloned the repository to your local machine and saved it on your desktop. You also have created a repository on GitHub to push your work into. Now we’re gonna organize and differentiate all this shizzle!</p><p>Still in the GitBash terminal, type git remote rename origin destination this changes the cloned remote’s name to destination, thus avoiding you having two repositories with the same name of “origin”. To see your newly renamed repository, type git remote -v . You will see that the cloned repository is now named ‘destination’.</p><p>Now it’s time to bring in your newly created repository from GitHub. In GitHub, in your new repository, copy the HTTPS address by going to the green ‘Code’ button, clicking on the dropdown arrow, and then clicking on the overlapping paper icon to the right. Remember we did something similar when cloning? In the GitBash terminal type git remote add origin &#39;paste https address&#39; .</p><p>In the GitBash terminal type git remote -v. You will see your two repositories. The cloned one is now named ‘destination’ and your new repository is named ‘origin’.</p><p>In the GitBash terminal type git branch -M main . This changes the cloned branch ‘master’ to your new branch ‘main’.</p><p>In the GitBash terminal typegit push -u origin. This pushes the cloned repository into your new repository on GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pv5a1THAlHvfHA2YSpCXfQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@ingle_jake?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jake Ingle</a> on <a href="https://unsplash.com/s/photos/winner?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Finally, whenever pushing work/changes to your new repository, you simply type — in the GitBash terminal — git push origin main.</p><p>This is how we do our exercises and projects in our coding academy. Obviously, this is much too simple for real-world scenarios. There are many ways to pull, fetch, push, create a branch, rename a branch, push to a branch created off the main branch in a repo you cloned, etc, etc. The possibilities are many and excitedly complex.</p><p>For my fellow student-coders, I hope this will save you the hours I have spent figuring and googling this out! Love that word: googling! (laugh)</p><p>Follow me as I try to conquer the world of web development from my home office, in slippers and an MS Pro 7 tablet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-ZMka2RtYhJSomam-eHJA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d957ccc91af1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Spoonful of Sugar…JavaScript Syntactic Sugar with Sprinkles]]></title>
            <link>https://medium.com/@barrera.jimnlil/a-spoonful-of-sugar-javascript-syntactic-sugar-with-sprinkles-4b5d9c724de?source=rss-f4f11ecf2388------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b5d9c724de</guid>
            <dc:creator><![CDATA[Liliana Barrera]]></dc:creator>
            <pubDate>Mon, 21 Nov 2022 23:07:42 GMT</pubDate>
            <atom:updated>2022-11-21T23:07:42.475Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o12NtHMrHYqRxEZgjVhNxA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@vika_strawberrika?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Vika Strawberrika</a> on <a href="https://unsplash.com/s/photos/kid-candy?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>While on my journey to conquer JavaScript — a neverending journey — I came across a sweet expression: Syntactic Sugar. At first, I thought it was a cute way to express the concept of simplifying one’s code. But, then, I ran across it again—this time on a free learn-to-code website. “Coincidence”, I thought. Then, again, I found an article on Medium explaining the whole legitimate, industry-standard expression.</p><p>See the links below, if you’re skeptical. See the links below even if you are <em>not </em>skeptical, but want to learn more.</p><p><a href="https://medium.com/front-end-weekly/syntactic-sugar-diabetes-alert-6329a7048cf5">🍬 Syntactic sugar, diabetes alert 🚨</a></p><p>And:</p><p><a href="https://www.freecodecamp.org/news/js-diabetes-and-understanding-syntax-sugar-5de249ee9ebc/">Syntactic Sugar and JavaScript Diabetes</a></p><p>And</p><p><a href="https://sophiali.dev/syntactic-sugar-examples-javascript">Examples of Syntactic Sugar in JavaScript</a></p><p>“Awesome”, I thought, “I want to understand more.” In this article, we will answer the following: What is syntactic sugar? I will also add a few sprinkles of my own learning journey: destructuring objects and arrays, spread with objects and arrays, ternary operator, and object shorthand. I am sharing my small wins with Javascript.</p><h3>What is Syntactic Sugar?</h3><p>In her Medium article, Maya Shavin uses the acronym: <strong>S</strong>implicity, <strong>U</strong>sability, <strong>G</strong>ood Code, <strong>A</strong>lternative, and <strong>R</strong>eadability. S.U.G.A.R. I understand syntactic sugar to be simple, effective, readable code. For me, it’s the more bang-for-your-buck concept. Anything that is simplified is an example of syntactic sugar. How can you get the best functionality in Javascript with the least amount of code? For example, the for/of loop is syntactic sugar for the for loop. Destructuring is syntactic sugar for creating new variables.</p><p>Whoever chose sugar as the analogy had a major sweet tooth! Or they were on a sugar high while rolling out the concept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CPwJzh0-5dqXqaAXQhbZhg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@amit_lahav?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Amit Lahav</a> on <a href="https://unsplash.com/s/photos/candy-store?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Think of simplicity. In English, I can say, “I cannot go to the park because it is too cold.” Or I can say, “I can’t go ’cause it’s too cold.” The contractions would be the syntactic sugar concept in Javascript. They are doing the same job for less; more bang for your buck.</p><h3>Sprinkles on Syntactic Sugar?</h3><p>For sake of simplicity (wink, wink) I will share four visual — because it’s who I am — examples of what I have learned thus far. Destructuring Objects and Arrays, Object and Array Spread, Ternary Operators, and Object Shorthand. I will include links for deeper study.</p><h4>Object Destructuring:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*9ju-zSqq-yWCHKo9hHRQgA.png" /></figure><p>Lines 14 and 16 are examples of syntactic sugar destructuring. I did not comment out the non-simple way of destructuring so it is easier to see the difference in code. Hence, all the squiggly red lines indicating errors.</p><h4>Array Destructuring</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*w9nczzUSw5Uu3ArPiCLlZg.png" /></figure><p>Line 6 is the syntactic sugar destructuring.</p><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment">Destructuring assignment - JavaScript | MDN</a></p><h4>Object Spread Operator</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*gIaCUUZxicIGuBMoRaXE5g.png" /></figure><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax">Spread syntax (...) - JavaScript | MDN</a></p><h4>Array Spread Operator</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*F5yCSxy-ICx7VIK5EbkVDw.png" /></figure><h4>Ternary Operator</h4><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator">Conditional (ternary) operator - JavaScript | MDN</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*59QPWSNj96Fr0c-j66r24A.png" /><figcaption>Taken from the MDN Web Docs on Conditional (Ternary) Operator</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*vr1QKnimfHNu5QIZMLc2aQ.png" /></figure><h4>Object Shorthand</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*Ri6Q2AfCrEk4uh9dQcoOMg.png" /></figure><p>In the above example, instead of logging to console the <em>a</em> variable, you are logging {a: a}. You will see an object for every value and you will know the name for every variable you are logging onto the console. This is helpful when debugging. You wrap the variable inside the console log with {} curly braces. This is using <em>object shorthand</em>.</p><p>The journey is a long one, but as long as we have sugar we can keep up. Or caffeine.</p><p>I hope you enjoyed this short trip with me. Share your wins with Javascript. Expand on what I shared. Or just drop some clapping hands down below. Either way, a win is a win, no matter how small.</p><p>Follow me as I try to conquer the world of web development from my home office, in slippers and an MS Pro 7 tablet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-ZMka2RtYhJSomam-eHJA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@heftiba?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Toa Heftiba</a> on <a href="https://unsplash.com/s/photos/pajama-slippers?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b5d9c724de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[So Random in JavaScript]]></title>
            <link>https://medium.com/@barrera.jimnlil/so-random-in-javascript-ae9a7e48bd0d?source=rss-f4f11ecf2388------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae9a7e48bd0d</guid>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript-web-developer]]></category>
            <category><![CDATA[journey]]></category>
            <category><![CDATA[frontend-development]]></category>
            <dc:creator><![CDATA[Liliana Barrera]]></dc:creator>
            <pubDate>Tue, 23 Aug 2022 22:52:28 GMT</pubDate>
            <atom:updated>2022-08-23T22:52:28.453Z</atom:updated>
            <content:encoded><![CDATA[<p>When your number is up, Math.floor &amp; Math.random come to the rescue!</p><p>I recently have the honor of working on a “mini Battleship” project for my online web development course. It has been eye-opening, to say the least!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3iaxSF8Ub4SfCvNBBtkVjQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@chris_pagan?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Chris Pagan</a> on <a href="https://unsplash.com/s/photos/ships?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I am nowhere near finished but have learned so much in such a short time. There are four parts to this project. Two of these parts are required; the other two are extra credit. I have not yet decided if I will try the extra credit portions. I mean, it has taken <em>me </em>four weeks just to get through part 1. But I digress.</p><p>In this article I would like to share the Math.floor and Math.random methods I recently delved into. Separately, they are interesting, but paired up, they rock!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oAhDm6V8MQRgjP7sAVKt0g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@frankiefoto?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">frank mckenna</a> on <a href="https://unsplash.com/s/photos/wonder-twins?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>We will see what they do on their own. We will look at some examples. Then, we’ll pair these wonder twins up and see how they rock harder than Aerosmith in the 90s. Or was that the 70s? I never know.</p><p><strong>Math.floor</strong>. This bad boy returns the largest integer <em>less than</em> or equal to a given number. It <em>rounds </em>a number <em>down</em> to its nearest <em>whole integer</em>.</p><p><a href="https://www.w3schools.com/jsref/jsref_floor.asp">JavaScript Math floor() Method</a></p><p>This may sound confusing. After all, why would it be written in simple terms, y’all? This is technical documentation, isn’t it?</p><p>Use the word “floor” as your guide. It returns 1. a whole number (no decimals), and 2. sets the “floor” for your range. The largest whole number closest to the number specified by you in your code but <em>less</em> than that number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Z307sZNLtgWMH9EZpzw4Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@dexezekiel?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Dex Ezekiel</a> on <a href="https://unsplash.com/s/photos/confused?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Let’s look at some examples. This always helps me. Trying code out on my own. But before we do, let’s look at the syntax:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*u_N0XcfW2vEO2Ngk61_apg.png" /><figcaption>Courtesy of W3Schools: Math.floor.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*AOPgW1Onv_WgqIkxa5NwmA.png" /><figcaption>This does involve some math knowledge and an understanding of rounding numbers.</figcaption></figure><p>Do you see how 0.60 rounds down to 0 because it is the closest, less-than-whole number? 5.2 rounds down to 5. -8.2 rounds down to -9, and so on. That’s it. It’s that simple.</p><p><strong>Math.random()</strong>. Another bad boy, if you’re into that sort of thing!</p><p><a href="https://www.w3schools.com/jsref/jsref_random.asp">JavaScript Math random() Method</a></p><p>Math.random returns a random number from a set-by-you minimum, which would be inclusive in the range, and a set-by-you maximum, which would be exclusive in the range. Inclusive means included and exclusive means excluded. The min and max could be set or you could leave it blank. Math. random will return a random decimal between o and 1 if left all by itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*JCVGvBPnLnweHTTSKe5lYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*S2pJI_7CG0WhUh04jJts9g.png" /><figcaption><a href="https://www.w3schools.com/jsref/jsref_random.asp">https://www.w3schools.com/jsref/jsref_random.asp</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*TLvFl2kpmFXEFXrD-nyQqw.png" /><figcaption>W3Schools: Math.random JavaScript</figcaption></figure><p><strong>EXAMPLES:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckNvTtlLvnj6R7ljVp4GLA.png" /><figcaption>The decimals are gettin’ out of hand!</figcaption></figure><p>As you can see by the comments, when you add 1. an *, 2. a number, in this case, the maximum, 3. a + sign, and 4. the number 1, this will include that max number in the range. It makes it inclusive.</p><p>We know there is power in numbers. So let’s pair these two methods and see what they can do for us.</p><p>What we want is clean and simple. A random, whole number where we set the ranges to whatever we want, right? Enter Math.floor + Math.random.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*Xl3vR48qpbLfuPeAthTm5A.png" /><figcaption>Whole results!</figcaption></figure><p>In randomCombo4, the maximum number is exclusive and the minimum number is inclusive.</p><p>In randomCombo5, the maximum and the minimum are inclusive.</p><p>The combinations are endless. This Math.floor + Math.random combination is what I am using to randomly assign my battleships a position (number) on the grid every time we restart the program. And one of my coaches showed me how to code so as to assign it an X-Y coordinate! I’m still trying to wrap my head around it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f-SjKpelYsFMyMgZt4d64Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@skyestudios?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Skye Studios</a> on <a href="https://unsplash.com/s/photos/mind?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><a href="https://devslopes.com/programs">Devslopes</a></p><p>My learning to code is not moving at lightning speed; more like a herd of turtles running through peanut butter. But I am enjoying the journey and community! And sharing this self-discovery journey with you.</p><p>Please, let me know your thoughts below. Feel free to add your tidbits! After all, we are a web dev community, are we not?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5QsFWC3EwRaTc0BRBqUA1g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@dear_jondog?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jonathan Daniels</a> on <a href="https://unsplash.com/s/photos/smile?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Continue to join me as I code in my slippers!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-ZMka2RtYhJSomam-eHJA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@heftiba?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Toa Heftiba</a> on <a href="https://unsplash.com/s/photos/slippers?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae9a7e48bd0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Objects…in JavaScript]]></title>
            <link>https://medium.com/@barrera.jimnlil/objects-in-javascript-bc169dbb161c?source=rss-f4f11ecf2388------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc169dbb161c</guid>
            <dc:creator><![CDATA[Liliana Barrera]]></dc:creator>
            <pubDate>Tue, 09 Aug 2022 13:03:18 GMT</pubDate>
            <atom:updated>2022-08-09T13:03:18.600Z</atom:updated>
            <content:encoded><![CDATA[<p>No, not the unidentified flying ones!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2hNOEVHG_RaD7O6oyyQ_bA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@goyongsu?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Dmitrii Ko</a> on <a href="https://unsplash.com/s/photos/ufo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In this article, we’ll consider three things. 1. What is an object literal in JavaScript? 2. Why do we need them? 3. Object literal syntax.</p><p><strong>What is an object literal in JavaScript? </strong>It is the most common, fundamental datatype in JS. It combines various property/value pairs, like strings, numbers, booleans, functions, and nested objects — an object within an object — into one variable. Objects can inherit properties from other objects. This is called <em>prototypal inheritance</em>.</p><p><strong>Why do we need them?</strong> Objects allow us to group similar attributes together under one variable. Objects represent and describe a certain element, entity, person, etc. Thus eliminating the creation of hundreds of single variables to describe one entity. Objects store related data and functionality. They are dynamic because we can store, retrieve, delete, and update properties and their respective values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*RTsgZZvClixsjaHDDve1Tw.jpeg" /></figure><p><strong>Object Literal Syntax</strong>. As you can see from the above example, to create an object literal one begins with the const or let word, the name of your object literal, open/close curly braces, and in between these curly braces, you begin to add the key/value(property/value) pairs. These are separated by a colon and then a comma to continue adding pairs.</p><p>The property is on the left of the colon and the value is on the right of the colon. These values can be strings, numbers, booleans, other objects, arrays, functions, etc. As a good practice, add a comma to the last property/value pair even if nothing comes after it. This will assure that if and when an additional property/value pair is added, it can easily be done without causing syntax errors in your code. And, let’s be honest, who likes error messages? Especially for stupid things like syntax errors!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VXyU6ziL93ZAaisYfNkLdg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@dav420?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">David Pupaza</a> on <a href="https://unsplash.com/s/photos/error?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Now, <strong>accessing the properties and their respective values</strong> is simple. We use a dot syntax: In the example given earlier, we would access the singer’s birthplace value by typing: <em>performer.birthPlace; </em>. That’s it! And if we want to change the value of this property we would type: <em>performer.birthPlace= ‘Oklahoma’; </em>.</p><p>This is an over-simplification of object literals in JavaScript. But it is an awesome way to begin to understand their purpose and how to incorporate them into your daily coding. You could continue your journey with object literals by reading about the various methods and functions that live inside them. Then there’s prototyping. Deleting properties. The list goes on and on.</p><p>The wonderful world of JavaScript, an ever-evolving language, is based on continuous learning. Yes, JavaScript was invented in 1995 by Brendan Eich, in just 10 days, with nothing but dial-up. But it will take years to become a master. And even then, on your low-caffeinated days, one will still make syntax code errors! That’s just life.</p><p><a href="https://www.springboard.com/blog/data-science/history-of-javascript/">The History of JavaScript: Everything You Need to Know</a></p><p>Follow me as I try to conquer the world of web development from my home office, in slippers and an MS Pro 7 tablet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-ZMka2RtYhJSomam-eHJA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@heftiba?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Toa Heftiba</a> on <a href="https://unsplash.com/s/photos/pajama-slippers?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc169dbb161c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[To Function Or Not To Function]]></title>
            <link>https://medium.com/@barrera.jimnlil/to-function-or-not-to-function-8ccb0aa5e4e5?source=rss-f4f11ecf2388------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ccb0aa5e4e5</guid>
            <dc:creator><![CDATA[Liliana Barrera]]></dc:creator>
            <pubDate>Tue, 17 May 2022 22:29:08 GMT</pubDate>
            <atom:updated>2022-05-17T22:29:08.706Z</atom:updated>
            <content:encoded><![CDATA[<p>Why do we need to function…eh, need functions in JavaScript?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i7RJoSt2RqzBjShOaCKvTQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@hishahadat?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Shahadat Rahman</a> on <a href="https://unsplash.com/s/photos/programming-javascript-functions?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><a href="https://www.amazon.com/gp/product/1118531647/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&amp;psc=1">JavaScript and jQuery: Interactive Front-End Web Development</a></p><p>This outline was formed with the help of the above book.</p><p>Functions could be compared to To-Do lists or Weekly Schedules in life. They organize our tasks, guide as to what needs be done next, and set repeat-tasks in place in our weeks and months.</p><p>For example, instead of writing Monday: 7am Water with Lemon, 7:30am Exercise, 8am Shower, 9am Work. Tuesday: 7am Water with Lemon, 7:30am Exercise, 8am Shower, 9am Work. Wednesday…you get the picture. We could simply group these tasks into a Morning Routine and know that at 7am every morning we begin set routine.</p><p>In this brief and simple article we will consider four points: What is a function? Why are functions needed? How do we write out a function, i.e. syntax? And, how do we call a function?</p><p><strong>One: What is a function?</strong> A function is a way to run actions. It is a statement or group of statements that when put together allow you to perform a specific task. There must be an input to result in an output, i.e. return a value. Functions can also be used to store steps to achieve a task and then called on when needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*U-Mt3c7uoMZZOoaO66f2dA.png" /><figcaption>A simple function to perform a addition task.</figcaption></figure><p><strong>Two: Why are functions needed?</strong> They help organize our code. They improve the readability of our code. They improve the reusability of our code. They help make debugging less overwhelming. They reduce the size of our code.</p><p><a href="https://beginnersbook.com/2014/01/c-functions-examples/">Functions in C Programming with examples</a></p><p><strong>Three: How do we write out a function? Syntax?</strong> You start with the function keyword. Then you give the function a name. You insert an open/close parenthesis where the parameters you input will go in. Then you insert open/close curly braces, where your statements will go. This is referred to as declaring a function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*BxqqRy7H_ebid2Qb69QWpA.png" /><figcaption>W3 Schools: JavaScript Functions</figcaption></figure><p><strong>Four: How do we call a function?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FEVAcHI2bdNBGiSXOm8Rzw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@anniespratt?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Annie Spratt</a> on <a href="https://unsplash.com/s/photos/vintage-phone?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>“Having declared the function, you can execute all of the statement(s) between its curly braces with just one line of code. This is known as calling the function.” (Jon Duckett, <a href="https://www.amazon.com/gp/product/1118531647/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&amp;psc=1"><strong>JavaScript and jQuery: Interactive Front-End Web Development</strong></a><strong> )</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*YhmTovNE2ntWc4EX8m-Ppw.png" /></figure><p>You would type out the name of the function you want to call, then inside of the open/close parenthesis, you would insert the values, i.e. arguments, you want the function to process.</p><p>This is just the start to building a function. In the words of one of my web development coaches, “Things can get real gnarly from here on out.”</p><p>The thing I appreciate the most about JavaScript, thus far, is that it is a logical programming language. As web-like as a function can seem, when I begin to decipher what is calling what, or iterating over something, or looping, or being conditional, there is a pattern that can be discovered. The catch: <em>discovering and understanding the patterns.</em></p><p>Join me as I continue to navigate this crazy, yet logical world of Web Development.</p><p>Also, feel free to share any tips that have helped you understand complicated concepts in easy steps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ccb0aa5e4e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginner Debugging Steps]]></title>
            <link>https://medium.com/@barrera.jimnlil/beginner-debugging-steps-84127848d9c2?source=rss-f4f11ecf2388------2</link>
            <guid isPermaLink="false">https://medium.com/p/84127848d9c2</guid>
            <dc:creator><![CDATA[Liliana Barrera]]></dc:creator>
            <pubDate>Thu, 14 Apr 2022 16:17:08 GMT</pubDate>
            <atom:updated>2022-04-14T16:17:08.545Z</atom:updated>
            <content:encoded><![CDATA[<p>No one likes to be bugged! But when it happens to your code, here is a simple strategy to get you started on cleanup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*uEfvpmbj6rYdf6oA5UEN3g.png" /><figcaption>No bug puns allowed :)</figcaption></figure><p>I have reached out to my web development coaches in a mad panic because “everything” I’ve tried and researched has not helped fix my code. “I am at the end of my rope!”, I frantically type. “Help!”, I add.</p><p>Then, like a ray of sunshine through gray clouds the response email pings on my phone: “You have an extra space in your syntax.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HV8XGCMsWHy-P8r1WcW9lw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@ryanmfranco?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ryan Franco</a> on <a href="https://unsplash.com/s/photos/unimpressed-face?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Okay, then. Dully noted.</p><p>How can I keep this from happening again? A checklist. ’Cause you know I’m all about the lists!</p><p>Now, I am a beginner so my list is very basic. As I advance in my lessons and experience, I am sure my list will become advanced and more coding specific. For example, instead of having to check for spelling errors, I may have to look at coding syntax.</p><p>Here are a few items I came up with to check for before pulling the emergency brake cord on my coding train. And it may help coaches and future supervisors see that I have exhausted my resources before coming to them for direction. And that I put the time and effort into trying to problem solve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*swpoOobsUNngaDQTxfJYEw.jpeg" /><figcaption>My simple debugging checklist</figcaption></figure><p>This is a basic list. Feel free to add, change, or come up with your own.</p><p>I have noticed that when you have a strategy to tackling projects and/or problems by the time you dial-a-friend you’re ready for direction and instruction that you have yet to acquire. And people see that you don’t expect to be handed answers, but rather you’re open to collaboration and expanding your knowledge.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84127848d9c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New Skills as Adults]]></title>
            <link>https://medium.com/@barrera.jimnlil/new-skills-as-adults-ee55025a0ff0?source=rss-f4f11ecf2388------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee55025a0ff0</guid>
            <category><![CDATA[skills-development]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[adulthood]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Liliana Barrera]]></dc:creator>
            <pubDate>Tue, 22 Mar 2022 23:25:53 GMT</pubDate>
            <atom:updated>2022-03-22T23:29:16.648Z</atom:updated>
            <content:encoded><![CDATA[<p>I still think I’m too “mature” to learn web development. But, am I right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nq_CfWCmtHIuz96dhoXbMw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@neonbrand?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">NeONBRAND</a> on <a href="https://unsplash.com/s/photos/adult-learning?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>I just read an article on former NFL star Jerome Bettis returning to college 30 years later to get his business degree.</p><p><a href="https://www.today.com/news/good-news/former-nfl-star-jerome-bettis-returns-notre-dame-30-years-later-get-de-rcna13936">Former NFL star Jerome Bettis returns to Notre Dame 30 years later to get his degree</a></p><p>He is 49 years old. Reading his story inspired me to take up a new skill. Jerome had promised his mother he would get a degree, and he is determined to do good on his promise.</p><p>What about me? Could I do it? Is it too late? Can my brain learn a new trick? Do I have the time? Do I have enough tech know-how to get through the online course? Will I feel intimidated by all the young minds whizzing past me?</p><p>These questions scared me. Then I thought of the quote, “We change our behavior when the pain of staying the same becomes greater than the pain of changing.” -Dr. Henry Cloud &amp; Dr. John Townsend. I definitely can not, nor do I want to, stay the same. I also see so many adults going back to school.</p><p>I decided to tackle this subject because this week I learned how to use Git and Git Hub. And, boy was it confusing for me. In the five weeks that I have been enrolled in the online web development course, I’ve had two very character building weeks. Today was no exception. So, again, I asked myself, “Can I do this? Am I mentally, physically able to learn this?” The answer is, “Yes!”</p><p>I came across an article in the Scientific American <em>Think You’re Too Old to Learn New Tricks?</em></p><p><a href="https://blogs.scientificamerican.com/observations/think-youre-too-old-to-learn-new-tricks/">Think You&amp;rsquo;re Too Old to Learn New Tricks?</a></p><p>I learned two truths. First, as adults we need to upgrade our skills. Our environment changes constantly -not to mention the speed in which technology advances- and if we do not keep up, we become functionally dependent. In other words, we regularly have to ask for help on things like how to use a smartphone, tablet, upload to a cloud, or create a pdf. Although, it is not wrong to ask for help, but the objective is to be as independent as possible for as long as possible.</p><p>Second, I learned that physical exercise, and a healthy diet are not enough. We also need cognitive growth. We should exercise our mind. This strengthens short-term memory, and gives resilience in aging. This second point applies to anyone, at any age. Learning a new skill should be something we do regularly. A new hobby. A new language. A new dance. A new recipe. Web Development (me blushing).</p><p>So can I do this? Yes. Should I do this? Yes. Will I do this? Yes. It may require more time Googling. It may require a vision board for motivation. It may require bombarding my instructors with questions. It may require me not focusing so much on how young everyone else is. It may require my husband helping me out a couple of hours after dinner. But the long-term benefits greatly out-weigh the challenges and inconveniences.</p><p>In conclusion, anyone can be anything if they are determined to do what it takes to achieve the desired outcome!</p><p>Let me know your tips and tricks for Git and GitHub. In the meantime, I’ll be Googling. Thank goodness for YouTube!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iPIYKIJ5iKdvc6bZqXdglQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@shiwa_id?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Shiwa ID</a> on <a href="https://unsplash.com/s/photos/google?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee55025a0ff0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSS Specificity]]></title>
            <link>https://medium.com/@barrera.jimnlil/css-specificity-99fbc9e34cce?source=rss-f4f11ecf2388------2</link>
            <guid isPermaLink="false">https://medium.com/p/99fbc9e34cce</guid>
            <category><![CDATA[css-selectors]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css-specificity]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Liliana Barrera]]></dc:creator>
            <pubDate>Mon, 21 Mar 2022 16:58:56 GMT</pubDate>
            <atom:updated>2022-03-21T17:10:41.261Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yaeYRUBFsgCifyg8UUfL0g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@flowforfrank?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ferenc Almasi</a> on <a href="https://unsplash.com/s/photos/css?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>No, I’m not talking about Keri Russell’s character in the 1998 TV show Felicity. I’m referring to the style values -or set of rules- that CSS assigns to selectors that identify an html element.</p><p>This is important to understand because sometimes styles may be overridden by something coming before it — breaking the cascading style concept of CSS — and you will want to know why this is happening. Specificity will also help if you purposefully want to keep a certain style applied to an element on your html and not have it be affected by latter CSS.</p><p>First, lets briefly see how CSS applies style. It does so in a <em>cascading </em>manner. For example if you have two paragraph html elements with the CSS text-align: center applied to it, but then further down in your list you have that same paragraph element tag with CSS text-align: right, CSS will apply the <em>latter </em>style to both paragraphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ud1OvQbyDUE5uUw1ieWV_w.jpeg" /></figure><p>This is due to the paragraph html element tag having a specificity of 1.</p><p>This brings us to our second point: how do we know the specificity value of an html element? By its selector. Enter CSS Specificity Calculator.</p><p><a href="https://www.codecaptain.io/tools/css-specificity-calculator">CSS Specificity Calculator. * CodeCaptain</a></p><p>The selector is the first part of a CSS Rule. For example, element (type) selector: p {}; class selector: .box {}; attribute selector: a[name] {}; ID selector: #uniqe {}; style selectors are part of the html tag: style = {}. These selectors are valued in the following way:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IRgG_o2oQqdmemgBd3avtQ.jpeg" /><figcaption>Most Specificity to Least Specificity</figcaption></figure><p>This is not an add-them-up point system. It is a way to understand which will take precedence over another.</p><p>Let’s use the above paragraph example to see this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DwKcve4PvuL2pbJ-4mXyPg.jpeg" /><figcaption>Second paragraph has a class attribute applied and used as a selector on CSS.</figcaption></figure><p>An example of the trumps-all style selector is the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*vGOv_WcpbpK6xths1HBELQ.jpeg" /><figcaption>Keep in mind that this is part of your html element tag.</figcaption></figure><p>In summary, CSS specificity is how browsers determine which CSS property values/styles are the most relevant to an html element and, therefore, will be applied. Keep in mind your CSS selectors’ values as you assign styles, id’s, and classes to your html. Your goal is to have a lean &amp; mean CSS machine.</p><p>Follow me in my journey as I learn and grow as a web developer. Together we will make sense of coding languages and concepts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZeKeDF73juQNomJmVO6nGg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@clemensvanlay?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Clemens van Lay</a> on <a href="https://unsplash.com/s/photos/journey?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99fbc9e34cce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>