As usual (cf. e.g. this discussion), this advice should be taken cum grano salis.
More related advice can be found in the other posts on this blog. I especially recommend the talk You and Your Research by Richard Hamming, and the advice from Terence Tao, James D. Watson, and Steven Weinberg. See also advice from E. W. Dijkstra and J.H. Conway