Summary of Craft of Software Engineering
My learning focus is to write readable codes. From this course, I have learnt the definition, the importance, the practices of code readability. Additionally, by reading good samples and refactoring my own bad code, I improved the code readability of mine a lot. I think this experience will improve my coding skills during my entire career.
Find my weakness
I reviewed my code and found it a little hard to read and understand. So I found some variable names are meanless and there are too many duplicated lines of code.
Find samples and standards to follow
My favorite language is Java and so the sample I choose is the JDK source code. Following the code convention of JDK, the javadoc can be generated automactically.
The regular class in JDK looks like:
Mentor
To discover the code readability, I need to find a skilled programmer to read my code. I found a mentor who is a google engineer, Shelton. Shelton reviewed my code and gave me many suggestions.
Comments for everything.
Remove duplicated(DRY)
Code comparibility
Don’t print unrequired results
Add source of the block of code
Add explanation of long function
Refactor
Follow the suggestions from Shelton, I refactored the code.
Details: https://github.com/Gonghan/PublicationParser/commits/master
I found nine defects in the original code.














