card.io-dmz
card.io-dmz copied to clipboard
reduced usage of magic numbers
see title
Do you plan to change the constants?
I'm torn. Although they are much friendly to someone new to the code, I have to admit that I find 270 and 428 a bit more readable than the rather long kCreditCardTargetHeight and kCreditCardTargetWidth. (And if we're going this route, why not 19 and 27 as well?)
I'll defer to @eslav on this, though; I don't feel strongly either way.
Sorry, missed numberWidth and numberHeight. Yes, I would replace those numbers by constants as well.
---offtopic---
I recall, when we were programming for i8080, it was really a good idea to use magic numbers, because the assembly code was more readable, and more aligned, but now we have already passed several paradigm shifts away from that mindset. :)
---offtopic---