A co worker thinks enforcing basic code quality standards are worthy insights.

Posted by SqueegyX@reddit | ExperiencedDevs | View on Reddit | 301 comments

I don't quite know how to respond to this person. So I have a guy on my team who I mention basic things in a code review and he responds positively with things like "good idea". Or "yeah that cleans things up a lot". Or "That should make this easier". So you're thinking "what the issue here" right? Well things things aren't just good ideas, it's like the base level of code quality. For example: If you have a 1:1 relationship in the database it's \_incorrect\_ to leave off the unique constraint on the foreign key. If you have a function that's 350 lines long and deeply indented, it's \_incorrect\_ and needs to be broken up. If you've named your variables in a way that is inconsistent with our conventions, then it's \_incorrect\_. (Disclaimer: none of these are absolutes, there can be a good reason to break any rule, but in these code reviews at least, there was not a good reason) He takes the feedback well at the time, and is positive, and then he fixes it. But it's like he doesn't quite get that this stuff isn't just a good idea, it's the low bar that code shall not go under. He also is the most likely person on the team to need the same code review note a few weeks later about the same issue. I would excuse this from someone less experienced but we've been working together for years. So inexperience is not a real excuse.