|
General |
|
Does the code work? Does it perform its intended function, the logic is correct etc. |
程式能正常運行,各個功能都完整。 |
|
Is all the code easily understood? |
代碼結構清晰,好好兒解釋代碼。 |
|
Does it conform to your agreed coding conventions? These will usually cover location of braces, variable and function names, line length, indentations, formatting, and comments. |
看來他的代碼跟厲害,看他的代碼學的很多了。 |
|
Is there any redundant or duplicate code? |
Generate和Compute函數的功能很多了,這兩個函數可以在模組化一些。 |
|
Is the code as modular as possible? |
沒有劃分模組 |
|
Can any global variables be replaced? |
全域變數比較合適 |
|
Is there any commented out code? |
代碼都比較乾淨找不到刪除的地方 |
|
Do loops have a set length and correct termination conditions? |
正常結束 |
|
Can any of the code be replaced with library functions? |
可以用到庫函數 |
|
Can any logging or debugging code be removed? |
沒有的 |
|
Security |
|
Are all data inputs checked (for the correct type, length, format, and range) and encoded? |
都做到了 |
|
Where third-party utilities are used, are returning errors being caught? |
未使用 |
|
Are output values checked and encoded? |
都正確 |
|
Are invalid parameter values handled? |
輸入錯的話不進行,並結束程式 |
|
Documentation |
|
Do comments exist and describe the intent of the code? |
沒有寫文檔 |
|
Are all functions commented? |
沒有寫文檔 |
|
Is any unusual behavior or edge-case handling described? |
沒有寫文檔 |
|
Is the use and function of third-party libraries documented? |
沒有寫文檔 |
|
Are data structures and units of measurement explained? |
沒有寫文檔 |
|
Is there any incomplete code? If so, should it be removed or flagged with a suitable marker like ‘TODO’? |
沒有寫文檔 |
|
Testing |
|
Is the code testable? i.e. don’t add too many or hide dependencies, unable to initialize objects, test frameworks can use methods etc. |
代碼可以測試 |
|
Do tests exist and are they comprehensive? i.e. has at least your agreed on code coverage. |
沒有設計測試代碼 |
|
Do unit tests actually test that the code is performing the intended functionality? |
沒有設計測試代碼 |
|
Are arrays checked for ‘out-of-bound’ errors? |
沒有進行數組越界檢查 |
|
Could any test code be replaced with the use of an existing API? |
沒有設計測試代碼 |