Today in our department’s weekly lunch seminar, we discussed how to start and finish a scientific paper. My summary of the main topic of discussion is that you just need to decide on a strategy and then start writing. It does not matter whether you start with the abstract, figures, methods, or main results. Ideally, you select a journal before you start writing to be sure that you do not need to revise or restructure before first submission.
I think that this is, however, secondary to another related point, which is that your paper is only one potential output from your science project. Other outputs could include the dataset and the source code used to generate the paper. These could be combined in a version-controlled repository and made public to be transparent about the whole process.
Aiming for transparency affects the way you think about preparing your manuscript. Writing traceable source files for the manuscripts invites you to explain how and why you prepared and analyzed the data as you did. To align the manuscript to the source file, you might need to drop some troublesome ideals of scientific writing. One such ideal is the tendency to build a scientific investigation on a (genius) hypothesis. This hypothesis is, of course, formulated in advance of collecting any data and is confirmed in the paper. In reality, many papers lack a formal, detailed pre-data hypothesis. It is probably, in many cases, made up to fit the format of hypothesis-driven research, a practice known as HARKing.
In my own work, I think the most important aspect of all this is to aim for small incremental improvements in every project. This is to acknowledge that what I did previously could be improved, and that what I will do next will still not be perfect. Aiming for perfection right away will likely push us towards hiding imperfections, leading to less transparency and more bad science.