The King of Code Style
At Inaka, we self-select to be people who love what we do. When you love something, you want to do it right. For the programming team, that means that the code you write and work with should be the best possible, within time constraints and team member ability.
We won't discuss the meaning of pure art, the origin of aesthetics, or John Dewey's Pragmatism, but for us, we think code is 'beautiful' when it not only activates the part of your brain that smiles when you look at the Mona Lisa, but also the part that thinks how much technical debt you have to deal with on your next sprint.
That part, the one that knows when an expression, object or module API is "right" because of the far-reaching effects it will have on code maintainability, is born out of experience (and a wee bit of borderline pseudo-OCD). You stop writing god modules after you've had to maintain one. You know when you have one case expression too many when your eyes glaze over looking for the place that variable was bound to its value.
The erlang community is growing, but it's still small. It's sometimes hard to find people that share our viewpoint and can sling erlang code from the hip, so we try and train new hires. This means that sometimes, some of our team members don't have the benefit of 20 years of erlang experience, and make decisions regarding code without even knowing they are doing so.
For these reasons, we've put together a document with the rules and guidelines we follow at Inaka: Erlang Standards (https://github.com/inaka/erlang_standards). We know they are not universal, but we share everything in the hope that it will be useful for somebody. We try to justify the guidelines, so they are more readily accepted without the experience behind the justification.
You can't keep a hundred rules in your head when writing code, especially if you're thinking about how to match that record field in this function header. So we wrote a tool similar to Ruby's Hound, and named him Elvis (https://github.com/inaka/elvis), 'cause he ain't nothin' but a hound dog. Elvis comments our github pull requests, pointing out when we stray from our own rules. Not all of them are checked, as some are, ahem, more vague than others. But writing him was really fun, and as he is configurable, we hope he is useful to you too.
Compile it, test it, fix it, rebase it, build it, ship it, mass-deploy it. Code on!