coderefinery / modular-code-development

Modular code development lesson.
Creative Commons Attribution 4.0 International
3 stars 4 forks source link

How to divide code into functions #13

Open rkdarst opened 5 years ago

rkdarst commented 5 years ago

Question some people may have: When I make functions, how do you avoid adding more and more input arguments and returned variables to make it general enough for everything you do?

The solution (I think) would be something related to composing functions, or as I would say, separate things into different abstraction layers (input, preprocessing, transformation, analysis, combining), each of which does one thing. More on this with my next suggestion for the lesson.

wikfeldt commented 5 years ago

that's a good question to cover in the material!