LFE Programming Rules and Conventions

9 Common Mistakes

  • Writing functions which span many pages (see Chapter 7, "Don't write very long functions").
  • Writing functions with deeply nested if's receive's, case's etc (see Chapter 7,
    "Don't write deeply nested code").
  • Writing badly typed functions (see Chapter 6, "Use tagged return values").
  • Function names which do not reflect what the functions do (see Chapter 7, "Function names").
  • Variable names which are meaningless (see Chapter 7, "Variable names").
  • Using processes when they are not needed (see Chapter 5, "Assign exactly one parallel process to each true concurrent activity in the system").
  • Badly chosen data structures (Bad representations).
  • Bad comments or no comments at all (always document arguments and return value).
  • Unindented code.
  • Using put/get (see Chapter 6, "Use the process dictionary with extreme care").
  • No control of the message queues (see Chapter 5, "Flush unknown messages" and "Time-outs" in the same chapter).