Question for experienced programmers.
I am in the beginning of my career (3 years in, Mid Backend Engineer).
I just inherited a large project (52297 lines of python code) that was built by a few developers who just left the company. I'm in the process of fixing bugs (and learning about the code altogether).
Every time I'm working on a bug, I just want to re-write the whole thing since the approach prev. devs took feels so bad. Obviously I can't do that, so I end up duct taping the existing thing. This is killing me.
So, here is the question:
1. In your engineering careers how often do you have to deal with shit code other people wrote?
2. If so, how do you deal with it? Psychologically and physically.
3. Are there any resources online that can help me structure my thoughts around this problem.
Thanks a ton in advance.
When working on a new code base of that size, figure out how old it is, and how the requirements changed over time. It might be more likely your don't see the big picture of why things are done and structured the way they are. obviously, it would be great to have someone around to ask why every time your see something that doesn't make sense or seems overly complicated or backwards. You don't have that luxury. But try to get to know the code more.
Sure, you might be right and the code is just complete garbage, but I'm just reminded of how third semester CS students also know everything better as soon as they learn some pattern X and consider it the best and only way to do things. :-)