Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Magic numbers #6

Open
ggarri opened this issue Jun 28, 2022 · 0 comments
Open

Magic numbers #6

ggarri opened this issue Jun 28, 2022 · 0 comments
Labels
good first issue Good for newcomers

Comments

@ggarri
Copy link
Collaborator

ggarri commented Jun 28, 2022

A magic number is a number that comes out of nowhere without existing declaration or explanation. In order to improve readability and maintainability magic numbers must be avoided.

Note that -1, 0 and 1 are not considered as magic numbers

Such values should be either related to existing const variables already declared or declared as const if non existing.

These values are commonly found in iterations, size declaration etc...

@ggarri ggarri added bug Something isn't working good first issue Good for newcomers and removed bug Something isn't working labels Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant