4 ms·
Joined a code base and all I see are bugs ( eg. Casting bugs are easy to find) + logic errors. I think good programming is how much wtf/ minute you have, when
by NicoJuicy 8y ago
Joined a code base and all I see are bugs ( eg. Casting bugs are easy to find) + logic errors.
I think good programming is how much wtf/ minute you have, when you read the source.
I'm normally easy to talk to, but I'm having difficulty for that now because:
- fixing a simple bug leads to a rabbit hole of fixing bugs.
- no seperation. Something can influence something everywhere. It's nuts, eg. A text explanation on a enum ( state) has been added in the businesslayer and transformed 3 times before it reaches the frontend. ( I removed all those texts to show only on the view with the appropriate conditionals)
- code is unreadable -> too much time spend in debugging
- a bug was fixed when it did something wrong, instead of looking for the root of the problem. So actually fixing a bug correctly creates a new bug, because it has already been fixed 2 times on different places. Just the root case was never fixed before.
- ...
All in all, solving a bug is tedious. Fixing it the right way, creates so much bugs, because previous workarounds for probably the same/similar bug everywhere around.
I'm pretty sure that good programming leads to better communication.
And bad programming leads to a clusterfuck of problems
- noir_lord 8y agoThat sounds too much like the code base I inherited, it gradually wears on you.
- jm__87 8y agoMaybe I've worked with bad code for too long, but my opinion is, being the one person who understands some clusterfuck of poorly designed and hard to read code is job security and improving it can be satisfying. Reducing coupling, making a codebase more readable, rewriting code to make it more unit testable, or making a given piece of code run faster I find to be satisfying and educational. You learn from direct experience a myriad of ways in which not to do things and exactly why not to do them, and you can use this information going forward when you write your next feature.
- slavik81 8y agoIt can also be incredibly frustrating. There's a human reason the code is a mess, and unless that situation changes, the code will rapidly revert to a mess no matter how clean you make it.
- jm__87 8y agoNot necessarily. At least in my experience, most people want to improve their coding skills and if you build a good relationship with your coworkers and have a track record of putting out good work, then you'll be in a position to offer up suggestions on how everyone can improve.
- slavik81 8y agoWhen the underlying problem is a lack of knowledge in the group, it can be easily fixed by the introduction of someone with the neccessary knowledge. In that case, you are solving the human problem. That's one of many possible reasons for why the code is a mess.
- jm__87 8y agoI can only really see a few possibilities here: 1. Lack of knowlege in the team. 2. Being asked to do something too quickly (or the technical team not asking for enough time up front). 3. Being asked to do something dumb and giving in. The second point happens everywhere to varying degrees, so I just see it as part of the job description of being a developer. You will always have to fight for more time since everyone who requests you to build something wants their software features now and not tomorrow. Points 1 and 3 can usually be solved with better communication and some education. All of these problems are solvable assuming the management of the team understands these problems occur and is on the same page as the people implementing the software. If that isn't the case and the management isn't going to listen to the devs, I think that is one of the few situations where it is time to just find a new job. Possibly this is more common than not and I have been lucky enough to only experience one manager who was this stubborn and ignorant.
- yakubin 8y ago
- kbouck 8y agoI've heard the book Working with Legacy Code [0] recommended for strategies to bring order to these kind of projects. Haven't read it myself yet... [0]: https://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052/ https://www.amazon.com/Working-Effectively-Legacy-Michael-Fe...