Al-Jāḥiẓ, an Arab writer from centuries ago, advised:
The book is a companion that does not praise you and does not entice you to evil. It is a friend that does not bore you, and it is a neighbour that causes you no harm. It is an acquaintance that desires not to extract from you favours through flattery, and it does not deceive you with duplicity and lies. When you are poring through the pages of a book, your senses are stimulated and your intellect sharpens.
Through reading the biographies of others, you gain an appreciation of common people while learning the ways of kings. It can even be said that you sometimes learn from the pages of a book in a month, that which you do not learn from the tongues of men in a century. All this benefit, yet no loss in wealth and no need to stand at the door of the teacher who is waiting for his fees or to learn from someone who is lower than you in manners.
The book obeys you by night as it does by day, both when you are travelling and when you are at home. A book is not impaired by sleep nor does it tire in the late hours of the night. It is the teacher who is there for you whenever you are in need of it, and it is the teacher who, if you refuse to give to it, does not refuse to give to you. If you abandon it, it does not decrease in obedience. And when all turn against you, showing you enmity, it remains by your side. As long as you are remotely attached to a book, it suffices you from having to keep company with those that are idle. It prevents you from sitting on your doorstep and watching those who pass by. It saves you from mixing with those that are frivolous in their character, foul in their speech, and woeful in their ignorance.
If the only benefit of a book was that it keeps you from foolish daydreaming and prevents you from frivolity, it would certainly be considered a true friend who has given you a great favour.