You Are Not the Code You Write
medium.com
medium.com
A typical conversation would go something like this:
me: [suggests some stupid idea]
friend: that's stupid!
me: Huh? [pause a moment to think about it, realize he is right] Oh, yeah, that was stupid.
...and then we move on. Sometimes the last line bit might instead be
me: Huh? [pause a moment to recheck my idea, and see that it was not stupid] No it isn't!
friend [pauses a moment, realizes that he was hasty] OK, maybe it was not stupid.
...and we then consider my idea.
I find this much nicer than the way it is often done nowadays, where what you have to do is try to get the person to figure out for themselves that it is a bad idea, typically by asking them questions designed to make them think about the area where you have spotted a fatal flaw in the hope that they will eventually see it themselves.
[1] Well, not always. Once someone hacked into my account on the mainframe, found something I was working on that had some stupid bugs...and they fixed them and left. I never found out who did it. On general principle I suspect Walter Bright. :-)
I also believe that method promotes hashing it out together. Outright rejection of an idea seems to put the onus back solely on the suggester to defend the idea without having been communicated the reason. That said, communicating the reason for rejection goes a long way towards making both process more equivalent.
The nice thing about working with very smart people is that when they have one of their rare very bad ideas, they are smart enough to see it right away as soon as they see you reject the idea (assuming they think that you are reasonably bright too).
For the more common case of bad ideas that are not super bad, then yeah, there probably needs to be some discussion to work out if they need to be rejected, or if the bad parts can be fixed.
If you can keep your ego disentangled from your ideas and from how people respond to your ideas, a group can move past the occasional really bad ideas very quickly, and spent most of its time on the good ideas, or on the not good ideas that have some good things in them that can be saved.
Critic: Component X could be Y times faster if you did it this way.
What you should ask yourself: Is performance of X actually a problem that your user base cares about or has complained about? If you improved performance of X, would it help your team in the long run?
Critic: Your code for X is hard to read.
What you need to ask yourself: Is this a core component that is going to stick around forever or is it some temporary thing you slapped together that is going to be replaced in the near future? If it is going to stick around, you should definitely refactor to make it readable. Otherwise, not worth the time unless you literally have no other priorities.
Critic: I noticed this new UI component you wrote has a bug.
What you should ask yourself: Is it critical to your company/team's image to have your UI working perfectly or do your users mostly care about other functionality which is higher priority? Does the bug stop anyone from using your software properly or being able to do something they want to do?
In general I'm in total agreement with your points, but in practice this one is really hard to do well. The majority of code that did anything useful tends to stay around for a long time, whether intentionally or not."There is nothing more permanent than a temporary fix."
This is why best practices and established patterns are so important for long term productivity. They help bridge the gap between effort and quality and in general work well. They're not panacea, but the exceptional case is a different issue.
Regardless, my hope was to offer some rebuttals for bad code critics. Getting defensive at every criticism is not productive. Giving in and trying to fix everything is not a smart way to handle criticisms either since you might just be wasting time and money.
Of course, I failed at various degree's in actuality, but I also had major wins with my 'code is not an identity' general policy.
One of those wins involving the realisation that in fact, code is not me, I am not code, but what code really is, is for the User. If the user can't identify with what the code is doing, it is in fact bad code. But only when the user is involved can one really determine good/bad on any kind of scale ..
tl;dr s/code/user/
Unless you're really passionate about your work. Take this from developers and programming will become just a job.
All the things the author mentioned in this article is just a bunch of statements probably based on their personal experience.