
Let’s be honest, every developer (yes, even the ones with years of experience) has shipped messy code at some point.
Writing clean code isn’t some...
For further actions, you may consider blocking this person and/or reporting abuse
Good article, I wrote a similar one, but regarding commits, here is the link
Oh great, I'll check it out! And thank you.
Shouldn't point 4 be:
if (count < 0) {
count++;
}
Example in point 6, makes no sense?
Good observation! The intent behind the example was to prevent the count from decreasing below zero, which is why it checks if
(count > 0)
. If the goal were to increment when the count is negative, your suggestion would be spot on. But in this case, it's about ensuring it doesn’t go below zero.I had the same thought, that the two examples were not the same, but neither is this. If counting up, why would count be less than 0? You counting to 0?
The example is meant to handle scenarios where the count might already be negative due to prior operations or external factors. In such cases, ensuring it doesn’t decrease further helps maintain logical consistency. Thanks for weighing in.
Nice Article
Thank you!
Nice one
Thank you!
I felt exposed in some aspects😅
I will do better, I promise
Haha, we’ve all been there! The fact that you’re thinking about it means you’re already ahead. Keep going!
Informative
Thank you!
It is SOO!! Hard to get people to understand these principles. I constantly hear things like. "If it aint broke dont fix it". "Oh you just dont understand business" blah blah blah. And you always get new people in there trying to show you how "to get it done", when all they are doing is making a mess of things.
Good point! Maintaining a well-structured and high-quality codebase is crucial, not just for the current team but also for future developers. It ensures better readability, maintainability, and scalability. It also reduces a lot of pain as our codebase grows.
Good article
I think it's just readable
I feel attacked 😭
Thanks you so much for this!