Developer Checklist!


When it comes to code readability and understanding, a well-documented and organized codebase is key. 

Here's a checklist to ensure your code is easier to comprehend for both yourself and others. 

Information and Comments:

- Comments should always provide value, adding insights and explanations to the code.

- In-line comments are helpful to explain the purpose and intention, especially for junior developers.


Top Comment Block:

- Clearly describe what the code does and its business purpose.

- If the code has been modified, explain the reason behind the modifications.

- Include feature/story reference numbers, original as well as modifications.

- Mention the date the class was last modified.

- Identify any related classes, flows.

- Provide the name of the developer who last modified the code.


In-Line Comments:

- Above variables, explain their purpose and usage.

- Above SOQL queries, describe why the query is needed.

- Above loops, clarify the purpose and reason behind the loop.

- Above DML statements, explain what is being committed and why.

- Above catch blocks, detail what is being handled in the exception.

- Above any limit checks, specify the limits being checked and why.


Additional Suggestions:

- Use descriptive variable and method names for better code readability.

- Break down complex sections into smaller, manageable functions.

- Utilize consistent indentations and spacing for improved code organization.

- Keep comments up to date and relevant.

- Maintain a consistent coding style for easier collaboration with other developers.

- Consider unit testing to validate your functionality.

Remember, well-documented code leads to faster comprehension, higher collaboration, and smoother development. 

0 Comments