Publishing a scientific paper is an important stage of any research project, yet a mistake at the journal-selection stage can undo years of work. How can a reliable journal be told apart from a fly-by-night one? Which criteria should the choice be based on? Here is how to build an algorithm for choosing a scientific journal and reduce the risk of rejection or of losing a publication altogether.