#Code review on beatsaber mod
1 messages · Page 1 of 1 (latest)
but i got it in a working state and want a code review just to see what i could make better
Seeing a few magic numbers and magic strings
@honest glacier
@honest glacier "magic values" are fixed values randomly distributed throughout the codebase. They usually should be avoided, because you oftentimes can't immediately see what they are meant to do. Also, when using "magic" string values, you are prone to making typos.
A better idea generally speaking, is to put constant values that you use in multiple places into constant variables. That won't only prevent typos, but also make maintaining the code a lot easier, if you ever need to change said values.
I haven't looked through your entire code, but I imagine nt was referring to places like this: https://github.com/Redageddon/BeatSaberCustomBackgrounds/blob/master/CustomBackgrounds/UI/Settings.cs where you use the same string literal repeatedly.
original values werent mine
how do i close this post, i am abandoning this now
Imma close it for ya 
that's no excuse? you're maintaining the code now
no im not
