We want two documents:
We want developers to use these documents as a reference and to uphold the values they instill.
For the code quality, that doesn’t mean we are gate-keepers trying to ‘enforce’ these as hardened rules. These should be seen as guidelines and best practice recommendations.
For the document to define how developers behave, see further below for my thoughts on that (i.e. the section “What level of authority does it carry?”)
Simply: developers can open a “pull request” on either document and from that start a discussion around the change they wish to make.
We would want to document a template for when opening a PR (so we ensure both consistency, as well as a well thought out proposal). What goes into that template will need to be discussed and agreed upon by tech leads/architects.
As mentioned in the section “What do we want to achieve?”…
To inform developers on how they should behave and conduct themselves within a professional organisation
As mentioned in the section “What do we want to achieve?”…
To inform developers on what is considered to be good code design/architectural choices
Authority depends on the document being discussed…
Authority could mean two things here:
For the ‘trust’, this should come from the collective agreement between tech leads and architects that the items listed are good and should be adhered to wherever possible.
For the ‘enforcement’, we can’t realistically enforce teams to follow these concepts. Nor can we expect a tech lead to have their eye over every piece of code that gets committed to master; so we can’t expect to enforce this on even a ‘team by team’ basis.
The best we can hope for, or at least work hard towards, is a pro-active engineering culture where we all think and do the best we can on the project/code we’re working on/with. So following these guidelines then becomes a healthy/positive experience.
The values should be enforced by the BBC and the engineering manager or someone like Robin Pembrooke (Head of News).
We should take these values seriously and every member of every team should be able to recognise when they’re being violated and take responsibility for members of our own teams. Yes this is a big ask for some people, but you can’t have one person (e.g. a tech lead) trying to handle this by themselves; least of all because they won’t be around all the time to see it happening.
It should be written by tech leads and architects, with contributions from the developers.
Any amendments or new additions should be discussed and at least collectively agreed upon by the tech leads/architects. But at least this will be an open discussion that developers can be involved with and feel they’re able to impact upon the outcome.
As mentioned in the section “What do we want to achieve?”…
We want developers to use these documents as a reference and to uphold the values they instill
The more both documents are viewed and looked at, the more common place their values will become and the need to reference them becomes less (that’s the dreamy ideal at least).
There are a few different types of programming languages and each has their own idioms and best practices. It would be appropriate to first identify what these types are so you can recognise roughly where your language sits.
Imperative programming: telling the “machine” how to do something, and as a result what you want to happen will happen
Go is a language that is imperative in nature as some abstractions - such as
Array#map
- are removed from the language and means it tends to encourage a particular explicit, concrete, and imperative programming style
Declarative programming: telling the “machine” what you would like to happen, and let the computer figure out how to do it
Functional Programming and abstractions such as
Array#map
instead offor
allow us to focus on what we want to happen rather than how
Structured programming: makes extensive use of subroutines, block structures, for
and while
loops etc
Object-Oriented Programming is an extension of this
None of the following are concrete recommendations. Just ideas, things for you and your team to consider.
Some of these will be cliches and others painfully obvious, but such is life
Aim to…
Aim to…