Live data from Hacker News

The code culture problem

fraustollc.com

1–10 of 162 posts

Re: The code culture problem

#2
Point taken - it's very easy to feel like someone else's code is bad if it's hard to understand or does something in a way you think isn't the best, or even good. Maybe being nice is helpful sometimes.

On the other hand, sometimes code really is just shit. Being positive and saying "this is a good start, let's go through it and see if we can improve upon it" might be a massive waste of time if it's really shit. Sometimes holding people to high standards is necessary so the whole team doesn't get held back.

Re: The code culture problem

#3
post #2

Point taken - it's very easy to feel like someone else's code is bad if it's hard to understand or does something in a way you think isn't the best, or even good. Maybe being nice is helpful sometimes. On the other hand, sometimes code really is just shit. Being positive and saying "this is a good start, let's go through it and see if we can improve upon it" might be a massive waste of time if it's really shit. Somet…

I would take your point forward and say if the code is hard too read then is it shit.

There is a reason that you are reading it: you are maintaining it, adding a feature or trying to fix a bug. If it is not easy to read then it makes this harder and that makes code bad and increases the chances of the editor making a mistake and breaking the system. (Or just making your day bad).

Re: The code culture problem

#4
I totally agree, somehow our alpha macho instinct likes to come up and show everyone else how much we know better. Worst of all, this attitude is well rewarded on some circles.

The above said, sometimes code is really shit!

Re: The code culture problem

#5
post #2

Point taken - it's very easy to feel like someone else's code is bad if it's hard to understand or does something in a way you think isn't the best, or even good. Maybe being nice is helpful sometimes. On the other hand, sometimes code really is just shit. Being positive and saying "this is a good start, let's go through it and see if we can improve upon it" might be a massive waste of time if it's really shit. Somet…

That is a fair point. And to be clear I'm not saying there is not shit code out there, because there is. I'm arguing against a type of culture that praises negativity rather than contributions.

Re: The code culture problem

#6
The other, darker side of this culture is that you're not calling the code shit, you're actually calling out the author of that code as shit.

Sometimes, it is not really in the code or in the design. Some people are just downright evil.

Re: The code culture problem

#7
A factor I think the article doesn't point out clearly enough is how the main attraction of dissing code is that it serves as an ego-defense mechanism. Understanding code is, almost without exception, challenging. It's much easier on our self image if we believe the code is to blame, rather than us.

An unfortunate side effect is that this perceived badness of the code is then often used as an excuse to not really try and understand it at all ("let's rewrite!" or "we don't touch that anymore").

Re: The code culture problem

#8
post #2

Point taken - it's very easy to feel like someone else's code is bad if it's hard to understand or does something in a way you think isn't the best, or even good. Maybe being nice is helpful sometimes. On the other hand, sometimes code really is just shit. Being positive and saying "this is a good start, let's go through it and see if we can improve upon it" might be a massive waste of time if it's really shit. Somet…

I can't imagine any reason to not be positive and constructive, no matter how bad the code is.

If the code is bad, then improve or replace it, and do your best to help that developer improve his own skills, so this wont happen again.

If code output is constantly bad, then fire the developer, but there's also no reason to be condescending here.

I just can't see that treating a developer (or anyone else) like shit is going to have any positive outcome considering the current market for developers, where demand is much higher than supply.

Re: The code culture problem

#9
There are also many other factors that come into play when developing code, particularly if it's as part of a team working to a schedule, that have nothing to do with technical competence. In agile development you always prize something working over something pretty and the business need is firmly in the former camp so the pressure to improve code existing is alway balanced against adding 'value'. None of which is visible when you are confronted by a snapshot of the code.

However, sometimes code is just shit.

Re: The code culture problem

#10
Behold, the aftermath of the brogrammer.

What was seen here is a particularly insidious, caustic and ultimately, demoralizing and self-defeating attitude from your colleague (and something I've seen routinely on HN). I don't particularly think he was in any way truly convinced that it was deserving of it, however it must be thrashed in accordance with a self selected pecking order in order to assert his dominance.

This "politeness is rubbish" attitude which also applies to common niceties in communication will one day be the death of us all.[1]

There is truly awful code out there and it doesn't deserve commentary or any other sort of attention. Just a yanking and replacement with good code.

[1] Politeness devoid of sincerity is not politeness. It is in fact the worst of all forms of rudeness.

Post reply on HN