inaka/erlang_guidelines — pull request #33 by elbrujohalcon (2014-12-16 20:40:50+00:00)
Title: Record Definition Placement

##### Place record definitions before any function bodies

ll records that are used within a module should be defined before any function bodies. If a record is used in more than one module, the definition must be moved into a shared header file. Record and field names must comply to the naming conventions for atoms. Each field must be written in a separate line and have an Erlang type specification.

> Do NOT do this!

```erlang
%% bad
horrible_erlang_code() ->
just_awful.

%% good
-record(some_rec, {
id :: string(),
name :: string(),
description :: string(),
history :: list()
}).
```

##### reasoning
I swear I heard Joe mutter this while taking a nap at the office.