A Difficult Problem I Had To Solve As A Backend Developer

Kenneth Igbo
4 min readJun 28, 2024

--

solving problems source: https://ccmit.mit.edu/problem-solving/

I’ve never been a fan of frontend development. To be honest, most of the time I try my best to avoid circumstances where I’d have to work as an ASP.NET/MVC developer(that’s how bad a relationship I have with frontend development).

while strictly working on backend projects, I’ve often encountered a lot of mind bugling problems like fixing bugs in your code, wondering why your code isn’t working the way you planned but soon eventually realizing you left a wrench in the engine!

yeah… all that annoying stuff that gives your eyes the red effect.

But for me personally, nothing compares to the issues I face when working as a full-stack developer, which is why this particular problem I had a few days ago was a nerve wrecker for me :( (and It’s always the little things).

To vividly describe this nerve wrecking 2 plus hours of my life, I’ll break this blog post down in order to tell the tale in detail :)

you got that part, right? “tale in detail”. (lol) Well never mind if you didn’t. Back to the topic!

The problem I encountered was related to a slow performance issue in fetching and displaying large amounts of data from a database… wish I could tell you it was that complicated but actually it was me discovering an endpoint for updating an item returns a duplicate of the updated item.

How I solved this?

Step 1:

First, I analyzed and reviewed my existing code track how the data was being fetched and processed in order to confirm if it aligned with the pseudocode.

Step 2:

Didn’t see a problem with step one, so I used the ASP.NET debugging tool to analyze the backend code and pin-point the source of the issue. I identified that the database was pulling in the required data(item), but yet the problem persisted.

This eventually led to me checking the Postgres database next, to see if the the updates where actually happening as intended.

and to my relief they weren’t, as I found out that they were actually being duplicated in the database as well. This was good news because at least I knew the problem would be in my Update Service method’s definition or in the Update endpoint of the item’s Controller. Debugging the code again, I found that I did leave a wrench in the engine, as I forgot to uncomment the code (in the item’s Controller) for assigning the ‘id’ value of the incoming data to the item’s ‘id’ property.

problem fixed right? But I was wrong, running the code again I was met with yet another problem and this time the item’s image wasn’t displaying like it was earlier. Obviously Frontend!!! And since all was working fine a while ago, I knew for sure I would have a really long day debugging this!

Step 3:

Checking the frontend Razor View files, I found the scripting code for displaying the particular item on the update page was error free.

Step 4:

The frustration that followed was really draining for me, and so I decided take a break from the screen for a while (I got used to this during my time at ALX, as it does help clear my mind when ever I get stressed on a task), on returning I decided to look up the issue on “Stack Overflow”, and there I found that often times, when you find yourself stuck in a mind bending issue of this sort, a simple “hard reload” would do the trick.

Step 5:

I executed the hard reload by Navigating to the ‘developer tools’ in the chrome browser, and after selecting ‘console’, right-clicked on the reload icon in the browser window, and then clicked on the “empty cache and hard reload” option (with both fingers crossed). And To my relief this fixed the issue.

conclusion: I was busy spending hours trying to redefine my Script code, when all I needed to do was something so little as hard reloading and clearing the cached memory. By the way did I mention I’m not a fan of frontend development… Yeah I did, still I just can’t shake it off, keep running into it from time to time. But I must admit though, eventually solving frustrating problems posed by the frontend stack (just like the backend stack), does give a very satisfying feeling.

By the end of the day, I was able to successfully solve the issues in updating and displaying the item. This experience not only improved my understanding of frontend development but it also further broadened my appreciation for the online community and also my love for team work, knowledge sharing and personal development.

About Me, and My Expectations of the HNG Internship:

I am an ASP.NET developer with a specialization in backend development. I love taking on new challenges like learning new technologies and improving my skillset as a Software developer.

My expectations are positive ones; to gain proficiency in writing more efficient codes using Industry standards and best practices, learning the ropes to thrive in an engaging work environment, as well as the humility, teamwork and work ethics needed in a goal centered work place which I believe is the hallmark of a valuable employee and recruiter.

--

--