When writing code, it's like writing a story. A good story is easy to read, and you understand what's happening right away. The same goes for code!...
For further actions, you may consider blocking this person and/or reporting abuse
In general I try to make my code readable and clean in the sense that it follows a consistent pattern that others can follow and replicate. (edit) patterns like SOLID can help accomplish that goal. Great tips, always stay learning! :)
Best wishes keep maintaining best practices
Thank you! :)
Moreover, it will be easier to change when the number of months will change. (Who knows? Maybe a new French Revolution will introduce 13 28-day months) 😉 (Sorry, I couldn't resist)
Good article!!!! I have a question though.Does refactoring violate the open-closed principle of the SOLID principles?
@hectorw_tt No refactoring does not violate the open-closed principle of the SOLID. The OCP says software should be "open for extension but closed for modification." When you refactor, you're not adding new features or changing the code's behaviour. Instead, you're just improving the existing code to make it cleaner or more efficient without altering how it works. So, refactoring is still "closed for modification" because it doesn't change the functionality, it just makes the code better.
Those are great tips. I'm doing this most of the time I work on projects.
@andrewbaisden that's great. I'm open to work and collaboration feel free to knock me.
Personally the hardest tip for me to maintain is keeping functions small and DRY principles especially when your code interacts with external objects like an API or a network
Every point is to the point!
Thanks
I love this article. Thanks for sharing.
Thanks