I try to do that, and yes it's probably the best trick for productivity, sometimes i overthink things in my mind before starting or I get stuck thinking about the best approach to a problem while coding, and sometimes the best it's just do one approach that works, if you don't like it later then just change it, just move forward and keep moving.