|
General |
|
| Does the code work? Does it perform its intended function, the logic is correct etc. |
可以運行。可以實現隨機產生題目功能,無法實現判作業功能,邏輯正確,沒有大的問題。產生的題目不但寫在txt中還列印到控制台上了。 |
| Is all the code easily understood? |
用的c語言文法,稍稍有些晦澀,沒有注釋,很難過。 |
| 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? |
沒有,沒有冗餘代碼。 |
| Is the code as modular as possible? |
main函數非常長,非常非常長。 |
| Can any global variables be replaced? |
no |
| Is there any commented out code? |
no |
| Do loops have a set length and correct termination conditions? |
yes~否則就不能正常進行了 |
| Can any of the code be replaced with library functions? |
能用的庫函數都用了。在這裡,c語言貌似沒有很多現成的庫函數可用 |
| Can any logging or debugging code be removed? |
no |
| Security |
|
| Are all data inputs checked (for the correct type, length, format, and range) and encoded? |
yes~ |
| Where third-party utilities are used, are returning errors being caught? |
沒有 話說並不知道c語言有沒有出錯catch的機制,貌似沒有。 |
| Are output values checked and encoded? |
yes~ |
| Are invalid parameter values handled? |
有些沒有進行參數檢查 |
| Documentation |
|
| Do comments exist and describe the intent of the code? |
幾 乎 沒 有 注 釋 超 級 sad |
| Are all functions commented? |
no |
| Is any unusual behavior or edge-case handling described? |
no |
| Is the use and function of third-party libraries documented? |
no! |
| Are data structures and units of measurement explained? |
no! |
| 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? |
no |
| Could any test code be replaced with the use of an existing API? |
程式中沒有測試代碼 |