| After the recent discussion about code-comments, that sort of code is exactly the sort that requires an explanatory comment. If the code isn't the clearest comment you have, you're doing it wrong. Comments are a crutch for people who write poor code. Comments have zero authority or guarantee of accuracy, and more often than not have little correlation with the actual code. Code is canonical. Comments are noise. |
Business logic is complicated and rarely defined by a developer but by a product manager. Often you can understand what's being done in the code, but the WHY is necessary to understand why it's there and what it is trying to do. I believe giving a brief synopsis of the business logic in a method comment and, if it's not super straightforward, a brief overview of the steps or algorithm, is incredibly useful.
I guarantee you won't be able to figure out what your program is doing by looking through years old wikis left by product managers no longer at your company.