asharif123 / quiz_maker

Create a quiz asking user to add a list of questions, answers and ability to select correct answer.
0 stars 0 forks source link

bad constant naming #11

Closed incredibleLeitman closed 7 months ago

incredibleLeitman commented 7 months ago

https://github.com/asharif123/quiz_maker/blob/69cbcee1fc86a177f7c0a486773e2b849f95697c/UIMethods.cs#L7-L10 in general, having a constant named after a specific number is very bad -> imagine you later want to change the value then "THIRD_ANSWER = 5" will be very confusing

But anyway, in case of indices there is no need to declare constants. The usual way is, if the user enters a value that represents an index your program just decreases it by one, when printing an index to a user the program just adds one

asharif123 commented 7 months ago

fixed issue #11 by getting rid of bad naming of constants