Waarom coding style guides belangrijk zijn

Waarom coding style guides belangrijk zijn

Laatst kreeg ik de vraag waarom een coding style guide eigenlijk belangrijk is. In de inleiding van onze PHP style guide leggen we de nadruk op de leesbaarheid, onderhoudbaarheid en debugbaarheid van de code.

Gezonde groei

Dagelijks wieden, snoeien en verplanten we onze code om het gezond te houden en nieuwe features te laten groeien. Meer dan 20 ontwikkelaars pushen dagelijks honderden commits naar onze codebase van zo'n 3 miljoen regels code.

Handhaven en bewaken

Een consistente coding style draagt enorm bij aan de onderhoudbaarheid. Maar er is een andere (misschien wel veel belangrijkere) reden om een coding style te hanteren. Namelijk de broken windows theory.

In een blog van Matt Sumner las ik het volgende:

Having a style guide makes a code base feel neat. It gives the impression of a team working well together towards a common goal, rather than individual developers  working frantically and without purpose.

Working in a well-organized code base is like cooking in a clean kitchen. If things feel messy, it’s easy not to treat it with respect. If the formatting feels sloppy, it will tempt you to also be sloppy when it comes to readability, dependency management, and testing.

Inconsistent formatting is the first sign of a code base that nobody really cares about.

Waarom maken we ons druk om onze eigen en elkaars coding style? Because we care about our codebase.

Leave a comment...

Leave a comment

Italic and bold

*This is italic*, and _so is this_.
**This is bold**, and __so is this__.

Links

This is a link to [Procurios](http://www.procurios.nl).

Lists

A bulleted list can be made with:
- Minus-signs,
+ Add-signs,
* Or an asterisk.

A numbered list can be made with:
1. List item number 1.
2. List item number 2.

Quote

The text below creates a quote:
> This is the first line.
> This is the second line.

Code

A text block with code can be created. Prefix a line with four spaces and a code-block will be made.