<?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>Forem: Shivam Sharma</title>
    <description>The latest articles on Forem by Shivam Sharma (@shivam_sharma_4e90e350a09).</description>
    <link>https://forem.com/shivam_sharma_4e90e350a09</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%2F3899316%2Fdde221d5-c53e-494f-a2f1-51ab8f686ca4.jpeg</url>
      <title>Forem: Shivam Sharma</title>
      <link>https://forem.com/shivam_sharma_4e90e350a09</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shivam_sharma_4e90e350a09"/>
    <language>en</language>
    <item>
      <title>Freshers Mistakes part- I</title>
      <dc:creator>Shivam Sharma</dc:creator>
      <pubDate>Sun, 26 Apr 2026 20:33:39 +0000</pubDate>
      <link>https://forem.com/shivam_sharma_4e90e350a09/freshers-mistakes-part-i-1ig2</link>
      <guid>https://forem.com/shivam_sharma_4e90e350a09/freshers-mistakes-part-i-1ig2</guid>
      <description>&lt;p&gt;&lt;strong&gt;# 🚨 I Lost My Entire Backend Code 2 Days Before Submission (A Fresher’s Mistake)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkfvalpkdllm79qay8jq2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkfvalpkdllm79qay8jq2.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Hi connections,&lt;/p&gt;

&lt;p&gt;As freshers, we face different types of failures and successes. In that process, we do many activities, and all of them give us some learning and warnings. In my journey as a fresher, an incident also occurred recently.&lt;/p&gt;




&lt;h2&gt;
  
  
  💻 The Incident
&lt;/h2&gt;

&lt;p&gt;The incident is like this: for my college project, I had been working on developing the backend system for my project &lt;em&gt;ArogyaNaxa&lt;/em&gt; for around 2 months. It is based on microservices architecture and has 14 APIs, along with a Gateway, Auth service, and business logic APIs.&lt;/p&gt;

&lt;p&gt;When it was built around 70%, I made a copy of that backend system to move further with new changes until 100% completion. When it became 100% successful along with API testing, at that stage I had all 14 microservices including Kafka, Redis, and a single entry point as a gateway.&lt;/p&gt;

&lt;p&gt;For all this work, I was using Git and GitHub for code review and code storage.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 Integration Phase
&lt;/h2&gt;

&lt;p&gt;Now, the next step was to integrate the backend with the frontend. I am a person who has more interest in developing backend systems rather than frontend and integration work, so I used Kiro for integration work.&lt;/p&gt;

&lt;p&gt;I gave a detailed prompt to Kiro to integrate the frontend and backend. Then the agent started analyzing my 14 APIs code with the frontend structure. It takes time, so I thought to push the backend code to the repository.&lt;/p&gt;

&lt;p&gt;I tried to push, but I got an error because the repository already had frontend code, and one or two APIs were the same as those used in my previous project, which were already pushed to that repo.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚠️ The Mistake
&lt;/h2&gt;

&lt;p&gt;So, I copied those errors and pasted them into GPT, and it suggested removing the &lt;code&gt;.git&lt;/code&gt; folder, reinitializing it, and pushing the code again.&lt;/p&gt;

&lt;p&gt;I deleted and reinitialized it and pushed the code.&lt;/p&gt;

&lt;p&gt;When I checked, I found my code was corrupted, and many APIs had lost their business logic.&lt;/p&gt;




&lt;h2&gt;
  
  
  😨 What Went Wrong
&lt;/h2&gt;

&lt;p&gt;When I investigated, I found that my 14 APIs were very large, and analyzing and integrating them took more time and exceeded the context limit of the agent, so it deleted out-of-context code.&lt;/p&gt;

&lt;p&gt;At that time, I was not aware of that.&lt;/p&gt;

&lt;p&gt;I tried my best to retrieve my code, thinking that since I was using Git, &lt;code&gt;git log&lt;/code&gt; would help me reset my working directory. But I had already made a mistake.&lt;/p&gt;

&lt;p&gt;Deleting the &lt;code&gt;.git&lt;/code&gt; folder deleted all the commit history, and the &lt;code&gt;git log&lt;/code&gt; command did not help me.&lt;/p&gt;

&lt;p&gt;That gave me a big shock at that time; it was around 4:30 AM IST.&lt;/p&gt;

&lt;p&gt;All this happened when my project submission was just 2 days away. Thinking about all this, I couldn’t sleep till 7 AM IST.&lt;/p&gt;

&lt;p&gt;When I woke up, my project members called me to verify the project report at 10 AM. They were busy doing all that work, and I kept thinking that if they knew about the current situation of our project, they would scold me badly.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔥 The Comeback
&lt;/h2&gt;

&lt;p&gt;After finishing the project report work, I came back to my hostel and started preparing to build the backend system again with some minor changes.&lt;/p&gt;

&lt;p&gt;At that time, instead of following microservices architecture, I followed monolithic architecture. Earlier, I was trying to make my APIs enterprise standard and ready to deploy on AWS, but now they were only compatible for my local server to build the system.&lt;/p&gt;

&lt;p&gt;From that day, I did not sleep for nearly 2 days and, without taking any break, just focused on building the backend and integrating it with the frontend.&lt;/p&gt;

&lt;p&gt;On the day of submission at 7 AM, I was confident that now all the functionalities were working, and we were able to present our project.&lt;/p&gt;




&lt;h2&gt;
  
  
  📌 Moral of the Incident
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Never delete your &lt;code&gt;.git&lt;/code&gt; folder; find other ways even if AI suggests it.&lt;/li&gt;
&lt;li&gt;Never use forceful Git commands like &lt;code&gt;--force&lt;/code&gt; or &lt;code&gt;--hard&lt;/code&gt; without understanding them, because they can delete commit history, and without history, &lt;code&gt;git log&lt;/code&gt; becomes useless.&lt;/li&gt;
&lt;li&gt;Building microservices-based projects is time-consuming.&lt;/li&gt;
&lt;li&gt;Building monolithic architecture-based projects is simpler, easier, and takes less time.&lt;/li&gt;
&lt;li&gt;Test cases are the backbone of any codebase. If your test cases run perfectly, your APIs will work smoothly. If you do not use test cases, you have to manually check every feature or endpoint. Writing test cases for every feature will save time and remove doubts about whether your system is working properly or not.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;📊 Below is my backend system architecture figure.&lt;br&gt;
🚀 I will share my working project in the next post.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;br&gt;
I know it’s a silly mistake, but how much maturity can you expect from a fresher?&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Writer&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Shivam Sharma&lt;/strong&gt;&lt;br&gt;
Java Backend developer&lt;br&gt;
LinkedIn : &lt;a href="http://www.linkedin.com/in/shivamsharma117" rel="noopener noreferrer"&gt;www.linkedin.com/in/shivamsharma117&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>backend</category>
      <category>java</category>
      <category>springboot</category>
    </item>
  </channel>
</rss>
