<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alexander Samaniego</title>
    <description>The latest articles on DEV Community by Alexander Samaniego (@alexsam29).</description>
    <link>https://dev.to/alexsam29</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F922717%2F15981d35-1117-41b6-8686-2534009c8cab.jpeg</url>
      <title>DEV Community: Alexander Samaniego</title>
      <link>https://dev.to/alexsam29</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexsam29"/>
    <language>en</language>
    <item>
      <title>DPS909 Blog: Final Pull Requests</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Sun, 11 Dec 2022 03:29:24 +0000</pubDate>
      <link>https://dev.to/alexsam29/dps909-blog-final-pull-requests-3c9e</link>
      <guid>https://dev.to/alexsam29/dps909-blog-final-pull-requests-3c9e</guid>
      <description>&lt;p&gt;This post is an update on my progress on the issues I selected to work on in my &lt;a href="https://dev.to/alexsam29/dps909-blog-issue-progression-1ee5"&gt;previous post&lt;/a&gt; for Release 0.4.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pull Requests
&lt;/h2&gt;

&lt;p&gt;I completed my work on &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/201" rel="noopener noreferrer"&gt;issue #201&lt;/a&gt; and &lt;a href="https://github.com/ayoayco/astro-reactive-library/pull/224" rel="noopener noreferrer"&gt;PR #224&lt;/a&gt; for that issue. The PR was eventually merged into the main branch after a couple of necessary adjustments. I ended up having to adjust the &lt;code&gt;querySelector&lt;/code&gt; in order to remove a condition. The &lt;code&gt;querySelector&lt;/code&gt; now only selects elements with the attribute &lt;code&gt;data-validation-on&lt;/code&gt;. This allowed me to simplify the code while only selecting elements from the page that were created by the library.  Furthermore, I had to add a &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing" rel="noopener noreferrer"&gt;nullish operator&lt;/a&gt; to set the default event listener if there is no attribute specifying one. I also added &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining" rel="noopener noreferrer"&gt;optional chaining&lt;/a&gt; to check whether the attribute actually exists, to avoid any errors.&lt;/p&gt;

&lt;p&gt;As for the other issue I wanted to work on, &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/211" rel="noopener noreferrer"&gt;#211&lt;/a&gt;. It was slightly more difficult than I had thought. I spent a couple of days experimenting on how to enable validation on forms when the user optionally uses &lt;code&gt;&amp;lt;validation&amp;gt;&lt;/code&gt;with a form passed in as a prop, as explained by the second point in this &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/211#issuecomment-1331809726" rel="noopener noreferrer"&gt;comment&lt;/a&gt;. I could not find a solution for this because I realized in Astro, you can't use prop component variables within the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; element in a component. Outside a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; element, it is possible to use component variables as described in the &lt;a href="https://docs.astro.build/en/core-concepts/astro-components/#variables" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;. So, this is where I had trouble trying to apply event listeners to forms specified by the user after form creation. I didn't get a solid enough solution to create a PR for this issue. I asked the project maintainer a couple of questions for clarification, but they ended up closing the issue due to a &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/211#issuecomment-1344788178" rel="noopener noreferrer"&gt;change of approach&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So with things not going as planned, I quickly had to find another issue related to the form component. Luckily there was an issue directly related to the first PR I made. &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/230" rel="noopener noreferrer"&gt;Issue #230&lt;/a&gt; relates to the form validator again. All components except the Radio buttons were compatible with form validation. To fix this issue, I spent time experimenting with various ways to make the Radio buttons compatible. At first, I was looking at the validator file, &lt;a href="https://github.com/ayoayco/astro-reactive-library/blob/main/packages/validator/Validator.astro" rel="noopener noreferrer"&gt;Validator.astro&lt;/a&gt;, for any line of code that may have caused the error. When nothing came of it, I went through the process of form creation multiple times to see exactly why other components were being validated and not the Radio buttons. I realized the this library treats radio buttons as one form component when in reality it is actually multiple. So, I decided to look at the other components to see what is different about the Radio buttons. As I described in my comment &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/230#issuecomment-1345078470" rel="noopener noreferrer"&gt;here&lt;/a&gt;, I noticed that other components only contain &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; elements, whereas the Radio button element contained another &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; element that covers the other elements. I experimented with removing that element and found that validation works. I suspect that the additional element was interfering with validation of that component and created &lt;a href="https://github.com/ayoayco/astro-reactive-library/pull/234" rel="noopener noreferrer"&gt;PR #234&lt;/a&gt; describing my solution. It still needs to be reviewed and merged but I think that part will go smoothly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I think this entire process was a good experience. I got to work on a project that I was already familiar with and further enhance my knowledge of it. I also got to work with the project owner and maintainers while working on my issues. Without their help the process would've taken much longer and it gave me more experience working with "strangers" on a public repository. I felt like I gained their trust with every successful PR. So while things may not have gone as planned, I still felt good about closing several issues while making 2 PRs. Things not going as planned also showed me that not everything goes smoothly so you have to think quickly to get things done. My goal was to complete at least 2 PRs and I got it done, even though it wasn't one of the issues I originally wanted to do.&lt;/p&gt;

&lt;p&gt;This should be my last blog post for DPS909. This has been one of the most useful courses I've taken to date and I've come out a better developer than I was at the beginning. 10/10, would recommend.&lt;/p&gt;

</description>
      <category>deepseek</category>
    </item>
    <item>
      <title>DPS909 Blog: Issue Progression</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Sun, 04 Dec 2022 00:57:16 +0000</pubDate>
      <link>https://dev.to/alexsam29/dps909-blog-issue-progression-1ee5</link>
      <guid>https://dev.to/alexsam29/dps909-blog-issue-progression-1ee5</guid>
      <description>&lt;p&gt;This post is an update on my progress on the issues I selected to work on in &lt;a href="https://dev.to/alexsam29/dps909-blog-planning-issues-to-fix-446n"&gt;my previous post&lt;/a&gt; for Release 0.4.&lt;/p&gt;

&lt;h2&gt;
  
  
  Progress
&lt;/h2&gt;

&lt;p&gt;I began my work on &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/201" rel="noopener noreferrer"&gt;issue #201&lt;/a&gt;. I was initially confused by the the description of the feature to be implemented, so I asked the project maintainer to explain it further. Another project contributor also further explained what was needed and this really helped me out. I also read up further on the Astro framework to understand how the project is put together. I started with the documentation explaining how &lt;a href="https://docs.astro.build/en/core-concepts/astro-components/" rel="noopener noreferrer"&gt;Astro components&lt;/a&gt; work and read on from there.&lt;/p&gt;

&lt;p&gt;After reading through the Astro documentation and going through the project documentation again, I experimented with the source code for a while just to see how I would implement the requested feature. The most difficult part about this was just trying to figure out how all the files work together. There are a lot of files in this project and it's easy to get lost. By the end, I felt like I knew the ins and outs of the entire project, so I began to code the feature into my forked version of the project.&lt;/p&gt;

&lt;p&gt;By the end of the week, I opened a &lt;a href="https://github.com/ayoayco/astro-reactive-library/pull/224" rel="noopener noreferrer"&gt;pull request (PR)&lt;/a&gt; with my feature implementation. I described what changes/additions I made and noted areas that require focus after the PR is merged.&lt;/p&gt;

&lt;p&gt;The project maintainer and one other reviewer made comments on my PR which I ended up addressing and making the requested changes. Now I am just waiting for any further comments and for the PR to be merged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Remaining Issues
&lt;/h2&gt;

&lt;p&gt;Now that I've nearly solved one issue, &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/211" rel="noopener noreferrer"&gt;issue #211&lt;/a&gt; seems like it'll be a smoother process since it is relates to the same area of the project and I've already went through most of the documentation. So my plan for the coming week is to hopefully open a PR quicker than I did for the first issue. If no problems occur and I still have time before the deadline, I will attempt to solve another issue in the project.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>DPS909 Blog: Planning Issues to Fix</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Sun, 27 Nov 2022 23:53:31 +0000</pubDate>
      <link>https://dev.to/alexsam29/dps909-blog-planning-issues-to-fix-446n</link>
      <guid>https://dev.to/alexsam29/dps909-blog-planning-issues-to-fix-446n</guid>
      <description>&lt;p&gt;As part of the final Release 0.4 project for our open-source course, we were asked to work on something larger and more impactful than anything we've done in the previous three releases. This can either be implementing features, fix a difficult bug, work on 2 or more smaller but related issues, or work on a bug in a large open-source community.&lt;/p&gt;

&lt;p&gt;I chose to work on 2 or more smaller but related issues. The issues I chose were from a project that I've previously worked on called &lt;a href="https://github.com/ayoayco/astro-reactive-library"&gt;Astro Reactive Library&lt;/a&gt;. This project builds components and architecture for other projects that use the &lt;a href="https://astro.build/"&gt;Astro&lt;/a&gt; framework for their reactive user interfaces.&lt;/p&gt;

&lt;p&gt;The issues I chose to work on both relate to the form and validator components.&lt;/p&gt;

&lt;p&gt;Issues: &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/201"&gt;#201&lt;/a&gt;, &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/211"&gt;#211&lt;/a&gt;,...TBD&lt;/p&gt;

&lt;h2&gt;
  
  
  Issue #201
&lt;/h2&gt;

&lt;p&gt;The feature request here is related to the form component. In this issue is to implement new event listeners for other types of events. Currently, the validator will only attach an event listener for &lt;code&gt;onBlur&lt;/code&gt;. There needs to be more event listeners and a way to determine when the event for validation on the client will occur.&lt;/p&gt;

&lt;h2&gt;
  
  
  Issue #211
&lt;/h2&gt;

&lt;p&gt;The feature request is related to the validator and the form. In this issue, the way the validator attaches to components must be changed. Currently, the element selector uses the component &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; as a selector. The job here is to change it to use the unique ID attached to components as the selector.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Goals
&lt;/h2&gt;

&lt;p&gt;My goals for this Release is to take my basic understanding of the Astro framework and hopefully turn it into an advanced understanding by solving these issues and implementing the features correctly.&lt;/p&gt;

&lt;p&gt;As of right now, these issues seem a bit confusing to me so there will be a lot of learning involved which will take a bit of time. Release 0.3 introduced me to the Astro framework and so my understanding of Astro is still pretty basic. This will be the challenge I will have to overcome. &lt;/p&gt;

&lt;p&gt;If by the end I find that these issues were quick to solve, there are more issues in the project repo that relates to the same area of the project. I will tackle some more just to give me more of a challenge. &lt;/p&gt;

&lt;p&gt;I will post an update on my progress and mention if I encounter any difficulties or if the issues are easier than I thought it would be.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Lab 10: NPM Package Release</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Fri, 25 Nov 2022 04:38:37 +0000</pubDate>
      <link>https://dev.to/alexsam29/lab-10-npm-package-release-3m8l</link>
      <guid>https://dev.to/alexsam29/lab-10-npm-package-release-3m8l</guid>
      <description>&lt;p&gt;This week in my open-source course (DPS909), for our last lab, we were asked to publicly release our &lt;a href="https://github.com/alexsam29/ssg-cli-tool"&gt;static site generator (SSG)&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Release Process
&lt;/h2&gt;

&lt;p&gt;The package registry I choose to release my project on was &lt;a href="https://www.npmjs.com/"&gt;npm&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To add my package to the registry I essentially just followed this &lt;a href="https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages"&gt;guide&lt;/a&gt;. I had already done most of the steps, all I needed to do was create a npm account on the website then use &lt;code&gt;npm publish&lt;/code&gt; to add the package to the registry. However, I still needed to create a release for my project before using &lt;code&gt;npm publish&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To create the release I used the command &lt;code&gt;npm version &amp;lt;version number&amp;gt;&lt;/code&gt;. This updates the version number in &lt;code&gt;package.json&lt;/code&gt; and tags the release. I then used the command &lt;code&gt;git push --follow-tags&lt;/code&gt; to push the tags to the GitHub repo. Once the release is tagged and pushed to GitHub, then the command &lt;code&gt;npm publish&lt;/code&gt; can be used to publish the package to the registry&lt;/p&gt;

&lt;p&gt;These steps are repeated for every update to the package.&lt;/p&gt;

&lt;p&gt;This process was rather simple as I had already completed most steps while creating the project. The tricky part was not realizing the command &lt;code&gt;npm version &amp;lt;version number&amp;gt;&lt;/code&gt; also tags the release. So I was manually attempting to tag the release and getting errors telling me that the tag already exists. This had me stumped for bit until I realized it was because the command also adds the tags.&lt;/p&gt;

&lt;h3&gt;
  
  
  User Testing
&lt;/h3&gt;

&lt;p&gt;I had another student in the course test my npm package on their local machine. The only issue encountered was during the setup process. Their machine didn't recognize the &lt;code&gt;ssg&lt;/code&gt; command that I used for the package. So I had to adjust the instructions to have the package be installed globally. I changed &lt;code&gt;npm install ssg-cli-tool&lt;/code&gt; to &lt;code&gt;npm install -g ssg-cli-tool&lt;/code&gt;. Once that change was implmented and the user installed the package globally, it worked as intended.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Final Release
&lt;/h2&gt;

&lt;p&gt;Here is the final package release: &lt;a href="https://www.npmjs.com/package/ssg-cli-tool"&gt;https://www.npmjs.com/package/ssg-cli-tool&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To install this package, in the terminal input the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i -g ssg-cli-tool
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run it using on a text or Markdown file by using this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssg -i &amp;lt;filepath of txt/MD file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow the instructions in the README.md file for more options.&lt;/p&gt;

&lt;p&gt;GitHub Repo: &lt;a href="https://github.com/alexsam29/ssg-cli-tool"&gt;https://github.com/alexsam29/ssg-cli-tool&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DPS909 Blog: Internal Code Reviews</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Sat, 19 Nov 2022 21:14:25 +0000</pubDate>
      <link>https://dev.to/alexsam29/dps909-blog-internal-code-reviews-4h1</link>
      <guid>https://dev.to/alexsam29/dps909-blog-internal-code-reviews-4h1</guid>
      <description>&lt;p&gt;As part of the Release 0.3 project in my open source course (DPS909), I was asked to continue my learning progression from Hacktoberfest by performing internal code reviews on pull requests (PR). "Internal" in this case means a PR in a project repository that is maintained by the class.&lt;/p&gt;

&lt;p&gt;The project I chose was &lt;a href="https://github.com/Seneca-CDOT/telescope"&gt;Telescope&lt;/a&gt;, which is an open source web server and client application for aggregating and presenting a timeline of Seneca's open source blogs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Review 1
&lt;/h2&gt;

&lt;p&gt;I decided to review &lt;a href="https://github.com/Seneca-CDOT/telescope/pull/3768"&gt;PR #3768&lt;/a&gt;. This PR addresses an issue in the sign up process where the Blog/RSS URL form cannot differentiate between a blog URL and a feed URL, as described &lt;a href="https://github.com/Seneca-CDOT/telescope/issues/3689#issue-1399594235"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To review the code, I checked out the PR on my editor and ran the app on my machine.  I followed the testing steps specified in the PR. I also purposely messed up some steps to see how the program would react with the changes. The changes appeared to work as I could input a Blog URL and a feed URL when signing up; I could complete the sign up with the form able to recognize a Blog URL and a Feed URL.&lt;/p&gt;

&lt;p&gt;One of the previous reviews of the PR &lt;a href="https://github.com/Seneca-CDOT/telescope/pull/3768#pullrequestreview-1185243877"&gt;commented&lt;/a&gt; with a concern with the backend breaking if a user enters a Feed URL instead of a Blog URL. So I tried to investigate this myself. As I explained in this &lt;a href="https://github.com/Seneca-CDOT/telescope/pull/3768#issuecomment-1320748083"&gt;comment&lt;/a&gt;, the current PR changes prevent a function that specifically uses a Blog URL from being called. I also noticed the Blog URL being used when making a call to the database. However, this should also not break the backend because the call is just made to store information in the database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Review 2
&lt;/h2&gt;

&lt;p&gt;For the second code review, I reviewed &lt;a href="https://github.com/Seneca-CDOT/telescope/pull/3769"&gt;PR #3769&lt;/a&gt;. This review was a little simpler, as it was a a UI change to the top navigation bar of the web page. The changes to the files included CSS adjustments and a new button at the top right of the page. The only feed back I could give was in this &lt;a href="https://github.com/Seneca-CDOT/telescope/pull/3769#pullrequestreview-1187015338"&gt;comment&lt;/a&gt; I left. I suggested to match the top nav bar with the side nav bar that appears when a user scrolls down; mostly for UI consistency.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Doing these code reviews, I realized that it was good to review all types of PRs no matter the complexity. I spent a lot of time trying find complex ones but even the most miniscule, like a UI change/addition, needs input from multiple people before being approved.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DPS909 Blog: Internal Pull Request</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Sat, 19 Nov 2022 09:50:46 +0000</pubDate>
      <link>https://dev.to/alexsam29/dps909-blog-internal-pull-request-oj5</link>
      <guid>https://dev.to/alexsam29/dps909-blog-internal-pull-request-oj5</guid>
      <description>&lt;p&gt;As part of the Release 0.3 project in my open source course (DPS909), I was asked to continue my learning progression from &lt;a href="https://dev.to/alexsam29/hacktoberfest-recap-bj6"&gt;Hacktoberfest&lt;/a&gt; by making another pull request (PR) to an internal project. Internal in this case means a project repository that is maintained by the class.&lt;/p&gt;

&lt;p&gt;The project I chose was &lt;a href="https://github.com/Seneca-CDOT/telescope" rel="noopener noreferrer"&gt;Telescope&lt;/a&gt;, which is an open source web server and client application for aggregating and presenting a timeline of Seneca's open source blogs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Issue
&lt;/h2&gt;

&lt;p&gt;The issue I chose to work on was &lt;a href="https://github.com/Seneca-CDOT/telescope/issues/3607" rel="noopener noreferrer"&gt;issue #3607&lt;/a&gt;. This issue described a bug that was occurring during the sign up process when the user would input their Blog/RSS URLs to link to their account. The issue here is that the instructions state that the user can enter multiple URLs separated by spaces. But when multiple URLs are entered, the form throws an error and says it's an invalid URL. The user must get rid of the additional URLs and leave just the one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The PR
&lt;/h2&gt;

&lt;p&gt;PR: &lt;a href="https://github.com/Seneca-CDOT/telescope/pull/3766" rel="noopener noreferrer"&gt;https://github.com/Seneca-CDOT/telescope/pull/3766&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me just get one thing clear about this PR. It may only say that 1 change and 1 deletion occurred, but it was not as simple as the number of code changes make it seem. This was probably the most frustrating issue I've worked on so far in this course.&lt;/p&gt;

&lt;h3&gt;
  
  
  Problem 1
&lt;/h3&gt;

&lt;p&gt;The frustration began even before working on the issue. I had trouble setting up the development environment. I followed the &lt;a href="https://telescope.cdot.systems/docs/getting-started/environment-setup" rel="noopener noreferrer"&gt;environment setup documentation&lt;/a&gt; exactly as described and I still could not run the backend or frontend of the application locally on my machine. A day was wasted going through the steps over and over again hoping it would work. &lt;/p&gt;

&lt;p&gt;I then turned to the Telescope Slack channel hoping someone could help diagnose my problem. My course Professor noticed that it looked like Docker was running out of resources when trying to run the app. Telescope uses Docker to deploy all the different parts of the app. Based on that advice, I looked at every obvious resource like CPU, RAM and disk. I had over 10 GB of free space before attempting to run the app, but I noticed that Docker took up all that space and that's when the app build broke.&lt;/p&gt;

&lt;p&gt;So obviously the problem was low disk space, much to my annoyance. I was told that Docker takes up a ton of disk space. I moved the Docker image file to another disk on my machine and that's when I was able to build and run the app... only took a couple of days.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2
&lt;/h2&gt;

&lt;p&gt;The second problem I encountered was just learning how the entire application worked. I've never worked with Telescope before so everything was new. &lt;br&gt;
I was already familiar with part of the tech stack used, but just the sheer size of the application was intimating. Trying to follow how the code was executed was also frustrating as I would often lose myself within all the files. &lt;/p&gt;

&lt;p&gt;Eventually, I was able to somewhat grasp how the sign up process worked. So I decided to start working on the issue at hand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 3
&lt;/h2&gt;

&lt;p&gt;The third problem I had was figuring out where the bug was originating from. I found the component used for the validating the Blog URL in the sign up form (&lt;a href="https://github.com/alexsam29/telescope/blob/109d1a7638b15348ca2fb4dd5fbc544396b0108b/src/web/app/src/components/SignUp/Forms/RSSFeeds.tsx#L181" rel="noopener noreferrer"&gt;RSSFeeds&lt;/a&gt;), so I started debugging there.&lt;/p&gt;

&lt;p&gt;I had no idea why the error kept appearing after inputting more than one URL. I experimented with every 'validating' and 'error' variable in the component to see if something changed. The file was covered in &lt;code&gt;console.log&lt;/code&gt; in my attempt to find the source of the bug.&lt;/p&gt;

&lt;p&gt;I then noticed that if I commented out an error check there would be no error with multiple URLs and they would be parsed correctly; as I described in this &lt;a href="https://github.com/Seneca-CDOT/telescope/issues/3607#issuecomment-1314629596" rel="noopener noreferrer"&gt;comment&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, one of the Telescope admins &lt;a href="https://github.com/Seneca-CDOT/telescope/issues/3607#issuecomment-1314715015" rel="noopener noreferrer"&gt;suggested&lt;/a&gt; I keep the error check and guided me to look elsewhere in the project. So I still didn't find the origin of the bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 4
&lt;/h2&gt;

&lt;p&gt;This problem was due to the fact that I did find the origin of the bug as I described in this &lt;a href="https://github.com/Seneca-CDOT/telescope/issues/3607#issuecomment-1314844922" rel="noopener noreferrer"&gt;comment&lt;/a&gt;. However, I could not implement the solution I had come up with because I could not find a way to convert input text to an array while still being validated by the form validation schema. I had experiment with what seems like every possible solution, but could not get past the error that the validation schema would throw. I even tried adjusting the validation schema to accommodate the array, but nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;After many hours of frustration with not being able to implement the original solution that I thought of, I noticed that the Channel URL section of the sign up form uses the same &lt;code&gt;RSSFeeds.tsx&lt;/code&gt; component and a similar validation schema. Oddly, the Channel URL input does not have the same bug when inputting multiple URLs.&lt;/p&gt;

&lt;p&gt;As I described in more detail in my &lt;a href="https://github.com/Seneca-CDOT/telescope/pull/3766#issue-1452859354" rel="noopener noreferrer"&gt;PR&lt;/a&gt;, this was because the Channel URL is not validated as a URL. It was only validated as a string so it could accept multiple URLs. When it's validated as a URL any space in the string automatically flags it as an error, which is why the bug existed.&lt;/p&gt;

&lt;p&gt;So I made sure to match the Channel and Blog URL validation schema. Just doing this one simple change completely fixed the bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I feel this PR taught me how to deal with frustration and taught me the importance of working with others on GitHub and Slack. Without guidance from other people I probably would have given up because I would have thought this was out of my skill level.  The solution may have been simple, but the process to get there certainly was not.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>cpp</category>
      <category>oop</category>
    </item>
    <item>
      <title>DPS909 Blog: External Pull Request</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Sat, 19 Nov 2022 06:18:58 +0000</pubDate>
      <link>https://dev.to/alexsam29/dps909-blog-external-pull-request-4hah</link>
      <guid>https://dev.to/alexsam29/dps909-blog-external-pull-request-4hah</guid>
      <description>&lt;p&gt;As part of the Release 0.3 project for my open-source course (DPS909), I was asked to continue my learning progression from &lt;a href="https://dev.to/alexsam29/hacktoberfest-recap-bj6"&gt;Hacktoberfest&lt;/a&gt; by making another pull request (PR) to an external project.&lt;/p&gt;

&lt;p&gt;Ideally, I would have continued working on the project I had already contributed to during Hacktoberfest because I would already be familiar with. But these projects currently didn't have many open issues so it was difficult to find one that wasn't assigned already.&lt;/p&gt;

&lt;p&gt;I was recommended to take a look at this project called the &lt;a href="https://github.com/alexsam29/astro-reactive-library"&gt;Astro Reactive Library&lt;/a&gt;. This repository builds components and architecture for projects that use the &lt;a href="https://astro.build/"&gt;Astro&lt;/a&gt; framework for their reactive user interfaces.&lt;/p&gt;

&lt;p&gt;The challenge with this project was that I never even heard of the Astro framework before this. I had no idea what it was and I would have to learn the very basics of the project before even thinking about solving an issue. Luckily, the learning process went smoothly and I was able to get a quick grasp of how the Astro framework works and how the components in the project build UI components.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Issue
&lt;/h2&gt;

&lt;p&gt;So after this learning process I felt comfortable looking at issues and determining which one I could tackle. I took a look at &lt;a href="https://github.com/ayoayco/astro-reactive-library/issues/140"&gt;issue #140&lt;/a&gt; which was related to the components used to create forms. To summarize, the way they assigned the &lt;code&gt;id&lt;/code&gt; attribute of the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; tag the same value as the &lt;code&gt;name&lt;/code&gt;. However, the project owner believed that this would cause issues since they use IDs as selectors, so the &lt;code&gt;id&lt;/code&gt; attribute needs to be unique. The ideal solution was to create an &lt;code&gt;id&lt;/code&gt; attribute that is not the same as the &lt;code&gt;name&lt;/code&gt; attribute by making a function that creates a Short Unique ID (UUID). The UUID should be prefixed with &lt;code&gt;arl&lt;/code&gt; and assigned that as the &lt;code&gt;id&lt;/code&gt; value for every &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  The PR
&lt;/h2&gt;

&lt;p&gt;PR: &lt;a href="https://github.com/ayoayco/astro-reactive-library/pull/182"&gt;https://github.com/ayoayco/astro-reactive-library/pull/182&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My idea to fix this issue was slightly different than the suggested solution. Instead of creating a new function to generate the UUIDs, I found an existing NPM library that does exactly what is needed for this issue. It's called the &lt;a href="https://github.com/simplyhexagonal/short-unique-id"&gt;Short Unique ID Generating Library&lt;/a&gt;. I added the library to the project. Now any time I need to generate a UUID, I just import the library to the file and assign a UUID like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;uid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;ShortUniqueId&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next step was to add &lt;code&gt;id&lt;/code&gt; properties to &lt;code&gt;form-control&lt;/code&gt; and &lt;code&gt;form-group&lt;/code&gt; and assign them with UUIDs so every time the component is created, it will have a unique ID. I added the property, assigned it a UUID in the constructor, and made a &lt;code&gt;get&lt;/code&gt; function for the property.&lt;/p&gt;

&lt;p&gt;I then found every instance where the &lt;code&gt;id&lt;/code&gt; attribute in an HTML tag is assigned the same value as the &lt;code&gt;name&lt;/code&gt; attribute. I also changed all &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; tags to use the associated &lt;code&gt;id&lt;/code&gt; value for their &lt;code&gt;for&lt;/code&gt; attribute.&lt;/p&gt;

&lt;p&gt;The PR went well, the project owner only asked me to assign the &lt;code&gt;&amp;lt;FormGroups&amp;gt;&lt;/code&gt; component a UUID since I had missed that originally.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This was step above the PR requests I made during Hacktoberfest as I mainly stayed working with web frameworks I was already familiar with. With this PR, I had to teach myself the basics of Astro and figure out how individual components are made using this framework.&lt;/p&gt;

</description>
      <category>opensource</category>
    </item>
    <item>
      <title>DPS909 Blog - Lab 9: Continuous Integration</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Fri, 18 Nov 2022 16:53:16 +0000</pubDate>
      <link>https://dev.to/alexsam29/dps909-blog-lab-9-continuous-integration-2hk5</link>
      <guid>https://dev.to/alexsam29/dps909-blog-lab-9-continuous-integration-2hk5</guid>
      <description>&lt;p&gt;This week in my open-source course (DPS909), we were asked to add Continuous Integration (CI) to our &lt;a href="https://github.com/alexsam29/ssg-cli-tool"&gt;static site generator (SSG)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This continues the work we did in &lt;a href="https://dev.to/alexsam29/dps909-blog-lab-8-testing-j2a"&gt;lab 8&lt;/a&gt; when we added testing. CI is a method where you can build and run tests automatically whenever anything is pushed to the repo, or a new pull request is made.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub Actions CI Workflow
&lt;/h2&gt;

&lt;p&gt;To setup CI in my project, I created a GitHub actions workflow. I followed this &lt;a href="https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs"&gt;guide&lt;/a&gt; which shows how to build and test a Node.js project using GitHub actions workflows. &lt;/p&gt;

&lt;p&gt;The YAML file I created for testing looked very similar to the example template given in the guide. The only thing I had to change was the operating system the workflow jobs run on. I changed it to run on Windows instead of the default Linux/Ubuntu environment. This was because I originally did my tests on my local Windows machine, so the snapshots taken by my tests use CRLF instead of LF for line endings. So just to avoid any testing errors coming from a windows environment, I changed the workflow job environment to match.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding Tests to Another Repo
&lt;/h2&gt;

&lt;p&gt;PR to another repo: &lt;a href="https://github.com/cychu42/staticSiteCon/pull/21"&gt;https://github.com/cychu42/staticSiteCon/pull/21&lt;/a&gt;&lt;br&gt;
My partner's repo and testing setup was very similar to my own. The main difference was that they used multiple testing files which kept things more organized. In hindsight, I probably should've done the same thing to keep things cleaner.&lt;/p&gt;

&lt;p&gt;They pretty much covered all areas of their program with their existing tests. I just added tests to their MD parser that was similar to tests they added for their text parser. I did this just to make sure testing for both parsers are consistent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now that I know how to add CI to my project, I feel like it's a must to add it to any new project I create since it makes testing easier.  You don't have to worry about accidently merging anything that will break the code in &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
    </item>
    <item>
      <title>DPS909 Blog - Lab 8: Testing</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Fri, 11 Nov 2022 22:17:53 +0000</pubDate>
      <link>https://dev.to/alexsam29/dps909-blog-lab-8-testing-j2a</link>
      <guid>https://dev.to/alexsam29/dps909-blog-lab-8-testing-j2a</guid>
      <description>&lt;p&gt;For this week in my open-source course (DPS909), we were asked to continue working on our &lt;a href="https://github.com/alexsam29/ssg-cli-tool"&gt;static site generator (SSG)&lt;/a&gt; and add automated testing to the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Testing Framework
&lt;/h2&gt;

&lt;p&gt;The testing framework that I chose for the project is &lt;a href="https://jestjs.io/"&gt;Jest&lt;/a&gt;. Jest is a testing framework originally developed by Facebook for React UI testing.  However, now it's its own tool that is used for any type of JavaScript project, including Node.js. I mostly chose it because of it's snapshot capabilities that allow you test whether UI elements on a page change unexpectedly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;In order to setup the framework in my project, I followed the &lt;a href="https://jestjs.io/docs/getting-started"&gt;documentation&lt;/a&gt; on the Jest website.&lt;/p&gt;

&lt;p&gt;First, I installed Jest in my project by using the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--save-dev&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I created a &lt;code&gt;test&lt;/code&gt; folder with a file called &lt;code&gt;test.js&lt;/code&gt; that will contain all the testing code. For the initial setup, I used a basic test that had nothing to do with the source code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;adds 1 + 2 to equal 3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, I added the following bit to &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"jest"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I then used this command to start the testing process:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;npm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Should everything be installed correctly, this will be the output in the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PASS  ./test.js
✓ adds 1 + 2 to equal 3 (5ms)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Writing Test Cases
&lt;/h2&gt;

&lt;p&gt;I initially had trouble coming up with test cases because I've been so accustomed to just running the code manually and testing it myself. I don't have much experience with automated testing so this was a new experience. I also wrote the source code to show error messages should something go wrong when manually testing. Coming up with ways to automate testing was the tricky part.&lt;/p&gt;

&lt;p&gt;I thought I should test something simple. So I made test cases all the functions in &lt;code&gt;Utils.js&lt;/code&gt;. These functions are small but crucial functions that verify things like file and directory existence.&lt;/p&gt;

&lt;p&gt;In order to test the main functionalities of the project, I decided to create tests for HTML file generation and Index page creation. I tested the functions &lt;code&gt;HTMLfile()&lt;/code&gt; and &lt;code&gt;indexPage()&lt;/code&gt; that I had made for this purpose in &lt;code&gt;create.js&lt;/code&gt;. I used Jest snapshots to take initial snapshots of the UI elements in the HTML pages created. Future tests will compare the UI elements against the snapshots to make sure nothing has changed. I tested Markdown to HTML file creation, &lt;code&gt;txt&lt;/code&gt; to HTML file creation, and index page creation. To make these tests work with snapshots, I had to adjust the function to return a value. Originally, these functions returned nothing. So I added a &lt;code&gt;return&lt;/code&gt; statement that returned the generated HTML body.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;p&gt;While writing and coming up with tests cases, it became increasingly clear that my source code was not written with testing in mind. I had to make some adjustments to make some tests work, but I feel like I should have even more test cases had my code been initially written with testing in mind.&lt;/p&gt;

&lt;p&gt;So from now on, I will always include automated testing in my code and make sure that I write my code with testing in mind.&lt;/p&gt;

&lt;p&gt;Automated testing commit: &lt;a href="https://github.com/alexsam29/ssg-cli-tool/commit/dff551f7690bf7caaa3db6902b934145df401853"&gt;https://github.com/alexsam29/ssg-cli-tool/commit/dff551f7690bf7caaa3db6902b934145df401853&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
    </item>
    <item>
      <title>DPS909 Blog - Lab 7: Static Analysis Tools</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Fri, 04 Nov 2022 00:28:38 +0000</pubDate>
      <link>https://dev.to/alexsam29/dps909-blog-lab-7-static-analysis-tools-5402</link>
      <guid>https://dev.to/alexsam29/dps909-blog-lab-7-static-analysis-tools-5402</guid>
      <description>&lt;p&gt;For lab 7 in my open-source course (DPS909), we were asked to implement static analysis tools into our &lt;a href="https://github.com/alexsam29/ssg-cli-tool"&gt;static site generator (SSG)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Static analysis tools help us to maintain quality in the source code by fixing common coding errors and formatting the code to make it much more readable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source Code Formatter
&lt;/h2&gt;

&lt;p&gt;For the source code formatter, I chose to use &lt;a href="https://prettier.io/"&gt;Prettier&lt;/a&gt;. Prettier is an opinionated code formatter that can be integrated into most of the popular editors/IDEs. I chose this because Prettier works well with JavaScript, which is the language I use for my SSG. I am also familiar with Prettier as I have used the Visual Studio Code extension before.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Setup
&lt;/h3&gt;

&lt;p&gt;To setup Prettier in my project, I followed the &lt;a href="https://prettier.io/docs/en/install.html"&gt;npm installation guide&lt;/a&gt; on the website. To summarize, I ran a npm command (&lt;code&gt;npm install --save-dev --save-exact prettier&lt;/code&gt;) in the terminal to install Prettier packages in the project. Then I created config(&lt;code&gt;.prettierrc.json&lt;/code&gt;) and ignore(&lt;code&gt;.prettierignore&lt;/code&gt;) files to let the editor know the project uses Prettier and to let it know what files to ignore. Once the packages are installed and the config and ignore files created, you can run &lt;code&gt;npx prettier --write .&lt;/code&gt; on the command line to format all files in the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Editor Setup
&lt;/h3&gt;

&lt;p&gt;I use Visual Studio code as my editor of choice.  Prettier offers a VS Code extension that you can download to make using Prettier easier. I downloaded the extension from the extensions sidebar. Prettier docs also has a &lt;a href="https://prettier.io/docs/en/editors.html"&gt;editor integration guide&lt;/a&gt; showing how to integrate Prettier into other editors/IDEs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Git Hooks
&lt;/h3&gt;

&lt;p&gt;I also installed Git Hooks to make sure that all commits are formatted properly. Again, I followed the same installation guide and ran the following commands to install packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save-dev husky lint-staged
npx husky install
npm set-script prepare "husky install"
npx husky add .husky/pre-commit "npx lint-staged"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I added this to my &lt;code&gt;package.json&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "lint-staged": {
    "**/*": "prettier --write --ignore-unknown"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, all commits will be formatted properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Linter
&lt;/h2&gt;

&lt;p&gt;For the linter of choice, I decided to use &lt;a href="https://eslint.org/"&gt;ESLint&lt;/a&gt;. I chose ESLint for the same reason as Prettier, I already had experience using the VS Code extension and it works for JavaScript.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Setup
&lt;/h3&gt;

&lt;p&gt;To setup ESLint in my project, the process was very similar to installing Prettier. I followed the &lt;a href="https://eslint.org/docs/latest/user-guide/getting-started"&gt;installation guide&lt;/a&gt; on the website. I first used this command, &lt;code&gt;npm init @eslint/config&lt;/code&gt; to install packages and create a config file (&lt;code&gt;.eslintrc.js&lt;/code&gt;) that will contain rules used to check the code. Once this is done, you can then run &lt;code&gt;npx eslint yourfile.js&lt;/code&gt; to check and fix errors on that specific file.&lt;/p&gt;

&lt;p&gt;After installing ESLint, I also had to install &lt;code&gt;eslint-config-prettier&lt;/code&gt; to make sure ESLint and Prettier work well together. This turns off all ESLint rules that are unnecessary or might conflict with Prettier. I followed this &lt;a href="https://github.com/prettier/eslint-config-prettier#installation"&gt;installation guide&lt;/a&gt; to install it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Editor Setup
&lt;/h3&gt;

&lt;p&gt;Much like Prettier, ESLint can also be integrated into the editor. Since I use Visual Studio Code there is an extension that is available for download which will make running ESLint easier. For other editors, this &lt;a href="https://eslint.org/docs/latest/user-guide/integrations"&gt;editor integration guide&lt;/a&gt; on the website will show you how to integrate ESLint with most of the popular editors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source Code Changes
&lt;/h2&gt;

&lt;p&gt;Running Prettier on my source code didn't change a whole a lot. The main thing that changed was a lot of spacing issues. Indenting was reduced to make more code visible at once without having to scroll horizontally.&lt;/p&gt;

&lt;p&gt;ESLint made a lot of changes, mainly to variable declarations. I defaulted to using &lt;code&gt;var&lt;/code&gt; to declare variables, however, ESLint changed my declarations to use &lt;code&gt;let&lt;/code&gt; instead to help reduce the chance of errors as described &lt;a href="https://eslint.org/docs/latest/rules/no-var"&gt;here&lt;/a&gt;. It also changed variables that were not reassigned to use &lt;code&gt;const&lt;/code&gt; instead of &lt;code&gt;var&lt;/code&gt;. This is because it helps the reader to understand that the variable is never reassigned and improves maintainability as described &lt;a href="https://eslint.org/docs/latest/rules/prefer-const"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This lab showed me that you can add source code formatting and error checking directly to projects.  Before I had used extensions for this purpose and never directly implemented it by installing it into the project. Now because of this lab, I know how to directly implement static analysis tools into future projects to make sure my code is readable and follows good coding practices.&lt;/p&gt;

&lt;p&gt;Here are all the changes made to my project: &lt;a href="https://github.com/alexsam29/ssg-cli-tool/commit/bcde670fb80c102fcdd37d4febdd39b99b4b7ca1"&gt;https://github.com/alexsam29/ssg-cli-tool/commit/bcde670fb80c102fcdd37d4febdd39b99b4b7ca1&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Hacktoberfest Recap</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Sun, 30 Oct 2022 22:28:23 +0000</pubDate>
      <link>https://dev.to/alexsam29/hacktoberfest-recap-bj6</link>
      <guid>https://dev.to/alexsam29/hacktoberfest-recap-bj6</guid>
      <description>&lt;p&gt;Well my first ever Hacktoberfest is now over. It was stressful at times, but I think that was mostly just because it was my first one. The main challenge throughout the month was finding issues to work on. Since this is a global event, you had to be quick and/or lucky to find a good issue that was both challenging but yet, not overwhelming for a beginner like myself.&lt;/p&gt;

&lt;p&gt;Overall, I made four pull requests (PRs) over the course of the month. Which can be read about here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/alexsam29/hacktoberfest-week-1-first-pull-request-31ie"&gt;https://dev.to/alexsam29/hacktoberfest-week-1-first-pull-request-31ie&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/alexsam29/hacktoberfest-week-2-first-bug-fix-5ao3"&gt;https://dev.to/alexsam29/hacktoberfest-week-2-first-bug-fix-5ao3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/alexsam29/hacktoberfest-week-3-enhancing-a-feature-3iin"&gt;https://dev.to/alexsam29/hacktoberfest-week-3-enhancing-a-feature-3iin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/alexsam29/hacktoberfest-week-4-finding-and-creating-issues-j79"&gt;https://dev.to/alexsam29/hacktoberfest-week-4-finding-and-creating-issues-j79&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I think I made good learning progress with my PRs. The first PR was just me getting into the swing of things and getting used to contributing to a public open-source project. The second PR is where I actually got to put some coding skills to the test by fixing an existing bug in a project. It gave me some experience researching potential fixes to bugs that weren't my own creation. The third PR allowed me to continue with my work on the same project and gave me the opportunity to enhance a feature of the project. It was challenging as I had to brainstorm potential solutions that would give me the enhancement I was looking for.  The fourth and final PR, while simple coding wise, gave me experience exploring different types of projects and tech stacks that I probably would not have explored had I not been participating in Hacktoberfest. The fact that it was challenging to find good issues to work on forced me to explore many projects to create a new issue myself. This gave me a good learning experience as I had to read and learn about many types of tech stacks in order to get a good understanding of the project, so that I could create an issue in the repository.&lt;/p&gt;

&lt;p&gt;Overall, Hacktoberfest gave me the confidence to put myself out there and not to be afraid of contributing to open-source projects. No matter your experience level or how easy or difficult an issue is, every contribution is a learning experience. &lt;/p&gt;

</description>
      <category>opensource</category>
    </item>
    <item>
      <title>Hacktoberfest Week 4: Finding and Creating Issues.</title>
      <dc:creator>Alexander Samaniego</dc:creator>
      <pubDate>Sun, 30 Oct 2022 21:51:52 +0000</pubDate>
      <link>https://dev.to/alexsam29/hacktoberfest-week-4-finding-and-creating-issues-j79</link>
      <guid>https://dev.to/alexsam29/hacktoberfest-week-4-finding-and-creating-issues-j79</guid>
      <description>&lt;p&gt;For the fourth week of Hacktoberfest, I searched for and created my own issue in a repository, rather than finding an existing issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Recap
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/arpitghura/typing-test"&gt;The project&lt;/a&gt; I chose is a rather simple project.  It's a web application designed to test and practice typing skills.  User's can take and practice typing tests and the results will then be saved locally.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Issue &amp;amp; Pull Request
&lt;/h2&gt;

&lt;p&gt;Initially, I tried to find an issue that was more challenging coding wise when compared to &lt;a href="https://dev.to/alexsam29/hacktoberfest-week-3-enhancing-a-feature-3iin"&gt;last week&lt;/a&gt;. However, I struggled to find an issue that was challenging and realistically do-able with my current skill set this late into Hacktoberfest. The problem was that I mainly encountered repositories that weren't real open-source projects and were created solely for Hactoberfest pull requests (PRs). When I did find an issue that I wanted, I was not quick enough to comment as somebody else was already assigned the task. Due to this, I spent way too long just searching GitHub for issues. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Challenge
&lt;/h3&gt;

&lt;p&gt;In order to still give myself a challenge, I decided to create my own issue instead of relying on ones already made. To do this, I had to find, fork, setup, run, and explore many (many) projects to find potential bugs and or features I'd like to add. I had to learn many tech stacks and read countless of documentation pages to get these projects to run and know how they work.&lt;/p&gt;

&lt;p&gt;This is what made this week's PR much more challenging than the previous weeks because before, the bug fixes and feature requests were already made by someone else. All I had to do was find a way to fix/add it. Now, I had to do the bug finding and thinking for new features. There was that additional 'rookie fear' of creating new issues because you get the feeling that others will judge you for something; like potentially missing something in the documentation or having your feature request be seen as 'dumb' by others. There were times where I thought I had found a bug, but it was just an error with setup on my part. Or times where I'd suggest an issue, but the project maintainers would deny or suggest something else.&lt;/p&gt;

&lt;p&gt;Once I got past the most challenging part and got an issue that I created assigned to me, I got to work. &lt;a href="https://github.com/arpitghura/typing-test/issues/44"&gt;The issue&lt;/a&gt; I got assigned was to add a new table in the Typing Test project that showed the average speed and time of all typing tests taken. I'll be honest, this issue wasn't too challenging.  I added the new feature by calculating average times in the JavaScript files and adding a new table below the existing one using the DOM. I created &lt;a href="https://github.com/arpitghura/typing-test/pull/48"&gt;the PR&lt;/a&gt; and got the feature added to the project with very little adjustments needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;While the actual coding was not as challenging as I had initially hoped, I'm still glad I got this experience because the challenge of creating a new issue myself gave me a chance to explore many projects that I probably would not have looked at before. I gained knowledge on different tech stacks and it gave me new found confidence to not be afraid to create new issues in open-source projects.&lt;/p&gt;

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