When we write code, we are also writing a story for other developers.
Here are a few tips on how we can write code for our future selves and other...
For further actions, you may consider blocking this person and/or reporting abuse
Nice one, should get more ❤️s!
By the way, I guess you meant
haha yes. That would very much negate the advantage here!
Nice spot. Article updated.
I think
userPassedCourse
should be calleduserFailedCourse
. Or at least, having a low mark suggests or low attendance suggests failure. But then, you switch passingfalse
to passingtrue
from one example to the next, so even if you are trying to refactor it to make it more readable, I'm getting really confused by the example.Changed to:
user.result > 40 && user.attendance > 50
Nice examples for promoting Clean Code!
Intention revealing code is prior to code length. There is a different tool for code length and it's called minifier.
If you can, use TypeScript to document the API. The reading flow is better than with plain JSDoc. The IDE integration will make working with your code a pleasure. Pro-Tip: use JSDoc comments to comment more complex types - this documentation will then be shown on hover in modern IDEs.
I used Typescript a couple of years ago. I definitely want to pick it back up again.
I really like these tips. Thank you!
I've read some Lovecraftian code.
Thanks for the read. Very informative.
Amen. The frameworks are the kings of the jungle right now.
I do love React but the building blocks of clean code are the key to having a nice codebase.
Fixed. Thanks for letting me know!
I also feel like courseID could be an enum, if there's a set number of course IDs