Dijkstra has three advices:
- Raise your quality standards as high as you can live with, avoid wasting your time on routine problems, and always try to work as closely as possible at the boundary of your abilities. Do this, because it is the only way of discovering how that boundary should be moved forward.
- We all like our work to be socially relevant and scientifically sound. If we can find a topic satisfying both desires, we are lucky; if the two targets are in conflict with each other, let the requirement of scientific soundness prevail.
- Never tackle a problem of which you can be pretty sure that (now or in the near future) it will be tackled by others who are, in relation to that problem, at least as competent and well-equipped as you.
Hamming says you should focus. First of all you should know what you want. If you decide that you want to be a first-class scientist then you should read to make sure what the important problems are, work hard on the important problems, work so hard that subconsciously you also do almost nothing else than work on those important problems. When you find out about some new result you should be able to instantly realise that it gives an attack on an important problem. Then start working. Don't waste time on things that don't make you a first-class scientist. Don't waste time fighting the system. Use it. Work on general problems: they are as hard as specific problems but more imporant. Make your results known, and make them readable. People don't want to read narrowly focused papers: they like to see the big picture so give them what they want. Better yet write books! But don't try to cover every detail of your field. People don't want to know every detail. Knowledge is increasing in mass at such a high rate that sedimenting the essentials is going to be more and more important. And, of course, you should work on important problems.
Peyton Jones writes about communicating your results. How to write a paper? How to give talk? One high-level advice he gives is that a paper should be written while doing research, not after doing research. Periodically trying to put what you know in a form readable by others will help you better understand what you know and so you'll make more progress. If you write your papers in this way you also have better chances of writing a good paper because you write everything while it is fresh in your mind. As to the specifics: learn by actively observing what sets apart papers you like from papers you don't like.
Which one is right? Dijkstra? Hamming? Jones? You guessed: all of them. You should probably pick the advices that work best for you and follow them.
But notice that there are some common threads in what these guys say. A good scientist (1) is hard working, (2) knows how to pick his problems and (3) presents well his results.