- Raise your quality standards as high as you can and try to always work at the boundary of your abilities.
- Ideally, your work should be socially relevant and scientifically sound. If it can't be both, scientific soundness should prevail.
- Never tackle problems that are (or will soon be) addressed by people who are equal/better equipped than you to do so.
The second one is nicely explained in E. W. Dijkstra's original post. Scientific rigour is all-important, because if you don't have that then social relevance (or anything else) isn't going to be useful. Being scientifically sound is a foundation.
The third one is the consideration, "If I didn't work on this, would my efforts be missed". If the answer is no, then go and find something else to work on. Ideally, we should all be making contributions that we're uniquely well-suited to make.