I recently read "Improving refactoringCodeThe design of this book, deep feeling.
In the past, when I learned programming, I saw that the code written by others was very elegant, but I couldn't write it myself. At that time, I lamented that my level was limited. After more than three years of work, the function is faster and there are many solutions to the problem, but the code written is still so ugly. Sometimes I feel that I am not suitable for programming, and the code I write is so ugly that even if the function is implemented, I feel uncomfortable.
By chance, I read the book "refactoring to improve the design of existing code" and found a way to write beautiful code, so I immediately started to transform the code I had previously written. After the change, I found that the original looks much better. Then I fell in love with refactoring. Hope that the code you want to improve is ugly.ProgramMembers can take a look at this book (I am not an advertisement but a personal experience ).