# Code Review
Before opening a merge request
1. Code compiles with no errors.
2. New code doesn't break existing code.
3. Useful comments in code.
4. Self localhost test on acceptance criteria verified.
5. Never commit any personal key or self debugging purpose code like "fmt.Print()", debugger", "alert()", "console.log" etc.
6. Review how the application is generating logs.
-> Are the logs 'useful'? If not then remove them
-> Are you spamming with logs?
7. When add new dependencies.
-> Make sure only released version of dependencies is used. Never use any beta or alpha version
8. Branch name and commit comment.
-> Make sure is meaningful and relevant.
9. Any DB table/function/SP changes and default value added must commit into phachanbin->migration folder under relevant file.
10. New API performance especially on new query part
-> test the query performance and put indexing if neccessary (need judge correctly)
-> able to address and prevent possible slow query
11. Variable naming has to be meaningful (easy to understand)
-> for example boolean data type start with "is" or "has"
-> must relavant to it real usage
-> prevent too long variable name
12. If add new DB table/column, choose appropriate data types to improve performance and data integrity
13. Add nolock for new query (need judge correctly)
-> reduce waits or deadlocks risk