<?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: Elisaassa</title>
    <description>The latest articles on DEV Community by Elisaassa (@elisassa).</description>
    <link>https://dev.to/elisassa</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%2F2070639%2F0507a409-0157-4737-82c1-7058a3951777.jpeg</url>
      <title>DEV Community: Elisaassa</title>
      <link>https://dev.to/elisassa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/elisassa"/>
    <language>en</language>
    <item>
      <title>Final Update - Failed to Release</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Thu, 12 Dec 2024 03:47:17 +0000</pubDate>
      <link>https://dev.to/elisassa/final-update-failed-to-release-5hh3</link>
      <guid>https://dev.to/elisassa/final-update-failed-to-release-5hh3</guid>
      <description>&lt;p&gt;Despite my best efforts, I wasn’t able to complete the migration from Bootstrap 3 to Bootstrap 5. Here’s what went wrong and what I learned from the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Gap Between Bootstrap 3 and Bootstrap 5
&lt;/h2&gt;

&lt;p&gt;The differences between Bootstrap 3 and Bootstrap 5 turned out to be much larger than I initially anticipated. It wasn’t just about adding new features; the way components are structured and used has changed significantly. Adapting to the new grid system and rewriting JavaScript components required careful attention to detail, making the migration process far more complex than expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layout Issues
&lt;/h2&gt;

&lt;p&gt;One of the biggest challenges was the layout. Even after updating all the grid classes and testing responsiveness, the layout in Bootstrap 5 didn’t align perfectly with the original one in Bootstrap 3. There were subtle differences in spacing, alignment, and overall design that proved difficult to resolve. Fixing these issues would have required more time and resources than I had available.&lt;/p&gt;

&lt;h2&gt;
  
  
  Too Many Details to Modify
&lt;/h2&gt;

&lt;p&gt;There were countless details that needed to be addressed, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Updating custom scripts&lt;/strong&gt; that relied on jQuery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adjusting styles&lt;/strong&gt; for deprecated CSS classes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing and debugging&lt;/strong&gt; every component to ensure functionality and visual consistency.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these tasks was time-consuming on its own, but together, they became overwhelming and made it impossible to finish the migration within the planned timeline.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Bootstrap 3 to 5</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Thu, 12 Dec 2024 03:36:53 +0000</pubDate>
      <link>https://dev.to/elisassa/bootstrap-3-to-5-jo9</link>
      <guid>https://dev.to/elisassa/bootstrap-3-to-5-jo9</guid>
      <description>&lt;h1&gt;
  
  
  Why Updating From Bootstrap 3 to 5 is a Bigger Challenge Than Expected
&lt;/h1&gt;

&lt;p&gt;When I first lokking this issue ifound it's mignt be easy . However, when I started updating a project from Bootstrap 3 to Bootstrap 5, I quickly discovered that the process wasn’t as straightforward as I’d hoped. Here’s a breakdown of the challenges I faced and how I tackled them during this journey.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges I Encountered
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Structural Overhaul
&lt;/h4&gt;

&lt;p&gt;One of the first hurdles I faced was adapting to Bootstrap 5’s new grid system. The &lt;code&gt;.col-md-*&lt;/code&gt; classes from Bootstrap 3 have been replaced with a more flexible &lt;code&gt;.col-*&lt;/code&gt; system. While this is great for modern responsiveness, it meant I had to go through the entire project and replace these classes manually. Beyond just swapping the classes, I had to test and tweak layouts to make sure everything worked smoothly across different screen sizes. It was a time-consuming but necessary step.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Moving Away from jQuery
&lt;/h4&gt;

&lt;p&gt;Bootstrap 3 relied heavily on jQuery for its JavaScript components, but Bootstrap 5 has completely removed this dependency in favor of vanilla JavaScript. While this is a step forward for performance and simplicity, it caused some serious headaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I had to rewrite custom scripts that were tied to jQuery. This included rethinking how event handlers like &lt;code&gt;$(element).on(...)&lt;/code&gt; worked and replacing them with &lt;code&gt;addEventListener&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Many third-party plugins that the project relied on were built for jQuery, so I had to either find alternatives or write custom solutions to replace them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This process took a lot longer than I expected because of how deeply jQuery was embedded into the project.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Styling Discrepancies
&lt;/h4&gt;

&lt;p&gt;Some CSS classes and utilities from Bootstrap 3 are no longer available in Bootstrap 5. For example, certain badge and button classes that were central to the project’s design had to be replaced or recreated with custom CSS. These small adjustments added up, and it took careful work to maintain the project’s original look and feel.&lt;/p&gt;




&lt;p&gt;While the migration hasn’t been easy, it’s been an eye-opening experience. Modernizing the project with Bootstrap 5 has helped me understand the importance of staying current with technology and has pushed me to improve my skills with vanilla JavaScript and responsive design.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Facing Overwhelm and Overcoming Procrastination in Release 0.3</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Mon, 09 Dec 2024 01:28:59 +0000</pubDate>
      <link>https://dev.to/elisassa/facing-overwhelm-and-overcoming-procrastination-in-release-03-5cjl</link>
      <guid>https://dev.to/elisassa/facing-overwhelm-and-overcoming-procrastination-in-release-03-5cjl</guid>
      <description>&lt;h3&gt;
  
  
  Discovering an Interesting Project
&lt;/h3&gt;

&lt;p&gt;As I was exploring different repositories for Release 0.3, I came across &lt;strong&gt;Puter&lt;/strong&gt;, an open-source internet operating system. The more I read about it, the more fascinating it seemed. Puter is designed to be fast, extensible, and versatile—it can serve as a personal cloud, a platform for building web apps, or even a remote desktop environment. Its wide range of use cases and potential for impact really caught my attention. I realized this was a project I wanted to contribute to.&lt;/p&gt;

&lt;h3&gt;
  
  
  Finding My Place in the Project
&lt;/h3&gt;

&lt;p&gt;At first, I wasn’t sure where I could make a meaningful contribution. The codebase was large and complex, and I wasn’t confident about diving into technical issues. But as I spent more time understanding the project, I discovered something I could work on: completing missing Traditional Chinese translations. This task stood out to me because it aligned perfectly with my strengths—I’m fluent in Chinese and could ensure the translations were accurate and culturally appropriate.&lt;/p&gt;

&lt;p&gt;The task wasn’t complex or flashy, but it was important. Adding translations would make the project more accessible to Chinese-speaking users. I realized this was my chance to help in a meaningful way.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recognizing the Need to Grow
&lt;/h3&gt;

&lt;p&gt;This experience made me reflect. I need to improve my technical skills and build confidence with complex codebases. Small tasks like translations are a good start, but I want to do more. I want to be ready for bigger challenges in the future.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>OSD Lab9</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Sat, 23 Nov 2024 04:12:34 +0000</pubDate>
      <link>https://dev.to/elisassa/osd-lab9-1mob</link>
      <guid>https://dev.to/elisassa/osd-lab9-1mob</guid>
      <description>&lt;p&gt;For Lab 9, I focused on packaging and releasing the Code-Formatter-Advisor project on PyPI, making it accessible for easy installation by others.&lt;/p&gt;

&lt;h4&gt;
  
  
  Choosing the Release Tool and Package Registry
&lt;/h4&gt;

&lt;p&gt;For this project, I chose Python's standard package manager, &lt;strong&gt;PyPI (Python Package Index)&lt;/strong&gt;, as the release tool. PyPI is widely used for distributing Python packages and is accessible to most Python developers. You can find the release at &lt;a href="https://pypi.org/project/code-formatter-advisor/" rel="noopener noreferrer"&gt;Code-Formatter-Advisor on PyPI&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Creating the Release
&lt;/h4&gt;

&lt;p&gt;The process of creating the release involved a few key steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Preparing &lt;code&gt;setup.py&lt;/code&gt;&lt;/strong&gt;: I created a &lt;code&gt;setup.py&lt;/code&gt; file to include metadata like the package name, version, author, and dependencies. This setup file is crucial as it tells PyPI how to build and install the package.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generating Distribution Files&lt;/strong&gt;: Using the command &lt;code&gt;python setup.py sdist bdist_wheel&lt;/code&gt;, I generated both source and wheel distribution files. These files were stored in the &lt;code&gt;dist/&lt;/code&gt; directory, ready for uploading.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Uploading to PyPI&lt;/strong&gt;: I used &lt;strong&gt;Twine&lt;/strong&gt; to upload the package to PyPI: &lt;code&gt;twine upload dist/*&lt;/code&gt;. During this step, I needed to use my PyPI credentials, including an API token. After uploading, my package was live on PyPI.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Lessons Learned
&lt;/h4&gt;

&lt;p&gt;While working on this release, I learned the importance of configuring &lt;code&gt;setup.py&lt;/code&gt; accurately, especially with correct dependency management. I encountered a few issues with encoding in the &lt;code&gt;README.md&lt;/code&gt; file, but I resolved them by specifying the encoding in the &lt;code&gt;setup.py&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;An "aha!" moment for me was understanding how git tags work alongside releases. Tagging releases (&lt;code&gt;git tag -a v1.0.0 -m "Initial release"&lt;/code&gt;) helped me track versions effectively.&lt;/p&gt;

&lt;h4&gt;
  
  
  Alterations Made for the Release
&lt;/h4&gt;

&lt;p&gt;I had to create and modify the &lt;code&gt;setup.py&lt;/code&gt; to add package details and define dependencies. This included adding all necessary libraries and ensuring the &lt;code&gt;README.md&lt;/code&gt; provided proper instructions for installing and using the package.&lt;/p&gt;

&lt;h4&gt;
  
  
  User Testing Feedback
&lt;/h4&gt;

&lt;p&gt;For user testing, I asked a fellow developer to try installing my package from PyPI and follow the README instructions. They had minor issues understanding the virtual environment setup step, which I have clarified in the README. This experience highlighted the importance of clear and precise instructions for users who may not have the same technical background.&lt;/p&gt;

&lt;h4&gt;
  
  
  Using Code-Formatter-Advisor via PyPI
&lt;/h4&gt;

&lt;p&gt;Users can now install &lt;strong&gt;Code-Formatter-Advisor&lt;/strong&gt; directly from PyPI by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;code-formatter-advisor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After installation, the command-line tool can be used as described in the updated README to analyze code and get formatting suggestions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pypi.org/project/code-formatter-advisor/" rel="noopener noreferrer"&gt;Code-Formatter-Advisor on PyPI&lt;/a&gt; provides an easy entry point for developers to leverage this tool in their projects.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building Robust Projects with GitHub Actions and Collaborative Testing</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Fri, 15 Nov 2024 22:27:16 +0000</pubDate>
      <link>https://dev.to/elisassa/building-robust-projects-with-github-actions-and-collaborative-testing-3ci5</link>
      <guid>https://dev.to/elisassa/building-robust-projects-with-github-actions-and-collaborative-testing-3ci5</guid>
      <description>&lt;p&gt;In my recent development journey, I focused on adding Continuous Integration (CI) and enhancing test coverage using GitHub Actions. Here's a brief overview of my experience.&lt;/p&gt;

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

&lt;p&gt;I set up a GitHub Actions CI workflow to run tests with every push and pull request to the main branch. This involved creating a YAML configuration to automate the setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Triggers&lt;/strong&gt;: The workflow runs on every push and pull request to the main branch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment Setup&lt;/strong&gt;: Uses Ubuntu, installs Python 3.10, along with Flake8 for linting and Pytest for testing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linting and Testing&lt;/strong&gt;: Linting checks code style, while Pytest validates functionality.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Collaborating on a Partner's Repository
&lt;/h3&gt;

&lt;p&gt;I also added tests to a partner's repository, which used a different framework. Adapting to someone else’s code structure highlighted the importance of well-documented contribution guidelines. &lt;/p&gt;

&lt;h3&gt;
  
  
  My Thoughts on CI
&lt;/h3&gt;

&lt;p&gt;Implementing CI made me realize it's a crucial tool in modern software development. It automates testing, reducing the risk of human error and ensuring code quality. Now, I feel more confident about the reliability of any changes pushed to the main branch.&lt;/p&gt;

&lt;h3&gt;
  
  
  Optional Challenges: Adding More Tests and Static Analysis
&lt;/h3&gt;

&lt;p&gt;Adding more tests to my partner's project and integrating a linter into the CI helped maintain a cleaner codebase by catching issues early.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CI is Essential&lt;/strong&gt;: It ensures code quality and reliability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clear Contribution Guidelines Matter&lt;/strong&gt;: They make it easier for others to contribute.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaborative Testing&lt;/strong&gt;: Writing tests for a new project improved my adaptability and understanding of new codebases.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>🧪 Testing Framework for Code-Formatter-Advisor</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Sat, 09 Nov 2024 03:42:58 +0000</pubDate>
      <link>https://dev.to/elisassa/testing-framework-for-code-formatter-advisor-4hpg</link>
      <guid>https://dev.to/elisassa/testing-framework-for-code-formatter-advisor-4hpg</guid>
      <description>&lt;h2&gt;
  
  
  🎯 Overview
&lt;/h2&gt;

&lt;p&gt;In this blog, I’ll share my experience setting up automated testing for the Code-Formatter-Advisor project. I’ll cover the tools I used, how I set up the environment, handled mock responses, and what I learned along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔧 Chosen Tools
&lt;/h2&gt;

&lt;p&gt;I used &lt;code&gt;pytest&lt;/code&gt; as my testing framework, along with Python’s &lt;code&gt;unittest.mock&lt;/code&gt; module to create mock responses for my LLM API. Here’s why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;pytest&lt;/strong&gt;: It’s simple, yet powerful for writing concise test cases. &lt;a href="https://docs.pytest.org/" rel="noopener noreferrer"&gt;Learn more about pytest here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;unittest.mock&lt;/strong&gt;: Ideal for mocking API responses without hitting the live API during tests. &lt;a href="https://docs.python.org/3/library/unittest.mock.html" rel="noopener noreferrer"&gt;Check out unittest.mock documentation&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛠️ Setting Up the Testing Environment
&lt;/h2&gt;

&lt;p&gt;Here’s how I set up the testing framework in my project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Installing Dependencies&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   pip &lt;span class="nb"&gt;install &lt;/span&gt;pytest
   pip &lt;span class="nb"&gt;install &lt;/span&gt;python-dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are used for running tests and managing environment variables.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Creating the Test File&lt;/strong&gt;:&lt;br&gt;
I created &lt;code&gt;test_example.py&lt;/code&gt; in my project’s root directory. It contains unit tests for various functions in my project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Writing the Tests&lt;/strong&gt;:&lt;br&gt;
I used &lt;code&gt;pytest&lt;/code&gt; and &lt;code&gt;unittest.mock&lt;/code&gt; to create mock versions of LLM API responses and simulate different scenarios.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  🌀 Mocking the LLM API
&lt;/h2&gt;

&lt;p&gt;Mocking LLM responses was crucial for reproducible tests. I created a mock response using &lt;code&gt;MagicMock&lt;/code&gt; from &lt;code&gt;unittest.mock&lt;/code&gt;, which allowed me to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Return a consistent response for each request.&lt;/li&gt;
&lt;li&gt;Avoid relying on live API calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example of mocking:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@patch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;analyzer.send_chat_completion_request&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nd"&gt;@patch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;analyzer.read_code_file&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_analyze_code_with_mocked_llm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mock_read_code_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mock_send_chat_completion_request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tmp_path&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;mock_read_code_file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;return_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SAMPLE_CODE_CONTENT&lt;/span&gt;
    &lt;span class="n"&gt;mock_llm_response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;MagicMock&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;mock_llm_response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Mocked formatting suggestions.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;mock_send_chat_completion_request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;return_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mock_llm_response&lt;/span&gt;
    &lt;span class="c1"&gt;# ...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;h3&gt;
  
  
  Aha! Moments
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mocking Simplifies Testing&lt;/strong&gt;: Mocking the LLM allowed me to avoid issues like rate limits and unstable responses, making tests consistent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refactoring Improves Testability&lt;/strong&gt;: I realized breaking large functions into smaller components makes them much easier to test.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Initially, I faced issues with Git branches, specifically merging my &lt;code&gt;testing&lt;/code&gt; branch into &lt;code&gt;main&lt;/code&gt;. After some troubleshooting, I learned about interactive rebase and fast-forward merging, which cleaned up the commit history.&lt;/p&gt;

&lt;h2&gt;
  
  
  🐞 Interesting Bugs Found
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Missing Files&lt;/strong&gt;: I found that when certain files were missing, my code wasn’t handling the errors gracefully. This was fixed by adding appropriate error logging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Errors&lt;/strong&gt;: Testing revealed that not all API errors were being caught, which could lead to crashes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎓 Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Testing Matters&lt;/strong&gt;: I’d never done thorough testing before, but now I see its value in creating reliable software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smaller Is Better&lt;/strong&gt;: Breaking down functions into smaller units isn’t just good practice for readability, but also for testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ll definitely continue writing tests for future projects to ensure better quality code.&lt;/p&gt;

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

&lt;p&gt;Setting up testing for my project taught me a lot about how important automated tests are for maintaining code quality. Mocking tools like &lt;code&gt;unittest.mock&lt;/code&gt; are powerful allies when working with external APIs.&lt;/p&gt;

&lt;p&gt;If you’re new to testing, my advice is: start small, be consistent, and keep learning. Writing good tests takes practice, but it’s absolutely worth it!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let me know your thoughts or questions below!&lt;/strong&gt; 😊&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Enhancing Code Quality: Adding Formatters and Linters to Code-Formatter-Advisor</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Sat, 02 Nov 2024 03:37:48 +0000</pubDate>
      <link>https://dev.to/elisassa/-enhancing-code-quality-adding-formatters-and-linters-to-code-formatter-advisor-4g49</link>
      <guid>https://dev.to/elisassa/-enhancing-code-quality-adding-formatters-and-linters-to-code-formatter-advisor-4g49</guid>
      <description>&lt;p&gt;In this post, I want to share my journey of integrating various code quality tools into my project, &lt;strong&gt;Code-Formatter-Advisor&lt;/strong&gt;. These tools helped me improve the overall quality, readability, and maintainability of the codebase, and I'm hoping this guide can help others interested in enhancing their own projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tools I Chose
&lt;/h3&gt;

&lt;p&gt;For this project, I chose the following tools:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Black&lt;/strong&gt; (Python Code Formatter) - &lt;a href="https://github.com/psf/black" rel="noopener noreferrer"&gt;Black&lt;/a&gt; is a widely used opinionated Python code formatter that helps standardize the look of Python code. Its primary advantage is that it eliminates arguments over style, helping teams stay productive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flake8&lt;/strong&gt; (Python Linter) - &lt;a href="https://flake8.pycqa.org/en/latest/" rel="noopener noreferrer"&gt;Flake8&lt;/a&gt; is a linting tool that combines PEP 8 compliance checks, pyflakes, and other plugins to catch issues in the code. It's easy to set up and gives comprehensive feedback to identify and fix errors.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Why I Chose These Tools
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Black&lt;/strong&gt; was chosen for its simplicity and for being highly opinionated, meaning it requires minimal configuration and is effective in keeping everyone on the same page regarding style.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flake8&lt;/strong&gt; was chosen because it offers a good balance between error detection and style consistency, while being easy to integrate into the existing workflow.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Setting Up the Tools
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Setting Up Black
&lt;/h4&gt;

&lt;p&gt;First, I installed Black by running the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;black
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To apply Black to the project, I configured it to format Python files on the entire project. I also created a simple script (&lt;code&gt;run_formatter.sh&lt;/code&gt;) to run Black from the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
black &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. Setting Up Flake8
&lt;/h4&gt;

&lt;p&gt;Similarly, I installed Flake8 via:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;flake8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I added a configuration file &lt;code&gt;.flake8&lt;/code&gt; to specify the max line length and files to exclude:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[flake8]&lt;/span&gt;
&lt;span class="py"&gt;max-line-length&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&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="s"&gt;venv, __pycache__, migrations&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also created a script (&lt;code&gt;run_linter.sh&lt;/code&gt;) to execute Flake8 from the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
flake8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Configuring Both Tools
&lt;/h4&gt;

&lt;p&gt;To make it easy for contributors to use these tools, I documented these steps in a &lt;code&gt;CONTRIBUTING.md&lt;/code&gt; file and added them to my GitHub repository. Contributors can run &lt;code&gt;./run_formatter.sh&lt;/code&gt; and &lt;code&gt;./run_linter.sh&lt;/code&gt; to apply these tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Issues Found by the Tools
&lt;/h3&gt;

&lt;p&gt;Once I ran Black, it reformatted most of my code to ensure a consistent style. There were a few areas where indentation and spacing were corrected, and it also enforced line breaks for long lines.&lt;/p&gt;

&lt;p&gt;When running Flake8, it detected some common issues such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Line length violations&lt;/strong&gt;: Several lines were longer than the configured limit (88 characters).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unused imports&lt;/strong&gt;: Flake8 flagged unnecessary imports, allowing me to clean up the code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Integrating Tools into VS Code
&lt;/h3&gt;

&lt;p&gt;I also integrated Black and Flake8 with &lt;strong&gt;Visual Studio Code (VS Code)&lt;/strong&gt; to ensure real-time feedback during coding. Here are the steps I followed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Install Python Extension&lt;/strong&gt;: The official Python extension for VS Code supports Black and Flake8. It provides linting and formatting features automatically.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enable Formatting with Black&lt;/strong&gt;: I configured VS Code to use Black for formatting upon saving. This was done by adding the following to the VS Code settings (&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;"black"&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="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;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enable Linting with Flake8&lt;/strong&gt;: Similarly, I enabled Flake8 as the linter by setting:
&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.linting.flake8Enabled"&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.enabled"&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;h3&gt;
  
  
  Command Line Integration
&lt;/h3&gt;

&lt;p&gt;To run these tools from the command line, I provided the &lt;code&gt;run_formatter.sh&lt;/code&gt; and &lt;code&gt;run_linter.sh&lt;/code&gt; scripts, which help developers easily run formatting and linting tasks on the entire project without needing to remember complex commands.&lt;/p&gt;

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

&lt;p&gt;This process was insightful as it highlighted several best practices for improving code quality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automation is Key&lt;/strong&gt;: Automating code formatting and linting makes the development process smoother and less error-prone. Developers can focus on coding rather than worrying about stylistic details.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Integration with Editor&lt;/strong&gt;: Real-time linting and formatting while writing code make it easier to maintain standards and fix issues on the spot.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Quality Tools Save Time&lt;/strong&gt;: Implementing these tools improved readability and maintainability, ultimately making the codebase easier to work with for everyone.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Using Black and Flake8 helped enhance the quality of the Code-Formatter-Advisor project significantly. If you’re considering improving your project’s code quality, I recommend trying these tools for Python projects. I hope this guide helps others set up a similar workflow!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My Third PR for Hacktoberfest</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Thu, 31 Oct 2024 19:24:49 +0000</pubDate>
      <link>https://dev.to/elisassa/my-third-pr-for-hacktoberfest-4j8p</link>
      <guid>https://dev.to/elisassa/my-third-pr-for-hacktoberfest-4j8p</guid>
      <description>&lt;h3&gt;
  
  
  Lessons from Testing the Voice Button Component
&lt;/h3&gt;

&lt;p&gt;Testing components can sometimes be a rollercoaster, and my recent experience with testing the VoiceButton component in my project was certainly a ride full of unexpected turns. In this blog post, I want to share what I encountered, the challenges I faced, and some insights that I hope might help others who are working on similar projects.&lt;/p&gt;

&lt;h4&gt;
  
  
  Setting the Scene: Voice Button
&lt;/h4&gt;

&lt;p&gt;The VoiceButton component is a part of an interactive chatbot interface that allows users to interact with the bot using their voice. My goal was to write unit tests for this component to ensure it renders properly and behaves as expected when users interact with it. Specifically, I needed to validate that it changes state (toggle on/off) when clicked and reflects those changes visually.&lt;/p&gt;

&lt;p&gt;The journey started with the VoiceButton tests, and while I initially hoped to use the same approach as other button components, this proved to be more challenging than expected.&lt;/p&gt;

&lt;h4&gt;
  
  
  Challenges with VoiceButton Tests
&lt;/h4&gt;

&lt;p&gt;While I referenced tests from similar components, like the AudioButton, the VoiceButton seemed to have a mind of its own. No matter how carefully I wrote the tests, they would consistently fail, specifically in checking the state toggling and style changes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Failing Tests and Debugging Loop&lt;/strong&gt;: The tests for the VoiceButton consistently failed, indicating that the expected style or class change didn't occur after the button was clicked. The message was clear: the button remained in the "disabled" state when I expected it to be "enabled."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Console Logs and Debugging&lt;/strong&gt;: I added console logs to trace the events and state changes during the test, but the logs showed that, despite simulating a click, the button state didn't update as expected in the test environment. I tried adjusting timeouts, tweaking how the button was clicked (using &lt;code&gt;fireEvent.click()&lt;/code&gt; or &lt;code&gt;fireEvent.mouseDown()&lt;/code&gt;), but the issue persisted.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Moving Forward
&lt;/h4&gt;

&lt;p&gt;For now, I have tests in place that ensure the VoiceButton renders properly and shows the initial state as expected. While I referenced the AudioButton approach, I didn't write or fully test the AudioButton itself. The VoiceButton tests are more basic due to the issues I encountered.&lt;/p&gt;

&lt;p&gt;I plan to revisit the VoiceButton tests later with fresh ideas and potentially refactor the component to make it easier to test. One consideration is to split out complex logic into smaller, isolated parts that can be tested independently.&lt;/p&gt;

&lt;p&gt;Testing can often feel like a frustrating loop of trial and error, especially when dealing with UI components. But every failure teaches you something new, and even a small success—like getting the VoiceButton to render correctly—is progress worth celebrating.&lt;/p&gt;

&lt;h4&gt;
  
  
  Final Thoughts
&lt;/h4&gt;

&lt;p&gt;This was my first time participating in such a big, complex project, and it was also the last day of Hacktoberfest when I worked on it. I didn't complete four pull requests this time, but I learned a lot about the challenges of testing complex components. Next time, I plan to start earlier and use this experience to improve my skills further.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My Second PR for Hacktoberfest</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Mon, 28 Oct 2024 18:34:55 +0000</pubDate>
      <link>https://dev.to/elisassa/my-second-pr-for-hacktoberfest-2d87</link>
      <guid>https://dev.to/elisassa/my-second-pr-for-hacktoberfest-2d87</guid>
      <description>&lt;h3&gt;
  
  
  My Second PR for Hacktoberfest: A Journey of Finding and Fixing an Issue
&lt;/h3&gt;

&lt;p&gt;Participating in Hacktoberfest has been a rewarding experience, and my second Pull Request (PR) taught me a lot. Here, I want to share how I found an issue, solved it, and what I learned.&lt;/p&gt;

&lt;h4&gt;
  
  
  Finding the Issue
&lt;/h4&gt;

&lt;p&gt;I browsed repositories with the &lt;strong&gt;"Hacktoberfest"&lt;/strong&gt; label on GitHub, filtering for &lt;strong&gt;"good first issue"&lt;/strong&gt; or &lt;strong&gt;"help wanted"&lt;/strong&gt;. I found a basic static website project that had incorrect setup instructions in the &lt;code&gt;README.md&lt;/code&gt;. The instructions mentioned running &lt;code&gt;npm install&lt;/code&gt;, but there was no &lt;strong&gt;&lt;code&gt;package.json&lt;/code&gt;&lt;/strong&gt; file, making the step incorrect.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fixing the Issue
&lt;/h4&gt;

&lt;p&gt;I forked the repository, cloned it, and confirmed the problem. Since it was a static website, I updated the &lt;code&gt;README.md&lt;/code&gt; to remove the &lt;code&gt;npm install&lt;/code&gt; step and provided instructions to open &lt;code&gt;index.html&lt;/code&gt; directly or use a simple local server.&lt;/p&gt;

&lt;p&gt;I tested the changes, committed them with a clear message, and created a Pull Request explaining how my updates improved the setup process.&lt;/p&gt;

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

&lt;p&gt;This PR taught me the importance of &lt;strong&gt;accurate documentation&lt;/strong&gt;. Documentation is often the first touchpoint for contributors, and incorrect instructions can lead to confusion. By improving the &lt;code&gt;README.md&lt;/code&gt;, I made the project more accessible, contributing to a welcoming open-source environment.&lt;/p&gt;

&lt;p&gt;Hacktoberfest is not just about adding code—it's about making meaningful contributions. Even small improvements can significantly enhance user experience.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My First PR for Hacktoberfest 🎉</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Mon, 28 Oct 2024 00:52:59 +0000</pubDate>
      <link>https://dev.to/elisassa/my-first-pr-for-hacktoberfest-2e8g</link>
      <guid>https://dev.to/elisassa/my-first-pr-for-hacktoberfest-2e8g</guid>
      <description>&lt;p&gt;This October, I took my first steps into the world of open source by contributing to the &lt;strong&gt;Awesome Social Chess&lt;/strong&gt; project as part of Hacktoberfest. My contribution might not have been a groundbreaking feature or a big code change, but it was something that could make a difference for others: a &lt;strong&gt;Contributing Guide&lt;/strong&gt;. I noticed that new contributors could benefit from clear instructions, so I decided to create a guide that would make it easier for them to get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Getting Started
&lt;/h2&gt;

&lt;p&gt;It all began when I identified the need for a &lt;strong&gt;Contributing Guide&lt;/strong&gt; and created an issue to highlight this gap. After making sure no one else had opened a similar issue, I went ahead and submitted it. Getting assigned to work on it was really motivating, and I felt excited to get started.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Forking the Repository&lt;/strong&gt;: I forked the &lt;strong&gt;Awesome Social Chess&lt;/strong&gt; repository to my GitHub account and cloned it locally so I could work on it offline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🌿 Creating a Branch&lt;/strong&gt;: From there, I created a new branch called &lt;code&gt;add-contributing-guide&lt;/code&gt; and got to work.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ✍️ Writing the Guide
&lt;/h2&gt;

&lt;p&gt;Writing the guide was a rewarding process. I focused on making it clear and easy to follow, with step-by-step instructions on how to fork the repo, create branches, make changes, and submit a pull request. I wanted it to be approachable, so I added a few friendly emojis to make it less intimidating and more engaging.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ Reflections
&lt;/h2&gt;

&lt;p&gt;Even though adding a &lt;strong&gt;Contributing Guide&lt;/strong&gt; might not seem like the most critical contribution, it taught me so much about how to support an open-source community. I learned the value of good documentation and how important it is to make projects accessible to everyone, especially newcomers. This experience showed me that even small contributions can have a big impact. I’m excited to keep contributing, learning, and being part of the open-source world.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Refactoring Code</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Fri, 11 Oct 2024 22:40:21 +0000</pubDate>
      <link>https://dev.to/elisassa/refactoring-code-fok</link>
      <guid>https://dev.to/elisassa/refactoring-code-fok</guid>
      <description>&lt;p&gt;Refactoring is an essential part of improving software quality. It involves restructuring existing code without changing its behavior, aiming to enhance readability, maintainability, and performance. In this blog post, I'll take you through how I refactored my code, focusing on each stage of the process and how I used Git tools like rebase and squash to clean up my project's history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identifying Areas for Improvement
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Split Code into Multiple Files&lt;/strong&gt;: My initial script was growing unwieldy. I decided to split the code into separate files for different functionalities. For example, I moved utility functions into &lt;code&gt;utils.py&lt;/code&gt; and the main analysis logic into &lt;code&gt;analyzer.py&lt;/code&gt;. This made the code modular and easier to read.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using Git to Manage Changes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Interactive Rebase
&lt;/h3&gt;

&lt;p&gt;Interactive rebase (&lt;code&gt;git rebase -i&lt;/code&gt;) is a powerful tool for rewriting commit history. During this refactoring, I used &lt;code&gt;rebase&lt;/code&gt; to organize my commits in a meaningful way.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Combining Commits&lt;/strong&gt;: Instead of having three commits that represented individual small changes, I combined them into one logical commit. This way, the commit history clearly shows one refactor, rather than multiple messy changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Editing Commit Messages&lt;/strong&gt;: Rewriting commit messages during rebase allowed me to add more descriptive details, making it easier for others (and future me) to understand the changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Git Squash
&lt;/h3&gt;

&lt;p&gt;While using &lt;code&gt;rebase&lt;/code&gt;, I also applied the &lt;code&gt;squash&lt;/code&gt; command to merge multiple commits into a single cohesive commit.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why Squash?&lt;/strong&gt;: By squashing multiple commits, I made my project's history cleaner. Squashing helps present the end product of a series of changes without the noise of every single incremental adjustment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Final Commit&lt;/strong&gt;: I ended up with one well-documented commit that encompassed the entire refactor, titled: "Refactor: Extract utility functions and split code into separate files."&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Handling Merge Conflicts&lt;/strong&gt;: During the process, I ran into some merge conflicts. They occurred because there were changes in both the main branch and my refactoring branch. Handling these conflicts taught me more about how to carefully review differences and make decisions about which changes to keep.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breaking the Code&lt;/strong&gt;: There were moments when my code broke due to some changes I made while moving functions around. I learned to rely on small, incremental changes and test regularly to prevent breaking the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Bugs Found (This Time!)&lt;/strong&gt;: Fortunately, while refactoring, I didn't discover any new bugs. This was a sign that my original functionality was sound, and the refactoring successfully made the code cleaner without introducing issues.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;These changes made my project cleaner, more organized, and easier for others to understand. And thanks to Git, I could confidently make these changes, knowing I had the tools to manage the history and avoid chaos.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>OSD lab4 : Adding TOML Support to a GitHub Project</title>
      <dc:creator>Elisaassa</dc:creator>
      <pubDate>Fri, 04 Oct 2024 21:01:49 +0000</pubDate>
      <link>https://dev.to/elisassa/osd-lab4-adding-toml-support-to-a-github-project-3kml</link>
      <guid>https://dev.to/elisassa/osd-lab4-adding-toml-support-to-a-github-project-3kml</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;This week, I worked on adding support for reading configuration from a TOML file to a peer's project on GitHub. It was a great learning experience that took me through the ups and downs of coding and version control. Here’s a brief overview of how it went:&lt;/p&gt;

&lt;h2&gt;
  
  
  Coding the Feature
&lt;/h2&gt;

&lt;p&gt;The goal was to modify the existing configuration setup to support TOML files so that users could manage settings more easily. I used the &lt;code&gt;tomli&lt;/code&gt; library, which made parsing TOML files straightforward. After implementing the changes, I ran into a few minor issues around handling exceptions and ensuring the correct path for the config file. By using print debugging and carefully reading the documentation, I resolved these issues and tested the feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Working with Git: Challenges and Solutions
&lt;/h2&gt;

&lt;p&gt;Using Git was where things got interesting. I created a new branch, &lt;code&gt;issue-15&lt;/code&gt;, for the changes and set up the remote repository. Creating a Draft Pull Request and pushing changes was smooth, but I encountered conflicts when merging. The tricky part was resolving these conflicts without messing up the codebase. I used the GitHub conflict resolution tool, which helped me view both changes side by side and decide what to keep. After a few careful attempts, I managed to resolve the issues.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Handling Merge Conflicts&lt;/strong&gt;: Resolving conflicts taught me the value of keeping my branch up to date with the latest changes from &lt;code&gt;main&lt;/code&gt;. I should have synchronized more frequently to avoid major conflicts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Frequent Communication&lt;/strong&gt;: My peer was very detailed and precise in their responses. My peer not only replied quickly but also provided clear instructions on how to resolve specific issues, such as the exact commands and code adjustments needed. This level of detail made it much easier to understand and fix the problems quickly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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