I strongly agree with this, but there is a danger:over-engineering, where you build a very generic module where a much simpler one will do. The key point: build the most specific module that will do the job; if it needs to be more generic for a future application, then you go back and modify it as needed, adding a second interface if necessary. Generic features that have not been used or even tested are basically garbage code.
It needs to be generic while also being as simple as possible. So you're building the module for a specific situation but leave it as open as possible for other situations without explicitly optimizing for them.