| ▲ | wakawaka28 2 hours ago |
| Unit tests in the same file wastes context and makes the whole thing hard to navigate for humans and machines alike. |
|
| ▲ | jimbokun 26 minutes ago | parent | next [-] |
| It’s about the best possible documentation. |
| |
| ▲ | wakawaka28 a minute ago | parent [-] | | It isn't documentation. It is example code, in the best case. That shit belongs in other files, not in the main file. There is also a reason why literate programming never took off in general. Good luck getting anything done when 80% of the stuff you have to scroll through contributes nothing to the actual execution. |
|
|
| ▲ | dnautics 2 hours ago | parent | prev | next [-] |
| nah, the agents jump around files anyways. |
|
| ▲ | J_Shelby_J 2 hours ago | parent | prev [-] |
| I’ve been doing the least amount of unit tests possible and doing debug asserts instead. |
| |
| ▲ | 0x3f 7 minutes ago | parent [-] | | Normally I would put as many invariants in the types as possible, then tests cover the rest. I'm curious how you do this/what you use it for though. Would be cool if you had any examples. |
|