DEV Community

Cover image for Spaghetti code
Baha chammakhi
Baha chammakhi

Posted on • Updated on • Originally published at

Spaghetti code

I’ve been lately working on a mobile application backend I am gonna talk on the next posts the problems I faced, things I learned.

Alt Text

In this post, I am gonna talk mainly about code quality the main task was to add some features to the project but suddenly I found my self blocked because of the poor spaghetti code written by the devs before me, the solution was refactoring and repeating a big part of the application.
Things I learned :

  • Code quality is a priority in creating products👨🏻‍💻
  • make your code readable and easy to understand by refactoring.
  • Follow pattern designs it will make your code better .
  • A bad code quality feels like he'll for a developer so please don't ship a bad code.🥵

Top comments (2)

nombrekeff profile image

I feel you, man...

I've been in this situation for more than 2 years and still haven't been able to fully refactor the app.

We calculated the tech dept for the project, it was something like 3.6yrs for a 1yr old project... crazy...

Since this project, I've been really appreciative of good code and design patterns, and try and make mine as good as possible so the next person won't need to go over all the shit I had to deal with in this project.

One thing worth mentioning is, that we can only assume why the project became that way. Our first instinct would be giving shit to the previous devs... but maybe they were forced into working this way, maybe short deadlines, maybe bad communication, maybe the app was badly designed from the getgo... maybe the management was not appropriate... etc...

bahachammakhi profile image
Baha chammakhi

Thats what happened to me since i spent a lot of time refactoring this application I just made a decision to never write code to just make something functional.
Off its not always devs fault as you said deadlines makes you write bad code too.