In a world where this needs to be solved with TDD there are a few approaches.
If you were pair programming, your pair could always create a new failing test with the current implementation.
Realistically I would want tests for the interesting cases like zero, positive even, negative even, and the odds.
Another approach would be property based testing. One could create sequence generators that randomly generate even or odd numbers and tests the function with those known sequences. I don't typically use this approach, but it would be a good fit here.
Really in pair programming, your pair would get sick of your crap if you were writing code like this, remind you of all the work you need to get done this week, and you'd end up using modulus and move on quickly.
TDD has cycles of red, green, refactor. This has neither been refactored nor tested. You can tell by the duplication and the fact that it can't pass all test cases.
If this looks like TDD to you, I'm sorry that is your experience. Good results with TDD are not guaranteed, you still have to be a strong developer and think through the solution.
This feels like a flimsy solution to the problem that will fail. I guess that when Medicaid recipients don't/won't/can't sign up, the government will take away their healthcare and use slave labor from prisons to catch up.
I think in six months they will be saying: "hey we tried this idea with Medicare recipients, but they just wanted to stay home and play video games. Now our crops are in danger of not being harvested.
What if... We round up some of these bad prisoners and make them work for almost free!? That will kill two stones."
Clear concise code that reads like documentation is the ideal. Good function and variable names, formatting, and encapsulation play into this. Tests should document and describe the system.
If it still isn't clear what the code is doing, and I'm all out of ideas (or time) for refactoring, a well placed, accurate comment is fine. It needs to be kept up to date like any other artifact in the project.
It's harder to keep comments accurate than code, since code can be executed and tested. I use them sparingly; when I've otherwise failed to write clean code, or the code is just so complex that it needs to be described.
Comments are just another tool in the toolbox. If they add clarity to the situation, by all means, use them.
If you can think of an expressive variable name that lets you skip a comment eg "employeeCount", instead of "e" // number of employees, do that.
Probably try to get my identity back. I'm not trying to escape anything currently, and not having documentation is a dangerous thing in the world these days.
You act like 100% of old people voted trump. They favored him 52 to 47 according to the AARP.
I understand you are angry, but just being blindly mad at a group of people due to prejudice and stereotyping is not ok. It's exactly what the Republicans are doing with trans and brown people. You are no better than them.
That has been my experience with it too. It's probably more fun with good gear, but i just see hours on the couch in my future that I don't want to spend.
Read the article about property based testing. It is the middle ground between what you are describing and practicality.
I often pair with myself, which sounds silly but you can write failing tests by yourself, it just isn't as fun.