Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
beefeater
on Dec 28, 2018
|
parent
|
context
|
favorite
| on:
Please do not attempt to simplify this code
If you need to make sure every condition is handled, write a test for every condition.
lmm
on Dec 28, 2018
[–]
Why? That's both more work and more error-prone than just using a language that will ensure it.
lgunsch
on Dec 29, 2018
|
parent
[–]
If every condition is important to the business, as is implied in this case, it would be very valuable to have tests to cover them.
lmm
on Dec 29, 2018
|
root
|
parent
[–]
The business wants to know all conditions are handled appropriately, to a certain level of confidence. Tests are one way of achieving this but by no means the only way.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: