I am a writer as I might have been a doctor or a lawyer. It is so pleasant a profession that it is not surprising if a vast number of persons adopt it who have no qualifications for it. It is exciting and various. The writer is free to work in whatever place and at whatever time he chooses; he is free to idle if he feels ill or dispirited. But it is a profession that has everyone in it and all its sights and events, is your material, you yourself can only deal with what corresponds to some secret spring in your own nature. The mine is incalculably rich, but each one of us can get from it only a definite amount of ore. Thus in the midst of plenty the writer may starve to death. His material fails him and we say that he has written himself out. I think there are few writers who are not haunted by the fear of this. Another disadvantage is that the professional writer must please. Unless a sufficient number of persons can be found to read him he will starve. Sometimes the stress of circumstances is too great for him and with rage in his heart he yields to the demand of the public.
---W Somerset Maugham
The above paragraph comes from chapter 46 of The Summing Up, an autobiography-style account of Maugham's writerly life. I would rather call it the bible for the art of writing, but the reader may well extract pieces of philosophy. As any religious text, this book needs to be read with devotion.
There are multiple places where you may find that you are not following the rules of the religion as set by Maugham, and you should. The text is not a Guide to the art of writing for Dummies, but an art in itself to be appreciated. I myself found that my writing style (if there is something like that at all) differs a couple of light years from what he has described as his (and his suggestions on how to write, I don't follow quite!).
The topic may well be very different from his other masterpieces, but the result is quite the same: magnificent.