One convention we don't have is for the ordering of functions in a module.
Everyone understands that the public ones go above the private ones. As the bulk of our code follows a service pattern this makes it simple
function go () {
// Do something
}
// everything else in the service!
But it's that 'everything else' where things are not being done consistently. It's either alphabetical, by weight (importance to the module), by call order, or let's be honest, by when we thought to create the function! 😂
One of our aims as a team is to remove any barriers from those new or less experienced to be able to contribute. Inconsistencies like this can cause someone to be uncertain about where and how to make a change.
So, we need a convention and we need to add it to our guide.
As our current 'benevolent' ~dictator~ Tech Lead I'm selecting the alphabetical as our decision going forward. But happy for anyone to refute that, as long as they can document their preferred method sufficiently! 😁
One convention we don't have is for the ordering of functions in a module.
Everyone understands that the public ones go above the private ones. As the bulk of our code follows a service pattern this makes it simple
But it's that 'everything else' where things are not being done consistently. It's either alphabetical, by weight (importance to the module), by call order, or let's be honest, by when we thought to create the function! 😂
One of our aims as a team is to remove any barriers from those new or less experienced to be able to contribute. Inconsistencies like this can cause someone to be uncertain about where and how to make a change.
So, we need a convention and we need to add it to our guide.
As our current 'benevolent' ~dictator~ Tech Lead I'm selecting the alphabetical as our decision going forward. But happy for anyone to refute that, as long as they can document their preferred method sufficiently! 😁