always assume good faith

Caio Tiago Oliveira caiotiago at colivre.coop.br
Tue Jun 24 23:57:50 BRT 2014


On 06/23/2014 03:30 PM, Bráulio Bhavamitra wrote:
> I was not referring to aesthetic issues, and I don't understand
> what made you think that I was. A lot of actual problems can be
> detected by reading the code. The large majority of the
> PatchGuidelines topic (which you didn't write by yourself by the
> way) is *not* about aesthetics.
> 
> 
> Even though, in practical terms a consistent coding style helps 
> maintainability in practical terms (and checking for it can be
> automated so we don't need humans wasting time with it).
> 
> Agree. I touched this point because I don't like when developers
> try to impose their coding style or the exact way and place of
> doing something. That's part of the sense of property developers
> have upon their code, and that sense usually harms more than helps
> the code to evolve. If the final user is benefited and the code
> doesn't break others' code, than it is OK to have it.


Wordpress example[1]:

<<<<< START
Why have coding standards? #

Coding standards help avoid common coding errors, improve the
readability of code, and simplify modification. They ensure that files
within the project appear as if they were created by a single person.

Following the standards means anyone will be able to understand a
section of code and modify it, if needed, without regard to when it
was written or by whom.

If you are planning to contribute to WordPress core, you need to
familiarize yourself with these standards, as any code you submit will
need to comply with them.
END >>>>>>>

Again, another example from wordpress[2]:

<<<<<<< START
Some parts of the WordPress code structure for PHP markup are
inconsistent in their style. WordPress is working to gradually improve
this by helping users maintain a consistent style so the code can
become clean and easy to read at a glance.
END >>>>>>>


Other source code projects, just like Mozilla[3], LibreOffice[4].
Gnome[5], Linux[6], Qt[7] do the same thing.

They do that because they need it, otherwise it would be impossible to
maintain the code. They aren't treating the code like a newly created
robot, where some deformity would destroy the world.

To edit a code with various coding styles mixed is a pain, but codes
which *just work* and are just a huge mess are a critical fault for
the project. Having codes which *just work* will increase the
maintenance costs and it might increase up to the infinity.

I have written patches for Mozilla which were rejected twice just for
coding convention issues and I ought to fix them, otherwise the code
wouldn't be incorporated, and I actually understood and liked it.

The owner of the code won't matter, but everyone must speak the same
language, otherwise you will get a babel tower.
Just try to join any project with more than three thousands lines of
code and submit a code with every aspect of coding style messed up.
Try and see which project would accept it.




1 - http://make.wordpress.org/core/handbook/coding-standards/
2 - http://make.wordpress.org/core/handbook/coding-standards/php/
3 -
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style
4 - https://wiki.openoffice.org/wiki/Cpp_Coding_Standards (they
haven't migrated from the old wiki)
5 -
https://help.gnome.org/users/programming-guidelines/stable/c-coding-style.html.en
(that's a general handling for most Gnome projects, each one has its
own rules)
6 - https://www.kernel.org/doc/Documentation/CodingStyle
7 - http://qt-project.org/wiki/Qt_Coding_Style



More information about the Noosfero-dev mailing list