
Clean Code – How to Write Amazing Functions
Coding Blocks
00:00
Is Your Function Doing More Than One Thing?
i love this one, but there were even parts what they say. The classic is that the function should do one and only one thing. But if you're doing a switch inside of some other function, and your using that switch to decide determined logic, then it's doing too much. That doesn't mean there's not a decision in that task, but you're only doing that one very specific thing. i'm pretty sure this was the same section too,. or maybe it was another one where it was talking about um, switch statements and how that felt kind of a wrong.
Transcript
Play full episode