And... Follow. Fail fast is an amazing mindset. Thank you for using your voice to empower writing good code.
Thank you man, being following Uncle Bob lessons lately and wow! Mind opened.
Doesn't fail fast refer to asserting preconditions rather than silently doing nothing?
You’re right, silence is always bad. Maybe I’m just too much used to it because of the codebase I work with. Gonna update the article with a throw. Thanks
throw
What I gain from the post is that flipping your conditionals can lead to more readable code. There are lots of cases where this is very very true.
Silently doing nothing isn't good, but neither is dragging out your code by putting the "fast" case in the else statement.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
And... Follow. Fail fast is an amazing mindset. Thank you for using your voice to empower writing good code.
Thank you man, being following Uncle Bob lessons lately and wow! Mind opened.
Doesn't fail fast refer to asserting preconditions rather than silently doing nothing?
You’re right, silence is always bad. Maybe I’m just too much used to it because of the codebase I work with. Gonna update the article with a
throw
. ThanksWhat I gain from the post is that flipping your conditionals can lead to more readable code. There are lots of cases where this is very very true.
Silently doing nothing isn't good, but neither is dragging out your code by putting the "fast" case in the else statement.