<?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: Debugging Rabbit</title>
    <description>The latest articles on DEV Community by Debugging Rabbit (@debuggingrabbit).</description>
    <link>https://dev.to/debuggingrabbit</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%2F1483109%2Fabfcfe24-5965-4bb0-9376-f81c13345f4a.jpeg</url>
      <title>DEV Community: Debugging Rabbit</title>
      <link>https://dev.to/debuggingrabbit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/debuggingrabbit"/>
    <language>en</language>
    <item>
      <title>Understanding Git Stashes</title>
      <dc:creator>Debugging Rabbit</dc:creator>
      <pubDate>Tue, 09 Jul 2024 00:27:42 +0000</pubDate>
      <link>https://dev.to/debuggingrabbit/understanding-git-stashes-12l</link>
      <guid>https://dev.to/debuggingrabbit/understanding-git-stashes-12l</guid>
      <description>&lt;p&gt;Stash is something stored or hidden away for later use.&lt;br&gt;
Why would i want to use git stash in the first place. &lt;/p&gt;

&lt;p&gt;let's say i'm working on the sign up button for a client but he needs work done on the login feature immediately regardless of the urgency for the signup feature, i can quickly stash my signup as work in progress [saving it for some moments before i get back] and start working on the login feature.&lt;/p&gt;

&lt;p&gt;Git stashing is keeping files [save files] that you are not ready to use yet [not ready to commit].&lt;/p&gt;

&lt;p&gt;Save a stash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;save a stash with a name (recommended)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash save wip_login_feature
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List Your Stashes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will show you a list of all your stashed changes, with their corresponding stash IDs. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stash@{0}: On master: readme_work
stash@{1}: On master: index_html_in_progress 
stash@{2}: WIP on master: 049d078_Create_index_file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Applying a Specific Stash&lt;br&gt;
To apply a specific stash, you can use the git stash apply command and provide the stash ID as an argument:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash apply stash@{1}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will apply the changes from the stash with ID stash@{1}, which in the example above is the "index_html_in_progress" stash.&lt;/p&gt;

&lt;p&gt;Popping a Specific Stash&lt;br&gt;
Alternatively, you can use the git stash pop command to apply and then remove a specific stash not needed again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash pop stash@{0}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will apply the changes from the most recent stash (stash@{0}) and then remove it from the stash list.&lt;/p&gt;

&lt;p&gt;Dropping a Specific Stash&lt;br&gt;
If you no longer need a particular stash, you can remove it from the stash list using the git stash drop command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash drop stash@{2}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will remove the stash with ID stash@{2} from the list of stashes.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Git User Credentials</title>
      <dc:creator>Debugging Rabbit</dc:creator>
      <pubDate>Mon, 08 Jul 2024 17:09:21 +0000</pubDate>
      <link>https://dev.to/debuggingrabbit/git-credentials-23fc</link>
      <guid>https://dev.to/debuggingrabbit/git-credentials-23fc</guid>
      <description>&lt;p&gt;So i always wondered why i do a git push to a certain repository but notice that i see a different user as the committer, and not the account i cloned from. so the problem is this - i clone from repo A with username A1, but while doing a git push i noticed that the commit done was from username B1, even though they all belong to me but it should be username A1 with the commit.&lt;/p&gt;

&lt;p&gt;The issue is that the git credential on your local machine was set to global hence the terminal uses it for commits. so how to change that...&lt;/p&gt;

&lt;p&gt;Navigate to the git directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd &amp;lt;git directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;check for the credentials list to see the default&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here you can see the global username and email&lt;br&gt;
All you need to do is to add another username in our case here the username and email of A1&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config user.name "&amp;lt;username&amp;gt;"
git config user.email "&amp;lt;email&amp;gt;"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you want to override the default and make A1 the default&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "&amp;lt;username&amp;gt;"
git config --global user.email "&amp;lt;email&amp;gt;"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To switch to a different user credential, run the following commands with the desired user name and email:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config user.name "New Name"
git config user.email "new.email@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to switch to a global user credential, add the --global flag to the commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "New Name"
git config --global user.email "new.email@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember that the user credential settings are stored in the .git/config file within your local repository. If you want to view or edit this file directly, you can open it with a text editor.&lt;/p&gt;

&lt;p&gt;What does this solution solve, it can solve some ssh issues, some wrong user commit and some serious headache lol&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Solving MySQL Authentication Problem</title>
      <dc:creator>Debugging Rabbit</dc:creator>
      <pubDate>Sat, 06 Jul 2024 16:55:55 +0000</pubDate>
      <link>https://dev.to/debuggingrabbit/solving-mysql-authentication-problem-2p9n</link>
      <guid>https://dev.to/debuggingrabbit/solving-mysql-authentication-problem-2p9n</guid>
      <description>&lt;p&gt;The Problem: Connecting a Java App to MySQL&lt;/p&gt;

&lt;p&gt;One of the most recent challenges I faced was connecting a Java application to a MySQL database. The application was designed to interact with the database, but it kept failing to establish a connection. After some investigation, I discovered that the issue was related to the MySQL user authentication method.&lt;/p&gt;

&lt;p&gt;The Solution: Updating the MySQL User Authentication Method&lt;br&gt;
To resolve the connection issue, I followed these steps:&lt;br&gt;
Open the MySQL prompt using the sudo command:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
sudo mysql -u root&lt;/p&gt;

&lt;p&gt;Switch to the mysql database:&lt;br&gt;
sql&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;USE mysql;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Update the user table to change the authentication method for the root user:&lt;br&gt;
sql&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UPDATE user SET plugin='mysql_native_password' WHERE User='root';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Flush the privileges to apply the changes:&lt;br&gt;
sql&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FLUSH PRIVILEGES;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exit the MySQL prompt:&lt;br&gt;
sql&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Restart the MySQL service:&lt;br&gt;
bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service mysql restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After following these steps, the Java application was able to successfully connect to the MySQL database, and I could continue working on the project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd my-java-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mvn clean install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Starting the JAR Application&lt;br&gt;
Navigate to the target directory of your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the generated JAR file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;java -jar my-java-app-1.0-SNAPSHOT.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My Journey with HNG Internship&lt;br&gt;
As I embark on my journey with the HNG Internship, I'm excited to tackle more complex backend challenges and learn from experienced mentors and peers. The internship provides a unique opportunity to gain practical experience, build a portfolio, and potentially secure a job in the tech industry.&lt;/p&gt;

&lt;p&gt;The HNG Internship is a remote internship program that offers training and mentorship in various tech tracks, including backend development. By completing the internship, participants can earn certificates and potentially secure job opportunities with partner companies. To learn more about the HNG Internship, visit their website at &lt;a href="https://hng.tech/internship" rel="noopener noreferrer"&gt;https://hng.tech/internship&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I'm eager to apply the problem-solving skills I've developed to real-world projects during the internship. By the end of the program, I aim to become a proficient backend developer and be well-prepared for a career in the tech industry.&lt;/p&gt;

&lt;p&gt;If you're interested in learning more about the HNG Internship and the opportunities it offers, visit &lt;a href="https://hng.tech/hire" rel="noopener noreferrer"&gt;https://hng.tech/hire&lt;/a&gt; or &lt;a href="https://hng.tech/premium" rel="noopener noreferrer"&gt;https://hng.tech/premium&lt;/a&gt; to explore the available tracks and resources.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mobile Development HNG</title>
      <dc:creator>Debugging Rabbit</dc:creator>
      <pubDate>Sat, 06 Jul 2024 16:44:01 +0000</pubDate>
      <link>https://dev.to/debuggingrabbit/mobile-development-hng-3h4d</link>
      <guid>https://dev.to/debuggingrabbit/mobile-development-hng-3h4d</guid>
      <description>&lt;p&gt;My Journey to Becoming a Mobile Developer with HNG Internship&lt;/p&gt;

&lt;p&gt;As an aspiring mobile developer, I'm happy to start a career by joining the HNG Internship program. In this blog post, I'll share my excitement about learning Flutter, a popular mobile development platform, and explore the common software architecture patterns used in Flutter apps.&lt;/p&gt;

&lt;p&gt;Flutter: The Future of Mobile Development&lt;/p&gt;

&lt;p&gt;Flutter is a cross-platform framework that allows developers to create high-performance, visually attractive, and natively compiled applications for mobile, web, and desktop from a single codebase. With its growing popularity and strong community support, Flutter has become a go-to choice for many developers looking to build modern and responsive mobile apps quickly.&lt;/p&gt;

&lt;p&gt;Software Architecture Patterns in Flutter&lt;br&gt;
When it comes to building Flutter apps, developers often rely on various software architecture patterns to structure their code and ensure maintainability, testability, and scalability. &lt;/p&gt;

&lt;p&gt;Here are a few common patterns used in Flutter development:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Bloc (Business Logic Component)&lt;br&gt;
Pros: Separates business logic from the presentation layer, making the code more testable and easier to maintain.&lt;br&gt;
Cons: Can lead to boilerplate code and requires a learning curve for developers unfamiliar with reactive programming.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provider&lt;br&gt;
Pros: Simple to implement and understand, with a straightforward API for state management.&lt;br&gt;
Cons: May not scale well for complex applications with multiple levels of nested widgets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Riverpod&lt;br&gt;
Pros: Provides a more modular and testable approach to state management, with features like dependency injection and code generation.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cons: Requires a shift in thinking for developers used to traditional state management approaches.&lt;/p&gt;

&lt;p&gt;My Journey with HNG Internship&lt;br&gt;
As I embark on my journey with the HNG Internship, I'm excited to dive deeper into Flutter development and learn from experienced mentors and peers. The internship provides a unique opportunity to gain practical experience, build a portfolio, and potentially secure a job in the tech industry.&lt;/p&gt;

&lt;p&gt;The HNG Internship is a remote internship program that offers training and mentorship in various tech tracks, including mobile development. By completing the internship, participants can earn certificates and potentially secure job opportunities with partner companies. To learn more about the HNG Internship, visit their website at &lt;a href="https://hng.tech/internship" rel="noopener noreferrer"&gt;https://hng.tech/internship&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I'm eager to put my skills to the test and contribute to real-world projects during the internship. By the end of the program, I aim to become a proficient Flutter developer and be well-prepared for a career in mobile development.&lt;/p&gt;

&lt;p&gt;If you're interested in learning more about the HNG Internship and the opportunities it offers, visit &lt;a href="https://hng.tech/hire" rel="noopener noreferrer"&gt;https://hng.tech/hire&lt;/a&gt; or &lt;a href="https://hng.tech/premium" rel="noopener noreferrer"&gt;https://hng.tech/premium&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Join me on this exciting journey to becoming a skilled mobile developer through the HNG Internship program.&lt;/p&gt;

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