dusk-network / rusk

The reference Dusk platform implementation and tools
Mozilla Public License 2.0
157 stars 60 forks source link

Investigate magic numbers #2126

Open HDauven opened 1 month ago

HDauven commented 1 month ago

Summary

Throughout the codebase, hard-coded number literals without context or a description are used. Using such “magic numbers” goes against best practices as they reduce code readability and maintenance as developers are unable to easily understand their use and may make inconsistent changes across the codebase.

It's recommended to define magic numbers as constants with descriptive variable names and comments, where necessary.

Solution

This will be addressed per module:

fed-franz commented 1 month ago

After a quick look at the code, I realized the are really many of these. We should probably address this issue with separate PRs (e.g. one per module)