<?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: commdao</title>
    <description>The latest articles on DEV Community by commdao (@commdao).</description>
    <link>https://dev.to/commdao</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%2F544795%2F34dae5f1-1d72-4d22-80b4-a8c2b518612b.png</url>
      <title>DEV Community: commdao</title>
      <link>https://dev.to/commdao</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/commdao"/>
    <language>en</language>
    <item>
      <title>JSON! at the Airport</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Tue, 31 Oct 2023 22:31:00 +0000</pubDate>
      <link>https://dev.to/commdao/json-at-the-airport-18gf</link>
      <guid>https://dev.to/commdao/json-at-the-airport-18gf</guid>
      <description>&lt;p&gt;The most stressful part of travel is the whole airport experience, yeah?&lt;/p&gt;

&lt;p&gt;You know, for prep time, I thought the old rule was get there &lt;em&gt;1 hour before&lt;/em&gt; for domestic and &lt;em&gt;2 hours before&lt;/em&gt; for international. My girlfriend said it was 2 and 3, which I've never heard before, but she provided proof:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fc-C_BlA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bdg5vl5g0dj2skrdt8qi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fc-C_BlA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bdg5vl5g0dj2skrdt8qi.png" alt="Airline email snippet reaffirming the recommended times to show up before domestic and international travel" width="751" height="66"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And reading that text over again, it only now dawned on me that all that extra time is supposed to be part of the contingency once you're actually there. That's not taking into account traffic on the way. Luckily, the roads of Mexico City were silent at 3:30 AM-- the quietest we'd seen it since our visit. &lt;/p&gt;

&lt;p&gt;We had issues with trying to check in through the Aeromexico site and app the night before. But with only carry ons, and no checked bags or items to declare, the self-service kiosk should be easy peasy.&lt;/p&gt;

&lt;p&gt;Except,&lt;/p&gt;

&lt;p&gt;&lt;code&gt;err&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;err&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;err&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;(I wish I took a photo of the err code)&lt;/p&gt;

&lt;p&gt;I could tell my girlfriend was getting more and more anxious with each attempt and restart. The mind starts jumping to the worst fears, of course.&lt;/p&gt;

&lt;p&gt;But then I see the latest message:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;something something JSON err something something&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R2btBKFx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdwhab8c9kap6z2wg1k2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R2btBKFx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdwhab8c9kap6z2wg1k2.jpg" alt="Pointing Rick Dalton (diCaprio) Meme" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I couldn't tell you all the ins and outs of JSON or what it stands for. But, it's not a syntax that's completely alien to me either. See it with the little REACT work I've done. A package handler of sorts.&lt;/p&gt;

&lt;p&gt;Something with handling API, I think.&lt;/p&gt;

&lt;p&gt;So if there's an API, there's a database. Okay, the kiosk is probably just having issue &lt;em&gt;retrieving&lt;/em&gt; the data versus any issue with the actual data (i.e. our booked flights).&lt;/p&gt;

&lt;p&gt;And sure enough, when we spoke to a service agent, we got printed boarded passes without issue!&lt;/p&gt;

&lt;p&gt;I know I did all that setup at the beginning about airports, but I'm going to break away to the real heart of the matter:&lt;/p&gt;

&lt;p&gt;Recognizing the unknown feels awesome!&lt;/p&gt;

&lt;p&gt;It's one of the best parts of the otherwise demoralizing learning process. Sure, you can take classes and lessons, do quizzes, then get scores in order to feel a sense of progression.&lt;/p&gt;

&lt;p&gt;But if you've ever learned a language before, you know there's a disconnect between feeling like you learned something versus actually learning it. I saw it in my students when I taught English. There were kids who didn't think they had the skills because they didn't "feel it" or see it reflected.&lt;/p&gt;

&lt;p&gt;Then, there were some kids who thought they were hot shit because they had the grades, but the capability was non-existent. (I can say it bluntly like that because classroom life is a decade ago!)&lt;/p&gt;

&lt;p&gt;I've also experienced this myself in learning Japanese. To put effort, then not know if you're actually improving... only to get that Matrix moment where it all comes together when you stick with it.&lt;/p&gt;

&lt;p&gt;With all the ups and downs and feeling stupid with learning code this past year, this JSON recognition will be one of those Matrix moments.&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>learning</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>Recontextualize to Remember</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Fri, 13 Oct 2023 17:00:39 +0000</pubDate>
      <link>https://dev.to/commdao/recontextualize-to-remember-167h</link>
      <guid>https://dev.to/commdao/recontextualize-to-remember-167h</guid>
      <description>&lt;p&gt;Diving into the world of web development has been the dumbest thing I've ever done.&lt;/p&gt;

&lt;p&gt;As in, learning to program and code is outside my wheelhouse, making me feel dumb on a regular basis-- not that the field itself isn't a smart move. (I believe it is! That's why I'm trying!)&lt;/p&gt;

&lt;p&gt;It feels like such an uphill climb to get a point down, only to later forget any understanding. It happens so easily. It happens often.&lt;/p&gt;

&lt;p&gt;Is it because I'm not passionate enough? Is it because I don't &lt;em&gt;love&lt;/em&gt; this stuff?&lt;/p&gt;

&lt;p&gt;Eh, neither of those matter. &lt;/p&gt;

&lt;p&gt;I've gotten a lot of peace of mind once I accepted that I &lt;em&gt;will&lt;/em&gt; forget, and that's part of the process. Maybe not so much for the hardcore, but it's my process anyway.&lt;/p&gt;

&lt;p&gt;No need to learn things perfectly. No need to spend so much effort trying to remember. It's less pressure that way. And it makes the second (or third or fourth or fifth or sixth) round of re-learning much easier.&lt;/p&gt;

&lt;p&gt;Now on to the real purpose of this post: writing down another aspect of learning that makes things easier.&lt;/p&gt;

&lt;p&gt;I was listening to HTML All The Things, their JavaScript Basics episode as a refresher. &lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://open.spotify.com/embed/episode/5QGUEIUOrpcTG7fSfNEVtL" width="100%" height="232px"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;And they were going through the differences of using &lt;code&gt;var&lt;/code&gt; vs &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;. A staple of JS understanding. Something you should know for an interview.&lt;/p&gt;

&lt;p&gt;Something that I've learned and forgotten frequently. I get reminded of its importance when my code breaks, basically. Or when something is/isn't hoisting properly.&lt;/p&gt;

&lt;p&gt;And as much as I can read through the differences of global and local scope, even with due diligence and note taking, I'm still going to forget.&lt;/p&gt;

&lt;p&gt;But in that episode, when talking about global scope, they used an example that registered so well with me: dark mode. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Global can be accessed anywhere in the program. You might have something you want the entire program to know, such as the light and dark theme.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Because duh. Of course you would want that toggle across the board and not limited to a single page.&lt;/p&gt;

&lt;p&gt;It seems so obvious, but I never had global as a concept click so well until now. Moving forward, when I distinguish between global and local, I can always think back to dark mode.&lt;/p&gt;

&lt;p&gt;What other aspects like dark mode would I need the entire program to know?&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>learning</category>
      <category>motivation</category>
    </item>
    <item>
      <title>Trust with DevTools Broken</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Fri, 29 Sep 2023 17:58:35 +0000</pubDate>
      <link>https://dev.to/commdao/trust-with-devtools-broken-4b2l</link>
      <guid>https://dev.to/commdao/trust-with-devtools-broken-4b2l</guid>
      <description>&lt;p&gt;Making use of the Chrome Dev Tools habit has been a more recent practice of mine. I've used it to inspect other people's code or disable JavaScript to get around some subscription-gated sites, sure, but to do due diligence with my own code?&lt;/p&gt;

&lt;p&gt;After mixed results with optimizing my portfolio site for mobile, I've been more conscious of &lt;a href="https://developer.chrome.com/docs/devtools/device-mode/" rel="noopener noreferrer"&gt;simulating mobile devices with Device Mode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And with my latest &lt;a href="https://tubular-faloodeh-6243c9.netlify.app/" rel="noopener noreferrer"&gt;journaling app&lt;/a&gt;, I stopped to preview it &lt;em&gt;all&lt;/em&gt; every step of the way-- Android and iOS to boot! &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%2Fuploads%2Farticles%2Fe2k4rlq709d8hgyeoe6c.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%2Fuploads%2Farticles%2Fe2k4rlq709d8hgyeoe6c.png" alt="false positive of the site layout"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I finally deployed it on Netlify, I shared the link to my friend and mentor who gave me props. But the screencap he shared looked weird.&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%2Fuploads%2Farticles%2Fdnz4rmh84v17c1ssk3w9.jpg" 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%2Fuploads%2Farticles%2Fdnz4rmh84v17c1ssk3w9.jpg" alt="reality of the site layout"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was crushed to see it looked just as jumbled when I pulled up the site on my own phone. It felt especially demoralized when I put more effort than ever to have responsiveness in mind.&lt;/p&gt;

&lt;p&gt;Dev Tools, you lied to me!&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%2Fuploads%2Farticles%2Fcda88qq3xknzal4e9dxs.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%2Fuploads%2Farticles%2Fcda88qq3xknzal4e9dxs.png" alt="Dev Tools lied"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How can mirrors be real if our eyes aren't real. - Jaden Smith&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Never thought that quote would hit as hard as it did now. &lt;/p&gt;

&lt;p&gt;How are you supposed to check the site layout if you can't trust the preview? And to that, I still don't have an answer. Said friend thought it might've been a rem - px issue, but adjusting that math didn't seem to make a difference.&lt;/p&gt;

&lt;p&gt;Device Mode preview will remain a mystery, but luckily the actual fix for my site layout wasn't too bad. &lt;/p&gt;

&lt;p&gt;Those elements that are all jumbled at the top were created at a later stage as I was designing things. And, instead of respecting the HTML top to bottom order (I thought only JavaScript cared about that?), I left those elements near the bottom of the HTML. I had things positioned okay through CSS, but &lt;code&gt;position: fixed&lt;/code&gt; and &lt;code&gt;position: absolute&lt;/code&gt; were conflicting with other styles. It was much easier to let things fall in line with flexbox and adjust from there.&lt;/p&gt;

&lt;p&gt;For those of you who felt Dev Tools betrayal, how long did it take you to regain trust? 🥺 👉👈&lt;/p&gt;

</description>
      <category>css</category>
      <category>developers</category>
      <category>beginners</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Even Pro Producers Use Reference Tracks</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Tue, 26 Sep 2023 04:58:32 +0000</pubDate>
      <link>https://dev.to/commdao/even-pro-producers-use-reference-tracks-1pb8</link>
      <guid>https://dev.to/commdao/even-pro-producers-use-reference-tracks-1pb8</guid>
      <description>&lt;p&gt;Something I've adjusted with my on/off again relationship with music production is using reference tracks. No, not just trying to remake a song. Not only modeling a tune based on another either.&lt;/p&gt;

&lt;p&gt;Literally, importing the original, and toggling it on/off as a baseline as you craft your own version... or something else entirely. &lt;a href="https://youtube.com/shorts/qXyOVrN1wV0?feature=share"&gt;It's really been a gamechanger as I continue to battle the learning curve that is EQ (truly the bane of my existence.)&lt;/a&gt; And now that I'm being more consistent in using them, I look back and think to myself: why was I so adamant against using them anyway?&lt;/p&gt;

&lt;p&gt;Even pro producers and sound engineers use reference tracks in this manner, which is part of the reason why I've come around to it.&lt;/p&gt;

&lt;p&gt;I think before, it felt like cheating? Just too much of a crutch. I should be struggling forward on my own. And maybe that has its merits too to an extent. It's not always the best thing to have the immediate answer and solution when you're in the learning phase.&lt;/p&gt;

&lt;p&gt;However, what's the context?&lt;/p&gt;

&lt;p&gt;For a seasoned musician with schooling, years of play, and the ear? They could do well with more struggle time. They'd probably ease in and out of it much more easily too.&lt;/p&gt;

&lt;p&gt;But for someone who took a year of piano when he was 4 years old and stopped, then taught himself guitar to impress girls and stopped... how the hell would he have that ear and knowhow to replicate a song?&lt;/p&gt;

&lt;p&gt;The talent is lacking. The skills... they're not cultivated yet.&lt;/p&gt;

&lt;p&gt;So similarly with coding and programming, if that's your background, then sure. Maybe you can struggle a bit better. But if you're a fish out of water (like me) coming from a field completely unrelated to this sort of thing, look at other people's code!&lt;/p&gt;

&lt;p&gt;Yes, expose yourself to concepts. Find inspiration. Even though tutorial hell exists, do the damn tutorials.&lt;/p&gt;

&lt;p&gt;But it's okay to look at and replicate code until you're more and more familiar with the components. &lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>music</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Piece of Cake JavaScript Functions: Single-Page Application NavBar</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Mon, 11 Sep 2023 18:17:54 +0000</pubDate>
      <link>https://dev.to/commdao/piece-of-cake-javascript-functions-single-page-application-navbar-6bj</link>
      <guid>https://dev.to/commdao/piece-of-cake-javascript-functions-single-page-application-navbar-6bj</guid>
      <description>&lt;p&gt;&lt;em&gt;Part Blog / Part Review, I plan to breakdown the Javascript functions I use on my &lt;a href="https://www.jondao.com/"&gt;portfolio site&lt;/a&gt;. While they might be a little bit more complex than the absolute beginner level, you'll see it's not really that more difficult. And if you can follow along and do it yourself? Well, it's a piece of cake after all!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d8tcaO9S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehtwq36meif5090xbvmk.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d8tcaO9S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehtwq36meif5090xbvmk.PNG" alt="Jon Dao dot com" width="800" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With any menu, you have a list of the different places visitors can go. Even if you don't code, all of us have experience with hyperlinks (&amp;lt;-- this here is a fake one, but you know the drill: you see something in blue, and you know that when you click it you &lt;em&gt;should&lt;/em&gt; be taken to another page). &lt;/p&gt;

&lt;p&gt;HTML implementation as follows:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;a href="website URL"&amp;gt;whatever caption text&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And for a complete example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;Don't go to my old site, check out the new one &amp;lt;a href="www.jondao.com"&amp;gt;here&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-Page Application
&lt;/h2&gt;

&lt;p&gt;Even if you don't code, if you've ever had a blog, you're familiar with this. When you're creating a blog post, it's making an entry as its own separate page. If you ever wrote a blog post that linked an old post, you're linking back to a separate page. &lt;/p&gt;

&lt;p&gt;It's perfectly fine to do, especially when the pages have a lot of stuff going on. The thing to note is that the redirect will be slightly slower. After all, the browser has to load a brand new page.&lt;/p&gt;

&lt;p&gt;So what happens if you're trying to redirect to a page that isn't all that complex?&lt;/p&gt;

&lt;h2&gt;
  
  
  Single-Page Application
&lt;/h2&gt;

&lt;p&gt;Until I develop my site further, my menu sections are basically simple blocks of text. I don't really need to dedicate that information to its own separate page (yet).&lt;/p&gt;

&lt;p&gt;Let's keep things optimized for snappiness. Instead of taking users to an entirely different page, I'll have everything already loaded on the site but hidden. Then, when the menu button is clicked, that section's information will show.&lt;/p&gt;

&lt;p&gt;Here's the HTML Menu&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ul class="menu"&amp;gt;
     &amp;lt;li&amp;gt;&amp;lt;a href="javascript:void(0);" onclick="displaySection('writing')"&amp;gt;Writing&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
     &amp;lt;li&amp;gt;&amp;lt;a href="javascript:void(0);" onclick="displaySection('music')"&amp;gt;Music&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
     &amp;lt;li&amp;gt;&amp;lt;a href="javascript:void(0);" onclick="displaySection('projects')"&amp;gt;Projects&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
     &amp;lt;li&amp;gt;&amp;lt;a href="javascript:void(0);" onclick="displaySection('about')"&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For now, don't mind what follows the href. Remember, we're not actually going to be taking users to a different page. The more important aspect is we have a function that will trigger when it's clicked (e.g. &lt;code&gt;onclick="displaySection('writing')"&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;I won't list the HTML for all of the sections, but let's use the writing one. The structure is basically the same.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div id="writing" style="display:none;"&amp;gt;
     &amp;lt;h3&amp;gt;Written Works&amp;lt;/h3&amp;gt;&amp;lt;br&amp;gt;
     &amp;lt;p&amp;gt;So, I could dig and pull from a decade back a list of articles I've written that were published. But, they'd all be e-learning, language, or fitness focused. And for the future, that's not the kind of writing I want to do!&amp;lt;/p&amp;gt;&amp;lt;br&amp;gt;
     &amp;lt;p&amp;gt;Currently on the docket is submitting to this year's &amp;lt;a href="https://theghoststory.com/tgs-fiction-award" target="_blank"&amp;gt;Ghost Story Supernatural Fiction Award&amp;lt;/a&amp;gt;, where I'm likely to become a two-time reject. Then, I'll participate in the &amp;lt;a href="https://nanowrimo.org/" target="_blank"&amp;gt;2023 NaNoWriMo&amp;lt;/a&amp;gt;, where I hope to be a two-time completionist!&amp;lt;/p&amp;gt;  
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's a heading block with two paragraphs. You'll see a few standard hyperlinks in there as well. &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; is how you do a hard line break. All of that is wrapped in a div that has an id and class. Then, we have the style set to &lt;code&gt;display:none&lt;/code&gt; so it's hidden by default.&lt;/p&gt;

&lt;p&gt;Now, we need to address the functionality in JavaScript.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function displaySection(sectionId) {
     const selectedSection = document.getElementById(sectionId);
     selectedSection.style.display = 'block';
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember, our sections are hidden by default. We already have it set in the HTML (onclick) that this function will activate when clicked. It takes the corresponding id, and changes its display to 'block' (e.g. appear). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HE027xfH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gjc1drr1vgyd4b5fnz5p.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HE027xfH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gjc1drr1vgyd4b5fnz5p.PNG" alt="Written Works section displays" width="800" height="619"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ta-da! And now it's loaded.&lt;/p&gt;

&lt;p&gt;Is there more to Single-Page Applications (SPA) than that? Sure. But this is a core chunk of it here: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Make hidden div containers of content with appropriate ids.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Address those ids in JavaScript and write the function to make them appear.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>portfolio</category>
    </item>
    <item>
      <title>Array Index != Array Min/Max Value</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Tue, 01 Feb 2022 03:08:55 +0000</pubDate>
      <link>https://dev.to/commdao/array-index-array-minmax-value-4ke9</link>
      <guid>https://dev.to/commdao/array-index-array-minmax-value-4ke9</guid>
      <description>&lt;p&gt;In this coding journey, I've severely underestimated how much utility goes into using an array. If you take a peek at some coding interview questions, you'll see lots of array stuff too!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://edabit.com/challenges"&gt;Edabit&lt;/a&gt;&lt;/strong&gt; gave me the challenge of "Finding the Smallest and Biggest Numbers" within an array of numbers.&lt;/p&gt;

&lt;p&gt;When I first took it to task, I made the mistake of confusing that for the index (i.e. the placement order of the numbers). I mean, it made sense to me since the example arrays where in numerical order.&lt;/p&gt;

&lt;p&gt;Why wouldn't arr[0] always be the smallest number?&lt;/p&gt;

&lt;p&gt;Mild spoilers: you'll need to learn Math.min and Math.max.&lt;/p&gt;

&lt;p&gt;TL;DR placement is placement. Value is value. Placement != value. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>coding</category>
      <category>newbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Asynchronous</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Thu, 01 Jul 2021 19:40:20 +0000</pubDate>
      <link>https://dev.to/commdao/asynchronous-5gm2</link>
      <guid>https://dev.to/commdao/asynchronous-5gm2</guid>
      <description>&lt;p&gt;In the middle of learning `setTimeout(), I'm seeing the word &lt;em&gt;asynchronous&lt;/em&gt; a lot. And Google says that just means&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;not existing or happening at the same time&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(There's a second definition that's probably even more of a relevant application to coding, but it's a bit &lt;em&gt;wordy&lt;/em&gt;.)&lt;/p&gt;

&lt;p&gt;But, okay, async, not at the same time. So synchronous &lt;em&gt;is&lt;/em&gt; at the same time.&lt;/p&gt;

&lt;p&gt;OMG THAT'S WHY THEY CALL IT BEING IN SYNC.&lt;/p&gt;




&lt;p&gt;If &lt;em&gt;NSYNC ever makes a comeback, they can call their album **SYNCHRONOUS&lt;/em&gt;&lt;em&gt;. Here's the concept album art they can have *for free&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dw37BI5d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n35ay0un2apx18d6zpli.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dw37BI5d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n35ay0un2apx18d6zpli.jpg" alt="SYNCHRONOUS" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Thinking about Ternary Operators</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Wed, 30 Jun 2021 15:38:45 +0000</pubDate>
      <link>https://dev.to/commdao/thinking-about-ternary-operators-1167</link>
      <guid>https://dev.to/commdao/thinking-about-ternary-operators-1167</guid>
      <description>&lt;p&gt;This is sort of a more advanced topic, and I've been recommended not to worry about it too much. After all, you want to feel more comfortable with the basics before you simplify, and "simplification" can be a never-ending process.&lt;/p&gt;

&lt;p&gt;That said, I know myself, and it's something I want to duck talk through so I can get back to the more important basics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Drinking Age
&lt;/h2&gt;

&lt;p&gt;First, let me review a more traditional if / else statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var age = 22;
var canDrink;
     if (age &amp;gt; 21) {
          canDrink = 'yes';
     } else {
          canDrink = 'no';
     }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If someone is over 21, they can drink. If they're under, they can't. In this case we have someone who is 22, so they'll be okay.&lt;/p&gt;

&lt;p&gt;Ternary Operators follow that logic too, but it manifests like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;condition ? expression_1 : expression_2;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So using that drinking example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var age = 22;
var canDrink = age &amp;gt; 21 ? 'yes' : 'no';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Makes sense, right? Let's try with one more example. &lt;/p&gt;

&lt;h2&gt;
  
  
  Higher Salary Justifies Gaming Purchase
&lt;/h2&gt;

&lt;p&gt;Let's say I want to make a certain salary before I can justify buying a PlayStation 5. (Honestly, we need some actual good console-exclusive games first, but bear with me here.)&lt;/p&gt;

&lt;p&gt;I tell myself that I &lt;em&gt;can't&lt;/em&gt; justify buying a PS5 unless I make $70,000, and what if I make minimum wage?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var salary = 28000
var buyPlaystation = salary &amp;gt; 70000 ? 'yes' : 'no';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And one more time more traditionally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var salary = 28000
var buyPlaystation;
     if (salary &amp;gt; 70000) {
          buyPlaystation = 'yes';
     } else {
          buyPlaystation = 'no';
     }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It can get even more mileage and usage than that, but this is a good digest for me now.&lt;/p&gt;




&lt;p&gt;Photo by &lt;a href="https://photostockeditor.com"&gt;https://photostockeditor.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>functional</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>"Do you know what '++' does?"</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Tue, 29 Jun 2021 11:27:21 +0000</pubDate>
      <link>https://dev.to/commdao/do-you-know-what-does-4j0l</link>
      <guid>https://dev.to/commdao/do-you-know-what-does-4j0l</guid>
      <description>&lt;p&gt;Finished another JavaScript tutorial and shared the project with a friend. He was reviewing one of the functions and asked, "Do you know what ++ does?"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;timerTime++;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Gut reaction was stress! But my friend wasn't gatekeeping. He wasn't saying "Do you &lt;em&gt;even&lt;/em&gt; know what ++ does?"-- he was just legitimately checking in. That's why he's my dawg.&lt;/p&gt;

&lt;p&gt;In the context of this project, "timerTime++;" ended up meaning the same thing as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;timerTime = timerTime + 1;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But, top dawg reminded me that ++ can have different outcomes in different uses. And that's... fun.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/24853/what-is-the-difference-between-i-and-i#:~:text=The%20only%20difference%20is%20the,the%20value%20the%20operator%20returns.&amp;amp;text=So%20basically%20%2B%2Bi%20returns,will%20have%20its%20value%20incremented."&gt;I know I definitely looked up the difference between i++ and ++i before.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Something, something loops.&lt;/p&gt;

&lt;p&gt;It's definitely not fully ingrained yet. But look at that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;usage&lt;/li&gt;
&lt;li&gt;reflection&lt;/li&gt;
&lt;li&gt;research&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I utilized it without fully understanding. I reviewed how well I got the concept, and when I realized it wasn't quite all there... I was able to look it (back) up (again).&lt;/p&gt;




&lt;p&gt;Note: we call him top dawg cuz he's a top dawg.&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Conviction to Code</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Mon, 28 Jun 2021 23:40:58 +0000</pubDate>
      <link>https://dev.to/commdao/conviction-to-code-1fph</link>
      <guid>https://dev.to/commdao/conviction-to-code-1fph</guid>
      <description>&lt;p&gt;I reached a &lt;em&gt;great&lt;/em&gt; milestone moment in this coding journey recently. &lt;/p&gt;

&lt;p&gt;For the past month and a half I've tried to buckle down on my routine and study habits. I know it's repeated often (and with good reason) to make your own projects. Don't &lt;em&gt;only&lt;/em&gt; follow along in a tutorial. And I've been trying to stick to that. I've also started writing some of the code with pen and paper, hoping to have it be better ingrained.&lt;/p&gt;

&lt;p&gt;But with coding being so different from most of the things I've done before, progress &lt;em&gt;felt&lt;/em&gt; stagnant still. A little different from imposter syndrome, but I'd get frustrated and just wonder &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;am I really ever going to be able to learn this coding stuff?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And then I remember, this feeling isn't so different at all. &lt;/p&gt;

&lt;p&gt;Well, I didn't come to that realization on my own. &lt;a href="https://youtu.be/vP2MNhC_Igw" rel="noopener noreferrer"&gt;WebDevSimplified has a video about not needing to memorize code.&lt;/a&gt; My mentor introduced a "simplified" function that really intimidating:&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%2Fuploads%2Farticles%2F11he8l4ltx5cqdz4ifxb.jpg" 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%2Fuploads%2Farticles%2F11he8l4ltx5cqdz4ifxb.jpg" alt="Blurred Because Mentor Shame"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But he reminded me that the important thing isn't knowing every single component, and instead, simply being able to think through the process.&lt;/p&gt;

&lt;p&gt;And that's an experience that is very familiar. I had it when learning Japanese (a language very different from Spanish or French). Learning the writing system is a daunting task, but I excelled at speaking because I knew how to think through a conversation. &lt;/p&gt;

&lt;p&gt;I had it when starting my fitness journey. In the beginning, you might not know all the exercises and machines, but you probably have an idea of what you're hoping to work. And that small sense, even if completely misguided, can separate those who are feeling iffy on what they're doing vs. those who absolutely have no idea what they're doing.&lt;/p&gt;

&lt;p&gt;You don't have to know everything. And when you hit that moment where you don't know something-- yeah it can still suck. But knowing that you don't know something in particular, that's still an advantage.&lt;/p&gt;

&lt;p&gt;In fighting games I get overwhelmed by all the options available constantly. &lt;br&gt;
&lt;iframe class="tweet-embed" id="tweet-1407913201312833539-669" src="https://platform.twitter.com/embed/Tweet.html?id=1407913201312833539"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1407913201312833539-669');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1407913201312833539&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;It's a very pulverizing genre, and it makes total sense why a lot of people would rather play something else. But it's super helpful for those who want to stick with it to know that's part of the process. You can't know all the options when you're new.&lt;/p&gt;

&lt;p&gt;Doing well doesn't even really show you how much you've learned. It's encountering the problem (again and again sometimes), and finding out how to get out of it... that's what it's all about.&lt;/p&gt;

&lt;p&gt;And eventually, all these options that used to feel overwhelming? They're going to feel pretty damn freeing when you can flex them. 💪&lt;/p&gt;




&lt;p&gt;I titled this post the way I did because of the plot from Dragon Zakura. One of the core themes is drawing out the sense of conviction, and I like that word a lot since "sense of belief" and "motivation" have been overtaken by toxic positivity.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-481944238616494080-502" src="https://platform.twitter.com/embed/Tweet.html?id=481944238616494080"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-481944238616494080-502');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=481944238616494080&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;It's nice to be inspired. It's nice to have reminders for your self-esteem. Yet, those can be fleeting.&lt;/p&gt;

&lt;p&gt;With conviction, it's set. &lt;/p&gt;

&lt;p&gt;For now, after feeling pretty directionless for some time, I know I want to keep coding!  &lt;/p&gt;

</description>
      <category>motivation</category>
      <category>codenewbie</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Slow Down When Proofreading</title>
      <dc:creator>commdao</dc:creator>
      <pubDate>Mon, 28 Jun 2021 18:38:08 +0000</pubDate>
      <link>https://dev.to/commdao/slow-down-when-proofreading-16m</link>
      <guid>https://dev.to/commdao/slow-down-when-proofreading-16m</guid>
      <description>&lt;p&gt;It's sort of a blessing and a curse that spelling errors can break the code for everyone &lt;em&gt;at any level&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KxTMtsPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/db7i42upgxv7zlyd77tx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KxTMtsPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/db7i42upgxv7zlyd77tx.png" alt="not a function ERROR" width="461" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today, I had the console show me right where things were problematic &lt;strong&gt;(LPT: use the console)&lt;/strong&gt;, but I was so focused on trying to make sense of the function (BUT IT IS A FUNCTION, I SWEAR) that I didn't notice the &lt;code&gt;addEventrListener&lt;/code&gt; itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J8WPiVD2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxq0etxcvm2gbs3tsvnn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J8WPiVD2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxq0etxcvm2gbs3tsvnn.png" alt="image" width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Easier said than done I'm sure, but I probably could've saved more time if I took things slow from the start.&lt;/p&gt;

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