<?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: Inderpreet Singh Parmar</title>
    <description>The latest articles on DEV Community by Inderpreet Singh Parmar (@inder4code).</description>
    <link>https://dev.to/inder4code</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%2F2038068%2F5fb8e5eb-8169-47f5-ae5d-23cd9d3d97ce.png</url>
      <title>DEV Community: Inderpreet Singh Parmar</title>
      <link>https://dev.to/inder4code</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/inder4code"/>
    <language>en</language>
    <item>
      <title>Simplifying Event Creation: Adding a Dedicated Button for Group Admins</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Thu, 12 Dec 2024 17:28:30 +0000</pubDate>
      <link>https://dev.to/inder4code/simplifying-event-creation-adding-a-dedicated-button-for-group-admins-4c4h</link>
      <guid>https://dev.to/inder4code/simplifying-event-creation-adding-a-dedicated-button-for-group-admins-4c4h</guid>
      <description>&lt;p&gt;In Release 4, I aimed to streamline the process of event creation for group admins in the Event Blend Frontend project. My focus was on implementing the following feature:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/harshmangalam/event-blend-frontend/issues/78" rel="noopener noreferrer"&gt;Add create new event button (#78)&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This feature allows group admins to quickly access the event creation page from their group's details page, significantly enhancing the usability of the platform.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Overview of the Feature&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Previously, navigating to the event creation page required several clicks, making it less intuitive for group admins to create new events. The new feature introduces a dedicated button visible only to admins, enabling a smoother and more accessible workflow.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Steps Taken to Implement the Feature&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Role-Based Visibility&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used the &lt;code&gt;role&lt;/code&gt; property from the session data to check if the logged-in user is an admin.&lt;/li&gt;
&lt;li&gt;Ensured only users with the &lt;code&gt;Admin&lt;/code&gt; role can see the "Create Event" button.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Dynamic Redirect&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added a button that redirects admins to the event creation page with the group ID pre-filled as a query parameter.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;UI Enhancements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Designed the button to match the existing UI theme for consistency.&lt;/li&gt;
&lt;li&gt;Ensured responsiveness and accessibility for various screen sizes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Code Refactoring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refactored the existing codebase to accommodate this feature without redundancy.&lt;/li&gt;
&lt;li&gt;Improved code maintainability by introducing reusable components.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Challenges and Collaboration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A key challenge was dynamically fetching and validating the admin role from the session data. Communication with the maintainer via Discord helped clarify the expected behavior and validate the changes. This collaboration ensured the feature met the project's standards and requirements.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Results and Impact&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This feature greatly enhances the user experience for group admins by providing a direct and intuitive way to create events. It reduces navigation complexity and improves the overall efficiency of the platform.&lt;/p&gt;

&lt;p&gt;For more details, see the related &lt;a href="https://github.com/harshmangalam/event-blend-frontend/pull/122" rel="noopener noreferrer"&gt;Pull Request here&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Both features—adding datetime inputs and a dedicated event creation button—have significantly improved the Event Blend Frontend's functionality and user experience. Through these contributions, I’ve honed my skills in frontend development, validation logic, and open-source collaboration. Working directly with the maintainer on Discord was an invaluable experience that emphasized the importance of clear communication in distributed teams.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Enhancing Event Management: Adding Date and Time Features in Open Source</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Thu, 12 Dec 2024 17:25:59 +0000</pubDate>
      <link>https://dev.to/inder4code/enhancing-event-management-adding-date-and-time-features-in-open-source-3hhd</link>
      <guid>https://dev.to/inder4code/enhancing-event-management-adding-date-and-time-features-in-open-source-3hhd</guid>
      <description>&lt;p&gt;As part of my Release 3 contribution to the Event Blend Frontend project, I focused on improving the event management functionality by addressing two important issues: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/harshmangalam/event-blend-frontend/issues/123" rel="noopener noreferrer"&gt;Feature/add event dates and times (#123)&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/harshmangalam/event-blend-frontend/issues/65" rel="noopener noreferrer"&gt;Add start and end time in create event (#65)&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These changes were pivotal in enhancing the user experience for event creation, ensuring better functionality and usability.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Overview of the Issues&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The original system allowed users to add only start and end dates for events. There was no functionality to include start and end times, which limited the precision and practicality of event scheduling. Additionally, the backend supported datetime values, but the frontend did not utilize this feature effectively.&lt;/p&gt;

&lt;p&gt;My contributions were focused on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding &lt;strong&gt;start time&lt;/strong&gt; and &lt;strong&gt;end time&lt;/strong&gt; inputs alongside the date inputs in the event creation form.&lt;/li&gt;
&lt;li&gt;Validating the input to ensure the end datetime is always later than the start datetime.&lt;/li&gt;
&lt;li&gt;Updating the data sent to the backend to include combined date and time values in ISO format.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Steps Taken to Solve the Issues&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Frontend Form Enhancement&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Updated the event creation form by adding fields for start time and end time.&lt;/li&gt;
&lt;li&gt;Used the &lt;code&gt;useSignal&lt;/code&gt; hook to capture and manage date and time values in real time.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Validation Logic&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implemented a client-side validation to ensure the end datetime is after the start datetime. If invalid, an alert prevents the form submission.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data Formatting for Backend&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modified the data structure sent to the backend, combining date and time values into a single ISO format string.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;User Interface Improvement&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enhanced the user interface with labels and placeholders to guide users on filling out the new fields effectively.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Challenges and Collaboration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One challenge was ensuring proper validation and formatting while maintaining a seamless user experience. Communication with the maintainer via Discord was essential to clarify implementation details and expectations. This direct line of communication was instrumental in quickly resolving uncertainties, particularly regarding data formatting requirements and UI design choices.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Results and Impact&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;These updates improved the event creation process by allowing users to define precise event timings. The new functionality aligns with modern user expectations and streamlines the scheduling process for organizers and participants.&lt;/p&gt;

&lt;p&gt;For a more detailed overview of my work, you can view the related &lt;a href="https://github.com/harshmangalam/event-blend-frontend/pull/123" rel="noopener noreferrer"&gt;Pull Request here&lt;/a&gt;.&lt;/p&gt;




</description>
    </item>
    <item>
      <title>Releasing Tailor4Job via npm</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Thu, 21 Nov 2024 20:58:39 +0000</pubDate>
      <link>https://dev.to/inder4code/releasing-tailor4job-via-npm-4h7l</link>
      <guid>https://dev.to/inder4code/releasing-tailor4job-via-npm-4h7l</guid>
      <description>&lt;p&gt;As part of my open-source development journey, I recently worked on packaging and releasing my command-line tool, &lt;strong&gt;Tailor4Job&lt;/strong&gt;, via the &lt;strong&gt;npm&lt;/strong&gt; registry. Tailor4Job helps candidates optimize their resumes and cover letters by analyzing them against job descriptions and providing actionable feedback. In this blog post, I’ll walk you through my experience with creating and publishing the package, the challenges I faced, and the lessons I learned.&lt;/p&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Why I Chose npm&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I chose npm as the package registry for Tailor4Job for several reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Popularity:&lt;/strong&gt; npm is one of the most widely used package registries and provides a robust ecosystem for publishing and sharing tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ease of Use:&lt;/strong&gt; npm simplifies the process of packaging and distributing command-line tools, making it accessible to a broad audience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compatibility:&lt;/strong&gt; Although Tailor4Job is a Python-based tool, npm allows easy integration for CLI tools, making it an ideal choice for this project.&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Steps for Creating and Publishing the Package&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Setting Up &lt;code&gt;package.json&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I initialized the project with &lt;code&gt;npm init&lt;/code&gt; and carefully filled in the metadata, such as &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;version&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, &lt;code&gt;repository&lt;/code&gt;, and &lt;code&gt;author&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;I added a &lt;code&gt;bin&lt;/code&gt; field to specify the CLI entry point (&lt;code&gt;main.py&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Ensuring Script Compatibility:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added a shebang line (&lt;code&gt;#!/usr/bin/env python3&lt;/code&gt;) to &lt;code&gt;main.py&lt;/code&gt; to ensure it executed as a Python script.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Publishing to npm:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logged into my npm account and published the package:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; npm publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Testing the Installation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installed the package globally to verify:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; tailor4job
 tailor4job &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Version Management:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Encountered a restriction on republishing the same version. Resolved it by incrementing the version number in &lt;code&gt;package.json&lt;/code&gt; and using semantic versioning for subsequent releases.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Documentation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Updated the &lt;code&gt;README.md&lt;/code&gt; with installation and usage instructions, ensuring users could easily understand how to install and use Tailor4Job.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Challenges and Solutions&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Permission Issues During Installation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faced &lt;code&gt;EACCES&lt;/code&gt; errors when globally installing the package. Fixed it by using &lt;code&gt;sudo&lt;/code&gt; and later configuring npm to use a local directory for global installations.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;CLI Command Not Found:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initially, the &lt;code&gt;tailor4job&lt;/code&gt; command was not recognized because the &lt;code&gt;bin&lt;/code&gt; field was missing in &lt;code&gt;package.json&lt;/code&gt;. After adding it, the issue was resolved.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Script Execution Errors:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The script was mistakenly executed as a shell script. Adding a shebang line and ensuring proper permissions fixed the problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Republishing the Same Version:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;npm does not allow overwriting published versions. Learned to increment the version number using &lt;code&gt;npm version&lt;/code&gt; commands before republishing.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Releasing Tailor4Job on npm was an enlightening experience. It taught me the nuances of software packaging, semantic versioning, and user-focused documentation. While challenges like permission errors and script execution issues slowed me down, they also helped me grow as a developer.&lt;/p&gt;

&lt;p&gt;Now, Tailor4Job is accessible to users globally, and I’m excited to see how it can help job seekers enhance their applications. If you’re interested, feel free to check out the project on npm and contribute your feedback or improvements!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;npm Package Link:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/tailor4job" rel="noopener noreferrer"&gt;tailor4job&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/InderParmar/Tailor4Job" rel="noopener noreferrer"&gt;Tailor4Job GitHub Repo&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Thank you for reading, and happy tailoring! 🚀&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Implementing GitHub Actions CI Workflow for Tailor4Job</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Thu, 21 Nov 2024 19:23:27 +0000</pubDate>
      <link>https://dev.to/inder4code/implementing-github-actions-ci-workflow-for-tailor4job-3pic</link>
      <guid>https://dev.to/inder4code/implementing-github-actions-ci-workflow-for-tailor4job-3pic</guid>
      <description>&lt;p&gt;Continuous Integration (CI) has revolutionized the way developers manage and maintain their codebases. In this blog post, I’ll share my experience setting up a GitHub Actions CI workflow for my project, &lt;code&gt;Tailor4Job&lt;/code&gt;. I’ll also reflect on writing tests for a peer’s repository in collaboration with Fahad Ali Khan, share insights on CI, and discuss additional challenges tackled during the process.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Setting Up the GitHub Actions CI Workflow&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To automate testing and ensure code quality for &lt;code&gt;Tailor4Job&lt;/code&gt;, I used GitHub Actions to set up a CI workflow. Here's how I approached it:&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Define the Workflow&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The workflow is defined in &lt;code&gt;.github/workflows/python-app.yml&lt;/code&gt;. It runs on every push or pull request to the &lt;code&gt;main&lt;/code&gt; branch and executes the following steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checks out the code.&lt;/li&gt;
&lt;li&gt;Sets up Python 3.9.&lt;/li&gt;
&lt;li&gt;Installs dependencies from &lt;code&gt;requirements.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Installs &lt;code&gt;wkhtmltopdf&lt;/code&gt;, required for PDF generation tests.&lt;/li&gt;
&lt;li&gt;Runs all tests using &lt;code&gt;pytest&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Python CI&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;main&lt;/span&gt;
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;main&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;

    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout code&lt;/span&gt;
      &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v3&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Set up Python&lt;/span&gt;
      &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-python@v4&lt;/span&gt;
      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;python-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3.9'&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install dependencies&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
        &lt;span class="s"&gt;python -m pip install --upgrade pip&lt;/span&gt;
        &lt;span class="s"&gt;pip install -r requirements.txt&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install wkhtmltopdf&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
        &lt;span class="s"&gt;sudo apt-get update&lt;/span&gt;
        &lt;span class="s"&gt;sudo apt-get install -y wkhtmltopdf&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run Tests&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
        &lt;span class="s"&gt;pytest -v --maxfail=1 --durations=10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Challenges Faced&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dependency Issues&lt;/strong&gt;: I encountered errors related to the &lt;code&gt;wkhtmltopdf&lt;/code&gt; dependency missing in the CI environment. Installing it resolved issues with PDF generation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment Variables&lt;/strong&gt;: Setting up API keys securely as GitHub secrets required careful attention to avoid exposing sensitive data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Outcome&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The workflow successfully ran all tests, providing immediate feedback on code changes. This streamlined the process of maintaining code quality and improved development efficiency.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Writing Tests for a Partner’s Repository&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;As part of the lab, I collaborated with &lt;strong&gt;Fahad Ali Khan&lt;/strong&gt; to contribute tests to his repository. This was an enriching experience, as it involved adapting to a different codebase and setup.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Test Case Added&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I added the following test case to verify error handling in the &lt;code&gt;save_file&lt;/code&gt; method of the &lt;code&gt;eng_format&lt;/code&gt; class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;TEST&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EngFormatTests&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SaveFileThrowsOnInvalidFile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Set dummy environment variables for testing&lt;/span&gt;
    &lt;span class="n"&gt;setenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"API_KEY"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"dummy_key"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;setenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"API_URL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"https://dummy.url"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;eng_format&lt;/span&gt; &lt;span class="n"&gt;formatter&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Use an invalid file path (e.g., a directory) to force an error&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;invalidFilePath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"/invalid_path/test_output.txt"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;testContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"This content should fail to save."&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Ensure that the save_file method throws an exception for the invalid path&lt;/span&gt;
    &lt;span class="n"&gt;EXPECT_THROW&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;formatter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;save_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;invalidFilePath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;testContent&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;runtime_error&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;h4&gt;
  
  
  &lt;strong&gt;Purpose&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;This test ensures robust error handling when saving files, verifying that the &lt;code&gt;save_file&lt;/code&gt; method throws a &lt;code&gt;std::runtime_error&lt;/code&gt; for invalid file paths.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Challenges and Learnings&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Understanding a New Codebase&lt;/strong&gt;: Writing tests for a new repository required me to carefully analyze the code and understand its structure and logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration&lt;/strong&gt;: Communicating with Fahad to clarify ambiguities and align my tests with his expectations was vital.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Integration&lt;/strong&gt;: Ensuring the new test fit seamlessly into the existing suite required attention to compatibility and coverage.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Reflections on CI&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Implementing CI for &lt;code&gt;Tailor4Job&lt;/code&gt; and contributing tests to Fahad’s repository has given me a new appreciation for CI's role in modern development.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Benefits of CI&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Error Prevention&lt;/strong&gt;: CI catches bugs early in the development process, preventing them from reaching production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficiency&lt;/strong&gt;: Automated testing saves time and ensures consistency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration&lt;/strong&gt;: CI fosters a collaborative environment by ensuring code changes are rigorously tested before merging.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Future Plans&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I plan to integrate CI into all future projects, particularly those involving collaboration or open-source contributions.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This lab was a rewarding experience that highlighted the importance of CI and testing in software development. Collaborating with Fahad Ali Khan and contributing to his repository improved my collaborative and technical skills. CI is now an integral part of my workflow, ensuring code quality and streamlining development processes.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Deep Dive into Testing and Tooling: Insights from Lab 7</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Mon, 04 Nov 2024 05:45:04 +0000</pubDate>
      <link>https://dev.to/inder4code/deep-dive-into-testing-and-tooling-insights-from-lab-7-58o2</link>
      <guid>https://dev.to/inder4code/deep-dive-into-testing-and-tooling-insights-from-lab-7-58o2</guid>
      <description>&lt;p&gt;In Lab 7 of my open-source development course, I focused on establishing robust testing practices within my project, Tailor4Job. This lab emphasized automated testing and static code analysis using tools like &lt;code&gt;pytest&lt;/code&gt;, &lt;code&gt;requests-mock&lt;/code&gt;, and &lt;code&gt;ruff&lt;/code&gt;. In this post, I'll walk through the setup, challenges, and insights gained.&lt;/p&gt;

&lt;h3&gt;
  
  
  Choosing the Right Tools
&lt;/h3&gt;

&lt;p&gt;Testing and code quality are essential for open-source projects. For Lab 7, I used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pytest&lt;/code&gt;&lt;/strong&gt;: As the main testing framework. &lt;code&gt;pytest&lt;/code&gt; is lightweight yet powerful and supports test discovery, which makes it ideal for an expanding project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;requests-mock&lt;/code&gt;&lt;/strong&gt;: To simulate API responses for functions reliant on external services. This tool allows us to verify functionality without making actual network requests, which is crucial for isolated and reliable tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ruff&lt;/code&gt;&lt;/strong&gt;: A linter and formatter for ensuring code quality and consistency across the project. I used &lt;code&gt;ruff&lt;/code&gt; to enforce style conventions and eliminate errors like unused imports or improper module-level import placement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Mocking API Responses&lt;/strong&gt;:&lt;br&gt;
   To avoid real network calls, I used &lt;code&gt;requests-mock&lt;/code&gt; to simulate the API’s behavior in test scenarios. By defining expected responses for the API endpoints, I ensured that tests were consistent and independent of network conditions.&lt;/p&gt;

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

&lt;p&gt;Lab 7 required extensive test case coverage. Some highlights include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Basic Input Validation&lt;/strong&gt;: Testing for proper handling of inputs like non-existent files, empty strings, and unsupported formats.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Response Testing&lt;/strong&gt;: Using &lt;code&gt;requests-mock&lt;/code&gt;, I verified that functions responded correctly to different API statuses (e.g., &lt;code&gt;401 Unauthorized&lt;/code&gt; for invalid API keys).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edge Case Testing&lt;/strong&gt;: From large file handling to custom filenames, edge cases were essential to test thoroughly. By simulating these scenarios, I gained confidence that the program could handle diverse inputs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Challenges Faced
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Static Analysis Failures&lt;/strong&gt;:&lt;br&gt;
One of the most persistent challenges was dealing with &lt;code&gt;ruff&lt;/code&gt; failures in pre-commit hooks. Errors related to import order (E402) required restructuring imports across multiple files. Fixing these required running &lt;code&gt;ruff --fix&lt;/code&gt; repeatedly until all issues were addressed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mocking Complex File Inputs&lt;/strong&gt;:&lt;br&gt;
Handling &lt;code&gt;.docx&lt;/code&gt; files in tests required careful mocking to simulate content without reading actual files. &lt;code&gt;patch&lt;/code&gt; from &lt;code&gt;unittest.mock&lt;/code&gt; helped to bypass file access, allowing me to test file-dependent functions in isolation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Git Workflow Adjustments&lt;/strong&gt;:&lt;br&gt;
Rebasing and stashing changes became tricky when pre-commit hooks kept flagging issues. Using &lt;code&gt;--no-verify&lt;/code&gt; with commits was a workaround to continue my workflow while maintaining formatting locally.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Insights and Takeaways
&lt;/h3&gt;

&lt;p&gt;This lab underscored the importance of automation in testing and formatting. I learned that setting up robust pre-commit hooks and using tools like &lt;code&gt;requests-mock&lt;/code&gt; early can save significant debugging time later. Additionally, structured testing practices make the codebase more reliable, paving the way for future enhancements without risking regressions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Lab 7 was a deep dive into testing and static analysis for open-source development. By implementing thorough tests, leveraging mocking tools, and adhering to code quality standards with &lt;code&gt;ruff&lt;/code&gt;, I gained hands-on experience that will be invaluable in future projects. &lt;/p&gt;

&lt;p&gt;For the complete source code and test cases, check out the project repository &lt;a href="https://github.com/InderParmar/Tailor4Job" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Submission Details
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Commit Hash&lt;/strong&gt;: [&lt;a href="https://github.com/InderParmar/Tailor4Job/commit/e024ecb26cd134951a83c7042dd7faf9c41da7c7" rel="noopener noreferrer"&gt;https://github.com/InderParmar/Tailor4Job/commit/e024ecb26cd134951a83c7042dd7faf9c41da7c7&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Improving Tailor4Job with Ruff 🛠️✨</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Mon, 04 Nov 2024 02:38:52 +0000</pubDate>
      <link>https://dev.to/inder4code/improving-tailor4job-with-ruff-224e</link>
      <guid>https://dev.to/inder4code/improving-tailor4job-with-ruff-224e</guid>
      <description>&lt;p&gt;In this post, I'll walk you through how I integrated &lt;strong&gt;Ruff&lt;/strong&gt;, a static analysis tool, into my project &lt;strong&gt;Tailor4Job&lt;/strong&gt;. Ruff provides both code formatting and linting, making it a one-stop tool for keeping my codebase clean and consistent. Here’s why I chose Ruff, how I set it up, the issues it helped me catch, and what I learned along the way. Let's dive in! 🏊‍♂️&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Ruff? 🤔
&lt;/h2&gt;

&lt;p&gt;I chose Ruff because it’s &lt;strong&gt;lightweight, fast, and powerful&lt;/strong&gt; — perfect for ensuring code quality without slowing down my workflow. Ruff handles both &lt;strong&gt;formatting&lt;/strong&gt; and &lt;strong&gt;linting&lt;/strong&gt;, meaning I don’t need separate tools for each. Plus, it’s highly customizable and easy to integrate with my editor and pre-commit hooks. The documentation is clear and easy to follow, making it a great choice for my project.&lt;/p&gt;

&lt;p&gt;👉 Check out Ruff’s documentation &lt;a href="https://beta.ruff.rs/docs/" rel="noopener noreferrer"&gt;here&lt;/a&gt; for details on how it works and how you can configure it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Ruff 🛠️
&lt;/h2&gt;

&lt;p&gt;To get started, I followed these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Installation&lt;/strong&gt;: I installed Ruff with &lt;code&gt;pip install ruff&lt;/code&gt;. Super easy! 👍&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configuration with &lt;code&gt;.ruff.toml&lt;/code&gt;&lt;/strong&gt;: Ruff’s configuration file lets me specify formatting, linting rules, and files to ignore.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example settings:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;  &lt;span class="py"&gt;line-length&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;88&lt;/span&gt;
  &lt;span class="py"&gt;exclude&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"__pycache__"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"dist"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;".venv"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

  &lt;span class="nn"&gt;[lint]&lt;/span&gt;
  &lt;span class="py"&gt;select&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"E"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"F"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="py"&gt;ignore&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"E501"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Editor Integration&lt;/strong&gt;: I added Ruff to my VS Code setup for real-time linting and formatting on save. This was as simple as configuring &lt;code&gt;.vscode/settings.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&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;"python.formatting.provider"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ruff"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"editor.formatOnSave"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"python.linting.ruffEnabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&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;Now, Ruff highlights issues as I type, making it easy to catch and fix them right away! 🚀&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pre-Commit Hook&lt;/strong&gt;: Using a pre-commit hook, Ruff runs automatically before each commit, ensuring all code follows my project’s standards. No more style checks in PRs! 🎉&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Issues Found and Fixed 🐛
&lt;/h2&gt;

&lt;p&gt;Ruff was great at identifying issues I didn’t notice before, like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unused Variables&lt;/strong&gt;: Ruff flagged variables that were declared but never used. It’s easy to miss these, but they can clutter the code and cause confusion. Fixing this was straightforward.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Formatting Consistency&lt;/strong&gt;: Ruff adjusted inconsistent indentation and spacing automatically, so I didn’t have to go through each file manually. This saved a ton of time! 🕒&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Line Length Violations&lt;/strong&gt;: Ruff pointed out lines that were too long, which I was able to break up for better readability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of these fixes were quick and easy thanks to Ruff’s automatic corrections. For others, Ruff provided clear feedback on what needed to be adjusted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Ruff 🚀
&lt;/h2&gt;

&lt;p&gt;There are multiple ways to run Ruff in my project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Command Line&lt;/strong&gt;: I set up &lt;code&gt;format.sh&lt;/code&gt; and &lt;code&gt;lint.sh&lt;/code&gt; scripts for one-command formatting and linting:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ./format.sh  &lt;span class="c"&gt;# Formats code&lt;/span&gt;
   ./lint.sh    &lt;span class="c"&gt;# Lints code&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These scripts are great for quickly checking or formatting code without needing to remember complex commands.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Editor Integration&lt;/strong&gt;: With Ruff in VS Code, I get instant feedback on errors and style issues. Code is automatically formatted on save, making it easier to maintain quality without interrupting my workflow. 🔥&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pre-Commit Hook&lt;/strong&gt;: Ruff runs automatically before each commit, so I don’t have to worry about accidentally committing unformatted or non-compliant code. ✅&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I Learned 🎓
&lt;/h2&gt;

&lt;p&gt;Using Ruff taught me a lot about the benefits of &lt;strong&gt;static analysis tools&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Time Efficiency&lt;/strong&gt;: Ruff catches issues before they become a problem, saving debugging time down the line. Pre-commit hooks are especially valuable for catching errors early.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Consistency&lt;/strong&gt;: Ruff enforces a consistent style, making the codebase cleaner and easier to navigate. This is crucial when working on collaborative projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improved Workflow&lt;/strong&gt;: With editor integration, Ruff keeps my code clean as I write, reducing the need for end-of-session cleanup. The scripts and pre-commit hooks add further efficiency, allowing me to focus more on writing code and less on formatting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, Ruff made my project more &lt;strong&gt;professional, readable, and scalable&lt;/strong&gt; for future contributors. I’m excited to keep using it and highly recommend it to anyone looking to streamline their development process. 💪&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🎉 Final Blog: My Hacktoberfest Journey - Four PRs, Countless Lessons! 🚀</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Sun, 03 Nov 2024 18:22:46 +0000</pubDate>
      <link>https://dev.to/inder4code/final-blog-my-hacktoberfest-journey-four-prs-countless-lessons-44cl</link>
      <guid>https://dev.to/inder4code/final-blog-my-hacktoberfest-journey-four-prs-countless-lessons-44cl</guid>
      <description>&lt;p&gt;Embarking on Hacktoberfest this year has been an incredible experience. Through my course &lt;em&gt;Topics in Open Source Development&lt;/em&gt;, I tackled four unique issues across different projects, each with its own challenges and learning curves. Here’s a look back on my journey from my first PR to my fourth, which marked the completion of this wonderful open-source journey! 🌟&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;PR #1: Adding a Signup Feature on the Login Page 🔑&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Issue:&lt;/strong&gt; &lt;a href="https://github.com/repo-owner/ForkTheCaptcha/issues/96" rel="noopener noreferrer"&gt;Adding a Signup Feature in Login Page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PR:&lt;/strong&gt; &lt;a href="https://github.com/repo-owner/ForkTheCaptcha/pull/96" rel="noopener noreferrer"&gt;#96&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For my very first contribution, I worked on a small but impactful UI improvement, adding a "Sign up" link to the login page of the &lt;strong&gt;ForkTheCaptcha&lt;/strong&gt; project. This feature was aimed at simplifying the user experience for new users, making it easier for them to find the signup page directly from the login screen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lessons Learned:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Tailwind CSS Mastery&lt;/em&gt;: I dove into Tailwind for styling, ensuring the "Sign up" link seamlessly blended with the existing design.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;UI/UX Fundamentals&lt;/em&gt;: I learned about subtle placement and consistency for better user navigation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This straightforward issue gave me a solid start, building confidence and making me excited to tackle more complex projects! 🥳&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;PR #2: Fixing the "Get Started" Link on Event-Blend-Frontend 🌐&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Issue:&lt;/strong&gt; &lt;a href="https://github.com/repo-owner/event-blend-frontend/issues/112" rel="noopener noreferrer"&gt;Fix Get Started Link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PR:&lt;/strong&gt; &lt;a href="https://github.com/repo-owner/event-blend-frontend/pull/115" rel="noopener noreferrer"&gt;#115&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My second PR involved updating a broken link in the &lt;strong&gt;Event-Blend-Frontend&lt;/strong&gt; project. The “Get Started” button was redirecting to the wrong page due to recent routing changes, so I updated it to ensure users reached the correct destination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges &amp;amp; Solutions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;File Tracking with Git&lt;/em&gt;: Dealing with unwanted lock files was a lesson in Git management. I learned how to use &lt;code&gt;git rm --cached&lt;/code&gt; to ensure these files weren’t included in the PR.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Maintainer Interaction&lt;/em&gt;: The maintainer’s feedback taught me the importance of file tracking and adhering to repository guidelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This experience gave me hands-on practice with Git hygiene and navigating file management in open-source projects. It also reinforced how a small fix can significantly improve user navigation. 📍&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;PR #3: Adding Consistent Bands Metadata for Vision Transformer and ResNet Weights 🛰️&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Issue:&lt;/strong&gt; &lt;a href="https://github.com/microsoft/torchgeo/issues/2364" rel="noopener noreferrer"&gt;Add Consistent Bands Metadata&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PR:&lt;/strong&gt; &lt;a href="https://github.com/microsoft/torchgeo/pull/2376" rel="noopener noreferrer"&gt;#2376&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my third contribution, I worked on adding consistent bands metadata for Vision Transformer and ResNet weights in the &lt;strong&gt;torchgeo&lt;/strong&gt; library. This fix was crucial for improving usability in geospatial applications by ensuring standardized metadata across weight classes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Highlights:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Understanding Geospatial Metadata&lt;/em&gt;: I delved into Landsat and Sentinel dataset specifications, learning about satellite bands and their practical applications.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Complex Git Workflows&lt;/em&gt;: Handling Git conflicts during rebase was challenging, but I learned to use &lt;code&gt;git rebase&lt;/code&gt; and &lt;code&gt;git rebase --continue&lt;/code&gt; effectively.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Detailed Maintainer Feedback&lt;/em&gt;: The maintainer’s input on variable names and code organization was invaluable and helped me refine my approach.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This PR significantly expanded my understanding of data consistency in machine learning workflows. It was a fantastic opportunity to work on a complex, real-world problem with practical implications for end-users! 🌍&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;PR #4: Migrating Nested Checkboxes - Task Migration Issue #3 ✅&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Issue:&lt;/strong&gt; &lt;a href="https://github.com/rodrigoea/my-notion-journal/issues/3" rel="noopener noreferrer"&gt;Task Migration for Nested Checkboxes&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PR:&lt;/strong&gt; &lt;a href="https://github.com/rodrigoea/my-notion-journal/pull/4" rel="noopener noreferrer"&gt;#4&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My final contribution for Hacktoberfest and this course was solving an issue with nested checkbox migration. The problem? Only the first checkbox in a nested task list was being migrated to the current day’s tasks, leaving behind the rest. My solution involved implementing a recursive function to ensure all checkboxes, regardless of depth, were migrated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaways:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Recursive Functions for Nested Data&lt;/em&gt;: I used a recursive approach to handle nested checkboxes, which was both challenging and enlightening.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;API Integration Skills&lt;/em&gt;: Working with the Notion API helped me better understand nested structures and how to handle them in API requests.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Completing a Complex Feature&lt;/em&gt;: Wrapping up Hacktoberfest with this issue was incredibly rewarding as it represented the culmination of everything I had learned along the way.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This final PR felt like the perfect capstone to my open-source journey, tying together my knowledge of JavaScript, APIs, and recursive functions. 📦&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Final Reflections 🥂&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Each PR was a stepping stone, building upon the last and pushing me out of my comfort zone. From UI tweaks and link fixes to handling complex metadata and recursive data migrations, I’ve learned so much through this journey. Open source has taught me to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Adapt to New Technologies&lt;/strong&gt;: Every project had different tools, from Tailwind CSS to advanced metadata handling in ML libraries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaborate with Maintainers&lt;/strong&gt;: Communication is key, and interacting with maintainers helped me refine my contributions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refine Git Skills&lt;/strong&gt;: Handling conflicts and organizing commits are essential skills that I’ll carry forward.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What I’d Do Differently&lt;/strong&gt;: I’d focus more on thorough testing before creating a PR to ensure I catch minor issues upfront. Additionally, I’d reach out sooner if I’m uncertain about feedback to streamline the process.&lt;/p&gt;

&lt;p&gt;With four successful PRs, I’m celebrating this milestone and looking forward to more contributions in the future! 🎊&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Open Source - Working on Task Migration for Nested Checkboxes</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Sun, 03 Nov 2024 18:16:07 +0000</pubDate>
      <link>https://dev.to/inder4code/open-source-working-on-task-migration-for-nested-checkboxes-1b11</link>
      <guid>https://dev.to/inder4code/open-source-working-on-task-migration-for-nested-checkboxes-1b11</guid>
      <description>&lt;h3&gt;
  
  
  Issue: Task Migration Bug for Nested Checkboxes
&lt;/h3&gt;

&lt;p&gt;This week, I worked on &lt;a href="https://github.com/rodrigoea/my-notion-journal/issues/3" rel="noopener noreferrer"&gt;Issue #3&lt;/a&gt; in the project. The issue identified a bug where only the first checkbox in a nested list was being migrated to the current day’s task page, leaving subsequent checkboxes behind. The goal was to ensure all nested checkboxes in a task list were correctly transferred to the new page, preserving the nested structure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Preparation for the Fix
&lt;/h3&gt;

&lt;p&gt;To address this bug, I set up the project environment and familiarized myself with the repository structure. This involved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reviewing the existing task migration function to understand the current behavior.&lt;/li&gt;
&lt;li&gt;Ensuring my setup could handle the required API calls.&lt;/li&gt;
&lt;li&gt;Reviewing documentation on nested lists and task migrations to understand how other tools approach similar issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Learning Goals and Key Knowledge Gained
&lt;/h3&gt;

&lt;p&gt;To implement this fix, I needed to understand how nested tasks are structured and accessed in the Notion API. This led me to learn more about recursive functions in JavaScript, which allow a function to call itself until a specified condition is met—in this case, iterating through nested tasks until each was processed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Code Explanation
&lt;/h3&gt;

&lt;p&gt;To address the issue, I implemented a recursive function, &lt;code&gt;moveNestedTasks&lt;/code&gt;, which handles nested checkboxes by:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Identifying Incomplete Tasks&lt;/strong&gt;: Filtering tasks to locate those that were not checked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Migrating the Main Tasks&lt;/strong&gt;: Adding these tasks to the current day’s task page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recursively Handling Nested Tasks&lt;/strong&gt;: For any task that had children, &lt;code&gt;moveNestedTasks&lt;/code&gt; calls itself to handle the nested items, ensuring that the sub-tasks are also appended in the correct format.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here’s a simplified code breakdown:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Main Migration Function&lt;/strong&gt;: &lt;code&gt;moveIncompleteTasks&lt;/code&gt; retrieves incomplete tasks and calls &lt;code&gt;moveNestedTasks&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recursive Function&lt;/strong&gt;: &lt;code&gt;moveNestedTasks&lt;/code&gt; iterates through tasks and, if it encounters a nested task, calls itself again, ensuring each level of the nested list is correctly processed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Research and Challenges
&lt;/h3&gt;

&lt;p&gt;During this work, I researched task structures within the Notion API and reviewed best practices for recursive functions in JavaScript. The biggest challenge was ensuring each subtask maintained its order and structure when migrated, which required careful handling of API calls.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Maintainer Interaction
&lt;/h3&gt;

&lt;p&gt;The project maintainer was responsive and supportive, especially when I requested clarification on nested structures. They confirmed the exact requirements for migrating nested items, which helped me finalize the approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  Difficulties and Solutions
&lt;/h3&gt;

&lt;p&gt;I initially struggled with managing the nested structure while ensuring efficiency. Recursive functions, while effective, can lead to high memory usage if not handled correctly. By carefully structuring the function calls and ensuring each nested task was processed independently, I was able to overcome these challenges.&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Issue:&lt;/strong&gt; &lt;a href="https://github.com/rodrigoea/my-notion-journal/issues/3" rel="noopener noreferrer"&gt;Task Migration Bug #3&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pull Request:&lt;/strong&gt; &lt;a href="https://github.com/rodrigoea/my-notion-journal/pull/4" rel="noopener noreferrer"&gt;Fix for Task Migration Bug&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Reflection
&lt;/h3&gt;

&lt;p&gt;This task was a great learning experience in working with recursive functions and handling nested data structures through APIs. If I were to approach this again, I’d test each nested level independently before the final implementation to verify structure handling at each depth. Going forward, I’ll continue using recursive functions for similar tasks, given how well it handled nested structures in this case.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My First Open Source Contribution @microsoft</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Sun, 03 Nov 2024 17:59:26 +0000</pubDate>
      <link>https://dev.to/inder4code/my-first-open-source-contribution-microsoft-542c</link>
      <guid>https://dev.to/inder4code/my-first-open-source-contribution-microsoft-542c</guid>
      <description>&lt;p&gt;&lt;strong&gt;Issue Worked On:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/microsoft/torchgeo/pull/2376" rel="noopener noreferrer"&gt;Add Consistent Bands Metadata to Vision Transformer and ResNet Weights #2376&lt;/a&gt;&lt;br&gt;
This week, I worked on a GitHub issue to add consistent band metadata across Vision Transformer (ViT) and ResNet weight classes in the &lt;code&gt;torchgeo&lt;/code&gt; library. The goal was to ensure uniform metadata across different weight classes, specifically supporting various satellite datasets like Landsat and Sentinel.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overview of the Issue:&lt;/strong&gt;&lt;br&gt;
The issue focused on improving usability by ensuring that each weight class had clear and consistent band metadata. This enhancement aimed to address missing information that users need to ensure compatibility when applying these weights in their workflows. The metadata needed to align closely with the Sentinel and Landsat datasets’ specifications, which are commonly used in geospatial applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preparation and Setup:&lt;/strong&gt;&lt;br&gt;
I began by cloning the repository and setting up the environment, ensuring I was familiar with the metadata definitions in &lt;code&gt;torchgeo&lt;/code&gt;. I studied the structure and naming conventions used in &lt;code&gt;resnet.py&lt;/code&gt; and &lt;code&gt;vit.py&lt;/code&gt; to determine where to add the new metadata. I also reviewed related documentation on Landsat and Sentinel datasets to ensure accuracy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning Requirements:&lt;/strong&gt;&lt;br&gt;
Understanding the structure and conventions for the different satellite bands was essential. I researched how Landsat and Sentinel datasets represent bands to ensure that I correctly implemented each set of metadata for these satellite data sources. Additionally, learning to interpret feedback from the maintainers regarding variable naming conventions and formatting was an important part of the process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explanation of the Fix:&lt;/strong&gt;&lt;br&gt;
To implement the fix:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Added Band Metadata&lt;/strong&gt;: I added band metadata to the Vision Transformer and ResNet weight classes, following the structure set in the &lt;code&gt;swin.py&lt;/code&gt; file for consistency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standardized Variable Naming&lt;/strong&gt;: I adopted naming conventions that clearly indicated the dataset associated with each band, such as &lt;code&gt;_landsat_tm_toa_bands&lt;/code&gt;, &lt;code&gt;_sentinel2_rgb_bands&lt;/code&gt;, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Removed Inconsistent Variables&lt;/strong&gt;: The final review involved removing the fMoW bands metadata as these bands were inconsistent across satellites, per feedback from the maintainer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Demo of Code Before/After Fix:&lt;/strong&gt;&lt;br&gt;
Before the fix, the band metadata was either missing or inconsistently named, making it difficult for users to identify which bands were needed for each weight class. After the update, the band metadata is now clear and consistent across weight classes, and each dataset is properly represented with standardized naming conventions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Research and Challenges:&lt;/strong&gt;&lt;br&gt;
In addition to researching Landsat and Sentinel band specifications, I faced challenges with Git, particularly with rebase conflicts while addressing feedback. Some metadata, like the fMoW bands, was particularly challenging due to inconsistent satellite band usage, which led to the eventual removal of this metadata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interactions with Maintainers:&lt;/strong&gt;&lt;br&gt;
Throughout the process, I received helpful feedback from the project maintainer, &lt;a href="https://github.com/adamjstewart" rel="noopener noreferrer"&gt;adamjstewart&lt;/a&gt;, who provided specific requests to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Alphabetize imports and variables for better readability.&lt;/li&gt;
&lt;li&gt;Move comments to improve code organization.&lt;/li&gt;
&lt;li&gt;Remove fMoW metadata due to inconsistencies across satellites.
The maintainer's insights on metadata formatting and code organization helped refine the final solution.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Overcoming Difficulties:&lt;/strong&gt;&lt;br&gt;
Handling Git conflicts was challenging, but I used commands like &lt;code&gt;git rebase&lt;/code&gt; and &lt;code&gt;git rebase --continue&lt;/code&gt; to resolve these issues. Additionally, interpreting the feedback regarding metadata names required careful review and adjustment. I implemented each change step-by-step and tested to ensure the updated metadata did not introduce errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Link to the Pull Request:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/microsoft/torchgeo/pull/2376" rel="noopener noreferrer"&gt;Add Consistent Bands Metadata to Vision Transformer and ResNet Weights #2376&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reflection and Learning:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This experience highlighted the importance of clear metadata and code organization in collaborative projects. For future contributions, I would ensure that I understand naming conventions from the start to avoid rework. The alphabetical organization and standardized naming practices were particularly useful and something I would apply in future coding projects. Additionally, I gained valuable experience in handling complex Git workflows, which will be beneficial for similar projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outcome:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The PR was successfully merged, with the "hacktoberfest-accepted" label added, allowing my contribution to be counted toward Hacktoberfest. The maintainer acknowledged the timing, ensuring the merge was completed in October. This contribution enhanced the usability of &lt;code&gt;torchgeo&lt;/code&gt; for geospatial applications, and I’m grateful for the learning experience this project provided.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Fixing the “Get Started” Link in Event-Blend-Frontend</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Mon, 28 Oct 2024 12:10:55 +0000</pubDate>
      <link>https://dev.to/inder4code/fixing-the-get-started-link-in-event-blend-frontend-24fb</link>
      <guid>https://dev.to/inder4code/fixing-the-get-started-link-in-event-blend-frontend-24fb</guid>
      <description>&lt;h4&gt;
  
  
  Issue Addressed
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Issue #112:&lt;/strong&gt; &lt;a href="https://github.com/harshmangalam/event-blend-frontend/issues/112" rel="noopener noreferrer"&gt;Fix Get Started Link&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Summary of the Issue
&lt;/h4&gt;

&lt;p&gt;The "Get Started" button in the footer of the website was redirecting to &lt;code&gt;/group/new&lt;/code&gt;, which needed to be updated to &lt;code&gt;/create-group&lt;/code&gt; to align with recent changes in the app's routing structure.&lt;/p&gt;

&lt;h4&gt;
  
  
  Preparation and Setup
&lt;/h4&gt;

&lt;p&gt;To fix this issue, I first set up the project locally:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Forked and cloned the repository&lt;/strong&gt; to ensure a separate copy for making changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Installed dependencies&lt;/strong&gt; using &lt;code&gt;npm install&lt;/code&gt; to prepare the project for development.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ran the project&lt;/strong&gt; locally to familiarize myself with the existing navigation structure and locate the “Get Started” link in the codebase.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Learning and Fix Implementation
&lt;/h4&gt;

&lt;p&gt;Navigating the project, I identified the footer component and located the "Get Started" button. The link was previously hardcoded to &lt;code&gt;/group/new&lt;/code&gt;, so I changed it to &lt;code&gt;/create-group&lt;/code&gt; in the component. I then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tested the link locally by running the app on &lt;code&gt;localhost&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Confirmed that the button redirected correctly to the new path &lt;code&gt;/create-group&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Handling Lock Files
&lt;/h4&gt;

&lt;p&gt;In the initial commit, I included the &lt;code&gt;package-lock.json&lt;/code&gt; file, which the project maintainer requested to be removed. To address this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I deleted both &lt;code&gt;package-lock.json&lt;/code&gt; and &lt;code&gt;pnpm-lock.yaml&lt;/code&gt; files locally.&lt;/li&gt;
&lt;li&gt;After removing them, I committed and pushed the changes. However, GitHub still displayed &lt;code&gt;pnpm-lock.yaml&lt;/code&gt; in the pull request, likely due to cache or sync issues.&lt;/li&gt;
&lt;li&gt;I resolved this by force-pushing the branch to refresh the pull request, ensuring both lock files were excluded.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Challenges and Interactions
&lt;/h4&gt;

&lt;p&gt;The most challenging part of this task was dealing with the lingering &lt;code&gt;pnpm-lock.yaml&lt;/code&gt; file in the PR. I had to troubleshoot this by experimenting with Git commands to forcefully update GitHub’s display of the files.&lt;/p&gt;

&lt;p&gt;The maintainer, &lt;a href="https://github.com/harshmangalam" rel="noopener noreferrer"&gt;@harshmangalam&lt;/a&gt;, was very helpful, providing feedback that guided me toward the best practices for managing unnecessary files in PRs.&lt;/p&gt;

&lt;h4&gt;
  
  
  What I Learned
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;File Tracking in Git:&lt;/strong&gt; I learned about using &lt;code&gt;git rm --cached&lt;/code&gt; to ensure unwanted files are completely removed from Git tracking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Force Sync with GitHub:&lt;/strong&gt; This issue taught me when and how to use a forced push to resolve GitHub sync issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Working with Maintainers:&lt;/strong&gt; It reinforced the importance of clear communication and responsiveness to feedback in open-source projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Link to the Pull Request
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Pull Request #115:&lt;/strong&gt; &lt;a href="https://github.com/harshmangalam/event-blend-frontend/pull/115" rel="noopener noreferrer"&gt;Fix Get Started Link in Footer&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Reflection and Next Steps
&lt;/h4&gt;

&lt;p&gt;This experience underscored the need for attention to detail in open source, especially in adhering to repository guidelines. Next time, I’ll double-check any included files to avoid unnecessary additions in PRs. Overall, it was a great learning opportunity to practice collaboration and tackle minor technical issues.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Adding a Signup Feature in Login Page (Issue #96)</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Mon, 28 Oct 2024 01:15:26 +0000</pubDate>
      <link>https://dev.to/inder4code/adding-a-signup-feature-in-login-page-issue-96-1ep9</link>
      <guid>https://dev.to/inder4code/adding-a-signup-feature-in-login-page-issue-96-1ep9</guid>
      <description>&lt;h4&gt;
  
  
  &lt;strong&gt;Issue and Link&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;This week, I worked on &lt;a href="https://github.com/AdityaSinha2305/ForkTheCaptcha/issues/96" rel="noopener noreferrer"&gt;Issue #96&lt;/a&gt; in the "ForkTheCaptcha" repository, which involved adding a signup feature to the login page. The issue required a "Sign up" link on the login page that would redirect users to the signup page.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;What Was the Issue About?&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The issue was about improving user experience by allowing users who don’t have an account to navigate easily to the signup page from the login screen. The request was straightforward: add a "Sign up" link below the "Submit" button in the login form and ensure it redirects to the signup page.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Preparation and Setup&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The setup was simple as the project already had a functioning login page (&lt;code&gt;login.html&lt;/code&gt;). I needed to analyze the existing structure and style of the login page to ensure the "Sign up" link would integrate seamlessly with the design. There wasn’t much technical setup involved since it was primarily a UI/UX addition.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Learning Points&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;To make the fix, I focused on a few key areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Understanding Tailwind CSS&lt;/strong&gt;: The project uses Tailwind for styling, so I reviewed Tailwind’s documentation to ensure I could add styles that matched the existing theme.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Basic HTML/CSS&lt;/strong&gt;: Since the change was in a static HTML file, it required a solid understanding of HTML and CSS basics rather than complex JavaScript or framework knowledge.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Demo of the Change&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Before the fix, the login page only had the "Submit" button, making it challenging for new users to locate the signup option. Now, with the "Sign up" link, users who don't have an account can quickly navigate to the signup page. Below is a screenshot of the updated login page (include the screenshot if possible).&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Research and Challenges&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Research&lt;/strong&gt;: Most of my research revolved around Tailwind CSS to ensure the link styling was consistent with the login page. I also reviewed best practices for login/signup pages to confirm my approach to placement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Challenges&lt;/strong&gt;: The main challenge was ensuring the new link didn’t disrupt the login page’s layout. I tested it across screen sizes to ensure responsiveness.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Interactions with Project Maintainers&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The issue was assigned by the project maintainer, Aditya Sinha, who provided a brief description. There wasn’t extensive interaction required for this issue as it was a straightforward addition, but I communicated clearly about my progress and verified that the PR was correctly linked to the issue.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Difficulties and Solutions&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;This issue was relatively straightforward, but I did double-check styling consistency and responsive design for different screen sizes. Testing it on different browsers also helped catch minor visual inconsistencies, which I adjusted accordingly.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Link to Pull Request&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The pull request for this issue can be found here: &lt;a href="https://github.com/AdityaSinha2305/ForkTheCaptcha/pull/100#issuecomment-2440070367" rel="noopener noreferrer"&gt;PR for Issue #96&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Reflection&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Process and Learning&lt;/strong&gt;: Working on this issue taught me the importance of aligning design elements with the existing UI for a seamless experience. This project gave me practical experience using Tailwind CSS, which was valuable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What I’d Do Differently&lt;/strong&gt;: Next time, I’d consider setting up a more formal review process for UI changes to ensure consistency across pages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What Worked Well&lt;/strong&gt;: Integrating the signup link was smooth, and Tailwind CSS made it easy to style the new element.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was a great experience contributing to Hacktoberfest and building on my UI/UX skills!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Refactoring and Git Rebase for Tailor4Job</title>
      <dc:creator>Inderpreet Singh Parmar</dc:creator>
      <pubDate>Tue, 22 Oct 2024 21:34:08 +0000</pubDate>
      <link>https://dev.to/inder4code/blog-post-refactoring-and-git-rebase-for-tailor4job-1i19</link>
      <guid>https://dev.to/inder4code/blog-post-refactoring-and-git-rebase-for-tailor4job-1i19</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
As part of my open-source development course, I undertook Lab 5, which focused on refactoring my 0.1 Release project, Tailor4Job. This process involved improving the code's structure, readability, and maintainability. Additionally, I had to practice using Git to rebase, squash commits, and update the commit history.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Refactoring Improvements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Refactoring is an essential part of maintaining any codebase, particularly as new features are added and technical debt starts to accumulate. In this lab, I focused on the following improvements for the Tailor4Job project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Encapsulation of Repetitive Code:&lt;/strong&gt;&lt;br&gt;
I encapsulated the model and provider processing logic into a new function called &lt;code&gt;process_model_provider&lt;/code&gt;. This removed code duplication across multiple sections of the code and made future modifications easier.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Naming Conventions:&lt;/strong&gt;&lt;br&gt;
One of the critical changes I made was renaming ambiguous variables to better reflect their purpose. For example, I changed generic names like &lt;code&gt;data&lt;/code&gt; to more descriptive names, which made the code easier to follow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Separation of Concerns:&lt;/strong&gt;&lt;br&gt;
I also worked on separating different functionalities into distinct functions and classes. For example, I moved API key handling to its function (&lt;code&gt;get_api_key&lt;/code&gt;), improving modularity and making the code more maintainable.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;&lt;strong&gt;Git Rebase and Squashing Commits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the most valuable parts of this lab was learning how to rewrite Git history by squashing multiple commits into a single cohesive one. Here’s how I approached it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Created a Refactoring Branch:&lt;/strong&gt;
I started by creating a new branch called &lt;code&gt;refactoring&lt;/code&gt;, which allowed me to make changes without affecting the &lt;code&gt;main&lt;/code&gt; branch.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; refactoring
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Made Multiple Commits:&lt;/strong&gt;
As I refactored the code, I made individual commits for each improvement, such as:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Refactored code logic&lt;/li&gt;
&lt;li&gt;Encapsulated model and provider processing&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Squashed Commits Using Git Rebase:&lt;/strong&gt;
After completing my refactor, I squashed all the refactoring commits into a single commit using Git's interactive rebase feature:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git rebase main &lt;span class="nt"&gt;-i&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the interactive rebase, I combined all the changes into one cohesive commit message.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Challenges Faced During Refactoring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Module Import Error:&lt;/strong&gt;
One of the challenges I faced was a &lt;code&gt;ModuleNotFoundError&lt;/code&gt; related to the &lt;code&gt;groq&lt;/code&gt; package. This error delayed the testing of the refactored code. After installing the necessary dependencies and fixing the module imports, I was able to run the project smoothly.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;strong&gt;Final Steps and Merging&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once I was satisfied with the refactoring and squash rebase, I merged the &lt;code&gt;refactoring&lt;/code&gt; branch into &lt;code&gt;main&lt;/code&gt; using a fast-forward merge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git merge &lt;span class="nt"&gt;--ff-only&lt;/span&gt; refactoring
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, I pushed the changes to the remote GitHub repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Refactoring the code for Tailor4Job not only improved its maintainability and readability but also helped me gain valuable experience using Git rebase and commit squashing. These tools are powerful for managing a clean and understandable commit history in any project.&lt;/p&gt;




&lt;p&gt;This lab has enhanced my understanding of writing clean code and managing Git history effectively, which are both crucial skills in open-source development.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
