4 ms·
I like to implement features from end-to-end and keep them as lean as possible so I can fit the execution flow in my head. Each time an edge case or a question
by cranium 4y ago
I like to implement features from end-to-end and keep them as lean as possible so I can fit the execution flow in my head. Each time an edge case or a question pops up, I leave a TODO in the code explaining why it could be a problem but I don't solve it yet. Then I proceed to implement the next call in the stack. Once the happy path is done and tested, I go back the TODOs.
I also like to implement the feature top-down: starting with the caller and implementing the chain of callee. It helps designing the abstraction layers by forcing you to answer "does the caller care/know about this argument or should it abstracted away elsewhere (config or service)?" By starting from the top, you tend to add arguments only if they are needed.