Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
rmetzler
on Oct 31, 2014
|
parent
|
context
|
favorite
| on:
Code that breaks 2 or 3 times every month
Yes, a method is usually much easier to test, if the method gets the current date passed as an argument. The same goes for methods calculating on random values. Passing these to the method enables testing.
Consider applying for YC's Summer 2025 batch! Applications are open till May 13
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: