2 ms·
I like the changes but I think the original has merit too. Along with the comments it is documenting the parameters/bounds that apply to this device where they
by dizhn 4y ago
I like the changes but I think the original has merit too. Along with the comments it is documenting the parameters/bounds that apply to this device where they are actually being used, making the code a kind of documentation for others who want to implement similar things. Having these defined in constants elsewhere would require some back and forth if this "document" is used as a reference.
- ddevault 4y agoWell, I said upfront that the level of comments here is fine. Just offering a perspective on how it could still be good code with less. In general I think it's fine to expect a reading of the code to be paired with a reading of the documentation/specification; in the absence of such a resource for the GameBoy the comments here are well-justified. I would definitely add more constants, though, and I would anticipate that a second implementation which references this would start by re-defining all of the constants in its own code.
- nunobrito 4y agoMost people will argue that this is nitpicking, however, I've learned something new today. Thank you. Quite a difference in code readability to the point where the code becomes self-evident. Few people are able to reach a more verbose level of documentation, let alone make sure the code remains understandeable in the future.