Hacker News new | ask | show | jobs
by shortoncash 2601 days ago
I work at a place where the culture is definitely "everybody should tidy this up" and it never changes, or it changes very slowly. What I'm finding though is that there's no real defense against this kind of culture other than to be really tight about hiring. So, to your point, if you came to my company asking to look at source, it'd be a good thing -- particularly since so few people actually do it.
1 comments

If the responsibility lies with everybody, nobody will do it[1]. There must be some rule or process whereby the job of tidying up something becomes a specific person's job - be it if they are committing changes to the same file, or whatever.

[1]: https://en.wikipedia.org/wiki/Tragedy_of_the_commons

I believe in the code dictator model also. However, the code dictator takes a lot of heat over style opinions. What I see is that, when the dictator emerges, he still has to build coalitions out of people with different skills and different backgrounds. If there's a pool of mediocre or average developers, that is very hard to work around. Only the new people being added can really come pre-loaded with the right code-culture attributes. With non-new people, everyone has to be convinced about the code dictator's approach. This is just not a frictionless process.
not necessarily. if we're all working on a code base and reviewing each others work, and we all value cleanliness, things can reach an ok steady state.

you have to establish a cultural habit of tidying up a little when you're in there. often accompanied by a 'wow thats much better, thanks for doing that'.

more importantly you have to foster a sense of ownership. a common issue with the worst organizations I've worked with is fear and lack of understanding. the code isn't something we're shaping together - its just some large and awful monstrosity that bites you every time you get near it. every time you start pulling at a thread the whole thing unravels.

so you restrict your scope to as narrow a window as possible, and make the smallest changes you can to fix the bug or add the feature.

its the difference between living in a pleasant little village or a squalid favela.

You expressed what I was trying to get at so perfectly and so much better than I ever did.

This is what I'm talking about. Not just "Hey can I see your codebase? Oh, you don't have 100% test coverage and I've seen some variable names that don't make sense, no thanks bye", which I feel is how some people have interpreted my post but I probably could have made that more clear.