Hacker News new | ask | show | jobs
by nraynaud 5210 days ago
that's what I did in my team, I want people to be able to sit next to each other, I want shared formatting settings, I don't want them to do the formatting by hands, and we have shared ownership of the code. You can only change the formatting style after discussing it with the others. I want people to remove my personal style after me, and I want to remove other's personal style in the code. Adding dependencies or libraries has to be debatted and if possible each new library should delete another one, the same with lines of code. I call it "trying to control the entropy".
3 comments

So you don't do the formatting by hand, you configure your editor of choice to do the work for you, assuming it is smart enough. If you have a group of people that use the same editor they can share this information through a developer wiki.

Sounds like you just need to have a well defined style guide rather than trying to micromanage developer habits.

What's also good is to establish a procedure to change the guidelines. It can be a source of frustration to have some funky guideline that most of the team doesn't like.
that's what the wednesday afternoon is for, changing our way of working. But we sometimes do it before. We've a problem with our python formatting guidelines, and I'll bring the issue tomorrow I think (we've to decide for spaces or tabs and camelcase or underscore, since it's not our only language, we've to arbitrage between a common rule for all our languages, or the usual rule of each language).
Enforcing formatting is good policy, and pre-installing a common editor on all workstations is certainly advisable; but enforcing the personal use a certain editor is like forcing a writer to use the editor's favorite pen, no matter how uncomfortable or cramped the writer's hands become.

From the answers:

  Yes, it's a bit of a red flag that management considers itself a better judge
  of which tools you would be more efficient with than you are.
It's absolutely different from a writer, I'm asking them to behave like a collaborative engineering team, not like a tortured drunk guy alone in a under lit room.

No 2 IDE can produce the same formatting, can store the dependencies and the running targets the same way, have the same shortcuts, etc. Therefore, you can't collaborate efficiently on the same machine.

Moreover, the only rule is that everybody uses the same, the majority can vote. Our last IDE change was initiated by a team member and multiplied the price per developer by 3

But there is a huge difference between enforcing style rules and enforcing which editors people use.

You can have different team members using different editors, but with the same style rules - and with a style checker that runs on commit/post-edit to verify the common rules are adhered to.

Enforcing which editors each team member must use to do his/her development is a form of management deciding it knows which tools each developer will be more efficient with than the developer does. It's pointless.

no, I can't, because I don't want to configure the IDE and then the style checker. And the the commit is rejected where it shouldn't have been because it could have been well formatted from the beginning and nobody cares about that because the editor does it for us (it's not totally true, since it doesn't remove useless endlines)

As far as I know different editors can't be made to produce the exact same code on automatic reformatting. And enforcing code style still doesn't help people switching keyboard, reading code or stuff like that. It's a team I'm building, not managing insulated people.

I enforce that everybody uses the same editor, if I find myself in a team where the majority votes for emacs, they'll just use emacs (and I guess I'll resign). Our last change was initiated by a team member.

Why so you need to configure someone else's IDE? Just produce a style checker ruleset (like Checkstyle) and tell team members they can use a non-standard editor if they want, but that any output that doesn't match the style checker will be rejected.

It seems to me that if you never allow anyone to use a different editor than you close your team off to the possibility of finding improved toolsets or workflows.

I don't prevent people from trying stuff, I just don't ant them to keep with a different IDE. They try it for a while, after that either we try it with the rest of the team an decide to adopt it all together or we reject it.

I don't know what is the problem. We just adopted New Relic with this method, removing pingdom + a bunch of custom stuff after someone proposed it, tried it, extended the perimeter of the trial and then it was good to go. We delete the other stuff, and it's our new common tool.

We did the same with our deployment scripts, where a guy started in his corner, but after a while we decided to go whith it and now it's out of question to use any other way to deploy an instance unless we do a collective decision to change.

Concerning the workflow, one guy tried a new testing tool, it appeared good, we now use it. That's it, everybody uses the smae testing framework, the same monitoring tool, the same IDE, the same deployment system. And they can do trial on the side, we'll extend the trial if the first guy testing the tool thinks it's a good stuff for the team and then we'll decide together to adopt it or not. Mostly if the tool is not deemed good the first time, the others won't really ear about it, and if it's good and the extended trial is good, I'll ask we delete something else if possible, try to "trade" one tool/library for another and limiting the entropy.