My solutions to Advent of Code 2022 problems.
I will log my journey here.
Things I have learned and practiced throughout my journey:
-
Using scanner class for parsing input
-
File structure and file/folder naming
-
Code improvements
- Adding constants and global variables
- Exception throwing instead of printing errors
- JavaDoc comments
- Later learned that these are not necessary for private functions and code that is not client-facing
- Variable naming
-
Builder design pattern
-
Reducing comments to only when they are necessary
-
Simplifying functions and classes to numerous smaller, more readable ones
- Keeping in mind the Single Responsibility Principle
- Read Robert C. Martin and Prentice Hall's Clean Code: A Handbook of Agile Software Craftsmanship A Handbook of Agile Software Craftsmanship and decided to start implementing what I have learned
- In particular
- Reducing comments
- Keeping classes and functions small
- Considering how to make my code more readable
- Understanding that my task isn't done once the code works. It is done after you are finished editing it.
- After I go through all 25 days, I will go back to my previous problems and improve them