Coding Practice
???????????? ???????[ 2013/4/11 9:50:07 ] ????????
???????????????????????д???????????????????Щ?????????????????????
????????? (Correctness)
??????????????????????????????????????
?????? (Code Structure)
???????????????????????????;??????????????????????????????????????????????????б??????????????
?????????????? ???????????????????????????????????design chart????????component????????????class?????????class???????????member function????ɡ?
????????????????? – ????????feature implementation?????У??????????diff????????????????????diff??????????????????(place holder)??
????????????????????????????????????????MVC???????????????????????UI???????????????????????
???????????diff review???????????????????????“???diff????????????????????????”
????test???????
??????????????????????д??????????(???)?????test?? 1)??????????????????????;2)?ú????????????????????????????????????????????
????test??e?class?????function???????
????test???e?class??????class?????integration?????顣
????????? (Readability)
????Readability leads to maintanence cost.
????diff???С
????bug????????ν???????????bug fix??????100?С???????????????????????????????ɡ??????????????????
???????diff??????????ó???200-300??????????????????????diff????? – split to multiple changes.
???????diff?????????????
???????diff??????????????????????????????????????????(?????git branch)???????reviewer???????顣???diff???????????£??????????????????????????????????????????Ч??????
???????function????1?? => split it?? idiot.
???????????淶
????????????????????????????????淶?????е?????2??spaces??4??;??е?????(???????80char);??????public/private/protected;??????????????;???е????;????????comments??λ??(???磬????comment??????????);??“// TODO:”????ù淶;macro??constant?????;
??????????
????????????????????style???????????????????????????guideline?????????????????????????????????
?????????????????readability.
????object-oriented v.s function-oriented
????Java???????????????????????????????????????????????????????class????д??????????????????????????£?????????????helper function.
????crispy & sufficient?????
???????????????????Щ???????????speak for itself????????????????????????????????????????????????????????????????????
????diff???????
??????master?????merge update?????resolve all conflicts
????run????????漰??test cases (???????)
?????????????reviewer???????????????飬???????????漰??????????owner????????????????????????????
???????е?manager??????subscribe?????????????????diff requests (????filtering????????????)
????code-review??????????
???????reviewer??????????diff;???б?accept??diff?????????????????????reviewer???????“?????????Щ????????????????????support”???????????
????code review ???????engineer?????????????????????Performance Review???????e??????????code review?????for both employee & manager.
?????????24С?????????????????????
?????о?????????????????????????????????? (inline comments)???????????????????????
????????????????????????????????????????????????????????????reviewer??????author?????????1???????????
????????diff????????????????3??;???????3?Σ????????????diff ???????????
????check-in?????????
??????master?????merge update????????????
????run???code change?漰????????test cases(????????????漰????test cases)
?????????????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11