4 ms·
If you work in a team you absolutely MUST enforce a coding standard. It better be a community standard most of developers use. All team members must use either
by valyard 12y ago
If you work in a team you absolutely MUST enforce a coding standard. It better be a community standard most of developers use. All team members must use either tabs or spaces and have IDE configured to automatically apply styles.
It will save A LOT of time later.
- VeejayRampay 12y agoI (respectfully) disagree. The editor should take care of adapting the codebase to the standards the programmer likes. Trying to force 20 developers into a "consistant" style only makes room for a soft consensus that doesn't satisfy anyone in the end. If we can do it for web pages (with CSS) there's no reason why we couldn't be able to do it for a source file.
- valyard 12y agoIn any IDE you can set up code formatting options. By pressing a button you are essentially applying this CSS you are talking about. You can write however you want but when saving a file you (either manually or automatically) should execute reformatting in IDE. I agree with you that having CSS-like option would be better, since code is data, CSS is formatting options. But you'd have to teach all other tools you use to work with this CSS approach. For example for git source files are just text. Git doesn't understand code semantics. For its diff routine tabs changed to spaces == every line of code changed. There's no much use for a VCS if every commit changed everything.