Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Kiro
on Jan 2, 2017
|
parent
|
context
|
favorite
| on:
How I Write Tests
How do you avoid the parameters from getting bloated? Like having to pass the same dependencies into every method.
mberning
on Jan 2, 2017
|
next
[–]
It's a judgement call to be sure. If I start seeing a pattern of adding a bunch of parameters I stop and rethink what I am doing. Usually there is a structural problem that can be fixed.
mercer
on Jan 2, 2017
|
prev
[–]
Maybe by using currying/partial application?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: