Always apply Hofstadter's law
https://en.wikipedia.org/wiki/Hofstadter%27s_law
Seriously, it will come with experience. There are few shortcuts.