<?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"><channel><title><![CDATA[Anthony's Techie Thoughts]]></title><description><![CDATA[Techie thoughts from Anthony Nanfito, a former mathematics teacher turned data analyst. ]]></description><link>https://blog.ananfito.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 04:39:21 GMT</lastBuildDate><atom:link href="https://blog.ananfito.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Never Give Up]]></title><description><![CDATA[My paternal grandfather often said, “never ever give up”. This sense of perseverance was instilled in me and is something I have carried throughout my life. Most recently, it has paid off in achieving my goal of transitioning out of education and int...]]></description><link>https://blog.ananfito.dev/never-give-up</link><guid isPermaLink="true">https://blog.ananfito.dev/never-give-up</guid><category><![CDATA[career switch]]></category><category><![CDATA[Data Science]]></category><category><![CDATA[data analytics]]></category><category><![CDATA[data analyst]]></category><category><![CDATA[perseverance]]></category><category><![CDATA[career advice]]></category><category><![CDATA[job search]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Thu, 27 Feb 2025 23:31:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/Wpnoqo2plFA/upload/e3846da196c410f44e342c148c276651.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>My paternal grandfather often said, “never ever give up”. This sense of perseverance was instilled in me and is something I have carried throughout my life. Most recently, it has paid off in achieving my goal of transitioning out of education and into the field of data analytics.</p>
<p>Yesterday was my last day working in the education industry. I have wanted to be an educator since I was in middle school and I actively worked toward achieving that goal by first starting to tutor other students. After high school while studying mathematics at university, I also began taking education classes which included how to teach mathematics and other pedagogical strategies.</p>
<p>I participated in an internship where I taught a university-level course. I continued tutoring. I continued studying. After many years of perseverance, I completed my credential program and entered the workforce as a teacher. I taught full-time at the high school level for five years. Then I taught online and internationally for another five years.</p>
<p>In the final year and half of my education career, I had the distinct privilege of passing on my programming and pedagogical knowledge to other teachers. This enabled them to teach programming and robotics directly in their mathematics classroom. I’m so honored to have had this privilege and watch their excitement as they learned programming and their students learn how to program as well.</p>
<p>Yet, as grateful as I am to have worked in education internally I knew something was amiss. So I started to look for other things that peaked my interest. One of those things is computer programming. In December 2020, I started learning how to program in Python. This eventually led me to take some online certifications in programming, including a certification in web development and another in data analytics. For a while, I looked around for some sort of web development position, but unfortunately didn't find anything.</p>
<p>I came to the conclusion that while I enjoyed working on various web development projects it was really the combination of mathematics and programming that truly intrigued my interest. And so I continued to focus on developing my data analytics skills. Most recently I have enrolled in a graduate program at Sacramento State where I am deepening my knowledge of both programming and data science in the Masters of Science Business Analytics program.</p>
<p>Through this unwavering perseverance and continued dedication to my studies, I have finally achieved the goal I set for myself years ago, which was to transition into a technical oriented career. I am very happy to announce that I will soon begin my career as a research data analyst at the California Department of Healthcare Services.</p>
<p>I know the job market has been particularly rough and challenging to many people who are looking for jobs in the tech industry. To those people I just wanna say that I have been where you are. You send out countless applications and oftentimes hear nothing back. And on the rare occasion where you do hear something back it's usually a letter of rejection.</p>
<p>This is where the power of perseverance comes into play. If this is something that you truly desire, then you will find the inner strength to get there.</p>
<p>In the meantime, you need to focus on whatever day-to-day things you need to do to get by. Whether that's working a job with a toxic boss or working multiple jobs to pay the bills. Whatever it is, keep in mind it is just a stepping stone to whatever comes next. And sometimes – as difficult as it is – you have to let the path in front of you unfold on its own.</p>
<p>On this path it is better to focus on what you can control.</p>
<p>You can control your reaction to the world and events along the path.</p>
<p>You can control how often you study or put into practice your newfound skills.</p>
<p>You can control how many applications you send out.</p>
<p>You can control how many networking events you go to.</p>
<p>You can control how many authentic connections you make.</p>
<p>If you keep focusing on what you can control instead of what you cannot control, you will end up in a much happier place.</p>
<p>I say that both as someone who has done both. I know when I focus on what I can control I feel much better and I am much happier. As opposed to when I focus on the things I cannot control. When I do that, I am miserable. This is a lesson I have learned countless times and I hope I’m further along the way to internalizing it completely.</p>
<p>If you're reading this post and looking for any piece of advice, it would be that. Remember to focus on what you can control. And if it's something you truly want and truly believe you are capable of, then keep going. Don't stop. And never ever give up.</p>
]]></content:encoded></item><item><title><![CDATA[Quick Start Guide to SQL Queries]]></title><description><![CDATA[Intro
Recently, I took a deep dive into analytics to finish some case studies I started as part of my coursework for the Google Data Analytics Certificate. Part of that deep dive meant reviewing SQL queries, but it had been a while since I worked wit...]]></description><link>https://blog.ananfito.dev/quick-start-guide-to-sql-queries</link><guid isPermaLink="true">https://blog.ananfito.dev/quick-start-guide-to-sql-queries</guid><category><![CDATA[SQL]]></category><category><![CDATA[beginnersguide]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[beginner]]></category><category><![CDATA[guide]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Mon, 04 Sep 2023 21:14:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1693861997186/7b29750e-069b-4744-9773-be3782d60c72.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Recently, I took a deep dive into analytics to finish some case studies I started as part of my coursework for the <a target="_blank" href="https://www.credly.com/badges/dafff9fa-de9f-497f-bd7f-d98c46a24e73/public_url">Google Data Analytics Certificate</a>. Part of that deep dive meant reviewing SQL queries, but it had been a while since I worked with them so I put together a cheat sheet of the basics.</p>
<p>In this post, you’ll find a list of the basic SQL queries, what they mean, and example code snippets. For these examples, I used <a target="_blank" href="https://console.cloud.google.com/bigquery">Google’s BigQuery</a> to practice. Depending on the SQL database you use the naming conventions of the columns and tables may be different, but the basic setup of the queries will be the same.</p>
<p>You can find the markdown version of this cheat sheet in <a target="_blank" href="https://github.com/ananfito/LearnInPublic">my LearnInPublic repo</a> on GitHub.</p>
<h2 id="heading-reserved-words">Reserved Words</h2>
<h3 id="heading-select">SELECT</h3>
<p><strong>What it does</strong>:</p>
<ul>
<li><p>Specifies or “selects” the column(s) you want to query</p>
</li>
<li><p>Can use the asterisk <code>*</code> if you want to select all the columns in the database</p>
</li>
<li><p><code>databaseName.columnName</code> → for specifying which DB and column, useful when joining datasets</p>
</li>
</ul>
<h3 id="heading-from">FROM</h3>
<p><strong>What it does</strong>:</p>
<ul>
<li><p>Specifies which table to pull data from</p>
</li>
<li><p>At this stage, you can introduce an alias for column names by adding it to the end of the <code>FROM</code> clause. This is useful for making them easier to remember. For example, <code>FROM Player_Attributes attributes</code></p>
</li>
</ul>
<p><strong>Example</strong>:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span>
  *
<span class="hljs-keyword">FROM</span>
  <span class="hljs-string">`bigquery-public-data.usa_contagious_disease.project_tycho_reports`</span>
</code></pre>
<p>Here we will get all of the columns from the table Project Tycho Reports of the USA Contagious Disease dataset.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1693862164817/a7e01a7b-b6f8-48c9-a254-c05957bdb5e5.png" alt /></p>
<p>As you can see there are 759,467 rows in the results. That’s a lot and this is where adding other clauses will help narrow down the results. Alternatively, we also have the option to export the data which then can be used with other analysis software or programming language (e.g., Python) to better understand it.</p>
<p>Instead of using the asterisk <code>*</code> to select all the columns we could also select a single column name (or multiple column names separated by commas <code>,</code>):</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span>
  disease
<span class="hljs-keyword">FROM</span>
  <span class="hljs-string">`bigquery-public-data.usa_contagious_disease.project_tycho_reports`</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1693862175267/2268c2eb-0ca7-42b6-9dd0-c75cf62c0be5.png" alt /></p>
<h3 id="heading-where">WHERE</h3>
<p><strong>What it does</strong>:</p>
<ul>
<li><p>Specifies the condition(s) for the data you want to see (e.g., all values greater than 100)</p>
</li>
<li><p>The percent symbol <code>%</code> can be used for searching strings</p>
</li>
<li><p>The greater than <code>&gt;</code> and less than <code>&lt;</code> symbols are used for looking for numerical values</p>
</li>
<li><p>The underscore <code>_</code> is used for searching for characters</p>
</li>
<li><p>The <code>in</code> keyword performs an <strong><em>exact</em></strong> match while the <code>like</code> keyword performs a looser match</p>
</li>
<li><p>There is also <code>between</code>, <code>and</code>, <code>or</code>, <code>is null</code>, <code>is not null</code></p>
</li>
</ul>
<p><strong>Example</strong>:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span>
  *
<span class="hljs-keyword">FROM</span>
  <span class="hljs-string">`bigquery-public-data.usa_contagious_disease.project_tycho_reports`</span>
<span class="hljs-keyword">WHERE</span>
  disease=<span class="hljs-string">"MUMPS"</span>
</code></pre>
<p>Here we can select all of the columns from the table, but the <code>WHERE</code> clause specifies we only want the entries where the disease is MUMPS. This means other diseases are not included.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1693862189045/1b84bc0f-a851-4df2-9770-7921a8fc432c.png" alt /></p>
<p>Here’s another example where we are looking for a numerical value. In this case, when the number of incidences of a disease per 100,000 people is greater than 1.</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span>
  *
<span class="hljs-keyword">FROM</span>
  <span class="hljs-string">`bigquery-public-data.usa_contagious_disease.project_tycho_reports`</span>
<span class="hljs-keyword">WHERE</span>
  incidence_per_100000&gt;<span class="hljs-number">1</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1693862199722/13d5df91-52f8-4777-bfd0-40329ef7fb88.png" alt /></p>
<p>We can even combine these statements with the <code>and</code> keyword and look for the disease “MUMPS” where the incidence per 100,000 people is greater than 1.</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span>
  *
<span class="hljs-keyword">FROM</span>
  <span class="hljs-string">`bigquery-public-data.usa_contagious_disease.project_tycho_reports`</span>
<span class="hljs-keyword">WHERE</span>
  disease=<span class="hljs-string">"MUMPS"</span> <span class="hljs-keyword">and</span> incidence_per_100000&gt;<span class="hljs-number">1</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1693862209619/40ed72f8-fba4-4c45-92f1-62a60d9460ad.png" alt /></p>
<h3 id="heading-group-by">GROUP BY</h3>
<p><strong>What it does</strong>:</p>
<ul>
<li>We can use the fields or column names to group things together</li>
</ul>
<p><strong>Example</strong>:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span>
  disease,
  <span class="hljs-keyword">AVG</span>(incidence_per_100000) <span class="hljs-keyword">as</span> avg_incidence
<span class="hljs-keyword">FROM</span>
  <span class="hljs-string">`bigquery-public-data.usa_contagious_disease.project_tycho_reports`</span>
<span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span>
  disease
</code></pre>
<p>Here we have a list of the average incidence per 100,000 people grouped by disease.</p>
<p>There are two things to note in this example:</p>
<ol>
<li><p>I used the keyword <code>as</code> to give an alias to the <code>avg_incidence</code>. This can be used when doing a calculation or with a column name that might be particularly long. This helps us make the column names more human-friendly.</p>
</li>
<li><p>There is no ordering to this list, but we can fix that with our next example when we use the <code>ORDER BY</code> clause.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1693862225761/5718cefb-3f2c-4f29-a8ab-e400761ce017.png" alt /></p>
<h3 id="heading-order-by">ORDER BY</h3>
<p><strong>What it does</strong>:</p>
<ul>
<li><p>Here we can specify a column name to order the results by</p>
</li>
<li><p>By default, it’s in ascending order but we can add <code>DESC</code> to the end for descending order</p>
</li>
</ul>
<p><strong>Example</strong>:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span>
  disease,
  <span class="hljs-keyword">AVG</span>(incidence_per_100000) <span class="hljs-keyword">as</span> avg_incidence
<span class="hljs-keyword">FROM</span>
  <span class="hljs-string">`bigquery-public-data.usa_contagious_disease.project_tycho_reports`</span>
<span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span>
  disease
<span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> 
  avg_incidence
</code></pre>
<p>Here we have a list of the average incidence per 100,000 people grouped by disease and ordered based on the incidence.</p>
<p>By default, it is listed from lowest to highest (ascending order). But we can also add the keyword <code>desc</code> to the <code>ORDER BY</code> clause in order to list it from highest to lowest (descending). See the second example below.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1693862246884/6e624660-e070-4cb0-a22b-3efe26713a8b.png" alt /></p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span>
  disease,
  <span class="hljs-keyword">AVG</span>(incidence_per_100000) <span class="hljs-keyword">as</span> avg_incidence
<span class="hljs-keyword">FROM</span>
  <span class="hljs-string">`bigquery-public-data.usa_contagious_disease.project_tycho_reports`</span>
<span class="hljs-keyword">GROUP</span> <span class="hljs-keyword">BY</span>
  disease
<span class="hljs-keyword">ORDER</span> <span class="hljs-keyword">BY</span> 
  avg_incidence <span class="hljs-keyword">desc</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1693862257509/ed36f1c3-d459-4be1-8123-6438bd9db0d3.png" alt /></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Those are the basic SQL queries you need to get started with querying a database. At the very least, you need to know how to use <code>SELECT</code> and <code>WHERE</code> so that you can pull data out. However, it’s helpful to know other clauses like <code>GROUP BY</code> and <code>ORDER BY</code> to narrow down or filter your data. This is particularly helpful with large datasets.</p>
<p>We also got a preview of how we can use functions, like <code>AVG()</code>, to perform calculations and return the results in a column. This helps us get a glance at the shape of the data which might lead us to areas for deeper exploration.</p>
<p>This is just a quick start guide. Like all things technology, there’s a lot more you can do with SQL and I’m not an expert by any means. But I do enjoy learning and sharing what I learn as I go. If you’d like to learn more about SQL, check out the ‘References &amp; Resources’ section. I’ve included a list of resources that were helpful to me when learning SQL and writing this post. Happy coding!</p>
<h2 id="heading-references-andamp-resources">References &amp; Resources</h2>
<p>If you want to take a deeper dive into SQL queries, I found the following resource helpful while writing this post.</p>
<ul>
<li><p><a target="_blank" href="https://youtu.be/kbKty5ZVKMY">Learn Basic SQL</a> in 15 Minutes (YouTube Tutorial by Adam Finer)</p>
</li>
<li><p><a target="_blank" href="https://www.datacamp.com/cheat-sheet/sql-basics-cheat-sheet">SQL Basics Cheat Sheet</a> by Datacamp</p>
</li>
<li><p><a target="_blank" href="https://www.dataquest.io/blog/sql-cheat-sheet/">SQL Cheat Sheet</a> by Dataquest</p>
</li>
<li><p><a target="_blank" href="https://www.sqlstyle.guide/">SQL Style Guide</a> by Simon Holywell</p>
</li>
</ul>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks for reading this post. I hope you found it useful. <strong>If you have a favorite resource for studying SQL, share it in the comments.</strong> Hearing your thoughts makes this more of a conversation and helps us all learn.</p>
]]></content:encoded></item><item><title><![CDATA[One-Year of Learning Frontend Web Development]]></title><description><![CDATA[Introduction
I have spent most of the past two years learning to code. For the past year, I’ve primarily been focused on frontend web development.
In this post, I will share my top 5 resources (in no particular order) for learning web development and...]]></description><link>https://blog.ananfito.dev/one-year-of-learning-frontend-web-development</link><guid isPermaLink="true">https://blog.ananfito.dev/one-year-of-learning-frontend-web-development</guid><category><![CDATA[webdev]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[learningwebdevelopment]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[#codenewbies]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Sun, 20 Aug 2023 03:59:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1692503807145/c50b6533-0013-40dc-a29e-1be0449edfb0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>I have spent most of the past two years learning to code. For the past year, I’ve primarily been focused on frontend web development.</p>
<p>In this post, I will share my top 5 resources (in no particular order) for learning web development and why I like them. I will also share a basic roadmap of what topics to learn as well as some thoughts on how to escape Tutorial Hell. Lastly, I’ve included some bonus resources — YouTube channels and websites — that have also helped me out along the way.</p>
<p>A quick note before we begin:</p>
<blockquote>
<p>These are resources that worked for me. They may or may not work for you. So don’t take my word as “gospel” and think you have to follow only these resources. It’s a journey and we all take different paths to the same destination.</p>
<p>I hope that by sharing what’s worked for me, you can find something that works for you. Even if it means none of the resources on this list. By knowing what does <strong>not</strong> work for you you have a better idea of what <em>does</em> work for you.</p>
</blockquote>
<p>This post is inspired by <a target="_blank" href="https://www.swyx.io/learn-in-public">Swyx’s LearnInPublic and Open Source Knowledge</a> approach to learning. You can find a condensed version of this list in <a target="_blank" href="https://github.com/ananfito/LearnInPublic">my LearnInPublic repo</a>.</p>
<h2 id="heading-what-to-learn-first">What to learn first</h2>
<p>When you’re learning something new it’s helpful to know where you need to go. In a traditional education setting, this is where curriculum and syllabi come in handy. However, as a self-taught learner, these are not always easily accessible.</p>
<p>Thankfully, in the age of the Internet and Open Source Knowledge, it’s quite easy to find a roadmap (i.e., syllabus) for what topics to study as a self-taught developer. Most of the time you can find these roadmaps with a quick Internet search (e.g., search for "roadmap for becoming a frontend developer").</p>
<p>You can also look at courses and use their outlines as a guide. Or you can also use job postings to see what the market wants, but this approach can be time-consuming and subject to change with time.</p>
<p>For myself, I eventually decided to invest in Scrimba’s Pro membership and gain access to the <a target="_blank" href="https://scrimba.com/learn/frontend">Frontend Career Path</a> for two reasons:</p>
<ol>
<li><p>They had the roadmap already figured out and it aligned with what I wanted to study</p>
</li>
<li><p>By putting my “money where my mouth is” I was more motivated to study and complete projects (whereas before I was kind of bouncing from one free resource to the next not learning or internalizing much)</p>
</li>
</ol>
<p>Thus, the paid resource became my primary learning resource while the free ones I discovered became supplementary learning resources. This worked out well when I needed extra or deeper practice with a topic.</p>
<h3 id="heading-a-basic-roadmap">A basic roadmap</h3>
<p>Learning frontend web development (or any programming language or framework) contains <strong><em>a lot of</em></strong> concepts. I won’t go into all of the details here because each person’s path will be unique to their situation. Some have the resources to go to a 5-day-a-week, 8 hours-a-day bootcamp while others need a slower, self-paced online learning environment.</p>
<p>Regardless of which option you choose, here’s a basic roadmap of the big ideas that your path should contain:</p>
<ul>
<li><p>Understand the basics of HTML and CSS</p>
</li>
<li><p>BUILD SOMETHING</p>
<ul>
<li>A simple landing page will do</li>
</ul>
</li>
<li><p>Learn JavaScript fundamentals</p>
<ul>
<li>OOP, data structures and algorithms, functions, etc.</li>
</ul>
</li>
<li><p>BUILD SOMETHING</p>
<ul>
<li>A to-do list is the usual go to</li>
</ul>
</li>
<li><p>Learn a framework (e.g., React, Vue, Angular, etc.)</p>
</li>
<li><p>BUILD SOMETHING</p>
<ul>
<li>At this point, you should be comfortable building a single-page app or maybe a multi-page website with an app</li>
</ul>
</li>
</ul>
<p>Again, this is a very rough, basic roadmap. I’ve intentionally left a lot of the finer details off the list. But you can think of this as “broad brush strokes” for what you need to study.</p>
<h3 id="heading-escape-tutorial-hell-by-building-something">Escape tutorial hell by building something</h3>
<p>In the above roadmap, I hope you noticed that I put “BUILD SOMETHING” in between each step. If you didn’t, I’m calling it out now because I think it’s important.</p>
<p>A lot of people talk about Tutorial Hell — being stuck going from tutorial to tutorial, course to course, without actually learning how to code. A lot of people talk about the best way to break out of Tutorial Hell is to build something. And I wholeheartedly agree. Let’s consider an analogy.</p>
<blockquote>
<p><strong>Learning to code by only watching videos is like learning to ride a bicycle by only watching videos. You won’t learn to ride until you put your feet on the pedals and you won’t learn to code until you put your fingers on the keyboard.</strong></p>
</blockquote>
<p>Let’s go a little deeper with this analogy. Let’s say you’re trying to learn to ride a bicycle. You buy a book that talks about the components of the bicycle and how they work. You watch a bunch of YouTube videos of people riding bicycles, watching what they do with their feet on the pedals.</p>
<p>Heck! Some of the videos even provide step-by-step instructions for riding the bicycle. You outline the steps in notes and rehearse them in your mind, but you haven’t set foot on a bicycle yet so you don’t know how to ride one yet. But you know humans can ride bicycles because you’ve seen them outside, in the real world.</p>
<p>However, <strong><em>you</em></strong> are not going to learn to ride a bicycle by only reading books and watching videos about it. Until you get on the bicycle, put your feet on the pedals and start pedaling, you’re not going to develop the muscle memory you need to balance and ride the bicycle.</p>
<p>The same is true for learning to code. You can read all the books and watch all the YouTube videos and take all the courses, but until you start to put your fingers on the keyboard and force your brain to figure out what goes where you won’t learn how to code.</p>
<p>This is why, I think, in addition to taking courses that have a “hands-on” approach you also need to build some things of your own. Now, you can build whatever you want. You create a clone of something or build from scratch. The choice is yours.</p>
<p>I do suggest starting small and building up from there. Build a single webpage first. Then build a multi-page website. (This is great practice for HTML and CSS).</p>
<p>Build a single-page web app with JavaScript (or with your preferred framework). Maybe it just counts the number of clicks each time the user clicks a button. Doesn’t need to be fancy or complicated, but in the process of building it you will learn, fortify your knowledge, and build your “muscle memory”.</p>
<p>Then move on to more complex projects. If you start something and realize you have some missing knowledge, great! You’re learning! Now, go out and find a resource (e.g., docs, tutorial, video, course) that will help you fill in the missing knowledge.</p>
<p><strong>This is a slow and steady race.</strong> I know bootcamps and coding courses make promises about learning to code in a matter of months (or weeks!) — and maybe that’s true for a select few — but most humans need time to process to learn and do things well. That’s just how our brains work. It <strong>does not</strong> happen overnight.</p>
<p>Okay, I’ll get off the “soap box” and get to the list.</p>
<h2 id="heading-my-top-resources">My top resources</h2>
<p>These are the top resources that have made the most impact on my coding journey. I have included what they offer and why I like them. I have not listed them in any particular order of importance, but I will admit that Scrimba is probably my favorite from this list.</p>
<h3 id="heading-freecodecamp">freeCodeCamp</h3>
<p>Link: <a target="_blank" href="https://freecodecamp.org">https://freecodecamp.org</a></p>
<p><strong>What they offer:</strong></p>
<ul>
<li><p>Free verified certifications in frontend, backend, data analysis, machine learning, and more.</p>
</li>
<li><p>Full-length YouTube courses with industry experts and high-quality teachers</p>
</li>
<li><p>Self-paced hands-on exercises and projects</p>
</li>
</ul>
<p><strong>Why I like them:</strong></p>
<ul>
<li><p>To earn each certification you must complete and submit a series of projects</p>
</li>
<li><p>This hands-on approach forces you to get your hands on the keyboard and put your abilities to the test</p>
</li>
<li><p>Building projects is the best way to grow your skills and escape “tutorial hell”</p>
</li>
<li><p>Of all the free resources I’ve encountered, this is by far the best in terms of quality and quantity</p>
</li>
<li><p>They have a supportive learning community on Discord and in their website’s forums</p>
</li>
</ul>
<h3 id="heading-sololearn">Sololearn</h3>
<p>Link: <a target="_blank" href="https://sololearn.com">https://sololearn.com</a></p>
<p><strong>What they offer:</strong></p>
<ul>
<li><p>More than 20 courses in Python, JavaScript, Web Development, Data, and more.</p>
</li>
<li><p>The lessons are “bite-sized” and can be completed in 5-10 mins.</p>
</li>
<li><p>Each lesson includes practice exercises and mini-project to test your skills</p>
</li>
<li><p>You get a certificate to validate your results</p>
</li>
<li><p>They have a free plan which offers bite-sized lessons and help from the community, but for as little as $6/month you can access unlimited practice, bonus exercises, and advanced goals and stats</p>
</li>
</ul>
<p><strong>Why I like them:</strong></p>
<ul>
<li><p>I took their JavaScript course and it was a great way for me to review and reinforce concepts like data structures and algorithms, OOP, etc.</p>
</li>
<li><p>Their free plan does limit how many times you can practice (it resets daily) which was fine for me because I was using them to review.</p>
<ul>
<li><p>However, if I were using this as my primary learning resource I probably would consider subscribing so I could unlock the unlimited practice.</p>
</li>
<li><p>That said, I kind of liked the limited practice because it forced me to focus more since I only had a limited number of tries before I had to wait a day for it to reset.</p>
</li>
<li><p>Also, when I did reach the max number of tries it forced me to walk away from the challenge and think about something else. When I came back to it, I usually had the solution sitting at the top of my mind. Funny how the mind works. Again, <strong>this is a slow and steady race — a marathon, not a sprint.</strong></p>
</li>
</ul>
</li>
</ul>
<h3 id="heading-scrimba">Scrimba</h3>
<p>Link: <a target="_blank" href="https://scrimba.com">https://scrimba.com</a></p>
<p><strong>What they offer:</strong></p>
<ul>
<li><p>Hands-on project-based learning in their browser-based code editor</p>
</li>
<li><p>Free courses, but they also offer <a target="_blank" href="https://scrimba.com/pricing">Pro and Bootcamp memberships</a></p>
<ul>
<li><p>Pro is self-paced and includes access to the online Discord Community</p>
<ul>
<li><p>Priced at $18/month and billed every semester (6 months)</p>
</li>
<li><p>This level is significantly cheaper than most bootcamps</p>
</li>
</ul>
</li>
<li><p><a target="_blank" href="https://scrimba.com/bootcamp">Bootcamp</a> includes everything in Pro PLUS weekly virtual bootcamp sessions with a cohort of fellow learners and a coach</p>
<ul>
<li><p>Priced at $700 for 3 months</p>
</li>
<li><p>Gain access to study groups, mentors, code reviews, group projects</p>
</li>
<li><p>I haven’t used it, but I think it’s a great price for what they offer especially when compared to other “bootcamps” offering the same</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><strong>Why I like them:</strong></p>
<ul>
<li><p>A<strong>mazing in-browser editor that lets you directly edit whatever code the instructor is discussing. It’s amazing!</strong></p>
<ul>
<li><p>Much better than switching windows/tabs between a YouTube tutorial and a code editor</p>
</li>
<li><p>It feels like you and the instructor are using the same computer. In a way, you’re pair programming together</p>
</li>
</ul>
</li>
<li><p>Fantastic instructors that break down ideas and concepts into easily manageable pieces</p>
<ul>
<li>Most videos are around 5 minutes long but never longer than 8-10</li>
</ul>
</li>
<li><p>They have an active and supportive community</p>
<ul>
<li><p>Weekly live sessions covering a variety of topics from practical coding skills to soft skills and everything in between</p>
</li>
<li><p>Forums and channels to ask others for help</p>
</li>
</ul>
</li>
<li><p>Strong “hands on the keyboard” approach to teaching</p>
<ul>
<li><p>Throughout each module, and indeed in most videos, the instructor gives you challenges to practice what you’re learning.</p>
<ul>
<li><p>Sometimes this is extending something you’ve already learned. Other times it’s deleting all the coding and starting from scratch.</p>
</li>
<li><p>This is a great way to build “muscle memory” and learn to code</p>
</li>
</ul>
</li>
<li><p>Each module ends with a solo project where you get to put your skills to the test.</p>
<ul>
<li><p>Projects are outlined with a set of requirements and a Figma file</p>
</li>
<li><p>Plus, when you finish you can share with the community and get feedback</p>
</li>
<li><p>You can also add them to your portfolio</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>A great <a target="_blank" href="https://scrimba.com/podcast/">weekly podcast</a> where they alternate between interviewing newly hired devs and seasoned pros</p>
<ul>
<li>I love hearing about transitioning into tech from both sides: beginners and experts.</li>
</ul>
</li>
</ul>
<h3 id="heading-frontend-mentor">Frontend Mentor</h3>
<p>Link: <a target="_blank" href="https://frontendmentor.io">https://frontendmentor.io</a></p>
<p><strong>What they offer:</strong></p>
<ul>
<li><p><a target="_blank" href="https://www.frontendmentor.io/challenges">Free and paid challenges</a> to build your portfolio and test your skills</p>
<ul>
<li>I think there are over 100 free challenges</li>
</ul>
</li>
<li><p>Challenges range from beginner (e.g., a preview card) to guru (e.g., full-scale website):</p>
<ul>
<li><p>Newbie</p>
</li>
<li><p>Junior</p>
</li>
<li><p>Intermediate</p>
</li>
<li><p>Advanced</p>
</li>
<li><p>Guru</p>
</li>
</ul>
</li>
<li><p>Their <a target="_blank" href="https://www.frontendmentor.io/pro">Pro membership</a> gives you access to:</p>
<ul>
<li><p>Professional designs for multi-page websites</p>
</li>
<li><p>Sketch and Figma design files (these aren’t included in the free challenges so you have to do your best to “eyeball” the design)</p>
</li>
<li><p>Mobile, tablet, and desktop layout designs</p>
</li>
<li><p>Professional design system</p>
</li>
</ul>
</li>
<li><p>Each challenge you complete earns you points, once you’ve earned enough points you can gain access to their hiring platform</p>
<ul>
<li><p>The more difficult the challenge the more points you can earn</p>
</li>
<li><p>You can also earn points by giving feedback to others in the community</p>
</li>
</ul>
</li>
<li><p>Feedback on challenge solutions</p>
<ul>
<li><p>An automated process gives you basic feedback on your challenge submission</p>
</li>
<li><p>The community can see your solution and provide targeted feedback</p>
</li>
<li><p>You can also see other solutions, give feedback, and learn from their approach</p>
</li>
</ul>
</li>
</ul>
<p><strong>Why I like them:</strong></p>
<ul>
<li><p>Great opportunity to practice building things.</p>
<ul>
<li>I’ve only used their free challenges, but I love them nonetheless.</li>
</ul>
</li>
<li><p>Great for when you just want to get your hands on the keyboard but don’t know what to build</p>
<ul>
<li><p>The design decision is already made for you so you just have to build. No need to worry about the following because it’s already decided:</p>
<ul>
<li><p>What color scheme should be used?</p>
</li>
<li><p>Where should the button be placed?</p>
</li>
<li><p>What font family should be used?</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>Supportive and helpful community — both on the website and on Discord.</p>
</li>
</ul>
<p><strong>Tip</strong>:</p>
<p>If you’re not used to receiving feedback, I suggest first finding a way to separate yourself (i.e., your ego) from your work. I did not do this in the beginning and it stunted my growth a little bit (plus it didn’t make me want to use the platform).</p>
<p>It took me some time but I figured out that my work is not who I am. They are separate entities. So a critique of my work is not a critique of myself as an individual.</p>
<p>Moreover, programming is about iteration and getting better which means making revisions when you receive <strong><em>valuable and constructive</em></strong> feedback. The keywords there are “valuable” and “constructive”. If someone is being an <code>@$$h0le</code>, then ignore them.</p>
<p>That said, I’m still human and still struggle with putting the ego aside so, like all things, it’s a work-in-progress.</p>
<p>In addition to receiving feedback, you also have the opportunity to give feedback. This is a great way to articulate what you know and understand about programming and the web development process. And, of course, it gives you a chance to connect and help others.</p>
<h3 id="heading-kevin-powells-conquering-responsive-web-design-course">Kevin Powell’s "Conquering Responsive Web Design" course</h3>
<p>Link: <a target="_blank" href="https://courses.kevinpowell.co/conquering-responsive-layouts">https://courses.kevinpowell.co/conquering-responsive-layouts</a></p>
<p><strong>What they offer:</strong></p>
<ul>
<li><p>Free 21-day course</p>
</li>
<li><p>Responsive layouts with a mobile-first approach to web design</p>
</li>
<li><p>Working with responsive units</p>
</li>
<li><p>Understanding flexbox</p>
</li>
<li><p>Mastering Media Queries</p>
</li>
</ul>
<p><strong>Why I like them:</strong></p>
<ul>
<li><p>The course is slowly delivered over 21 days</p>
<ul>
<li>Some days are intentional rest days so you have time to process the information and work on the projects</li>
</ul>
</li>
<li><p>Practical examples and hands-on projects</p>
</li>
<li><p>Kevin is a great instructor</p>
<ul>
<li><p>He breaks things down into easy-to-understand pieces</p>
</li>
<li><p>His passion for CSS shines through and it’s infectious</p>
</li>
</ul>
</li>
<li><p>His mobile-first approach to responsive web design changed how I create webpages and websites</p>
<ul>
<li><p>He argues that since HTML is already responsive by default that it only takes a few “tweaks” to the CSS and media queries to make a site responsive to different screen sizes</p>
</li>
<li><p>I’ve previously blogged about his approach on <a target="_blank" href="https://blog.ananfito.dev/ive-been-designing-websites-all-wrong">how HTML is responsive by default</a> and <a target="_blank" href="https://blog.ananfito.dev/responsive-web-design-with-3-lines-of-css">how you can use 3 lines of CSS to create responsive websites</a></p>
</li>
<li><p>And I expanded on his ideas from the course in this post about <a target="_blank" href="https://blog.ananfito.dev/how-to-three-methods-for-centering-elements-with-css">three methods for centering elements with CSS</a></p>
</li>
</ul>
</li>
</ul>
<h2 id="heading-tldr">TLDR;</h2>
<p>If you want the speedy version of this list, here’s the condensed version of my favorite web dev resources:</p>
<ul>
<li><p><a target="_blank" href="http://freeCodeCamp.org">freeCodeCamp.org</a> - I completed their Responsive Web Design course. It was very hands-on and focused on building projects. This was a great way for me to get my “feet wet” but I found I wanted to go deeper.</p>
</li>
<li><p><a target="_blank" href="http://Sololearn.com">Sololearn.com</a> - I used this one to reinforce my knowledge of JavaScript, Object Oriented Programming, and Functional Programming</p>
</li>
<li><p><a target="_blank" href="http://Scrimba.com">Scrimba.com</a> - This was a game-changer for me. Their tutorials are entirely hands-on and with their in-browser code editor you can pause the video and work directly with the same code the instructor was working with. It’s very hands-on and has lots of great projects. They have lots of free courses to choose from but I signed up for their pro-membership ($18/month billed every semester) to access their Frontend Developer Career Path which takes you from HTML basics up to Advanced React and Getting Hired. They’ve also got a great online community for support.</p>
</li>
<li><p><a target="_blank" href="http://Frontendmentor.io">Frontendmentor.io</a> - Once you know a little bit, I recommend checking out the challenges here. It’s a great way to build projects, test your skills, and get feedback. They have a paid plan, but there are plenty of free challenges to choose from as well.</p>
</li>
</ul>
<h2 id="heading-other-resources">Other Resources</h2>
<h3 id="heading-youtube-channels">YouTube Channels</h3>
<p>In addition to the above courses, I have also found the following YouTube channels helpful during my journey.</p>
<ul>
<li><p><a target="_blank" href="https://www.youtube.com/@freecodecamp">freeCodeCamp</a></p>
<ul>
<li><p><strong>What they offer</strong>: Huge selection of free, full-length courses on a variety of programming topics</p>
</li>
<li><p><strong>Why I like them:</strong> A great companion to the challenges they offer on their website. I would consider the YouTube videos to be the “lecture” part of the course and the challenges on their website to be the “lab” part of the course where you put the ideas into action.</p>
</li>
</ul>
</li>
<li><p><a target="_blank" href="https://www.youtube.com/@KevinPowell">Kevin Powell</a></p>
<ul>
<li><p><strong>What they offer</strong>: In addition to his free and paid courses, Kevin has some great YouTube videos and tutorials primarily focused on CSS.</p>
</li>
<li><p><strong>Why I like them:</strong> As noted above, I enjoy Kevin’s enthusiasm for CSS and responsive web design and he does a great job of breaking ideas down into smaller components.</p>
</li>
</ul>
</li>
<li><p><a target="_blank" href="https://www.youtube.com/@WebDevSimplified">WebDevSimplified</a></p>
<ul>
<li><p><strong>What they offer</strong>: Kyle offers courses and tutorials on web development.</p>
</li>
<li><p><strong>Why I like them:</strong> Kyle’s teaching style is simple, approachable, and he does a great job of breaking concepts down into easy-to-digest chunks. I often watch his videos when I needed extra help with JavaScript or React.</p>
</li>
</ul>
</li>
<li><p><a target="_blank" href="https://www.youtube.com/@AniaKubow">Code with Ania Kubów</a></p>
<ul>
<li><p><strong>What they offer</strong>: Ania offers courses and tutorials on a variety of coding subjects from frontend to backend.</p>
</li>
<li><p><strong>Why I like them:</strong> She emphasizes learning to code by building. A lot of her tutorials and projects are centered around game development so if you like games, she’s worth checking out. Because of this approach, it’s a great way to see how JavaScript concepts like <code>for</code> loops, <code>map()</code> method, <code>forEach()</code>, and others work in a real-world setting instead of an abstracted coding challenge you might see on a website like Codewars or LeetCode.</p>
</li>
</ul>
</li>
</ul>
<h3 id="heading-websites">Websites</h3>
<ul>
<li><p>Internet Search Engines — <a target="_blank" href="https://duckduckgo.com">DuckDuckGo</a>, <a target="_blank" href="https://ecosia.org">Ecosia</a>, <a target="_blank" href="https://google.com">Google</a>, etc.</p>
<ul>
<li><p>There’s lots of great, helpful content on the Internet — docs, blogs, tutorials — but you need a way to find it. That’s where search engines come in.</p>
</li>
<li><p>If you’re not skilled at using one, you’ll want to learn all the ins and outs of performing searches. Here are some resources for learning how to refine your search engine technique. Note, these resources use Google as their example, but most of the techniques mentioned should work for other search engines as well. If not, you can always look it up! 🙂</p>
<ul>
<li><p><a target="_blank" href="https://edu.gcfglobal.org/en/internetbasics/using-search-engines/1/">Internet Basics - Using search engines</a> (Tutorial by GCF Global featuring videos and images with examples)</p>
</li>
<li><p><a target="_blank" href="https://youtu.be/5ynfoyqqbYE">Advanced Searching with Google Search Engine</a> (9min YouTube tutorial by Loi Liang Yang)</p>
</li>
<li><p><a target="_blank" href="https://youtu.be/BRiNw490Eq0">Google Like a Pro – All Advanced Search Operators Tutorial [2023 Tips]</a> (54min course by freeCodeCamp)</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p><a target="_blank" href="https://developer.mozilla.org/en-US/">MDN Docs</a></p>
<ul>
<li><p>If a dictionary is where writers go to look up definitions, this is where programmers go to look up the meaning of code.</p>
</li>
<li><p>It took a while for me to get used to reading the docs (and sometimes it’s still doesn’t make sense), but this is usually the first place I go when I’m trying to use a method or operator.</p>
</li>
</ul>
</li>
<li><p><a target="_blank" href="https://chat.openai.com/">ChatGPT</a> (or your preferred AI/ML chatbot)</p>
<ul>
<li><p>I use it like a “coding buddy” by asking it questions when I’m stuck, usually, I do this after doing an Internet search and it has yielded a helpful result</p>
</li>
<li><p>Most of the time it’s spot on with its advice, but I almost always have to modify the code it provides to make it fit my situation which I think helps me understand it more deeply.</p>
</li>
</ul>
</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Those are the top resources I’ve used throughout my coding journey. Each person will have their unique challenges when learning to code so don’t take my word as “gospel”. What worked for me may or may not work for you. However, I hope by sharing these resources will lead your closer to finding something that works for you.</p>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks for reading this post. <strong>What is your favorite learning resource? Tell me what it is and why you like it in the comments below.</strong> Hearing your thoughts makes this more of a conversation and helps us both learn. Happy coding!</p>
]]></content:encoded></item><item><title><![CDATA[How-to: Three Methods for Centering Elements with CSS]]></title><description><![CDATA[Introduction
In web development, knowing how to center things with CSS is an essential skills. Like many things in the programming world there is more than one way to do it. Some ways are better than others, but there’s not always a best way. It ofte...]]></description><link>https://blog.ananfito.dev/how-to-three-methods-for-centering-elements-with-css</link><guid isPermaLink="true">https://blog.ananfito.dev/how-to-three-methods-for-centering-elements-with-css</guid><category><![CDATA[CSS]]></category><category><![CDATA[CSS Grid]]></category><category><![CDATA[css flexbox]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[Responsive Web Design]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Sun, 06 Aug 2023 09:13:50 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1691313116593/48ae0268-01ca-43fa-b349-e3be535b8627.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>In web development, knowing how to center things with CSS is an essential skills. Like many things in the programming world there is more than one way to do it. Some ways are better than others, but there’s not always a best way. It often depends on the context of the situation. </p>
<p>In this blog post, I’ll share my three favorite ways for centering elements using CSS. I first learned about these methods from <a target="_blank" href="https://courses.kevinpowell.co/conquering-responsive-layouts">Kevin Powell’s ‘Conquering Responsive Layouts’ course</a> (and in fact, wrote a short <a target="_blank" href="https://ananfito.hashnode.dev/responsive-web-design-with-3-lines-of-css">blog post in December 2022</a> about it, but only covered the first method in that post). Here, I’d like to discuss all three methods: <code>margin</code> and <code>max-width</code>, <code>flex</code>, and <code>grid</code>. </p>
<p>I’ll be assuming you have some familiarity with CSS, flex, and grid. Also, for demonstration purposes I’ll be using the example of a blog website with a single-column layout. I will provide snippets of code throughout the post, but if you’d like to see the source code and live example for these methods, you can view <a target="_blank" href="https://github.com/ananfito/LearnInPublic/tree/main/center-with-css">the repo here</a> and the <a target="_blank" href="https://ananfito.dev/LearnInPublic/center-with-css">live site here</a>.</p>
<h2 id="heading-method-1-using-margin-and-max-width">Method 1: Using <code>margin</code> and <code>max-width</code></h2>
<p>This is probably my favorite way to center elements in CSS. I like it because it’s quick and simple. However, because of its simple approach this also means it’s best used in simple situations. This method works best when you want to center something directly in a vertical column. More complex layouts will require a different or combination of techniques. </p>
<p>If you want to center the <code>body</code> (or any element within its parent container), a quick and easy way to do that is with <code>margin</code> and <code>max-width</code>:</p>
<pre><code class="lang-css"><span class="hljs-comment">/* METHOD 1: Using margin and max-width */</span>
    <span class="hljs-selector-class">.blog-post</span> {
      <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span> auto;
      <span class="hljs-attribute">max-width</span>: <span class="hljs-number">600px</span>;
    }
</code></pre>
<p>In the <code>margin</code> property, the first value sets the top and bottom margin are set to <code>0</code> so that they touch whatever is above and below them. In other words, there’s no gap between the elements but if you wanted to have some space you could set the first value to something other than <code>0</code>.</p>
<p>The second value, <code>auto</code>, will automatically set the left and right margin to the same amount with whatever space is available. This ensures that the element is centered along the vertical axis of the page. </p>
<p>Then the <code>max-width</code> property ensures that the width of the element does not extend beyond the numerical value. In this case, the maximum width will be <code>600px</code> but it can be set to whatever value is desired/needed. </p>
<p>It’s not used in this example, but you can also add <code>width: 80%</code> (or whatever percentage you desire) so that the element fills 80% of the available width. This will allow for a little bit of space on the left and right. This is ideal on mobile or tablet devices where you might want a little bit of space between the left and right edges of the content and the edge of the screen. </p>
<p><strong>NOTE</strong>: When <code>max-width</code> is used in conjunction with <code>width: 80%</code> the element will fill 80% of the available width up to the maximum width. </p>
<p>If you’d like to see a demonstration of this in action, you can view a <a target="_blank" href="https://ananfito.dev/LearnInPublic/center-with-css/method1.html">live example</a> and the <a target="_blank" href="https://github.com/ananfito/LearnInPublic/blob/main/center-with-css/method1.html">source code</a>.</p>
<h2 id="heading-method-2-using-flex">Method 2: Using <code>flex</code></h2>
<p>Another common method for centering elements is to use <code>flex</code> with <code>justify-content</code> and <code>align-items</code>. Continuing with the same example let’s look at how we would use this to center items within a single-vertical column: </p>
<pre><code class="lang-css"><span class="hljs-comment">/* Method 2: Using flex */</span>
<span class="hljs-selector-class">.blog-post-container</span> {
  <span class="hljs-attribute">display</span>: flex;
  <span class="hljs-attribute">flex-direction</span>: column; <span class="hljs-comment">/* REMINDER: with `column`, the main axis is horizonal and cross axis is vertical */</span>
    <span class="hljs-attribute">align-items</span>: center; <span class="hljs-comment">/* `align-items` still affects the cross axis, but with column it works vertically */</span>
}
</code></pre>
<p>Here we’ve set the <code>.blog-post-container</code> class to have a display of <code>flex</code> and centered its children elements using <code>align-items</code>. Since the <code>flex-direction</code> is set to column the <code>align-items</code> affects the cross axis which the vertical axis. This is what places the elements within the center of the flex container. </p>
<p>If you’d like to see a demonstration of this in action, you can view a <a target="_blank" href="https://ananfito.dev/LearnInPublic/center-with-css/method2.html">live example</a> and the <a target="_blank" href="https://github.com/ananfito/LearnInPublic/blob/main/center-with-css/method2.html">source code</a>.</p>
<h2 id="heading-method-3-using-grid">Method 3: Using <code>grid</code></h2>
<p>Lastly, we can use <code>grid</code> to center things too. Using our same blog website example, let’s look at how we would do this: </p>
<pre><code class="lang-css"><span class="hljs-comment">/* Method 3: Using grid */</span>
<span class="hljs-selector-class">.blog-post-container</span> {
     <span class="hljs-attribute">display</span>: grid;
 }
<span class="hljs-selector-class">.blog-post</span> {
  <span class="hljs-attribute">justify-self</span>: center; <span class="hljs-comment">/* this places the div in the center of the grid-column */</span>
    <span class="hljs-attribute">max-width</span>: <span class="hljs-number">600px</span>; <span class="hljs-comment">/* this prevents the div from filling the entire space */</span>
}
</code></pre>
<p>Here we have a little bit of a different set up. We have to set the container (in this case <code>.blog-post-container</code>) to use <code>grid</code> while at the same time setting the properties for the blog post itself. </p>
<p>Since we’re only working with a single column layout we don’t need to worry about <code>grid-template-columns</code> or <code>grid-template-rows</code> or <code>grid-template-areas</code>. Instead, we can focus our  attention on the <code>.blog-post</code> class. </p>
<p>In this above snippet, we can use the <code>justify-self</code> property to center this class within the <code>grid</code> container. And just like with Method 1 we want to set the <code>max-width</code> property so that the content doesn’t span the entire width of the column or window. </p>
<p>If you’d like to see a demonstration of this in action, you can view a <a target="_blank" href="https://ananfito.dev/LearnInPublic/center-with-css/method3.html">live example</a> and the <a target="_blank" href="https://github.com/ananfito/LearnInPublic/blob/main/center-with-css/method3.html">source code</a>.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Those are my three favorite techniques for centering elements. These work best within a single-column layout, but can also be used within more complex layouts (if you want to center something within a section). </p>
<p>I mostly lean toward using Method 1, but what’s great about all of these is they don’t take up more than a few lines of code. This makes them great in a pinch when you want to center something quickly without worrying too much about the layout. </p>
<p>If you’re looking to learn more about these techniques and other ways of designing responsive web design, check out the resources listed below. Note, these are <strong><em>NOT</em></strong> affiliate links. These are just the resources I found useful in learning about these concepts. You can also check out the References section for the documentation I referenced in writing this post. Happy coding!</p>
<h2 id="heading-resources">Resources</h2>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/css-flexbox-tutorial-with-cheatsheet/">CSS Flexbox Tutorial with Flexbox Properties Cheat Sheet</a> (freeCodeCamp) - In-depth tutorial on how to use CSS flex including <code>flex-direction</code>, <code>justify-content</code>, <code>align-content</code>, <code>align-items</code>, <code>align-self</code>, and more. Plus, there’s a video tutorial linked in the post.</li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/css-grid-tutorial-with-cheatsheet">Complete CSS Grid Tutorial with Cheat Sheet</a> (freeCodeCamp) - In-depth tutorial on how to use CSS grid including <code>grid-template-columns</code>, <code>grid-template-rows</code>, <code>grid-template-areas</code>, and more. Plus, there’s a video tutorial linked in the post.</li>
<li><a target="_blank" href="https://courses.kevinpowell.co/conquering-responsive-layouts">Kevin Powell’s ‘Conquering Responsive Layouts’ course</a> - Free 21-day course which gradually guides you through designing mobile-first websites using <code>flexbox</code> and other great tools</li>
<li><a target="_blank" href="https://scrimba.com/learn/cssgrid">Scrimba’s Learn CSS Grid</a> - Free interactive tutorial spread out over 18 tutorials building a website, an image grid, and an article. Plus, you’ll learn how to combine CSS grid with flexbox.</li>
</ul>
<h2 id="heading-references">References</h2>
<ul>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexible_box_layout/Aligning_items_in_a_flex_container">Aligning Items in a Flex Container</a> (MDN Docs)</li>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout">CSS grid layout</a> (MDN Docs)</li>
<li><a target="_blank" href="https://www.w3schools.com/css/css_grid.asp">CSS Grid Module</a> (w3schools)</li>
</ul>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks for reading. I hope you found it useful. 
<strong>What are you favorite techniques for centering content with CSS?</strong>
Let me know in the comments. Hearing your thoughts makes this more of a conversation and helps us both learn. 🚀</p>
]]></content:encoded></item><item><title><![CDATA[Git Command Cheatsheet]]></title><description><![CDATA[Introduction
This week I took a deep dive into Swyx's philosophy of Learn in Public. I first heard about this idea on Episode 125 of The Scrimba Podcast. This episode focused on the topic of developing a personal brand and featured clips from previou...]]></description><link>https://blog.ananfito.dev/git-command-cheatsheet</link><guid isPermaLink="true">https://blog.ananfito.dev/git-command-cheatsheet</guid><category><![CDATA[Git]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[#learning-in-public]]></category><category><![CDATA[#codenewbies]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Sun, 30 Jul 2023 14:34:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1691153798063/3e927f0b-58db-493e-b9c1-04a2a2d965d2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>This week I took a deep dive into <a target="_blank" href="https://www.swyx.io/learn-in-public">Swyx's philosophy of Learn in Public</a>. I first heard about this idea on <a target="_blank" href="https://scrimba.com/podcast/how-to-create-a-personal-brand-and-why-you-need-it/">Episode 125 of The Scrimba Podcast</a>. This episode focused on the topic of developing a personal brand and featured clips from previous episodes. Including Episode 18 which featured an in-depth interview with <a target="_blank" href="https://www.notion.so/c98e3acaf3274e88b6e39fbf34d15dbf?pvs=21">Swyx</a> and his book, <a target="_blank" href="http://learninpublic.org">The Coding Career Handbook</a>.</p>
<p>I listened to both episodes and was so inspired that I purchased the book, joined the community, and (re)started my dailyDevLog journal (a personal journal I use to track my daily progress on projects and what I’m learning).</p>
<p>As a former educator, I fully understand how beneficial writing-to-learn can be. As <a target="_blank" href="https://skeptics.stackexchange.com/a/22409">the quote often attributed to Albert Einstein — but more likely came from Lord Rutherford of Nelson</a> — says, “if you can’t explain it simply, then you don’t understand it well enough”.</p>
<p>That’s always been my goal with writing (both online and offline), but I haven’t been good about writing regularly since I completed my first round of the #100DaysOfCode challenge. My blog posts have been sporadic and I know that regular reflection is what helps our brains process and retain information.</p>
<p>I hope that the resources and inspiration I’ve found in these podcast episodes and in Swyx’s book will help me pursue that goal with renewed energy and commitment.</p>
<p>So, without further ado …</p>
<p>I present to you my latest installment toward that goal. Here is a quick list of the most common git commands I use when working on a project. In addition to this blog post, I’ve also made a GitHub repo, aptly titled <a target="_blank" href="https://github.com/ananfito/LearnInPublic/tree/main">LearnInPublic</a>, in hopes of building a collection of things I’ve found useful along my programming journey.</p>
<h2 id="heading-git-init"><code>git init</code></h2>
<pre><code>git init
</code></pre><p>What it does: </p>
<ul>
<li>Initializes git repo in from CLI</li>
</ul>
<p>Useful when:</p>
<ul>
<li>You start your project! Git will track changes within your repo, but first you've got to initialize it. </li>
</ul>
<h2 id="heading-git-clone"><code>git clone &lt;URL&gt;</code></h2>
<pre><code>git clone &lt;URL&gt;
</code></pre><p>What it does: </p>
<ul>
<li>Clones a remote repo (i.e., creates a copy on your local machine)</li>
</ul>
<p>Useful when:</p>
<ul>
<li>Cloning an open-source repo to your local machine so you can make contributions</li>
<li>Cloning your own remote repo to your local machine</li>
</ul>
<h2 id="heading-git-status"><code>git status</code></h2>
<pre><code>git status
</code></pre><p>What it does:</p>
<ul>
<li>Checks the status of the repo<ul>
<li>Are there any unstaged files? </li>
<li>Are files staged and ready to commit?</li>
</ul>
</li>
</ul>
<p>Useful when: </p>
<ul>
<li>You can't remember if you're last set of changes were committed or not</li>
</ul>
<h2 id="heading-git-remote-add-origin"><code>git remote add origin &lt;URL&gt;</code></h2>
<pre><code>git remote add origin &lt;URL&gt;
</code></pre><p>What it does:</p>
<ul>
<li>Adds a remote origin to a local repo</li>
</ul>
<p>Useful when: </p>
<ul>
<li>You've created a local repo and need to connect it to a remote repo<ul>
<li>In other words, this tells <code>git</code> where to send the files when you use the <code>git push</code> command</li>
</ul>
</li>
</ul>
<h2 id="heading-git-add"><code>git add &lt;FILENAME&gt;</code></h2>
<pre><code>git add &lt;FILENAME&gt;
</code></pre><p>What it does: </p>
<ul>
<li>Adds untracked changes in file to staging (i.e., they're ready to commit to the repo)</li>
</ul>
<p>Useful when: </p>
<ul>
<li>You've made changes to a project and need to stage those changes <em>before</em> you commit the changes to the repo<ul>
<li>In other words, you're happy with the changes and ready to "store" them</li>
</ul>
</li>
</ul>
<h3 id="heading-variant">Variant</h3>
<pre><code>git add .
</code></pre><p>What it does: </p>
<ul>
<li>Adds all files with untracked changes to staging </li>
</ul>
<p>Useful when: </p>
<ul>
<li>You've made mutliple changes to multiple changes. With <code>git add</code> you need to list individual file names after the command so this is useful when you've made lots changes. </li>
</ul>
<p><strong>CAUTION</strong>: Including <em>all</em> files may also include hidden files (e.g., <code>.DS_Store</code>) within the directory where your repo is located. These kinds of files often contain system metadata, however you may not want them in your repo repository, especially if it's a public one. </p>
<p>Further, you may be working on a project that contains access keys. If you add these files and commit them, then push them to a public repo they become available to the public. This could be bad news if these keys give access to a private database.</p>
<p>To solve this, you can either move these files to another directory or add them to a <code>.gitignore</code> file. This file contains a list of files and directories that git will ignore (i.e., it won't track any changes, stage them for commits, or push them to remote repos). </p>
<h2 id="heading-git-commit-m"><code>git commit -m "&lt;COMMIT MSG GOES HERE&gt;"</code></h2>
<pre><code>git commit -m <span class="hljs-string">"&lt;COMMIT MSG GOES HERE&gt;"</span>
</code></pre><p>What it does:</p>
<ul>
<li>Commits the file changes to the repo along with a message about the changes made (e.g., <code>"fix broken link"</code>)</li>
</ul>
<p>Useful when: </p>
<ul>
<li>You're satisfied with the changes you made and want to "save" them</li>
</ul>
<h3 id="heading-variant-1">Variant</h3>
<pre><code>git commit -am <span class="hljs-string">"&lt;COMMIT MSG GOES HERE&gt;"</span>
</code></pre><p>What it does: </p>
<ul>
<li>Adds all untrack files to staging, then commits them (it's a 2-for-1 command)<ul>
<li>Here the <code>-am</code> tag is for adding the untracked files to staging (the <code>a</code> part) and attaching the message (<code>m</code>) for the commit </li>
</ul>
</li>
</ul>
<p>Useful when: </p>
<ul>
<li>You've made <strong>a lot of changes</strong> and don't want to have to type two separate commands for <code>add</code> and <code>commit</code> (i.e., you're feeling lazy you're a productive programmer and want to save time)</li>
</ul>
<h2 id="heading-git-push"><code>git push</code></h2>
<pre><code>git push
</code></pre><p>What it does:</p>
<ul>
<li>Pushes commits to remote repo</li>
</ul>
<p>Useful when: </p>
<ul>
<li>You've made your changes and its time to share them with the world! </li>
</ul>
<h3 id="heading-variant-2">Variant</h3>
<pre><code>git push --all --set-upstream origin
</code></pre><p>What it does:</p>
<ul>
<li>This sets the upstream of the repo to the remote repo so it will push future commits to the remote repo</li>
</ul>
<p>Useful when:</p>
<ul>
<li>You've created a repo on your local machine and you want to push the files to a remote repo</li>
</ul>
<p>Note: Unless you decide to change the upstream, you only need to this once. I usually do it on my first push.</p>
<h2 id="heading-other-commands">Other commands</h2>
<ul>
<li><code>git branch &lt;NAME&gt;</code>: Creates a new branch with desired name (e.g., <code>"add-feature"</code>)</li>
<li><code>git checkout &lt;NAME&gt;</code>: Moves to specified branch (e.g., from <code>main</code> to <code>add-feature</code>)</li>
<li><code>git checkout -b &lt;NAME&gt;</code>: Creates new branch and moves to that branch</li>
<li><code>git branch -d &lt;NAME&gt;</code>: Deletes specified branch</li>
<li><code>git fetch</code>: Fetches new changes from remote repo</li>
<li><code>git merge &lt;NAME&gt;</code>: Merges changes from the named branch into the current branch</li>
</ul>
<h2 id="heading-resources">Resources</h2>
<ul>
<li><a target="_blank" href="https://git-scm.com/doc">Git Documentation</a> - Docs are always a good starting place when you want to learn how to use a tool</li>
<li><a target="_blank" href="https://learngitbranching.js.org/">Learn Git Branching</a> - Fun interactive resource for beginners to learn how git branching works</li>
</ul>
<h2 id="heading-references">References</h2>
<ul>
<li><a target="_blank" href="https://osxdaily.com/2009/12/31/what-is-a-ds_store-file/">What is a .DS_Store file?</a></li>
</ul>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks for reading. I hope you found it useful.</p>
<p><strong>What git commands to you use the most? Did I leave any out?</strong></p>
<p>Let me know in the comments. Hearing your thoughts makes this more of a conversation and helps us both learn. 😄</p>
]]></content:encoded></item><item><title><![CDATA[Project Showcase: Tenzies Clone]]></title><description><![CDATA[Intro
Hello and welcome to another blog post for Anthony’s Techie Thoughts! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer.
In my blog posts, I reflect on...]]></description><link>https://blog.ananfito.dev/project-showcase-tenzies-clone</link><guid isPermaLink="true">https://blog.ananfito.dev/project-showcase-tenzies-clone</guid><category><![CDATA[React]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[CSS]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Fri, 14 Jul 2023 08:48:28 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/ZSPBhokqDMc/upload/c0d92c78b7ce7f4fc616aa45030133d4.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hello and welcome to another blog post for <a target="_blank" href="https://ananfito.hashnode.dev/">Anthony’s Techie Thoughts</a>! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer.</p>
<p>In my blog posts, I reflect on my journey and share things I’m learning along the way. You can find me on <a target="_blank" href="https://hachyderm.io/@infinifito">Mastodon</a>, <a target="_blank" href="https://twitter.com/wordsbyfifi">Twitter</a>, <a target="_blank" href="https://github.com/ananfito">GitHub</a>, and <a target="_blank" href="https://linkedin.com/in/anthonynanfito/">LinkedIn</a>.</p>
<p>In this blog post, I’ll be sharing some thoughts on a recent project I completed: a clone of the Tenzies dice game. Thanks for stopping by and happy coding!</p>
<h2 id="heading-tenzies-clone">Tenzies Clone</h2>
<h3 id="heading-overview">Overview</h3>
<p>This project was introduced in Module 11 "React Basics" of <a target="_blank" href="https://scrimba.com/learn/frontend">the Scrimba Frontend Career Path</a>. It is a clone of the popular dice game, <a target="_blank" href="https://ilovetenzi.com/">Tenzies</a>, and is played the same way.</p>
<p>The goal of the game is to roll the 10 dice until they are the same. During gameplay, players can set aside the number they are trying to reach -- this means these dice will not be rolled during the next roll. They then continue rolling and holding dice until all are the same number.</p>
<p>The bulk of this project was completed during follow-along tutorials, however, the following features were completed independently:</p>
<ul>
<li><p>Ability to track time</p>
</li>
<li><p>Store the player's best time in local storage</p>
</li>
<li><p>Track the number of rolls</p>
</li>
<li><p>Use CSS to add dice dots</p>
</li>
</ul>
<h4 id="heading-built-with">Built with</h4>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>React JS</li>
</ul>
<h4 id="heading-screenshots">Screenshots</h4>
<p><img src="https://github.com/ananfito/tenzies-clone/blob/main/screenshot_tenzies_desktop.png?raw=true" alt="Game title and instructions at the top. In the middle, ten dice laid out in two rows of five. Underneath the dice, the game stats: number of rolls, game time, and best time." /></p>
<p><img src="https://github.com/ananfito/tenzies-clone/blob/main/screenshot_tenzies_desktop-dice-selected.png?raw=true" alt="Game title and instructions at the top. In the middle, ten dice laid out in two rows of five with two dice selected, or held, and highlighted in green. Underneath the dice, the game stats: number of rolls, game time, and best time." /></p>
<h4 id="heading-links">Links</h4>
<ul>
<li><p>Live: <a target="_blank" href="https://tenzies-clone.netlify.app/">https://tenzies-clone.netlify.app/</a></p>
</li>
<li><p>Repo: <a target="_blank" href="https://github.com/ananfito/tenzies-clone">https://github.com/ananfito/tenzies-clone</a></p>
</li>
</ul>
<h3 id="heading-my-big-takeaway-how-to-use-css-grid">My big takeaway: How to use CSS Grid</h3>
<p>This project packed a lot into it! It was a great opportunity to review key practices with React, such as <code>useState</code> and <code>useEffect</code>, but I think my biggest takeaway from this project was learning how to use CSS <code>grid</code> to create the dice dots.</p>
<p>As I learned from <a target="_blank" href="https://dev.to/ekeijl/creating-dice-using-css-grid-j4">this</a> <a target="_blank" href="http://DEV.to">DEV.to</a> <a target="_blank" href="https://dev.to/ekeijl/creating-dice-using-css-grid-j4">blog post by Edwin</a>, the trick here is to use CSS grid with <code>grid-template-areas</code> and the <code>nth-child()</code> pseudo-selector to specify where the dots (or pips) will appear. This is because the dots on an actual dice fall into a 3x3 grid which makes CSS grid a great choice for displaying the dots.</p>
<p>Here's an excerpt of the CSS:</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.die-face</span> {
  <span class="hljs-attribute">box-shadow</span>: <span class="hljs-number">0px</span> <span class="hljs-number">3px</span> <span class="hljs-number">3px</span> <span class="hljs-number">0px</span> <span class="hljs-built_in">rgba</span>(<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0.25</span>); 
  <span class="hljs-attribute">padding</span>: .<span class="hljs-number">20em</span>;
  <span class="hljs-attribute">width</span>: <span class="hljs-number">45px</span>;
  <span class="hljs-attribute">height</span>: <span class="hljs-number">45px</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">5px</span>;
  <span class="hljs-attribute">cursor</span>: pointer;
  <span class="hljs-attribute">display</span>: grid;
    <span class="hljs-comment">/* each area (or letter) will be taken by a dot */</span>
  <span class="hljs-attribute">grid-template-areas</span>: 
      <span class="hljs-string">"a . c"</span>
      <span class="hljs-string">"e g f"</span>
      <span class="hljs-string">"d . b"</span>;
  <span class="hljs-attribute">flex</span>: <span class="hljs-number">0</span> <span class="hljs-number">0</span> auto;
}

<span class="hljs-selector-class">.pip</span> {
  <span class="hljs-attribute">display</span>: block;
  <span class="hljs-attribute">align-self</span>: center;
  <span class="hljs-attribute">justify-self</span>: center;
  <span class="hljs-attribute">width</span>: <span class="hljs-number">8px</span>;
  <span class="hljs-attribute">height</span>: <span class="hljs-number">8px</span>;
  <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">50%</span>;
  <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span>;
  <span class="hljs-attribute">background-color</span>: <span class="hljs-number">#333</span>;
  <span class="hljs-attribute">box-shadow</span>: inset <span class="hljs-number">0</span> <span class="hljs-number">3px</span> <span class="hljs-number">#111</span>, inset <span class="hljs-number">0</span> -<span class="hljs-number">3px</span> <span class="hljs-number">#555</span>;
}

<span class="hljs-comment">/* these assign the dots to the appropriate grid areas */</span>
<span class="hljs-selector-class">.pip</span><span class="hljs-selector-pseudo">:nth-child(2)</span> {
  <span class="hljs-attribute">grid-area</span>: b;
}

<span class="hljs-selector-class">.pip</span><span class="hljs-selector-pseudo">:nth-child(3)</span> {
  <span class="hljs-attribute">grid-area</span>: c;
}

<span class="hljs-selector-class">.pip</span><span class="hljs-selector-pseudo">:nth-child(4)</span> {
  <span class="hljs-attribute">grid-area</span>: d;
}

<span class="hljs-selector-class">.pip</span><span class="hljs-selector-pseudo">:nth-child(5)</span> {
  <span class="hljs-attribute">grid-area</span>: e;
}

<span class="hljs-selector-class">.pip</span><span class="hljs-selector-pseudo">:nth-child(6)</span> {
  <span class="hljs-attribute">grid-area</span>: f;
}

<span class="hljs-comment">/* this places the dot of the 3 and 5 die in the center */</span>
<span class="hljs-selector-class">.pip</span><span class="hljs-selector-pseudo">:nth-child(odd)</span><span class="hljs-selector-pseudo">:last-child</span> {
<span class="hljs-attribute">grid-area</span>: g;
}
</code></pre>
<p>I found this solution to be particularly clever and helpful in completing the independent portions of the project. For a full explanation, I strongly encourage you to read <a target="_blank" href="https://dev.to/ekeijl/creating-dice-using-css-grid-j4">Edwin's post</a> and check out the sandbox he provided at the end of the post.</p>
<h3 id="heading-closing-thoughts">Closing thoughts</h3>
<p>I was excited to work on this project because Tenzies is a game that I’ve played with my family many times. It’s so simple, yet so addictive! The hallmark qualities of a great game. Creating a clone of the game helped me to practice my programming skills and also see the connection between real-world activities and software. And this excites me!</p>
<p>One of the things I love and find fascinating about developing software like this is seeing how activities (like rolling dice) can be broken down into smaller and smaller actions which then can be written as code and executed by a computer. And the best part is when you learn this skill and put it into practice like I have in this project, it’s such an exhilarating moment.</p>
<p>Granted, it takes a lot of hard work, trial and error (maybe lots of errors?), and refactoring to get to that point, but I think that makes it all the more joyous. You get to see the results of how your hard work paid off. And then you get to do it again! These are the two parts of programming I enjoy the most: the process and the results. Which means it’s time to start another project!</p>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks so much for reading this post. I hope you found it helpful. I’d love to know: <strong>what are your favorite parts of programming?</strong> Share your thoughts in the comments below. Hearing your thoughts makes this more of a conversation and helps us all learn. See you next time.</p>
]]></content:encoded></item><item><title><![CDATA[My Top 3 Tips for Staying Focused]]></title><description><![CDATA[Intro
Hello and welcome to another blog post for Anthony’s Techie Thoughts! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer. In my blog posts, I reflect on...]]></description><link>https://blog.ananfito.dev/my-top-3-tips-for-staying-focused</link><guid isPermaLink="true">https://blog.ananfito.dev/my-top-3-tips-for-staying-focused</guid><category><![CDATA[beginner]]></category><category><![CDATA[codenewbie]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[100DaysOfCode]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Tue, 20 Jun 2023 12:43:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/7KLa-xLbSXA/upload/a663b118472287040f7055d34f9eaace.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hello and welcome to another blog post for <a target="_blank" href="https://ananfito.hashnode.dev/">Anthony’s Techie Thoughts</a>! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer. In my blog posts, I reflect on my journey and share things I’m learning along the way. You can find me on <a target="_blank" href="https://hachyderm.io/@infinifito">Mastodon</a>, <a target="_blank" href="https://github.com/ananfito">GitHub</a>, <a target="_blank" href="https://linkedin.com/in/anthonynanfito/">LinkedIn</a>, <a target="_blank" href="https://hashnode.com/@ananfito">Hashnode</a>, <a target="_blank" href="http://DEV.to">DEV.to</a>, and <a target="_blank" href="https://community.codenewbie.org/ananfito">CodeNewbie</a>.</p>
<p>In this blog post, I’ll share my top three tips for staying focused while studying or coding. These came out of a reflection after completing a third round of the <a target="_blank" href="https://www.100daysofcode.com/">#100DaysOfCode challenge</a>. These techniques worked for me and they might work for you. Feel free to take what vibes with you and toss the rest. Alright, let’s get to the tips!</p>
<h2 id="heading-tips-for-staying-focused">Tips for Staying Focused</h2>
<h3 id="heading-tip-1-turn-off-notifications">Tip #1: Turn off notifications 🔕</h3>
<p><a target="_blank" href="https://unsplash.com/photos/xv7-GlvBLFw"><img src="https://images.unsplash.com/photo-1554177255-61502b352de3?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=1170&amp;q=80" alt="Red and white neon sign with a heart and zero." class="image--center mx-auto" /></a></p>
<p><em>Image Credit:</em> <a target="_blank" href="https://unsplash.com/@prateekkatyal"><em>Prateek Katyal</em></a></p>
<p>If you’re looking to stay focused and, perhaps, get into a state of <a target="_blank" href="https://en.wikipedia.org/wiki/Flow_(psychology)">flow</a>, then you’ve got to eliminate distractions. Apart from choosing a quiet working environment, this means turning off notifications on your devices (e.g., phone, tablet, computer) for the duration of your work session. The last thing you want is to hear a ‘ding’ and then get pulled down a virtual rabbit hole and lose valuable work time. Your future self will thank you.</p>
<p>Turn off the notifications and, if you can, put your phone out of arm’s reach. I’ve found that even if I pick up my phone, even when it’s on silent, I can still get sucked into something distracting. So I’ve started following the motto of “out of sight, out of mind” by placing my phone out of arms reach, but still where I can hear my interval timer go off (more on that in Tip #3).</p>
<h3 id="heading-tip-2-listen-to-relaxing-music">Tip #2: Listen to relaxing music 🎶</h3>
<p><a target="_blank" href="https://unsplash.com/photos/5gn2soeAc40"><img src="https://images.unsplash.com/photo-1458560871784-56d23406c091?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=1074&amp;q=80" alt="Close up shot of a record on a turntable with the needle resting on the record. " class="image--center mx-auto" /></a></p>
<p><em>Image Credit:</em> <a target="_blank" href="https://unsplash.com/@adkorte"><em>Adrian Korte</em></a></p>
<p>Jazz, Classical, Lo-Fi, whatever floats your boat or, in this case, wiggles your eardrums. Choose some music that puts you at ease and helps you focus. I prefer music without any words otherwise I find it distracting. Any else perform tiny desk karaoke? No, just me. Okay, moving on!</p>
<p>Bonus music-listening tips:</p>
<ul>
<li><p>Use headphones to block out surrounding noise</p>
<ul>
<li><p>This is especially helpful if you’re somewhere like a cafe or a busy office environment.</p>
</li>
<li><p>I’ve also found that when others see me with headphones on it signals to them that I’m focusing on important work and don’t want to be disturbed.</p>
</li>
</ul>
</li>
<li><p>Listen to the same song on repeat</p>
<ul>
<li>This might sound a little whacky, but having it on repeat lets your brain worry less about the patterns in the music and more about the task you’re trying to complete (because yes, your brain is using energy to analyze the patterns in music even if you’re not conscious of it)</li>
</ul>
</li>
</ul>
<h3 id="heading-tip-3-use-an-interval-timer-to-practice-the-pomodoro-technique">Tip #3: Use an interval timer ⏲️ to practice the Pomodoro 🍅 Technique</h3>
<p><a target="_blank" href="https://unsplash.com/photos/0dAREtlOGlE"><img src="https://images.unsplash.com/photo-1540829414482-5f8ef8834d85?ixlib=rb-4.0.3&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&amp;auto=format&amp;fit=crop&amp;w=1185&amp;q=80" alt="Tomatoes lined up on a window shelf in front of a blurred background" class="image--center mx-auto" /></a></p>
<p><em>Image Credit:</em> <a target="_blank" href="https://unsplash.com/@slavudin"><em>Slejven Djurakovic</em></a></p>
<p>In case you’re not familiar with the <a target="_blank" href="https://en.wikipedia.org/wiki/Pomodoro_Technique">Pomodoro Technique</a>, here’s a quick overview:</p>
<ul>
<li><p>Set a timer for 25 minutes and work until the timer goes off</p>
</li>
<li><p>Take a quick break before setting the timer again and continuing your work</p>
</li>
<li><p>Repeat 3-4 times or until your task is complete</p>
</li>
</ul>
<p>There’s plenty of room for variation within this technique to tweak so it fits your needs. I use an app called <a target="_blank" href="https://apps.apple.com/us/app/interval-timer-hiit-workouts/id406473568">Interval Timer</a> on my iPhone where I’ve set up three different Pomodoro timers. This is an app designed for HIIT workout timers, but I found it useful in this situation as well. I like this better than using the standard timer that came with my phone because I can customize both the time spent working on a task and the time spent taking a break.</p>
<p>Here are my three Pomodoro timers:</p>
<ul>
<li><p><strong>Short Session</strong>: Two 20-minute work sessions with a 3-minute break in between each session (46 minutes total).</p>
</li>
<li><p><strong>Medium Session</strong>: Three 20-minute work sessions with a 3-minute break in between each session (1hr 9m total).</p>
</li>
<li><p><strong>Long Session</strong>: Five 25-minute work sessions with a 5-minute break in between (2hr 30m total).</p>
</li>
</ul>
<p>I’ll select one of these timers based on how much time I have to study. This helps me use my time effectively and stay focused. When the timer starts, I get to work and when the session ends I take a quick break. During the break between work sessions, I like to get up and move around. I will either stretch or do bodyweight exercises (e.g., push-ups) to stay active and not be seated at a computer for too long. I found this also helps with eye strain too. During the break when I get up and move, I also make a point to go look out a window.</p>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks so much for reading this post. I hope you found it useful.</p>
<p>These are the top three techniques I’ve used over the past three rounds of the #100DaysOfCode challenge. They’ve helped me stay focused and get into a flow state which has allowed me to learn many new skills for my career change.</p>
<p><strong>What techniques do you use to stay focused while you code</strong> 👨‍💻 <strong>or study</strong> 📖<strong>?</strong> Leave your suggestions in the comments below 👇🏼. Hearing your thoughts 💭 makes this more of a conversation and helps us learn together.</p>
]]></content:encoded></item><item><title><![CDATA[Experimenting with Linux]]></title><description><![CDATA[Intro
Hello and welcome to another blog post for Anthony’s Techie Thoughts! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to a frontend web developer. In my blog posts, I reflect ...]]></description><link>https://blog.ananfito.dev/experimenting-with-linux</link><guid isPermaLink="true">https://blog.ananfito.dev/experimenting-with-linux</guid><category><![CDATA[linux for beginners]]></category><category><![CDATA[Ubuntu]]></category><category><![CDATA[#learning-in-public]]></category><category><![CDATA[freeCodeCamp.org]]></category><category><![CDATA[Linux]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Sun, 23 Apr 2023 06:16:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/4Mw7nkQDByk/upload/9becedf106222abf5c35be10bac9d90e.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hello and welcome to another blog post for <a target="_blank" href="https://ananfito.hashnode.dev/">Anthony’s Techie Thoughts</a>! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to a frontend web developer. In my blog posts, I reflect on my journey and share things I’m learning along the way. You can find me on <a target="_blank" href="https://hachyderm.io/@infinifito">Mastodon</a>, <a target="_blank" href="https://github.com/ananfito">GitHub</a>, <a target="_blank" href="https://linkedin.com/in/anthonynanfito/">LinkedIn</a>, <a target="_blank" href="https://hashnode.com/@ananfito">Hashnode</a>, <a target="_blank" href="http://DEV.to">DEV.to</a>, and <a target="_blank" href="https://community.codenewbie.org/ananfito">CodeNewbie</a>.</p>
<p>In this blog post, I share my experience with installing Ubuntu on an external hard drive. This article is more of a reflection of my experience and impressions of Ubuntu and not so much a “how-to” guide, but I will include links to the resources I used for learning about Linux and how to install Ubuntu. Alright, let’s get to it!</p>
<h3 id="heading-free-time-to-explore">Free time to explore</h3>
<p>During the weeks of March 27 to April 16, I had the good fortune to be on a mid-term break from my teaching job. One of those weeks was spent on a (much-needed) vacation, but the remainder were (mostly) dedicated to studying. Along with continuing the interactive videos and projects on <a target="_blank" href="http://Scrimba.com">Scrimba.com</a>, I started exploring other tutorials within the realm of computers, programming, etc.</p>
<p>Before I dive too deeply into the Linux crash course I completed and how I installed Ubuntu on an external hard drive, let’s take a quick look at what Linux is and how it got started.</p>
<h2 id="heading-what-is-linux">What is Linux</h2>
<p><em>Disclaimer: I am by no means an expert on Linux and its various distributions (or distros), but here’s a basic overview based on my limited experience with the OS. Please forgive if I make any errors and if you know more about Linux, feel free to correct my misunderstandings or misinterpretations. Thank you.</em></p>
<p>Linux is a family of free and open-source operating systems based on the Unix operating system. These are based on the Linux kernel first released by Linus Torvalds on September 17, 1991.</p>
<p>There are a huge variety of Linux distributions (or distros) but the most popular include Debian, Fedora, Linux, and Ubuntu. The advantage of these operating systems is that they are open-source. This means that their source code is freely available for anyone to inspect and improve. This makes them very secure and reliable to use.</p>
<p>You can learn more about Linux at <a target="_blank" href="http://linux.org">linux.org</a> or on <a target="_blank" href="https://en.wikipedia.org/wiki/Linux">the Linux Wikipedia page</a> (both of which were helpful to me in writing this section)</p>
<h2 id="heading-taking-a-crash-course-and-using-ubuntu">Taking a crash course and using Ubuntu</h2>
<p>During my break, one of the tutorials I stumbled across (or perhaps saved — I can’t remember) was <a target="_blank" href="https://youtu.be/ROjZy1WbCIA">freeCodeCamp’s “Linux Operating System - Crash Course for Beginners”</a> taught by <a target="_blank" href="https://www.youtube.com/channel/UCP2bshADPrVMoNrdJvZEQzw">KeepItTechie</a>. I enjoyed the course and found it very accessible. Josh (KeepItTechie) does a great job of guiding beginners through the installation and basic usage of the operating system.</p>
<p>I will note that the installation instructions on the video did not work for me. I think it’s simply a matter of the video was record a year or so ago and the Virtual Machine software has since been updated. I found <a target="_blank" href="https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox#1-overview">these instructions from Ubuntu to run desktop on a virtual machine</a> very helpful.</p>
<p>The course covers the following topics:</p>
<ul>
<li><p>Terminal commands</p>
</li>
<li><p>Working with directories</p>
</li>
<li><p>Working with files</p>
</li>
<li><p>Working with file content</p>
</li>
<li><p>Linux file structure</p>
</li>
<li><p>System information</p>
</li>
<li><p>Networking</p>
</li>
<li><p>Package manager</p>
</li>
<li><p>Text editors</p>
</li>
</ul>
<p>Overall, it was a great introduction to Linux/Ubuntu. It helped me get some exposure to the operating system and it helped boost my confidence in using the command line interface. However, I was curious to know more about Linux and what you could do with it. So I started searching the Internet and YouTube. That’s when I discovered you could install and run Linux on a USB drive or an external hard drive.</p>
<h2 id="heading-installing-ubuntu-on-an-external-hard-drive">Installing Ubuntu on an external hard drive</h2>
<p>One of the valuable resources I found after doing those Internet and YouTube searches was the <a target="_blank" href="https://www.youtube.com/@SwitchedtoLinux">Switch to Linux YouTube channel</a>. I found the tutorials here very helpful in getting a better understanding of the process of installing Linux to a USB flash drive or an external hard drive.</p>
<p>First I created a bootable USB stick with Ubuntu 22.04 installed on it. This allowed me to “try out” the OS without having to do a complete install. I have MacOS so I used this <a target="_blank" href="https://ubuntu.com/tutorials/create-a-usb-stick-on-macos#1-overview">installation tutorial for MacOS from</a> <a target="_blank" href="http://Ubuntu.com">Ubuntu.com</a>, but they also have an <a target="_blank" href="https://ubuntu.com/tutorials/create-a-usb-stick-on-windows#1-overview">installation tutorial for Windows users</a>.</p>
<p>However, having a bootable USB stick only allows you to test drive the OS or install it on a machine. I wanted to have it installed and operational on an external hard drive so that I could have persistence (more on that in this <a target="_blank" href="https://youtu.be/aOccwpM2cRk">YouTube video by Switch to Linux</a>).</p>
<p>After doing some sleuthing on the Internet, I found this <a target="_blank" href="https://ubuntuhandbook.org/index.php/2022/04/install-ubuntu-2204-step-by-step/">installation guide on</a> <a target="_blank" href="http://UbuntuHandbook.com">UbuntuHandbook.com</a> which helped me install Ubuntu 22.04 onto an external hard drive, including how to encrypt the drive.</p>
<p>Once I had Ubuntu installed on the hard drive, I was ready to get a deeper feel for the OS. I decided to complete my solo project, <a target="_blank" href="https://github.com/ananfito/tindog">Tindog</a>, for Module 7 of <a target="_blank" href="http://Scrimba.com">Scrimba.com</a><a target="_blank" href="https://scrimba.com/learn/frontend">’s Frontend Developer Career path</a>.</p>
<h2 id="heading-impressions">Impressions</h2>
<p>Overall, this was a great experience and I look forward to exploring more of Ubuntu and Linux. I’ve used MacOS for close to 7 years now and Ubuntu, in terms of looks, wasn’t too dissimilar so there wasn’t a big adjustment there. I have used Windows in the past (and still use it at my place of employment) so I could see Ubuntu being a harder adjustment for a Windows user who’s not used to using different operating systems. However, I do know there are Windows-like Linux distros for Windows users looking to try Linux but don’t want too big of a change.</p>
<p>As of right now, I’m not sure if I’m interested in going into back-end development or working with operating systems. I’m still very early in my career change, but I did appreciate that this experience of installing Ubuntu onto an external hard drive taught me a little bit about how computer drives are partitioned. I won’t claim to have a full and deep understanding of it, but I am grateful I know a little bit more than I did before this experience.</p>
<p>I’m also grateful that I am now no longer using GitHub Desktop to manage my repositories. Instead, I am now working directly in the command line interface. I purposefully did not install GitHub Desktop onto the Ubuntu “computer” I created with the external hard drive. I have been studying how to use Git within the command line interface, but having GitHub Desktop installed on my computer made it a bit of a crutch. Why open up a terminal window and manually type commands when you can just click to update that repo on GitHub, right?</p>
<p>Well, I wanted to put add another layer of learning to the project I was working on so I decided to use the command line interface and directly update my repo using the Git commands. This helped me gain a deeper understanding of how these commands are used and create a habit ofw using them. I have now uninstalled GitHub Desktop and use the terminal for updating my remote repos, but I will say that using GitHub Desktop as a beginner was a great stepping stone to getting where I’m at now with using the Git commands.</p>
<p>Lastly, I like the spirit and philosophy that comes with using Linux and other open-source software. One of the key advantages of using a Linux distro is that oftentimes you can install it on older hardware and runs great.</p>
<p>This helps bring old computers back to life and extends their usage. I like this idea because it helps reduce tech waste as well as gives me (us) an option for getting off the consumerism treadmill of always “needing” the latest and greatest device.</p>
<p>Further, there are privacy concerns with using proprietary software such as MacOS or Windows, but I think that discussion is outside the scope of this post.</p>
<p>Ultimately, I love the idea of being able to extend my current computer’s lifespan with a Linux distro because that means I can save the money I would have spent on a new computer for other things like life experiences (e.g., travel).</p>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks so much for reading this post. I hope you found it helpful and enlightening.</p>
<p>Have you tried a Linux distribution like Ubuntu before? How did you feel about it? Leave your thoughts in the comments below.</p>
<p>Hearing your thoughts makes this more of a conversation and helps us all learn. See you next time.</p>
]]></content:encoded></item><item><title><![CDATA[Using ChatGPT as a Coding Buddy]]></title><description><![CDATA[Intro
Hello, world! Welcome to another blog post for Anthony’s Techie Thoughts! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to a frontend web developer. In my blog posts, I refl...]]></description><link>https://blog.ananfito.dev/using-chatgpt-as-a-coding-buddy</link><guid isPermaLink="true">https://blog.ananfito.dev/using-chatgpt-as-a-coding-buddy</guid><category><![CDATA[100DaysOfCode]]></category><category><![CDATA[chatgpt]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[Scrimba]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Mon, 10 Apr 2023 00:59:52 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/cckf4TsHAuw/upload/0e3bad171fe2d005b7a017e887fb792e.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hello, world! Welcome to another blog post for <a target="_blank" href="https://ananfito.hashnode.dev/">Anthony’s Techie Thoughts</a>! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to a frontend web developer. In my blog posts, I reflect on my journey and share things I’m learning along the way. You can find me on <a target="_blank" href="https://github.com/ananfito">GitHub</a>, <a target="_blank" href="https://linkedin.com/in/anthonynanfito/">LinkedIn</a>, <a target="_blank" href="https://hashnode.com/@ananfito">Hashnode</a>, <a target="_blank" href="http://DEV.to">DEV.to</a>, and <a target="_blank" href="https://community.codenewbie.org/ananfito">CodeNewbie</a>.</p>
<p>In this blog post, I’ll offer a quick reflection on my progress this week and share some thoughts on how I used ChatGPT as a coding buddy.</p>
<h2 id="heading-weekly-reflection">Weekly Reflection</h2>
<p>This past week has been productive for me. This is mostly because I’m currently on a mid-term break from work and I have extra time I can dedicate to my studies. Which I am thoroughly enjoying. Here’s a quick list of my accomplishments this week:</p>
<ul>
<li><p>Completed the solo project for Module 6 of <a target="_blank" href="https://scrimba.com/learn/frontend">Scrimba’s Frontend Career Path</a></p>
<ul>
<li><p>GitHub Link: <a target="_blank" href="https://github.com/ananfito/learning-journal">https://github.com/ananfito/learning-journal</a></p>
</li>
<li><p>Live link: <a target="_blank" href="https://ananfito.github.io/learning-journal/">https://ananfito.github.io/learning-journal/</a></p>
</li>
</ul>
</li>
<li><p>Started Module 7 of <a target="_blank" href="https://scrimba.com/learn/frontend">Scrimba’s Frontend Career Path</a></p>
</li>
<li><p>Published <a target="_blank" href="https://ananfito.hashnode.dev/using-python-to-make-my-teaching-job-easier">a blog post on how I used a Python script to automate a part of my teaching job</a></p>
<ul>
<li>This might seem small, but I had written this post weeks ago and just never published it so I’m glad I got it out there.</li>
</ul>
</li>
<li><p>I played around with using ChatGPT as a coding buddy and it helped me figure out a problem I was having with the code for my Learning Journal project (more thoughts on that below)</p>
</li>
</ul>
<h2 id="heading-using-chatgpt-as-a-coding-buddy">Using ChatGPT as a ‘coding buddy’</h2>
<p>On a whim, I decided to make use of ChatGPT as a ‘coding buddy’ by asking it questions when I got stuck or needed a sounding board. As a self-taught dev, this is one of the things I’ve struggled with the most. Sometimes I wish I could just tap someone on the shoulder and say, “Hey, what do I need to make this work?” Or “This is what I’m thinking for this problem. Is that the right approach?” However, this isn’t always an easy option so this week I tried something different: I asked ChatGPT.</p>
<p>For example, I was working on a function earlier this week for my Learning Journal project where I needed it to return the first three elements of an array, but I couldn’t figure out what method I needed to use. Initially, I thought I could use the <code>.filter()</code> method, but further down you’ll see how ChatGPT corrected me on that idea. First I asked it, “How do I write a function in JavaScript to return the first 3 items in an array?” Here is the response I received:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681087755253/7c26f75e-c6e3-493f-a5eb-02c12700ff21.png" alt="Image of chat conversation with ChatGPT. QUERY: write a function in javascript that will return the first three elements from an array.  RESPONSE: You can write a function in JavaScript that returns the first three elements from an array using the slice() method. Here's an example:  javascript  function getFirstThreeElements(arr) {   return arr.slice(0, 3); }  This function takes an array arr as an argument and returns a new array containing the first three elements of arr.  Here's an example of how to use this function:  javascript  const myArray = [1, 2, 3, 4, 5, 6]; const firstThreeElements = getFirstThreeElements(myArray); console.log(firstThreeElements); // Output: [1, 2, 3]  In this example, the getFirstThreeElements() function is called with the myArray array as an argument. The function returns a new array containing the first three elements of myArray, which are then printed to the console." class="image--center mx-auto" /></p>
<p>When I asked my ‘coding buddy’ this question the first thing it mentions is the <code>.slice()</code> method and I was like, “Oh! duh! Of course, why didn’t I think of that?” As requested, it did write an entire function for returning the first 3 elements of an array, but I didn’t need the entire function. I just needed that little hint to use <code>.slice()</code> instead of <code>.filter()</code>. When I asked it if I could use the <code>.filter()</code> method it explained why it wasn’t possible and why I should use the <code>.slice()</code> method instead:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1681087806691/5a4eb063-4f5e-4898-bd82-5b906e28115b.png" alt="Image of chat conversation with ChatGPT. QUERY: Is it possible to write return the first three elements of an array using the filter() method in JavaScript?  RESPONSE: The filter() method in JavaScript is not suitable for returning the first three elements of an array because it is designed to filter an array based on some condition and returns a new array containing only the elements that pass that condition. It does not provide a way to select a specific number of elements from the beginning of an array.  Instead, you can use the slice() method to return the first three elements of an array, as shown in the previous example:  javascript  function getFirstThreeElements(arr) {   return arr.slice(0, 3); }  const myArray = [1, 2, 3, 4, 5, 6]; const firstThreeElements = getFirstThreeElements(myArray); console.log(firstThreeElements); // Output: [1, 2, 3]  The slice() method can be used to select a range of elements from an array, starting from the first element and ending at the specified index. In this example, we used slice(0, 3) to select the first three elements of the myArray array." class="image--center mx-auto" /></p>
<p><em>(NOTE: While writing this blog post, I noticed that my initial question here has a typo in the first part of the question. I’m not sure why my brain decided to write “Is it possible to write return …” but ChatGPT seems to have correctly interpreted this to mean “Is it possible to write a function that returns the first …” This is interesting, but could also just be a random occurrence. In the big picture, I’m not sure if ChatGPT is always good at interpreting human miscommunication.)</em></p>
<p>This second explanation helped me realize the error in my initial approach and redirect toward a solution that worked. Of course, this is information could have obtained from someone in a Discord community, a forum, or even through reading through webpages and documentation, but those come with a longer time commitment. Here, in a few minutes, I got some advice on the direction I needed to go as well as some examples to reference. In fact, in this case, I just needed a nudge in the right direction. As a self-taught dev, this is particularly useful because I can’t just lean over to the next cubicle and ask a coworker quick questions like these. But, for now, I can ask ChatGPT and it (might) give me an answer to ‘nudge’ me in the right direction.</p>
<h3 id="heading-closing-thoughts-on-chatgpt">Closing thoughts on ChatGPT</h3>
<p>As impressive as it ChatGPT is (and other AI software like it), we’ve already seen examples of where it will hallucinate and present incorrect information. With that in mind, I do <strong>not</strong> think it is a good idea to ask it to do a specific task for you.</p>
<p>For example, I’m sure I could have given it more information and context about how and why I needed a function to return the first three elements of an array, but that would have defeated the purpose of studying. To me, that is the equivalent of having someone else do your work for you. Which doesn’t help you become a better developer.</p>
<p>I tell my students, “the person who holds the pencil learns the math.” Meaning, the person who is sitting there going through the steps (and perhaps struggling a bit) to solve the problem is the one who will learn and remember it. In this case, the person who types on the keyboard learns to code.</p>
<p>All that said, I do think this could become another tool within our developer toolbox. We have a plethora of resources already at our deposal: freeCodeCamp, Stackoverflow, W3 Schools, YouTube, Discord Communities, and more! This is an addition to that and perhaps it might fill in some gaps that the others don’t provide or don’t meet the needs of the learner. I think this is how I’ll use it moving forward (and continue to use it as long as it proves useful). It’s one tool in a vast toolbox of tools to help me learn how to code and get better at achieving my goal of making a career switch.</p>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks so much for reading this post. Have you used ChatGPT in your studies? If so, how have you been using it? Has it been helpful? Leave your thoughts in the comments below. Hearing your thoughts makes this more of a conversation and helps everyone learn.</p>
]]></content:encoded></item><item><title><![CDATA[Using Python to Make my Teaching Job Easier]]></title><description><![CDATA[Intro
Hello and welcome to another blog post for Anthony’s Techie Thoughts! It's been a few months since my last post, but I've kept busy studying and progressing toward my goal of making a career transition from mathematics teacher to front-end web ...]]></description><link>https://blog.ananfito.dev/using-python-to-make-my-teaching-job-easier</link><guid isPermaLink="true">https://blog.ananfito.dev/using-python-to-make-my-teaching-job-easier</guid><category><![CDATA[Python]]></category><category><![CDATA[python beginner]]></category><category><![CDATA[Python script]]></category><category><![CDATA[#codenewbies]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Thu, 06 Apr 2023 06:25:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/npxXWgQ33ZQ/upload/2318003f589295a40d0fc2eeb4761e6c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hello and welcome to another blog post for <a target="_blank" href="https://ananfito.hashnode.dev/">Anthony’s Techie Thoughts</a>! It's been a few months since my last post, but I've kept busy studying and progressing toward my goal of making a career transition from mathematics teacher to front-end web developer. If you're new here, in my blog posts I reflect on my journey and share things I'm learning along the way. You can find me <a target="_blank" href="https://github.com/ananfito">GitHub</a>, <a target="_blank" href="https://hashnode.com/@ananfito">Hashnode</a>, <a target="_blank" href="http://DEV.to">DEV.to</a>, and <a target="_blank" href="https://community.codenewbie.org/ananfito">CodeNewbie</a>.</p>
<p>In this blog post, I want to share how I used a Python script to make my day job a little easier. Specifically, I used the script to create individual .CSV files with students' assignments and grades. Throughout the post, I will share snippets of the code, but if you'd like to see the script in its entirety, you can view it in <a target="_blank" href="https://github.com/ananfito/splitter">this GitHub repo</a>.</p>
<h2 id="heading-the-problem">The Problem</h2>
<p>At the school I work at we use an online database management software to manage things such as attendance, grades, etc. For the most part, it gets the job done but there’s one feature (a vital one in my opinion) that’s missing: the ability to generate individualized reports for students. Having the ability to do this helps solve two problems:</p>
<ol>
<li><p>Answering the question “What’s my grade?”</p>
</li>
<li><p>Improving student’s ability to complete missing assignments</p>
</li>
</ol>
<p>In my experience, when students can receive regular updates on their progress their overall learning and understanding of the content improve. However, the software we currently use does not provide this feature (or at least I haven’t been able to find it). The result is that come progress reports or end-of-semester reports students (and parents) are sometimes surprised about what their overall grade is.</p>
<p>To avoid this shock and surprise at report time I put in the effort to export my grade book as an Excel spreadsheet, then import it into Google Sheets (we use Google’s Education tools at my school), and then create a separate Google Sheet for each student which is then shared to that student’s individual school email account.</p>
<p>This process is both tedious, repetitive, and time-consuming. In particular, it was something that a computer could do and give me back time that could be spent doing more productive things like planning lessons, helping struggling students (before they receive their final grade report and it’s too late), or simply just spending less time staring at a screen. So I sent out on a quest to find out how to automate this process with a Python script.</p>
<h2 id="heading-my-python-script-solution">My Python Script Solution</h2>
<h3 id="heading-exporting-the-spreadsheet">Exporting the Spreadsheet</h3>
<p>The first thing I needed to do was to export the grade book as an Excel spreadsheet and do some data cleaning. In particular, I needed to remove duplicate columns and unnecessary rows. Then save the document as a CSV.</p>
<p>This part took some trial and error. At first, I attempted to use the <code>.read_excel()</code> method from the Pandas library directly on the exported Excel file, but the way the grade book software exports the Excel file made it unreadable using this method. As such, it was easier to modify the file and export it as a CSV file. Then use the <code>.read_csv()</code> pandas method.</p>
<h3 id="heading-importing-pandas-and-creating-a-dataframe">Importing pandas and creating a dataframe</h3>
<p>Once I had the properly cleaned and formatted CSV file it was time to import the Pandas library and create a dataframe:</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd
data = pd.read_csv(<span class="hljs-string">"data.csv"</span>)
</code></pre>
<p>Once I had the dataframe set up the next part was to set up a loop to iterate through the rows in the dataframe and then save them as an individual CSV file. In this case, each row of the dataframe represents a student and their corresponding assignment grades.</p>
<p>This is the first time I have worked with Python in while — for the past few months I’ve been studying JavaScript. So in my first attempt to write the <code>for</code> loop it didn’t work out because <code>for</code> loops are used differently in Python than in JavaScript. Instead, in Python, I had to make use of the <code>while</code> loop. Here’s a quick tangent on the difference between a <code>for</code> loop and a <code>while</code> loop in Python.</p>
<h3 id="heading-for-vs-while-loop-in-python"><code>for</code> vs. <code>while</code> loop in Python</h3>
<p>In Python, <a target="_blank" href="https://www.w3schools.com/python/python_for_loops.asp">“a <code>for</code> loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string)”</a>. In other words, it won’t work for iterating over the dataframe so instead,n I had to make use of <a target="_blank" href="https://www.w3schools.com/python/python_while_loops.asp">a <code>while</code> loop</a>:</p>
<pre><code class="lang-python"><span class="hljs-comment"># separates rows of data frame into individual CSV files</span>
i = <span class="hljs-number">0</span>
<span class="hljs-keyword">while</span> i &lt; len(data):
    <span class="hljs-comment"># isolate each row of data and save it as CSV based on the Name</span>
    data.iloc[i].to_csv(str(today) + <span class="hljs-string">'_'</span> + str(data.iloc[i][<span class="hljs-string">"Name"</span>]) +<span class="hljs-string">'.csv'</span>) 
    i+=<span class="hljs-number">1</span>
</code></pre>
<p>Here the loop goes through each row in the dataframe and then saves that row as it’s own CSV file which includes the current date (more on that in the next section) and the student’s name.</p>
<h3 id="heading-importing-date-from-datetime">Importing <code>date</code> from <code>datetime</code></h3>
<p>Initially, when I saved the split files I had manually typed in the current date as part of the file’s name, but then I realized that the whole point of writing this script was to be able to automate the process and having to type in the current date each time I used the script kind of defeated the overall purpose.</p>
<p>So instead I figured out how to import the current date and have it written into the file name automatically using the following set of code:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> datetime <span class="hljs-keyword">import</span> date
today = date.today()
</code></pre>
<p>Then the variable <code>today</code> can be used within the naming scheme for the file name inside the <code>while</code> loop (see the previous snippet above).</p>
<h3 id="heading-sharing-the-files">Sharing the files</h3>
<p>Once I had the files created the next step was to upload them to Google Drive and share them with the students. This part I had to do this manually but I suspect there is a way to automate it which leads me to the ideas for improving the script.</p>
<h2 id="heading-features-to-add">Features to Add</h2>
<p>Here’s the short list I’ve come up with for features to add to the script:</p>
<ul>
<li><p>Export as a PDF instead of a CSV</p>
<ul>
<li>My students are familiar with using Google Sheets to read CSV files, but I can envision use cases where it might help to have a PDF version instead. Maybe even have the ability for the user to choose.</li>
</ul>
</li>
<li><p>Highlight only missing assignments</p>
<ul>
<li>This is another feature that’s missing from the grade book software the school uses. There’s no way to run a report of just the missing assignments. This is something I’ve found valuable in the past because it acts as a checklist for students on what work they need to complete and improve their grades. (Assuming the student’s low grade is due to lack of completed assignments and not conceptual misunderstandings)</li>
</ul>
</li>
<li><p>Email students directly</p>
<ul>
<li>I had to do this part manually, but I know it’s possible to use Gmail’s API to send emails via a Python script so this would something I would like to add because it would cut out the steps of uploading the files to Google Drive and sharing them with each student.</li>
</ul>
</li>
<li><p>Continue working on seeing if I can work directly from the exported Excel spreadsheet</p>
<ul>
<li>As stated previously, I initially tried to read the Excel file and convert it to a dataframe but struggled with getting it to work. This is something I’d like to possibly explore because it would eliminate another step in the process. This would especially be useful if I could also automate the data cleaning step of removing the unneeded rows and columns that come with the exported spreadsheet.</li>
</ul>
</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>These are a few of the ideas I have for improving the script. However, at a certain point, this begins to develop into a full-fledged database management software system — something the school is already paying for even though it lacks, in my opinion, some critical and helpful features.</p>
<p>For now, I’m happy with my simple script because it saves me time and I was able to put into practice my programming skills in a real-world setting. Python completed this task in seconds whereas it took me over than hour to manually separate each spreadsheet row and save them to an individual file that could be shared with 80+ students.</p>
<h3 id="heading-resources">Resources</h3>
<p>Along with copious amounts of Internet searching, I found the following resources useful in learning how to create this script:</p>
<ul>
<li><p>Automate with Python (Beginner’s Course): <a target="_blank" href="https://youtu.be/PXMJ6FS7llk">https://youtu.be/PXMJ6FS7llk</a></p>
</li>
<li><p>Automate the Boring Stuff: <a target="_blank" href="https://automatetheboringstuff.com/">https://automatetheboringstuff.com/</a></p>
</li>
</ul>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks so much for reading this post. I hope you found it useful.</p>
<p>How do you use automation to save yourself time? Share your thoughts in the comments. Hearing your thoughts makes this more of a conversation and helps us all learn.</p>
<p>Thanks for stopping by and happy coding!</p>
]]></content:encoded></item><item><title><![CDATA[MathemaQuizzo: My First Web App]]></title><description><![CDATA[Intro
Hello, world! Welcome to another blog post for Anthony’s Techie Thoughts! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to a frontend web developer. In my blog posts, I refl...]]></description><link>https://blog.ananfito.dev/mathemaquizzo-my-first-web-app</link><guid isPermaLink="true">https://blog.ananfito.dev/mathemaquizzo-my-first-web-app</guid><category><![CDATA[Web Development]]></category><category><![CDATA[career switch]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[#DevRetro2022]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Wed, 14 Dec 2022 09:44:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1671010810590/AkiUjmG53.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hello, world! Welcome to another blog post for <a target="_blank" href="https://ananfito.hashnode.dev">Anthony’s Techie Thoughts</a>! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to a frontend web developer. In my blog posts, I reflect on my journey and share things I’m learning along the way. You can find me on <a target="_blank" href="https://github.com/ananfito">GitHub</a>, <a target="_blank" href="https://linkedin.com/in/anthonynanfito/">LinkedIn</a>, <a target="_blank" href="https://hashnode.com/@ananfito">Hashnode</a>, <a target="_blank" href="https://dev.to/ananfito">DEV.to</a>, and <a target="_blank" href="https://community.codenewbie.org/ananfito">CodeNewbie</a>.</p>
<p>This will likely be my final post of 2022 and while I'm only reflecting on my coding journey of the past week it also represents the progress I've made in the past six (and indeed the last twelve) months. If you had told me in July (before I even learned any javascript) that I would be creating a web app from scratch by the end of the year, I would have thought you were crazy. But that's exactly what I did this past week.</p>
<p>In this post I'll share my reflections on the app I created, some general reflections about my coding journey thus far, and my goals for next year.</p>
<h2 id="heading-background">Background</h2>
<p>I started studying javascript back in August of this year. It has been a rollercoaster of a journey with lots of ups and downs. There have been plenty of frustrating moments where I felt like giving up. However, I'm grateful I did not give up because I wouldn't have gotten to where I am now.</p>
<h3 id="heading-how-it-started">How it started</h3>
<p>My day job is working as a middle school mathematics teacher and right now we're nearing the end of our first semester. Grades are finalized and submitted but there are still a few weeks left in the semester. At times like these, I like to step away from the textbook, the curriculum, and other resources and have my students work independently on creating something of their own. This time I chose to assign a self-study project where students are to create their own mathematically-themed game. It must have at least three levels and have two math problems to solve per level. Some students are choosing to create a video game of sorts while others are opting to create a tabletop game. Students are working in groups to compete for the best game and win a prize.</p>
<p>At first, I hadn't planned on creating something myself and I hadn't thought about it all until a student asked me what I would be making for the project (usually I like to create something alongside my students). My initial response was "nothing" but after giving it some thought I decided to this would be a good opportunity to put my javascript skills to the test and create some sort of web application. And that's how the idea of MathemaQuizzo was born.</p>
<h2 id="heading-mathemaquizzo">MathemaQuizzo</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1694109916746/c5471212-b599-4345-a06c-0bb486a9262a.png" alt="screenshot of the app with the title &quot;MathemaQuizzo&quot; at the top, a description of the rules, and a button to start the game." class="image--center mx-auto" /></p>
<p>The app I created isn't revolutionary or ground-breaking in any way. Compared to most other web applications on the Internet it's quite simple. But it's something I made entirely on my own. And that's what makes it a truly exciting and proud moment for me. It represents the act of persevering and, perhaps most importantly, it gives me the courage and confidence to keep going.</p>
<p>Given that my skills are still at a novice level, I knew that I wasn't going to build a mega-game app like Angry Birds or Candy Crush. So I settled on creating a simple quiz-like app that met the same requirements as the project I assigned to my students. And like any great millennial entrepreneur, I gave it the name "MathemaQuizzo" because it sounded cool and it had double letters.</p>
<h3 id="heading-my-process">My process</h3>
<p>I started with a basic HTML layout on a single page with some simple CSS styling. The elements are centered on the page with buttons to activate/render the game and provide interactivity during gameplay. After finalizing the layout and styles, I started working on the javascript for the app's functionality. I knew I needed to have the app have a 'start game' button, as well as the ability to move on to the next question, receive a hint (if needed), and keep track of points for correct answers, incorrect answers, and hints. This is the part where I was surprised at how much of my learning I was able to produce. Most of the functions for these buttons I completed on my own, however, there were a few times when I needed to consult the MDN documentation or a previously made app for reference.</p>
<h3 id="heading-tribulations">Tribulations</h3>
<p>Most of my points of struggle came with the CSS styling. This is a skill I'm continuing to develop, but thanks to the coursework by <a target="_blank" href="https://courses.kevinpowell.co">Kevin Powell</a> and <a target="_blank" href="https://scrimba.com/">Scrimba</a>, I am getting better at this. In particular, it mostly came down to knowing how to space things out on the page so that it's visible and responsive. As for the javascript, most of this felt like I was testing my knowledge and seeing if all that time I spent studying paid off. Which, thankfully, it did because writing most of the functions for this was not only doable but relatively easy for me. Plus, it helped me to practice these concepts in a lifelike setting.</p>
<h3 id="heading-feedback">Feedback</h3>
<p>The repo and live links for this project can be found below. I am open to hearing thoughts and constructive criticism. I built this entirely on my own so I'm sure there's some room for improvement. If you'd like to share your thoughts, feel free to reach out to me via the <a target="_blank" href="https://github.com/ananfito/mathemaquizzo/issues">GitHub Issues</a> for the project, <a target="_blank" href="https://www.linkedin.com/in/anthonynanfito">LinkedIn</a>, or <a target="_blank" href="https://anthonynanfito.com/contact/">Email</a>.</p>
<ul>
<li><p>Repo: <a target="_blank" href="https://github.com/ananfito/mathemaquizzo/">https://github.com/ananfito/mathemaquizzo/</a></p>
</li>
<li><p>Live Version: <a target="_blank" href="https://ananfito.github.io/mathemaquizzo/">https://ananfito.github.io/mathemaquizzo/</a></p>
</li>
</ul>
<h2 id="heading-looking-ahead">Looking Ahead</h2>
<h3 id="heading-the-next-app">The next app</h3>
<p>I've already started working on a similar app, currently called <a target="_blank" href="https://github.com/ananfito/mathapalooza">Mathapalooza 2000</a>, that provides the user with random questions instead of progressing through a series of levels. So far this is proving to be a bit more challenging but I'm enjoying it because it's pushing me to grow my skills. In particular, I'm still trying to figure out how to generate a series of random numbers and not have them repeat. I've got a few ideas I haven't tested yet, but once I'm back in study mode I'll be ready to test them out. More on that in a future blog post.</p>
<h3 id="heading-what-to-study-next">What to study next</h3>
<p>Now that I'm feeling more confident about my javascript skills I think I'm ready to start learning some frameworks and libraries. When I started this <a target="_blank" href="https://ananfito.hashnode.dev/day-100-lessons-learned-from-100daysofcode">second round of the #100DaysOfCode challenge</a>, I wanted to focus more on the vanilla javascript but now I'm feeling ready for some more powerful tools. This is exciting because it means I will be able to do and create more sophisticated applications and websites, but also because it means I will be more job-ready.</p>
<h3 id="heading-getting-job-ready">Getting job-ready</h3>
<p>Since this is a reflection post and my last post of 2022, I can't help be think about what my goals will be for 2023. I'm very proud of the progress I've made these past six months, but there's still more work to be done. Specifically, I want to start getting ready for the job application process. My current teaching contract ends in June and I'd like to have a frontend web developer job lined up at that time to make my career switch.</p>
<p>This means getting my profiles on GitHub and LinkedIn polished up and adding more projects to my portfolio. It also means preparing for the infamous tech interviews. After the new year, I plan to start dedicating some of my study time to these efforts. Based on what I've already researched about the job application process (and the job market) it will likely take anywhere from three to six months to find a job. This means I can't start looking in June when my teaching contract ends, but sooner than that.</p>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks so much for ready this post. I hope you found it useful or inspiring.</p>
<p><strong>What's one goal you have for yourself in 2023?</strong> Share what you want to achieve in the comments. Hearing your thoughts makes this more of a conversation and I can't wait to hear what you're goals are for 2023. Happy coding!</p>
]]></content:encoded></item><item><title><![CDATA[Responsive Web Design with 3 Lines of CSS]]></title><description><![CDATA[Intro
Hello world! Welcome to another blog post for Anthony’s Techie Thoughts! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer. In my blog posts I reflect ...]]></description><link>https://blog.ananfito.dev/responsive-web-design-with-3-lines-of-css</link><guid isPermaLink="true">https://blog.ananfito.dev/responsive-web-design-with-3-lines-of-css</guid><category><![CDATA[100daysofc]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[#learning-in-public]]></category><category><![CDATA[CSS]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Mon, 05 Dec 2022 07:58:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1670226955391/QSgCAw5EhA.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hello world! Welcome to another blog post for <a target="_blank" href="https://ananfito.hashnode.dev/">Anthony’s Techie Thoughts</a>! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer. In my blog posts I reflect on my journey and share things I’m learning along the way. You can find me on <a target="_blank" href="https://github.com/ananfito">GitHub</a>, <a target="_blank" href="https://linkedin.com/in/anthonynanfito/">LinkedIn</a>, <a target="_blank" href="https://hashnode.com/@ananfito">Hashnode</a>, <a target="_blank" href="https://dev.to/ananfito">DEV.to</a>, and <a target="_blank" href="https://community.codenewbie.org/ananfito">CodeNewbie</a>. </p>
<p>This week I continued working my way through the curriculum on <a target="_blank" href="http://Scrimba.com">Scrimba.com</a>, <a target="_blank" href="https://sololearn.com/">Sololearn.com</a>, and <a target="_blank" href="https://courses.kevinpowell.co/conquering-responsive-layouts">Kevin Powell’s ‘Conquering Responsive Layouts’ course</a>.  In this blog post I’ll share the 3 lines of CSS I learned to keep page elements centered and responsive.</p>
<h2 id="heading-weekly-reflection">Weekly Reflection</h2>
<p>My progress was slow and steady this week due to some extra responsibilities at work. I would have liked to had made more progress, especially with the ideas I’m learning in Kevin’s course, but sometimes life gets in the way and you just gotta roll with it. Throughout this week one idea from Kevin Powell’s course has stuck with me: using <code>width</code>, <code>max-width</code>, and <code>margin</code> to center elements on a page. </p>
<p>His approach is simple and uses a minimal amount of code. This is something I (as a novice) can appreciate because it lessens the burden of entry to building responsive websites. For example, the following is the minimal amount of CSS code needed to center a <code>container</code> on a page, ensure that it fills 80% of the body width, and sets a limit on how wide it will stretch (this is particularly helpful for really wide screens, the text when spread all the way across): </p>
<pre><code class="lang-css"><span class="hljs-selector-class">.container</span> { 
    <span class="hljs-attribute">width</span>: <span class="hljs-number">80%</span>;
    <span class="hljs-attribute">max-width</span>: <span class="hljs-number">1100px</span>;
    <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span> auto;
 }
</code></pre>
<p>The <code>max-width</code> property will change depending on what is in the container and the design of the page — as could the <code>width: 80%</code> if you didn’t want it to fill 80% of the page’s width — but these are the core properties needed to center the <code>.container</code> on the page. As an example, this CodePen features <a target="_blank" href="https://codepen.io/ananfito/full/KKebpZz">my solution to a challenge from Kevin Powell’s course</a> that makes use of this idea in practice. The goal is to create a responsive webpage that uses flexbox to create columns and rows of content while implementing these 3 lines of CSS to keep the elements centered and responsive. </p>
<p>Previously, I had been using any and all properties to get things to center on the page (e.g., height, width, display, etc.) — most of it unnecessary. With these three lines of code things are centered and responsive. Granted, this isn’t the end of the line but the start. There may be more styling properties required based on the design specifications of the page, but this comes later and in other places. </p>
<p>I’ve only completed up to Day 9 of his 21-day course, but ideas such as this one have already triggered thoughts like, “oh, that would’ve been helpful for project X, instead of using <em>gliff</em>, <em>glaff</em>, and <em>gluff</em> to do the same thing”. But this is the nature of learning. You crawl (and stumble) before you learn to walk and run. After I’m done with his course, I’d like to go back to previous Frontend Mentor projects and apply what I’ve learned (and, of course, carry these ideas into new projects).</p>
<h2 id="heading-projects-from-the-week">Projects from the Week</h2>
<ul>
<li>Scrimba Project<ul>
<li>Basic Blackjack App<ul>
<li>Repo: <a target="_blank" href="https://github.com/ananfito/basic-blackjack">https://github.com/ananfito/basic-blackjack</a></li>
<li>Live: <a target="_blank" href="https://ananfito.github.io/basic-blackjack/">https://ananfito.github.io/basic-blackjack/</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks so much for reading this post. I hope you found it useful and inspiring. What’s a big idea you learned this week that’s stuck with you? Feel free to share your thoughts in the comments below. Hearing your thoughts makes this more of a conversation and helps everyone learn.</p>
]]></content:encoded></item><item><title><![CDATA[I’ve Been Designing Websites All Wrong]]></title><description><![CDATA[Intro
Hello world! Welcome to another blog post for Anthony’s Techie Thoughts! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer. In my blog posts I reflect ...]]></description><link>https://blog.ananfito.dev/ive-been-designing-websites-all-wrong</link><guid isPermaLink="true">https://blog.ananfito.dev/ive-been-designing-websites-all-wrong</guid><category><![CDATA[100DaysOfCode]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Learning Journey]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Sun, 27 Nov 2022 08:31:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/duTm7WvwN0U/upload/v1669537529406/O1wTeDaXH.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hello world! Welcome to another blog post for <a target="_blank" href="https://ananfito.hashnode.dev/">Anthony’s Techie Thoughts</a>! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer. In my blog posts I reflect on my journey and share things I’m learning along the way. You can find me on <a target="_blank" href="https://github.com/ananfito">GitHub</a>, <a target="_blank" href="https://linkedin.com/in/anthonynanfito/">LinkedIn</a>, <a target="_blank" href="https://hashnode.com/@ananfito">Hashnode</a>, <a target="_blank" href="https://dev.to/ananfito">DEV.to</a>, and <a target="_blank" href="https://community.codenewbie.org/ananfito">CodeNewbie</a>. </p>
<p>This week I continued to review the fundamentals of JavaScript via Sololearn and Scrimba, but my biggest triumph was starting <a target="_blank" href="https://courses.kevinpowell.co/conquering-responsive-layouts">Kevin Powell’s course “Conquering Responsive Layouts"</a>. In this blog post I share my initial thoughts on his course and how his mobile-first mindset to web development is changing my approach to creating websites.</p>
<h2 id="heading-weekly-reflection">Weekly Reflection</h2>
<p>On Tuesday of this week I completed <a target="_blank" href="https://www.frontendmentor.io/solutions/responsive-product-preview-card-using-css-grid-VHa9lno4Au">the Frontend Mentor challenge “Product Preview Card”</a>. While I’m happy I was able to complete the challenge and meet the project specifications, I definitely took the “long way” to get there. And based on the (amazing) feedback I got from users on Frontend Mentor there’s definitely a lot of room for improvement. In particular, my approach to the challenge used a lot of extra (and unnecessary) code to get the project to meet the specifications.</p>
<p>At first, all of the feedback was initially overwhelming but once I sorted through it I found the most useful suggestion to be exploring <a target="_blank" href="https://www.youtube.com/@KevinPowell">Kevin Powell’s YouTube Channel</a>. Kevin is CSS guru and takes a mobile-first mindset to his web development. My exploration of some of the videos on his channel led me to his (free) 21-day course <a target="_blank" href="https://courses.kevinpowell.co/conquering-responsive-layouts">“Conquering Responsive Layouts”</a>. </p>
<p>In the course he teaches you how to use his mobile-first mindset by leveraging HTML and CSS to your advantage without having to add countless media queries. So far I’m <strong><em>really</em></strong> enjoying his course. The first few videos have been an eye opener on responsive web design and I’m starting to see the advantages of the mobile-first design mindset he espouses. </p>
<p>Kevin argues (and I agree) that instead of starting with the desktop version of the site it’s better to start with the mobile version first and use CSS to your advantage when you want to make it responsive. I’m surprised (and happy) to learn things like removing the <code>height</code> property and using units like <code>em</code> and <code>rem</code> make this really easy to do. </p>
<p>This works because HTML is already responsive by default and we (developers) can often easily mess it up by adding in extra and unnecessary CSS properties to make it “mobile-friendly”. It’s better to start with the mobile design <strong><em>first</em></strong> then build outward to the desktop version of the site. As opposed to layering on media query after media query to making your site mobile friendly for all the various mobile devices out there.</p>
<p>I’m eager to learn more, but I also like his “drip” style of pacing for this course. He has designed the course so that you only have access to the lessons on a specified date. That is, you can only access Day 2 Lessons on Day 2, not before. This is different from the typical “binge” approach that other courses (and tutorials) usually take — which some students might prefer — but having a day (or two) between lessons is definitely beneficial for processing the information. It’s important to absorb the information and give yourself time to process it.</p>
<p>I still have 19 more days of the course to complete before I finish, but I already have some ideas for how I could improve my solution to <a target="_blank" href="https://www.frontendmentor.io/solutions/responsive-product-preview-card-using-css-grid-VHa9lno4Au">the Frontend Mentor challenge “Product Preview Card”</a>. I’m eager to implement these ideas but mindful that I need to wait until I’ve had some time to fully “digest” the ideas from the course. </p>
<p>Looking ahead to next week, I plan to continue my studies and following my even/odd day approach (even days for HTML/CSS and odd days for JS). Like Kevin’s course, I find having some time between concepts helps me think about them more deeply. </p>
<h2 id="heading-projects-from-the-week">Projects from the Week</h2>
<ul>
<li>Scrimba Solo Projects<ul>
<li>Personal website: <a target="_blank" href="https://startling-starlight-cc84f0.netlify.app/">https://startling-starlight-cc84f0.netlify.app/</a></li>
<li>Basketball Scoreboard: <a target="_blank" href="https://github.com/ananfito/basketball-scoreboard">https://github.com/ananfito/basketball-scoreboard</a></li>
</ul>
</li>
<li>Frontend Mentor Challenges<ul>
<li>Product Preview Card: <a target="_blank" href="https://github.com/ananfito/product-preview-card">https://github.com/ananfito/product-preview-card</a></li>
</ul>
</li>
</ul>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks so much for reading this post. If you found it helpful or have a suggestion for something I can improve upon, please let me know in the comments below. Hearing your thoughts makes this more of a conversation and helps everyone learn.</p>
]]></content:encoded></item><item><title><![CDATA[R2D6: Sololearn, Scrimba, and Frontend Mentor]]></title><description><![CDATA[Intro
Hello and welcome to another blog post for Anthony’s Techie Thoughts! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer. In my blog posts I reflect on ...]]></description><link>https://blog.ananfito.dev/r2d6-sololearn-scrimba-and-frontend-mentor</link><guid isPermaLink="true">https://blog.ananfito.dev/r2d6-sololearn-scrimba-and-frontend-mentor</guid><category><![CDATA[100DaysOfCode]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[beginner]]></category><category><![CDATA[codenewbie]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Sun, 20 Nov 2022 10:00:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/cckf4TsHAuw/upload/v1668938453181/GzfcJYG9V.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>Hello and welcome to another blog post for <a target="_blank" href="https://ananfito.hashnode.dev/">Anthony’s Techie Thoughts</a>! If you’re new here, my name is Anthony and I’m studying programming to make a career change from mathematics teacher to frontend web developer. In my blog posts I reflect on my journey and share things I’m learning along the way. You can find me on <a target="_blank" href="https://github.com/ananfito">GitHub</a>, <a target="_blank" href="https://hashnode.com/@ananfito">Hashnode</a>, <a target="_blank" href="https://dev.to/ananfito">DEV.to</a>, and <a target="_blank" href="https://community.codenewbie.org/ananfito">CodeNewbie</a>. </p>
<p>This week, on Tuesday November 15, I started my second round of the #100DaysOfCode challenge. In this blog post, I’ll share my reflection on my progress including my dailyDevLog with notes reflections, references, and links to my work. Thanks for stopping by and happy coding!</p>
<h2 id="heading-weekly-reflection">Weekly Reflection</h2>
<p>I’m five days into the second round of the #100DaysOfCode challenge. I wrote about <a target="_blank" href="https://ananfito.hashnode.dev/day-100-lessons-learned-from-100daysofcode">my reflections after the first challenge</a> and I’m looking forward to another 100 days of learning. This week has been a very productive week. I found two fantastic resources (<a target="_blank" href="https://www.sololearn.com/profile/27548051">Sololearn</a> and <a target="_blank" href="https://scrimba.com/">Scrimba</a>) to continue to improve my JavaScript coding skills. </p>
<p>I’ve been enjoying the quick, short lessons on Sololearn to review JS concepts, especially since I can practice both on the computer and on my phone. This is really useful when I’m at work and only have 15-30 minutes to time to study. It’s perfect for squeezing micro lessons. </p>
<p>I’ve fallen in love with how Scrimba uses scrims to teach and engage learners. If you haven’t checked it out, I recommend it. It’s worth looking into. I really love how you can pause the video and interact directly with the code that’s being discussed in the video without having to clone a repository or switch to a code editor. This makes learning more efficient and practical — it’s really great learn the concepts but be able to practice before seeing a solution.</p>
<p>I’m currently working my way through the Frontend Developer Career Path (which is part of the Pro subscription package) with the end goal of being hirable upon completion. Hopefully, I’ll be done with the program by May 2023 (if not, sooner) and ready to start looking for jobs. I also really like how Scrimba charges in 6-month increments with the mindset that six months you’ll be job-ready. This is both motivating to me and flexible for my finances. </p>
<p>I’m still working on finalizing the <a target="_blank" href="https://github.com/ananfito/frontend-mentor/tree/main/product-preview-card">“product preview card” for the Frontend Mentor Challenge</a>. This has been another excellent resource for both putting my skills into action and reviewing concepts like HTML and CSS which I study back in May/June of this year. This project in particular has helped me review CSS and I’m looking forward to finishing the challenge with a mobile-friendly design. This is something that I’m continue to struggle with but with practice I know I’ll get better.</p>
<p>Looking ahead to next week, I want to continue with the even/odd study days where I on even numbered days I focus on Frontend Mentor Challenges and on odd numbered days I focus on learning JavaScript via Sololearn, freeCodeCamp, and/or Scrimba. This was an idea that occurred to me after reflecting on my first round of #100DaysOfCode. So far it’s working really well because (1) I always know what I need to focus on (I don’t waste time trying figure out what to learn) and (2) alternating days gives a break from topics which lets my subconscious work “behind-the-scenes” to better understanding them. </p>
<h3 id="heading-tldr">TLDR;</h3>
<p><strong>Triumphs</strong></p>
<ul>
<li>Completed the first 3 modules on Sololearn’s JavaScript Course</li>
<li>8% complete with Module 3 of Scrimba’s The Frontend Developer Career Path</li>
<li>Created a simple <a target="_blank" href="https://github.com/ananfito/passenger-counter-app">passenger counter app</a> (inspired by the one in Scrimba curriculum) for my partner, who’s a flight attendant, to use</li>
</ul>
<p><strong>Tribulations</strong> </p>
<ul>
<li>Designing the passenger counter app to be mobile-friendly</li>
</ul>
<p><strong>Goals for next week</strong> </p>
<ul>
<li>Continue with even/odd study days<ul>
<li>Even Days: Frontend Mentor Challenges</li>
<li>Odd Days: JS, fCC, and/or Scrimba curriculum</li>
</ul>
</li>
</ul>
<h2 id="heading-dailydevlog">dailyDevLog</h2>
<p>Here are my daily reflections for the #100DaysOfCode challenge from this week.</p>
<h3 id="heading-tue-nov-15">Tue Nov 15</h3>
<p><strong>Today's Progress:</strong></p>
<ul>
<li>Completed the last 3 intermediate scripting algorithms on fCC (now onto the certification projects!)</li>
<li>Play around with some introductory Node.js</li>
</ul>
<p><strong>Thoughts:</strong></p>
<p>I’m really happy I completed the final few scripting challenges on freeCodeCamp’s JavaScript course. I took a break from the challenges to use some other resources but I came back to them today and it was a good review of functions, <code>this</code>, <code>some</code>, and <code>map()</code>. It was also helpful to learn about some new things like currying and <code>delete</code>. </p>
<p>Moving ahead, I’d like to review the JavaScript concepts. Even though I completed all the challenges on fCC and I feel (mostly) confident in going to work on the certification projects, I still want a stronger JavaScript foundation to stand on before I move on the frameworks and libraries. I’ve already downloaded the Sololearn app to my phone to start reviewing and I think I’ll complete the video courses for JavaScript that are on the fCC YouTube channel. </p>
<p>I’ve also got some other tutorial videos for building projects (like games) saved in a playlist on YouTube so I think I’ll start going through those too. I really enjoy the “learning by doing” approach. Sometimes the challenges on fCC (or elsewhere) are a little too abstract for me.   </p>
<p><em>References:</em></p>
<ul>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some"><code>some</code></a></li>
<li><a target="_blank" href="https://www.w3docs.com/learn-javascript/currying.html">Currying</a></li>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this"><code>this</code></a></li>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete"><code>delete</code></a></li>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math"><code>Math</code> Global Object</a></li>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map"><code>map()</code></a></li>
</ul>
<p><strong>Link to work:</strong></p>
<ul>
<li><a target="_blank" href="https://freecodecamp.org/ananfito">https://freecodecamp.org/ananfito</a></li>
</ul>
<h3 id="heading-wed-nov-16">Wed Nov 16</h3>
<p><strong>Today's Progress:</strong></p>
<ul>
<li>Completed 2 JavaScript lessons on Sololearn about <code>if</code>, <code>else</code>, and <code>else if</code>.</li>
<li>Added styling for the “product preview card” challenge for frontend mentor</li>
</ul>
<p><strong>Thoughts:</strong></p>
<p>Really satisfied with today’s session. Sololearn is turning out to be a good resource for me to review my knowledge of JavaScript and I’m liking how the Frontend Mentor challenge helps me review/practice my HTMS/CSS skills.</p>
<p><em>References:</em></p>
<ul>
<li><a target="_blank" href="https://blog.udemy.com/css-strikethrough/">CSS Strikethrough</a></li>
<li><a target="_blank" href="https://youtu.be/V9yP0QG0NWI">CSS Variables - Using them in the real world and a cool trick</a></li>
</ul>
<p><strong>Link to work:</strong> </p>
<ul>
<li><a target="_blank" href="https://github.com/ananfito/frontend-mentor/tree/main/product-preview-card">https://github.com/ananfito/frontend-mentor/tree/main/product-preview-card</a></li>
<li><a target="_blank" href="https://www.sololearn.com/profile/27548051">https://www.sololearn.com/profile/27548051</a></li>
</ul>
<h3 id="heading-thu-nov-17">Thu Nov 17</h3>
<p><strong>Today's Progress:</strong></p>
<ul>
<li>Completed two lessons on Sololearn: the <code>switch</code> statement and the <code>for</code> loop</li>
<li>Joined Scrimba &amp; Completed Sections 1-12 of Module 1 of the Learn JavaScript course</li>
</ul>
<p><em>Notes &amp; Quotes:</em></p>
<p><code>swtich</code>:</p>
<ul>
<li>When using a <code>switch</code> statement if there is a case where there is no match you can use the keyword <code>default</code> at the end of the statement</li>
</ul>
<p><code>for</code> loops:</p>
<ul>
<li>Statement 1 in a <code>for</code> loop is optional <strong>if</strong> the variable is defined before the start of the <code>for</code> loop<ul>
<li>Also within in Statement 1 you can initiate more than one variable by separating them with commas. e.g., <code>for (i = 1, text=""; i &lt; 5; i++)</code></li>
</ul>
</li>
<li>Statement 2 of a <code>for</code> loop is optional <strong>if and only if</strong> you put a <code>break</code> statement in the lop</li>
<li>Optionally Statement 3 can be included inside of the for loop at the end</li>
</ul>
<p><strong>Thoughts:</strong></p>
<p>I felt a little lost at the start of today’s study session. Today was an odd so I my focus is “set” to work on freeCodeCamp projects, but I’m just not feeling confident about my JavaScript skills. Yeah I completed the course work but it still feels jumbled and “soft” in my brain. I know I need to start building up the skills with projects, but I’m also not sure where to start. So I started looking for some resources and stumbled upon Scrimba which is a really cool learning resource and I wish I had known about it earlier. </p>
<p>For now, I think I’ll continue to study the coursework during the week and save the projects for the Saturdays, when I have more time to focus. Right now, it’s hard to get started on the projects when I only have 10-15 mins here and there to study while at work. </p>
<ul>
<li>M - F<ul>
<li>Odd Days: JS, fCC, and/or Scrimba curriculum</li>
<li>Even Days: Frontend Mentor Challenges</li>
</ul>
</li>
<li>Sat<ul>
<li>fCC Project Work Day (have an extended study session)</li>
</ul>
</li>
<li>Sun (no code, rest &amp; reflect)<ul>
<li>Weekly reflection blog post<ul>
<li>Triumphs</li>
<li>Tribulations</li>
<li>Goals for next week</li>
</ul>
</li>
</ul>
</li>
</ul>
<p><strong>Link to work:</strong> </p>
<ul>
<li><a target="_blank" href="https://github.com/ananfito">https://github.com/ananfito</a></li>
<li><a target="_blank" href="https://freecodecamp.org/ananfito">https://freecodecamp.org/ananfito</a></li>
<li><a target="_blank" href="https://www.sololearn.com/profile/27548051">https://www.sololearn.com/profile/27548051</a></li>
</ul>
<h3 id="heading-fri-nov-18">Fri Nov 18</h3>
<p><strong>Today's Progress:</strong></p>
<ul>
<li>Added styling to “product preview card” (frontend mentor challenge)<ul>
<li>Need to figure out how to properly style SVG graphic</li>
</ul>
</li>
</ul>
<p><strong>Thoughts:</strong></p>
<p>Today’s session was short because I went on a field trip for work and came home tired (and with a headache) so I didn’t get much done beside some simple styling. </p>
<p><em>References:</em></p>
<ul>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial">SVG Tutorial (MDN)</a></li>
</ul>
<p><strong>Link to work:</strong> </p>
<ul>
<li><a target="_blank" href="https://github.com/ananfito/frontend-mentor/tree/main/product-preview-card">https://github.com/ananfito/frontend-mentor/tree/main/product-preview-card</a></li>
</ul>
<h3 id="heading-sat-nov-19">Sat Nov 19</h3>
<p><strong>Today's Progress:</strong></p>
<ul>
<li>Completed 2 lessons on Sololearn about the <code>do...while</code> loop</li>
<li>Continued working through the JS course on Scrimba</li>
<li>Created my own version of the ‘passenger counting app’ based on the one featured in the Scrimba coursework</li>
</ul>
<p><em>Notes &amp; Quotes:</em></p>
<ul>
<li>“The <strong>while</strong> loop repeats through a block of code, but only as long as a specified condition is <strong>true</strong>.”<ul>
<li>“If a condition is always true, the loop will run forever”</li>
<li>“Make sure that the condition in a <strong>while</strong> loop eventually becomes <strong>false</strong>.”<ul>
<li>This can be done by remember to increase/decrease the value of the variable (e.g., <code>i++</code> or <code>i--</code>).</li>
</ul>
</li>
</ul>
</li>
<li>The <code>do...while</code> loop differs from the <code>while</code> loop in that it “will execute the code block once, <strong>before</strong> checking if the condition is true, and then it will repeat the loop as long as the condition is true.”<ul>
<li>The <code>do...while</code> loop must end with a semicolon <code>;</code></li>
<li>“The loop will always be executed <strong>at least once</strong>, even if the condition is false, because the code block is executed before the condition is tested.”</li>
</ul>
</li>
</ul>
<p><strong>Thoughts:</strong></p>
<p>Really satisfied with today’s study session. I feel like things are starting to come together. I’m really enjoying using a Sololearn as a quick-study tool to review JS concepts. I’m also really enjoying Scrimba — so much so that I’m considering signing up for their Pro account in order to get access to their Frontend Developer Path and full access to their community. </p>
<p><em>References:</em></p>
<ul>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/background">CSS Background (MDN)</a></li>
<li><a target="_blank" href="https://sebhastian.com/background-image-opacity-css/">Background image opacity (blog tutorial)</a></li>
</ul>
<p><strong>Link to work:</strong> </p>
<ul>
<li><a target="_blank" href="https://github.com/ananfito/passenger-counter-app">https://github.com/ananfito/passenger-counter-app</a></li>
<li><a target="_blank" href="https://www.sololearn.com/profile/27548051">https://www.sololearn.com/profile/27548051</a></li>
</ul>
<h2 id="heading-thanks-for-reading">Thanks for reading</h2>
<p>Thanks so much for reading this post. If you found it helpful or have a suggestion for something I can improve upon, please let me know in the comments below. Hearing your thoughts makes this more of a conversation and helps us all learn. See you next time.</p>
]]></content:encoded></item><item><title><![CDATA[Day 100: Lessons Learned from #100DaysOfCode]]></title><description><![CDATA[100 Day Challenge Reflection
November 12, 2022 marked the 100th day of my journey on the #100DaysOfCode Challenge. In this post, I look back on what I learned from the challenge and what I want to gain as I move forward to the next 100 days.
Where I'...]]></description><link>https://blog.ananfito.dev/day-100-lessons-learned-from-100daysofcode</link><guid isPermaLink="true">https://blog.ananfito.dev/day-100-lessons-learned-from-100daysofcode</guid><category><![CDATA[100DaysOfCode]]></category><category><![CDATA[beginner]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[learning]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Mon, 14 Nov 2022 09:22:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/EPppwcVTZEo/upload/v1668417504081/uaJK5g9xYR.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-100-day-challenge-reflection">100 Day Challenge Reflection</h2>
<p>November 12, 2022 marked the 100th day of my journey on the #100DaysOfCode Challenge. In this post, I look back on what I learned from the challenge and what I want to gain as I move forward to the next 100 days.</p>
<h3 id="heading-where-ive-been">Where I've Been</h3>
<p><a target="_blank" href="https://www.freecodecamp.org/ananfito">I joined freeCodeCamp</a> in Oct of 2020. I started with the <a target="_blank" href="https://www.freecodecamp.org/learn/scientific-computing-with-python/">Python course</a> and really enjoyed it (though I didn't complete the certification projects ... yet). Unfortunately, some life events got in the way and I stopped studying programming in the toward the end of 2021.</p>
<p>At the beginning of 2022, I got back into studying programming which led me to explore data analytics. I took a detour into the topic by completing the <a target="_blank" href="https://www.credly.com/badges/dafff9fa-de9f-497f-bd7f-d98c46a24e73/public_url">Google Data Analytics Certificate</a> via Coursera. I really enjoyed putting my mathematical knowledge and skills to work, but I felt something was missing. I wasn't thrilled about sitting at a desk manipulating spreadsheets and analyzing data. To be clear I love reading about the outcomes of such practices, but I wasn't enthralled with doing them myself.</p>
<p>I took another short break on my programming journey before starting <a target="_blank" href="https://www.freecodecamp.org/learn/2022/responsive-web-design/">freeCodeCamp's Responsive Web Design certification</a>. <em>This</em> was a game changer for me! I was enthralled with being able to manipulate HTML/CSS code and channel my creative energy into creating something that then could be shared. For example, checkout <a target="_blank" href="https://ananfito.github.io/">the portfolio website</a> I made as part of the certification. It's simple and not super flashy, but it gets the job done and it's something I made with my own two hands.</p>
<p>After earning my certificate for that program in July of this year, I continued my journey by starting <a target="_blank" href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures">freeCodeCamp's JavaScript certification</a>. Shortly after starting the course I started the <a target="_blank" href="https://github.com/ananfito/100-days-of-code">#100DaysOfCode Challenge</a> on August 5 and on November 12 I completed the 100th day of that challenge.</p>
<p>Seventeen of those 100 days were rest days (because life gets in the way sometimes), but overall I'm really happy I started and completed this challenge. The challenge helped me get into the habit of coding, get connected with others, and build my confidence. I still have more work to do, but I feel like I've got a firmer foundation to stand on than I did six months ago.</p>
<h3 id="heading-what-i-accomplished">What I Accomplished</h3>
<p>Looking back on my 100 days of coding there have been plenty of lessons learned (both at and beyond the keyboard). The following is what I like to think of as my "Did It" list: a list of all the things I accomplished during this 100 day challenge. I keep it as a reminder of what I was able to accomplish just by dedicating a small amount of time (30-60 mins) each day.</p>
<p>This is especially important for someone like me who is a beginner but also as someone who is switching industries entirely. It's quite easy to feel like I don't know enough or don't have the skills to enter into a new industry (i.e., imposter syndrome), but this list is evidence that shows I do have skills and that they will continue to grow as long as I continue to put in that little bit of effort each day.</p>
<p>If you're a beginner coder or a career changer like me, I strongly encourage you to keep a "Did It" list too so you can remind yourself of what you've accomplished. And, if you feel like it, share your list so we can all celebrate together.</p>
<h4 id="heading-my-did-it-list">My "Did It" List</h4>
<ul>
<li>Nearly complete with <a target="_blank" href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures">freeCodeCamp's JavaScript certification</a><ul>
<li>I'm 85% complete with the final section and I still need to complete the five certification projects</li>
</ul>
</li>
<li><a target="_blank" href="https://ananfito.github.io/">My portfolio</a> has a few more featured projects:<ul>
<li><a target="_blank" href="https://ananfito.github.io/random-quote-generator/">Random Quote Generator</a></li>
<li><a target="_blank" href="https://ananfito.github.io/stopwatch/">Stopwatch</a></li>
<li><a target="_blank" href="https://ananfito.github.io/to-do-list/">To-Do List</a></li>
</ul>
</li>
<li>In addition to the featured portfolio projects, I also added some new repository projects to my GitHub profile. While these are basic examples of my skills, they do demonstrate how my skills have improved over these past few months:<ul>
<li><a target="_blank" href="https://github.com/ananfito/basic-tetris">Basic Tetris</a></li>
<li><a target="_blank" href="https://github.com/ananfito/accordion-demo">Accordion Demo</a></li>
<li><a target="_blank" href="https://github.com/ananfito/modal-demo">Modal Demo</a></li>
<li><a target="_blank" href="https://github.com/ananfito/responsive-css-grid">Responsive CSS Grid</a></li>
<li><a target="_blank" href="https://github.com/ananfito/frontend-mentor/tree/main/qr-code-component-main">QR Component</a></li>
<li><a target="_blank" href="https://github.com/ananfito/frontend-mentor/tree/main/product-preview-card">Product Preview</a> (work-in-progress)</li>
<li><a target="_blank" href="https://github.com/ananfito/calculator">Calculator App</a> (work-in-progress)</li>
</ul>
</li>
</ul>
<p>All of these projects and coursework have let me improve my understanding of various web development concepts and skills. In particular I've increased my knowledge of the following areas:</p>
<ul>
<li>Basic HTML/CSS</li>
<li>Basic JavaScript</li>
<li>ES6</li>
<li>Regular Expressions</li>
<li>Debugging</li>
<li>Basic Data Structures</li>
<li>Basic Algorithm Scripting</li>
<li>Object Oriented Programming</li>
<li>Functional Programming</li>
<li>Intermediate Algorithm Scripting</li>
<li>Git &amp; GitHub</li>
</ul>
<h3 id="heading-where-i-want-to-go">Where I Want to go</h3>
<p>I've got my "Did It" list, but what about my "To-Do" list. While I'm proud of the above listed accomplishments I'm keenly aware of the fact that I still have more to learn. Right now, my goal is to make my career transition in the summer of 2023. Which means I need to have a plan in place for how I will continue to improve my skills. Moving forward I'll continue to put in the daily practice but with a more focused effort in the following areas.</p>
<h4 id="heading-double-down-on-javascript">Double Down on JavaScript</h4>
<p>I'm nearly done with freeCodeCamp's JavaScript certification -- and I do want to move on to their <a target="_blank" href="https://www.freecodecamp.org/learn/front-end-development-libraries/">frontend libraries certification</a> -- but I also want to spend more time learning JavaScript in more detail. I have a basic understanding of it, but I want to go deeper because I know that a lot of the frontend libraries (e.g., React, Vue, etc.) make frontend development easier but I believe that's only true if you have a solid foundation of JavaScript to stand on.</p>
<p>In other words, I believe that if I have strong, firm understanding of JavaScript it will making learning new libraries or frameworks easier. It's kind of like using a calculator to do math. It's only useful if you know how addition, subtraction, multiplication, and division work. Otherwise you're just pushing random buttons hoping for an outcome that works.</p>
<p>In particular, I want to go back to my "Identified Weaknesses" list (which I established in my <a target="_blank" href="https://ananfito.hashnode.dev/day-50-reflecting-at-the-halfway-point">Day 50 Reflection</a>) and continue working on the following concepts:</p>
<ul>
<li>Callback functions; I've seen more examples of how these are used in practiced but I'm still not very confident in how and when to use them.</li>
<li>Arrow functions; again, here I've seen more practical examples but haven't quite solidified the concept in my head yet.</li>
</ul>
<h4 id="heading-more-frontend-mentor-challenges">More Frontend Mentor Challenges</h4>
<p>So far I've only completed one challenge on <a target="_blank" href="https://www.frontendmentor.io/">Frontend Mentor</a> -- mostly just to try it out -- but I definitely want to complete more. First, it lets me continue to practice and improve my frontend skills. Second, I really like the ability to share my solution and get feedback from others (as well as to give feedback too). This is incredibly valuable and I'm deeply grateful that a site such as Frontend Mentor exists to help facilitate that, especially as a self-taught programmer who doesn't always have the opportunity to connect with other learners in person.</p>
<h4 id="heading-set-a-study-schedule">Set a Study Schedule</h4>
<p>This challenge taught me the importance of doing something regularly (or rather retaught it to me) and how big things are build as a series of small things first. To that end, I would like to be more structured with my study schedule. Specifically, I want to try setting specific tasks for specific days. During the challenge I found that more often than not I would have breakthroughs in learning or solving a problem after taking a break and working on something else.</p>
<p>To keep things simple I think I want to try focusing on freeCodeCamp's coursework on odd numbered days and focusing on projects (i.e., Frontend Mentor challenges) on even numbered days. I think it will provide a nature structure for walking away from certain tasks/problems to allow my subconscious to think about the problem while I work on something else and then return to it at another time. Further, I think it will provide some focus for what I need to work on and what resources to incorporate.</p>
<p>It's no secret that there are a plethora of learning resources out there to teach yourself how to code, but this can be overwhelming and lead you to jump from resource to resource without actually learning anything. Some like to call this "tutorial hell" but regardless of what you call it I think it's something that can be avoided by having a structure and roadmap for how you study. This is why I'm grateful for resources like freeCodeCamp or <a target="_blank" href="https://www.theodinproject.com/">The Odin Project</a> because they give an outline or roadmap to follow for those of us who might not know which direction to head.</p>
<h4 id="heading-blog-more">Blog More</h4>
<p>The habit of coding everyday helped increase my skills and keep them active, but I also really enjoyed the aspect of reflecting on my study session. For the challenge, I wrote my reflections in markdown files and published them on GitHub in a repo. This worked well enough, but moving forward I want to publish them elsewhere in a more social capacity. I think I'd like to start blogging about my journey on platforms like <a target="_blank" href="https://ananfito.hashnode.dev">Hashnode</a> and <a target="_blank" href="https://dev.to/ananfito">DEV.to</a> where other developers are so I can connect and learn from them.</p>
<h4 id="heading-connect-with-others">Connect with Others</h4>
<p>In addition to blogging and sharing my knowledge on the Internet, I also want to start being more active in the developer communities on Slack and Discord. I have already connected with a few people and I have found value in learning from what people post to these places, but I have not put in a lot of time into being active there on a regular basis. And with the future of Twitter in some major uncertainty, it feels like the right time to explore other places to connect with beginners and developers.</p>
<h3 id="heading-things-to-remember">Things to Remember</h3>
<p>At the halfway point of this challenge I took some time to reflect in a <a target="_blank" href="https://ananfito.hashnode.dev/day-50-reflecting-at-the-halfway-point">blog post</a> on how far I had gone and where I wanted to go. Re-reading it there a few things I didn't get to complete in the second half of the challenge which is okay because it gives me something to work toward in another round of this challenge. But in my re-read of the post I did notice the list I made of things I wanted to remember. In this post, I'll repeat the short version of that list because these are things that I <em>still</em> want to remember going forward.</p>
<p>Ultimately, learning is a process and not a destination and part of the process means going back and reminding myself of important ideas such as the following:</p>
<ul>
<li>Be Patient</li>
<li>Ask for Help</li>
<li>Coding isn't everything</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>When I started this challenge I wasn't sure where it would lead or what I would gain along the way. And while this 100th day is milestone in this journey it's also an arbitrary marker because the journey doesn't stop here. There's still more to come and I look forward to seeing what I'm able to accomplish in the next 100 days, 500 days, 1000 days!</p>
<p>Thanks for reading. If you'd like to continue sharing this journey with me, consider connecting with me:</p>
<ul>
<li><a target="_blank" href="https://ananfito.hashnode.dev">Hashnode</a></li>
<li><a target="_blank" href="https://dev.to/ananfito">DEV.to</a></li>
<li><a target="_blank" href="https://github.com/ananfito">GitHub</a></li>
<li><a target="_blank" href="https//linkedin.com/in/anthonynanfito">LinkedIn</a></li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Regular Expressions: A Basic Explanation]]></title><description><![CDATA[Intro
In an effort to be intentional with my weekly reflections on the #100DaysOfCode Challenge, I want to focus this post on regular expressions. While completing the scripting challenges on freeCodeCamp I struggled and felt very frustrated with the...]]></description><link>https://blog.ananfito.dev/regular-expressions-a-basic-explanation</link><guid isPermaLink="true">https://blog.ananfito.dev/regular-expressions-a-basic-explanation</guid><category><![CDATA[Regular Expressions]]></category><category><![CDATA[#learning-in-public]]></category><category><![CDATA[learningJavaScript]]></category><category><![CDATA[100DaysOfCode]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Mon, 03 Oct 2022 06:54:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/uAFjFsMS3YY/upload/v1664779964310/EZXM02rB-.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-intro">Intro</h2>
<p>In an effort to be intentional with my weekly reflections on the <a target="_blank" href="https://github.com/ananfito/100-days-of-code">#100DaysOfCode Challenge</a>, I want to focus this post on regular expressions. While completing the scripting challenges on freeCodeCamp I struggled and felt very frustrated with the challenges that involved regular expressions. Which means ... I needed to learn more about them and on a deeper level. So here goes!</p>
<p>In this article, I'll give a basic overview of what regular expression are and how to get started using them. This by no means will be a comprehensive overview of them, but an introduction to regular expressions from one beginner to another.</p>
<h2 id="heading-what-are-regular-expressions">What are Regular Expressions?</h2>
<p>Regular expressions are patterns that are used to match strings. We place them inside a set of forward slashes <code>/ /</code>. In JavaScript, they are also objects and can be used with a variety of methods such as <code>match()</code>, <code>replace()</code>, <code>split()</code>, and more.</p>
<p>Basically, you're telling the computer to look for this pattern of characters within a string. That pattern could be letters, numbers, whitespace, special characters, etc. When a match is found it will be recorded or returned to you (depending on what method you're using).</p>
<h2 id="heading-how-do-you-use-regular-expressions">How do you use Regular Expressions?</h2>
<p>In JavaScript we can make use of regular expression by declaring a variable or place them directly inside a function. Before we look at those two use cases, let's start with an example.</p>
<h3 id="heading-example">Example</h3>
<p>Let's say I have the string of text <code>'For us, we like to take the dogs on a walk far from home.'</code> and I want to match all words that start with <code>f</code> and end with <code>r</code>. I can use the regular expression <code>/f[aeiou]r/gi</code> to match the words <code>For</code> and <code>far</code> in my sentence. But what does this goop of <code>/f[aeiou]r/gi</code> mean? Let's break it down.</p>
<h4 id="heading-the-expression-inside-the-slashes">The Expression (Inside the Slashes)</h4>
<p>First, we already know the expression falls between the slashes so let's focus in it: <code>f[aeiou]r</code>. I'm looking for three-letter words that start with <code>f</code> and end with <code>r</code>, but have a vowel (<code>a</code>, <code>e</code>, <code>i</code>, <code>o</code>, or <code>u</code>) in between them. The square brackets <code>[]</code> are used for matching character sets. Since I have the possibility of any vowel in between the <code>f</code> and the <code>r</code> I want to indicate that the brackets. In other words, it will match any word that starts with <code>f</code> and ends with <code>r</code> regardless of what vowel is in the center so it would match <code>far</code>, <code>fer</code>, <code>fir</code>, <code>for</code>, or <code>fur</code>.</p>
<h4 id="heading-the-flags-outside-the-slashes">The Flags (Outside the Slashes)</h4>
<p>Second, let's break down the <code>gi</code> that appears outside the slashes. These are expression flags and change how the expression is interpreted. Here, <code>g</code> stands for <code>global</code> meaning I want to search the entire string. If I remove the <code>g</code>, then it will only provide the first match in the string.</p>
<p>The letter <code>i</code> stands for <code>case insensitive</code> meaning it ignores the case of the letter. This allows us to match the word <code>For</code> at the beginning of the sentence. Without the <code>i</code> it would only match the word <code>far</code> in the sentence.</p>
<h3 id="heading-variable-declaration">Variable Declaration</h3>
<p>There are two ways to implement this in your script so let's start with the variable declaration. Consider the following:</p>
<pre><code><span class="hljs-keyword">let</span> string = <span class="hljs-string">`For us, we like to take the dogs on a walk far from home`</span>
<span class="hljs-keyword">let</span> regex = <span class="hljs-regexp">/f[aeiou]r/gi</span>

<span class="hljs-built_in">console</span>.log(string.search(regex));
<span class="hljs-comment">// expected output: 0, 42</span>
</code></pre><p>Here I've got variables for my string and the regular expression, and I'm using the <code>search()</code> method which provides the index of any matches. In this example, the method will search the string (the sentence) and return the indexes for any matches of word that starts with an <code>f</code> and ends with an <code>r</code>.</p>
<p>The advantage of using a variable declaration is that if we need to change the string or the regular expression, we can easily do that with out having to modify the rest of our script. In this case, we're only making use of our regular expression in the line <code>console.log()</code>, but other cases might be more complex or lengthly.</p>
<p>In particular if we end up searching multiple strings it's easier just to have to type the regular expression once (when we declare the variable) than each time we need to use it. This is especially helpful as regular expressions can get very complicated depending on what you're looking for.</p>
<h3 id="heading-inside-the-function">Inside the Function</h3>
<p>Alternatively, we could have also done the following and returned the same result:</p>
<pre><code><span class="hljs-keyword">let</span> string = <span class="hljs-string">`For us, we like to take the dogs on a walk far from home`</span>

<span class="hljs-built_in">console</span>.log(string.search(<span class="hljs-regexp">/f[aeiou]r/gi</span>));
<span class="hljs-comment">// expected output: 0, 42</span>
</code></pre><p>Notice in this case I've placed the regular expression as parameter directly into the <code>search()</code> function.</p>
<h2 id="heading-resources">Resources</h2>
<p>When I wasn't banging my head against the keyboard trying to figure out how regular expressions work, I cruised around the internet to find out what resources I could use to help understand them better.</p>
<p>My first go-to resource with any problem I have is to consult the documentation. The <a target="_blank" href="https://developer.mozilla.org">Mozilla Developer Network (MDN)</a> is my preferred place for this. Most times I figured out what I need from reading through their guides.</p>
<p>When the documentation doesn't help or it's still not clear to me, I move on to YouTube and find a tutorial (because having a person explain it to me usually does the trick). For regular expressions, I found the tutorial <a target="_blank" href="https://youtu.be/rhzKDrUiJVk">"Learn Regular Expressions In 20 Minutes"</a> by Web Dev Simplified to most helpful. It includes several examples and pointed me to my next suggested resource: <a target="_blank" href="https://regexr.com">RegExr</a>.</p>
<p>RegExr allows you to input the text you want to search and write your regular expressions to search the text. What I like about it (especially as a beginner) is it will highlight the characters that are being matched based on your expression <em>and</em> (my favorite part) it also provides description of what each part of your expression is doing in the match. I'm sure there are other tools out there like this, but this is the one I stumbled upon. Feel free to use what works best for you.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I've kept the above example simple because I'm writing this article for beginners who are just getting started. As a beginner myself, reading through the documentation can be overwhelming, particularly when we look at the <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes">Character Class</a>, <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Assertions">Assertions</a>, <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences">Groups and Backreferences</a>, Quantifers, and <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes">Unique property escapes</a> that make up the special character in regular expressions. However, that doesn't mean it's impossible to get better at using regular expressions.</p>
<p>I've still got more to learn when it comes to regular expressions, but my confidence is growing. Resources like RegExr and writing this blog post are helping me learn them. What are some resources you have found helpful in learning regular expressions?</p>
]]></content:encoded></item><item><title><![CDATA[Day 50: Reflecting at the Halfway Point]]></title><description><![CDATA[I started the #100DaysOfCode Challenge on August 5, 2022. Today is Day 50 of that challenge - well, technically it's the 51st day because I started my first entry as Day 0. As this marks the halfway point of the challenge I'm taking this opportunity ...]]></description><link>https://blog.ananfito.dev/day-50-reflecting-at-the-halfway-point</link><guid isPermaLink="true">https://blog.ananfito.dev/day-50-reflecting-at-the-halfway-point</guid><category><![CDATA[100DaysOfCode]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[freeCodeCamp.org]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[reflection]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Sat, 24 Sep 2022 13:41:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/9BlA8vech74/upload/v1664024890824/7Fd2A6ND-.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I started the <a target="_blank" href="https://www.100daysofcode.com/">#100DaysOfCode Challenge</a> on <a target="_blank" href="https://ananfito.hashnode.dev/100-days-of-code-challenge">August 5, 2022</a>. Today is Day 50 of that challenge - well, technically it's the 51st day because I started my first entry as <a target="_blank" href="https://github.com/ananfito/100-days-of-code/blob/main/days0-45.md#day-0-august-5-2022">Day 0</a>. As this marks the halfway point of the challenge I'm taking this opportunity to reflect on where I've been and where I want to go for the rest of the challenge.</p>
<h2 id="heading-triumphs">Triumphs</h2>
<h3 id="heading-freecodecamp-coursework">freeCodeCamp Coursework</h3>
<p>When I started this challenge I was just beginning my foray into the world of JavaScript (previously I had worked with python, R, SQL, HTML, and CSS). Now, I'm nearly finished with <a target="_blank" href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures">freeCodeCamp's JavaScript Data Structures and Algorithms course</a>. And soon I'll begin the certification projects, once I complete the final set of algorithm scripting challenges.</p>
<h3 id="heading-tetris-app">Tetris App</h3>
<p>In addition to working my way through fCC's coursework, I've also been exploring other resources and tutorials. One such tutorial - taught by <a target="_blank" href="https://youtu.be/rAUn1Lom6dw">Ania Kubow</a> - helped me design and build a <a target="_blank" href="https://github.com/ananfito/basic-tetris">basic Tetris app</a> using HTML, CSS, and JavaScript. This was fun and frustrating at the same time - a great combo in my opinion. Working through constructing this app helped me grasp things I had been struggling with - like writing functions - and it gave me an opportunity to see practical uses of the concepts I had been studying. More precisely, it gave me a clearly defined goal to work towards.</p>
<h3 id="heading-github">GitHub</h3>
<p>I've also been able to get more comfortable with GitHub. I've been creating and updating repositories with files from this challenge and projects - like my Tetris app. I still need to learn Git, but the GitHub desktop app has made syncing with GitHub a breeze. Moreover, it's helped to lower the bar for entry and given me an opportunity to see how GitHub works and the benefits to using it. Prior to this, GitHub felt like nebulous place programmers go to share their work. Now I'm not sure how I'd get along with it out.</p>
<h3 id="heading-portfolio-site">Portfolio Site</h3>
<p>I've also been continuing to design and build out <a target="_blank" href="https://ananfito.github.io">my portfolio website</a>. I originally built it as part of <a target="_blank" href="https://www.freecodecamp.org/learn/2022/responsive-web-design/">freeCodeCamp's Responsive Web Design course</a>, but throughout this challenge I've been able to tinker with the site. This has kept my HTML/CSS skills active, but also has allowed me to expand on other web design skills, like <a target="_blank" href="https://ananfito.hashnode.dev/what-does-accessibility-mean-for-developers">accessibility</a>.</p>
<h2 id="heading-tribulations">Tribulations</h2>
<p>Of course even with these triumphs there have certainly been tribulations that have tested both my coding skills and my commitment to the challenge (and to learning programming in general). Considering I've made it to Day 50 and I'm still 'alive' is a testament to my perseverance.</p>
<p>I'm still struggling with some concepts and methods like callback functions, arrow <code>=&gt;</code> functions, and how to properly use methods like <code>filter</code> or <code>map</code>, but I'm confident my skills in these areas will grow with time and practice.</p>
<p>Ultimately, the biggest thing I struggle with is knowing what to use and when. This is especially true when it comes to algorithm scripting. Again, I think this will come with practice (which I definitely need more of), but also with patience. There have been more than one occasion where I've gotten frustrated and felt like giving up (I'm grateful I didn't though).</p>
<p>To help deal with these tribulations I have started a list called "Identified Weaknesses" where I list out things I struggle with or don't fully understand. Then I carve out some time each week to have a dedicated practice session toward understanding those weaknesses and (hopefully) turn them into a strength.</p>
<h2 id="heading-looking-ahead">Looking Ahead</h2>
<h3 id="heading-complete-fcc-coursework">Complete fCC Coursework</h3>
<p>Obviously, in the next 50 days of this challenge I want to complete my freeCodeCamp coursework and obtain another certification. I'd also like to progress to the next freeCodeCamp course - which focuses on <a target="_blank" href="https://www.freecodecamp.org/learn/front-end-development-libraries/">front-end libraries</a> - round out my skills as a front-end developer.</p>
<h3 id="heading-fix-the-tetris-app-glitch">Fix the Tetris App Glitch</h3>
<p>My Tetris app still has a glitch that I'd like to fix and I want to make it so that it's mobile friendly (currently it's only desktop compatible). I know this will require reworking some of the event listeners in the JavaScript file and updating the CSS to support mobile browsers.</p>
<h3 id="heading-build-more-projects">Build More Projects</h3>
<p>Once the Tetris app is complete, I want to start working on other projects to add to my portfolio. Specifically, I want to put my JavaScript skills to the test and build an app that requires a user login and allows the user to perform certain tasks. For example, maybe design a clone of a website like YouTube or Twitter. I'd also like to design an app that makes use of API. Both of these types of projects seem like they'd involve practical skills that would help make me job-ready.</p>
<h3 id="heading-be-intentional-with-rest-days">Be Intentional with Rest Days</h3>
<p>Lastly, I'd like to plan out my rest days in advance and with the intention to step away from coding. So far I've only taken rest days when I've felt like it or when my body forced me to. This stratagem seems both ill-advised and unsustainable. From now on, I think I'll plan to take a weekend off everyone two weeks and work on non-coding projects and hobbies.</p>
<p>In addition to these breaks, I want to be more intentional with how I study by setting clearer goals for my study sessions. For example, being more strict about completing challenges within a time frame (e.g., one hour) - especially during the work week. Sometimes I've stayed up too late or neglected other tasks because I was too dedicated to studying. I'd like for my sessions to be more balanced. I already know I can make use of a timer to <a target="_blank" href="https://ananfito.hashnode.dev/day-43-functional-programming-javascript-dom-and-the-pomodoro-technique">employ the Pomodoro technique when I study</a>, now I just have to be better about not extending the study session longer than needed.</p>
<h2 id="heading-things-to-remember">Things to Remember</h2>
<p>As I complete the second half of this 100-day challenge these are the things I want to remember:</p>
<h3 id="heading-be-patient">Be Patient</h3>
<p>I'm more than eager to switch careers, but I need to remember that learning takes time. Ironically, as a teacher, you'd think I'd know this, but the experience of being a teacher is different than that of a learner. This journey has been humbling, if nothing else.</p>
<h3 id="heading-ask-for-help">Ask for Help</h3>
<p>I'm getting better at this, but in the beginning I was shy about asking for help. I wanted to solve everything on my own, but that's not how the world works. The world - all of human civilization - is built upon collaboration. That means asking for helping when I need. Using <a target="_blank" href="https://www.freecodecamp.org/news/freecodecamp-discord-chat-room-server/">the fCC Discord</a> has been helpful here; I've already gotten help on previous problems and made a few friends.</p>
<h3 id="heading-coding-isnt-everything">Coding isn't everything</h3>
<p>It's not the end of the world if I don't code. I know I need to continue to practice my skills, but I can't act like the world is going to explode if I don't code. There are other priorities that require my attention too.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Those are the triumphs, tribulations, and lessons I've learned from my first 50 days of the #100DaysOfCode Challenge. I'm looking forward to what comes next in the second half of the challenge and writing this post has helped me identify the direction I need to work toward. If you'd like to see <a target="_blank" href="https://github.com/ananfito/100-days-of-code/blob/main/day50.md">my log entry for Day 50's study session</a>, you can find in my GitHub repository for the #100DaysOfCode challenge.</p>
<p>Thanks for reading. If you'd like to continue sharing this journey with me, consider connecting with me:</p>
<ul>
<li><a target="_blank" href="https://ananfito.hashnode.dev">Hashnode</a></li>
<li><a target="_blank" href="https://github.com/ananfito">GitHub</a></li>
<li><a target="_blank" href="https://twitter.com/wordsbyfifi">Twitter</a></li>
<li><a target="_blank" href="https//linkedin.com/in/anthonynanfito">LinkedIn</a></li>
</ul>
<p>Happy coding!</p>
]]></content:encoded></item><item><title><![CDATA[What Does Accessibility Mean for Developers?]]></title><description><![CDATA[Introduction
Hello readers! Have you ever used a website or application and didn't work the way it was supposed to? Do you remember the feeling of frustration you had when it happened? Well, as web developers this is the kind of experience we don't w...]]></description><link>https://blog.ananfito.dev/what-does-accessibility-mean-for-developers</link><guid isPermaLink="true">https://blog.ananfito.dev/what-does-accessibility-mean-for-developers</guid><category><![CDATA[codenewbie]]></category><category><![CDATA[Web Accessibility]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Learning Journey]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Sun, 18 Sep 2022 07:56:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/EYDlkEskTjs/upload/v1663481859465/M-5pz8Dww.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-introduction">Introduction</h1>
<p>Hello readers! Have you ever used a website or application and didn't work the way it was supposed to? Do you remember the feeling of frustration you had when it happened? Well, as web developers this is the kind of experience we don't want to provide to users of the websites and applications we create. In this blog post I'll discuss what is accessibility and some accessibility tools I used to make <a target="_blank" href="https://ananfito.github.io/">my portfolio site</a> more accessible for everyone.</p>
<h2 id="heading-my-background">My Background</h2>
<p>I've worked as an educator for nearly ten years now. I have taught mathematics at the high school and middle school level (US Grades 6-12) and I have taught English as a Second Language. Thinking about accessibility is not a foreign concept to me in my current job, but I am learning about it in new ways as I continue to learn about web development.</p>
<p>In general, I tend to think of education and accessibility as trying to accomplish the following task: changing a light bulb. Everyone has to do it, but not everyone will do it in the same way. As someone who is 6 foot 2 inches (187 cm) this kind of task is generally not too difficult - I might need a step stool but little else. However, for others who are not as tall as I am or perhaps those who don't have full use of their limbs this task can become much more difficult (even risky) without the proper accommodations such as a ladder or perhaps a <a target="_blank" href="https://en.wikipedia.org/wiki/Reach_extender">reach extender</a>.</p>
<h1 id="heading-what-is-accessibility">What is accessibility?</h1>
<p>At its core making things accessible in education means giving access to learning. This can be done through accommodations or modifications such as shortening the length of assignments, providing information in multiple formats (e.g., written, audio, visual, braille), or use of various assistive tools.</p>
<p>Similarly, in web development, the goal is to allow any user to use all of the features and content on your site, "regardless of how the user accesses the web — even and especially users with physical or mental impairments", according to <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility">MDN Web Docs for Accessibility</a>.</p>
<p>Specifically, this means your site should be accessible to tools such as the keyboard, mouse, and touch screen users, but is also means making applications "understandable and usable by people regardless of auditory, visual, physical, or cognitive abilities."</p>
<h2 id="heading-accessibility-tools-how-do-you-test-your-site">Accessibility Tools: How do you test your site?</h2>
<p>Thankfully, by default, HTML is accessible - if used correctly - so there's no extra tool or language web developers need to use or learn, but it does require a subtle shift in habits and practice. Also, there are a number of different tools available help make this easier for us - even a beginner such as myself.</p>
<p>These tools includes things like <a target="_blank" href="https://accessibleweb.com/">AccessibleWeb.com</a> which has a free Website Accessibility Checker - this is the tool I used to check <a target="_blank" href="https://ananfito.github.io/">my portfolio site</a> (see further details below). Web browsers, such as Firefox, also come with tools in the Inspector to check the Accessibility Tree. You can learn more about <a target="_blank" href="https://youtu.be/7mqqgIxX_NU">Firefox's accessibility tool in this YouTube video from Mozilla</a>.</p>
<h2 id="heading-further-reading">Further Reading</h2>
<p>Before moving on to how I tested <a target="_blank" href="https://ananfito.github.io/">my portfolio site</a> and increased the accessibility, here is a list of articles I found useful for this task and are recommended to you as you learn more about making your projects accessible.</p>
<ul>
<li><p><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility">MDN's Accessibility Guide</a></p>
</li>
<li><p><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility/CSS_and_JavaScript">Accessibility for CSS and JavaScript</a></p>
</li>
<li><p><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics">WAI-ARIA Basics</a></p>
</li>
<li><p><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility/Multimedia">Making Multimedia Accessible</a></p>
</li>
<li><p><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility/Mobile">Accessibility for Mobile Devices</a></p>
</li>
</ul>
<h1 id="heading-testing-my-portfolio-site">Testing My Portfolio Site</h1>
<p>When I first setup <a target="_blank" href="https://ananfito.github.io/">my portfolio site</a> (as part of <a target="_blank" href="https://www.freecodecamp.org/learn/2022/responsive-web-design/">freeCodeCamp's Responsive Web Design course</a>) I initially picked the colors to match one of the GitHub pages themes (Cayman). It featured the colors blue and green which initially reminded me of the ocean or water. However, it wasn't until after I had gone through all the work of setting up the site did I remember that there are people who have <a target="_blank" href="https://www.nei.nih.gov/learn-about-eye-health/eye-conditions-and-diseases/color-blindness/types-color-blindness">blue-yellow color blindness</a>. In this particular form of color blinded, people have trouble distinguishing between blue and green, and yellow and red.</p>
<p>I knew this was something I would have to update - especially since it's part of my outward facing presentation of my work I'd hate for a blue-green color blind recruiter to see it - however, like so many things it got pushed to the end of my to-do list. That is, until earlier this week when I had some extra time to tinker with my site.</p>
<h2 id="heading-before">Before</h2>
<p>Going in I knew I wanted to change the color scheme to something other than blue-green, but I also wanted to know if there were other areas that needed improvement. I did some searching on the web and I found the <a target="_blank" href="https://accessibleweb.com/website-accessibility-checker/">Free Web Accessibility Checker</a>. This tool will scan your webpage (or entire site), give you an overall accessibility score, and suggestions for improvements. My initial score was 77/100 or a C+ in the jargon of education. Average, but not great.</p>
<p>Looking at the list of suggestions I needed to make adjustments to the following:</p>
<ul>
<li><p><strong>Update the HTML tags so they're there's a unique ID for each elements</strong> (as I understand it these tags are used in assembling the accessibility tree which is used as a reference by assistive devices)</p>
</li>
<li><p><strong>Improve the color contrast for the text elements</strong> (this is both for color blindness as well as other visual impairments or for anyone who just wants something easy to read)</p>
</li>
<li><p><strong>Add alternative text for the images</strong> (something else used by assistive devices for those with visual impairments)</p>
</li>
</ul>
<h2 id="heading-after">After</h2>
<p>With my checklist in hand, I set to work on updating my HTML and CSS files. The task itself wasn't too challenging, but it was tedious to re-read each file and make the necessary changes. In the future, I'll make a better habit of doing this as I build.</p>
<p>After making the necessary changes, I ran the URL for my site through the accessibility checker and received a <a target="_blank" href="https://accessibleweb.com/website-accessibility-checker/?page_url=https%3A%2F%2Fananfito.github.io">score of 100/100</a>! Hooray!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1663484250687/JMlgdHan7E.png" alt="Screen Shot of my accessibility score after I made changes" /></p>
<p>Here's a video featuring with before and after images of <a target="_blank" href="https://ananfito.github.io">my portfolio site</a>. The latest version can be viewed at https://ananfito.github.io.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/hjr6otX1J9Q">https://youtu.be/hjr6otX1J9Q</a></div>
<p> </p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>I know I still have more to learn when it comes to web development and accessibility, but this was a really great learning experience. My biggest takeaway from this is to build better habits as I build. Going back through my site wasn't a terribly painful experience, but it's certainly something that can be avoided with foresight.</p>
<p>Next, I know I have a few projects on my site that need to be made accessible on mobile web browsers. Understanding and using media queries is something I've already identified as a weakness of mine so this sounds like a great opportunity to take a deep dive and figure them out.</p>
<p>Thanks for reading! This is what I learned from making <a target="_blank" href="https://ananfito.github.io/">my portfolio site</a> more accessible. I hope you found it useful and I'd love to hear from you in the comments.</p>
<p><strong>What tools do you use to help make sure your sites/apps are accessible?</strong></p>
]]></content:encoded></item><item><title><![CDATA[Day 43: Functional Programming, JavaScript DOM, and the Pomodoro Technique]]></title><description><![CDATA[Today's Progress:
I completed the Functional Programming section of freeCodeCamp's JS course.
Next up is Intermediate Algorithm Scripting, then I'll start the certification projects.
I also read through a tutorial on how JavaScript DOM works and I re...]]></description><link>https://blog.ananfito.dev/day-43-functional-programming-javascript-dom-and-the-pomodoro-technique</link><guid isPermaLink="true">https://blog.ananfito.dev/day-43-functional-programming-javascript-dom-and-the-pomodoro-technique</guid><category><![CDATA[100DaysOfCode]]></category><category><![CDATA[learningJavaScript]]></category><category><![CDATA[#learning-in-public]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[beginner]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Sat, 17 Sep 2022 09:29:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/OlXUUQedQyM/upload/v1663406615879/hWjK5GT8w.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-todays-progress"><strong>Today's Progress:</strong></h2>
<p>I completed the <a target="_blank" href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#functional-programming">Functional Programming</a> section of freeCodeCamp's JS course.</p>
<p>Next up is <a target="_blank" href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#intermediate-algorithm-scripting">Intermediate Algorithm Scripting</a>, then I'll start the <a target="_blank" href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#javascript-algorithms-and-data-structures-projects">certification projects</a>.</p>
<p>I also read through a tutorial on <a target="_blank" href="https://www.freecodecamp.org/news/the-javascript-dom-a-practical-tutorial/">how JavaScript DOM works</a> and I read through some of <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility">MDN's accessibility guides</a> for upcoming blog post on how improved the accessiblity of <a target="_blank" href="https://ananfito.github.io">my portfolio site</a>.</p>
<h3 id="heading-quotes-andamp-key-ideas"><em>Quotes &amp; Key Ideas:</em></h3>
<ul>
<li>DOM = Document Object Model<ul>
<li>"The DOM is a Web API that allows developers to use programming logic to make changes to their HTML code. It's a reliable way to make changes that turn static websites into dynamic ones."</li>
<li>"<code>querySelector</code> is a method which accepts the exact CSS selector in a string and returns one element. ... If you wanted to use this approach to select and return more than one element, you can use <code>querySelectorAll</code> instead."<ul>
<li>Similarly, we can use <code>getElementByClassName</code>, <code>getElementById</code>, <code>getElementsByTagName</code> to select elements. However, these are more restrictve than <code>querySelector</code> and <code>querySelectorAll</code> which are more general</li>
</ul>
</li>
</ul>
</li>
<li>Manipulation is the main purpose of DOM. It allows you to select the elements you want to work with to be able to add interactivity to your website.</li>
<li>There are two key concepts for understanding DOM manipulation: <strong>events</strong> and <strong>handlers</strong>:<ul>
<li><strong>events:</strong> An action performed by the user (e.g., click, swipe)</li>
<li><strong>handlers:</strong> The triggered response to when an event is read</li>
<li>Responses are tied to each event and are monitored by <em>event listeners</em> such as the method <code>addEventListener</code> which takes two arguments (event, event handler)<ul>
<li>Anatomy of an event: <code>element.eventListenerMethod(event, eventHandler)</code></li>
</ul>
</li>
</ul>
</li>
<li>"The <code>split</code> method splits a string into an array of strings. It takes an argument for the delimiter, which can be a character to use to break up the string or a regular expression."<ul>
<li>"Since strings are <em>immutable</em>, the <code>split</code> method makes it easier to work with them."</li>
</ul>
</li>
<li>"The <code>join</code> method is used to join the elements of an array together to create a string. It takes an argument for the delimiter that is used to separate the array elements in the string"</li>
<li>"The <code>every</code> method works with arrays to check if <em>every</em> element passes a particular test. It returns a Boolean value - <code>true</code> if all values meet the criteria, <code>false</code> if not."</li>
<li>"The <code>some</code> method works with arrays to check if any element passes a particular test. It returns a Boolean value - true if any of the values meet the criteria, false if not." (This is another one I encountered while building the Tetris app - admittedly at the time I was a little confused at what it was, but today I'm glad I got another, clearer look at it)</li>
<li>"The <strong>arity</strong> of a function is the number of arguments it requires. <strong>Currying</strong> a function means to convert a function of N arity into N functions of arity 1."<ul>
<li>"In other words, it restructures a function so it takes one argument, then returns another function that takes the next argument, and so on."</li>
<li>"This is useful in your program if you can't supply all the arguments to a function at one time."</li>
</ul>
</li>
<li>"<strong>partial application</strong> can be described as applying a few arguments to a function at a time and returning another function that is applied to more arguments."</li>
</ul>
<h2 id="heading-thoughts"><strong>Thoughts:</strong></h2>
<p>I had a great study session today. I used the <a target="_blank" href="https://en.wikipedia.org/wiki/Pomodoro_Technique">Pomodoro Technique</a> to stay focus as well as to stay active - during each break I made sure to stand up, stretch, and walk around. I listened to the Battlestar Galactica song <a target="_blank" href="https://youtu.be/K2RQvE0GfYQ"><em>Prelude to War</em></a> on repeat while I studied and then switched to <a target="_blank" href="https://youtu.be/b9v3OVClkUs"><em>Fight Night</em></a> or <a target="_blank" href="https://youtu.be/6qCDazeZ8TU"><em>Allegro</em></a> during the breaks.</p>
<p>This was a new strategy I implemented today. I've noticed previously sometimes I don't always take a long enough break so by listening to a different (shorter) song on the break I made sure I was staying active for a sufficient amount of time.</p>
<p>Today's freeCodeCamp challenges on Functional Programming were at just the right level of difficulty (or perhaps things are starting to make sense). I was having fun working my way through the challenges; they were like little puzzles that needed to be solved.</p>
<p>Also, now that I've completed this section there's only one more section to complete until it's time to work on the certification projects. I'm really excited about this because while I find the challenges helpful, working on projects is where I think I learn the most.</p>
<h3 id="heading-references"><em>References:</em></h3>
<ul>
<li>This fCC blog article was very helpful in furthering my understanding of DOM, query selectors, event listeners (which I made use of on my <a target="_blank" href="https://github.com/ananfito/basic-tetris">Tetris</a> app): <a target="_blank" href="https://www.freecodecamp.org/news/the-javascript-dom-a-practical-tutorial/">How the JavaScript DOM Works – A Practical Tutorial</a></li>
<li>The <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet">Regular expression syntax cheatsheet</a> on MDN is always a useful reference I have bookmarked for easy access<ul>
<li>Read more about <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions">Regular Expressions</a></li>
</ul>
</li>
</ul>
<h2 id="heading-link-to-work"><strong>Link to work:</strong></h2>
<p>https://www.freecodecamp.org/ananfito</p>
<p><em>You can read my full journal for #100DaysOfCode on <a target="_blank" href="https://github.com/ananfito/100-days-of-code/">GitHub</a></em></p>
]]></content:encoded></item><item><title><![CDATA[Day 42: A Breakthrough While Using the reduce Method]]></title><description><![CDATA[Today's Progress:
I had a breakthrough while writing a function using the reduce method and I'm 75% done with 'Functional Programming' section of freeCodeCamp's JavaScript Algoothms and Data Structure course.
Quotes & Key Ideas:

"The reduce method i...]]></description><link>https://blog.ananfito.dev/day-42-a-breakthrough-while-using-the-reduce-method</link><guid isPermaLink="true">https://blog.ananfito.dev/day-42-a-breakthrough-while-using-the-reduce-method</guid><category><![CDATA[100DaysOfCode]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[beginner]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[learningJavaScript]]></category><dc:creator><![CDATA[Anthony Nanfito]]></dc:creator><pubDate>Fri, 16 Sep 2022 14:36:22 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/ha56hDUZuik/upload/v1663338423815/72aJMyTG2.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-todays-progress"><strong>Today's Progress:</strong></h2>
<p>I had a breakthrough while writing a function using the <code>reduce</code> method and I'm 75% done with 'Functional Programming' section of freeCodeCamp's JavaScript Algoothms and Data Structure <a target="_blank" href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures">course</a>.</p>
<h3 id="heading-quotes-andamp-key-ideas"><em>Quotes &amp; Key Ideas:</em></h3>
<ul>
<li>"The <code>reduce</code> method iterates over each item in an array and returns a single value (i.e. string, number, object, array). This is achieved via a callback function that is called on each iteration." <ul>
<li>The callback function takes four arguments: (1) the accumulator; which gets assigned the return value of the return value of the callback function from the previous iteration, (2) the current element being processed, (3) the index of that element, and (4) the array upon which <code>reduce</code> is called</li>
<li>In addition to the callback function, <code>reduce</code> also takes an initial value for the accumulator. "If this second parameter is not used, then the first iteration is skipped and the second iteration gets passed the first element of the array as the accumulator."</li>
<li>The MDN documentation a helpful <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#try_it">example</a> of <code>reduce</code> to calculate a sum</li>
</ul>
</li>
<li>The <code>sort</code> method sorts elements of an array in ascending order (by default) BUT this based on converting the elements into strings and comparing the Unicode point value. However, this can return unexpected results. Thus, it's best practice to provide a callback function (usually called <code>compareFunction</code>) to define how you want the elements sorted. More details <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort">here</a>.<ul>
<li>NOTE: The <code>sort</code> method <strong>mutates</strong> the array it's called upon. One way to avoid this is to first concatenate an empty array to the one being sorted, then run the <code>sort</code> method</li>
</ul>
</li>
</ul>
<h2 id="heading-thoughts"><strong>Thoughts:</strong></h2>
<p>I had a breakthrough in today's session: I managed to write an <strong>entire</strong> function without having to consult a "bazzillion" different sources. Lately I've had to refer to several different resources (e.g., documentation, forum posts, videos) to get through challenges. But today was different and it felt great!</p>
<p>While working on the challenge, I read the instructions carefully, broke the task into pieces, and only needed to refer to the MDN documentation <em>once</em> - and that was just for clarification on how syntax works for the <code>reduce</code> method. That's it!</p>
<p>It might not sound like a lot, but   I almost screamed, "F*ck yeah!" when I saw the 'Tests passed' pop-up, but restrained myself since I was studying late and didn't want to disturb my partner (who was sleeping in the other room).</p>
<p>Feeling good about today's session and looking forward to more studying this weekend. (-:</p>
<h3 id="heading-references"><em>References:</em></h3>
<p>The following documentation was useful into today's challenges:</p>
<ul>
<li><a target="_blank" href="https://www.w3schools.com/jsref/jsref_isinteger.asp"><code>isInteger</code></a></li>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce"><code>reduce</code></a></li>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort"><code>sort</code></a></li>
</ul>
<h2 id="heading-link-to-work"><strong>Link to work:</strong></h2>
<p>https://www.freecodecamp.org/ananfito</p>
<p><em>You can read my full #100DaysOfCode journal on <a target="_blank" href="https://github.com/ananfito/100-days-of-code">GitHub</a></em></p>
]]></content:encoded></item></channel></rss>