I find a great way to understand the complexity you are coding into a method / function is to try and write a unit test for it. Short simple methods are easy to write tests for, while long, complex ones become exponentially harder to capture all the combinatorial state possibilities (eg: does it work when foo is null, but bar is not and baz is out of range? what about when bar is null but foo is not and baz is in range .... and so on.)
Even if you are not intending to write a unit test for a particular function, it's useful to imagine how hard it would be to do so as a thought experiment.
Even if you are not intending to write a unit test for a particular function, it's useful to imagine how hard it would be to do so as a thought experiment.