updated list moved to https://grin.io/coding-maxims
Last active
August 23, 2023 21:18
-
-
Save lyoshenka/0a43205aa9a072b196ff87e2c689a8b9 to your computer and use it in GitHub Desktop.
Keep this in mind
kauffj
commented
Nov 21, 2017
•
- I propose these be numbered.
- I propose "no magic numbers/strings — use constants instead" be modified (or a new rule added) to cover that strings are only for messages for people (e.g. to be displayed, for log files, etc.). If you are doing a comparison against a string, especially in more than one place, that is a strong sign it should be a constant. I think magic strings/numbers specifically refers to input that triggers hidden or non-standard behavior, which is a bad idea even if you are using constants.
Great Maxims Lyoshenka
I love DRY as much as the next guy but when you are moving fast, I think sometimes it’s okay to save things to factor out later. What do you think about the Sandi Metz saying “duplication is far cheaper than the wrong abstraction”.?
Thanks for the Maxims!.
@rchasman he's probably right. As the last maxim says, "first you don't know the rules, then you learn the rules, then you break the rules".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment