The author, the great scholar of hadeeth, An-Nawawee – may Allah shower blessings on him – said in the Book, Riyaad as-Saaliheen: Chapter on Continuing Upon Good Deeds One Became Used To.
Meaning, when a person becomes used to a particular good deed, he should endeavor to continue to do it. For example, when he becomes used to not leaving the supererogatory prayers approved to be observed before and after the obligatory prayers, then he should continue upon it. If he is in the habit of observing the late-night Prayers, then he should stick to it. If he is regular in performing the forenoon supererogatory Prayer, he should continue; any good deed the individual becomes used to, he should for him to stick to them.
Among the lines of conduct of the Prophet ﷺ is that his deeds were continuous; meaning that, he is regular in them. Whenever he performs a good deed, he makes it continuous deed, he doesn't change it. Because, when the individual becomes used to a good deed, performing it and then leaves it, that causes disinterest in performing good deeds considering the fact that leaving a deed after commencing it is worse than not starting it at all. That is to say, if you had not performed the good deed it, it would be less worrisome than you starting and abandoning it. This is something widely noticed and experienced.
The author – may Allah shower blessings on him – mentioned several verses of the Qur'an, all pointing to the fact that the individual should continue upon any good deed he becomes used to such as Allah's saying:
“And be not like her who undoes the thread which she has spun after it has become strong.”
That is, do not be like the woman who spins yarn from wool, and after spinning it having it become strong and firm, she unties it and shreds
it. You should rather be constituent upon good deeds you perform.
From that also is His saying - Exalted is He:
“Lest they become as those who received the scripture before (that is, Jews and Christians) and the term was prolonged for them and so their heart were hardened”
Meaning that, they used to work righteous deeds but time passed and their hearts became hardened and so, they abandoned the good deeds. Do not become like them.
As for hadeeths, the author – may Allah shower blessings on him – mentioned the hadeeth of Abdullah bin Amr bin Al-'Aas that Allah's Messenger ﷺ said, “O Abdullah! Do not be like So-and-so, he used to stand up during late-night (for Prayers); but he left standing up in the night.”
The word, Fulan (as it occurs in the text rendered as so-and-so) is used to allude to a particular person who is male. As regard a woman, the word Fulanah is rather used. This word, Fulan, could have been used by the Messenger ﷺ himself, and that the Messenger did not mention the person's name to Abdullah bin 'Amr – may Allah be pleased with him – by way of protecting his identity since the matter rather than the individual was the point of reference. It is also possible that the Messenger ﷺ mentioned the person but Abdullah bin 'Amr (may Allah be pleased with him) preferred to preserve it. In any case, the point is to do the deeds.
And the matter was that a man used to stand (for prayers) during late-night and then left it, he stopped observing it, he did not continue upon it. Even though standing up during late-night is recommended act such that if the individual does not perform it, he is not blamed for it. That is to say, if he does not stand up during the night, no one will chide or say to him, “Why did you not standup at night (for the Prayers)?” since it is only a recommended worship. But the fact that he was observing it and later abandoned it itself caused the dispraise. Consequently, the Messenger ﷺ said, “Do not be like So-and-so; he would stand up during the night but he abandoned standing (for Prayers) during night.”
In addition or even more importantly and significantly is for the individual to begin to seek knowledge of Islamic legislations and then Allah blesses him upon it and then he abandons it. This constitutes being ungrateful for the mercy Allah showered on him. So when you begin to seek knowledge, you should continue except a thing of dire necessity busies you therefrom. Otherwise, you should be consistent because seeking knowledge is Fard Kifaayah (communal obligation) and whoever seeks knowledge, Allah - the Exalted - will certainly grant him the rewards of obligatory deeds which are greater than those of recommended actions as is indicated in an authentic hadeeth that Allah the Exalted said, "My servant does not come close to Me with something dearer to Me than what I have made obligatory upon him."(1)
Seeking knowledge is Fard Kifaayah (communal obligation), when a person carries it out, he fulfills an obligation on behalf of the generality of the Ummah. It could even become Fard Ayn (individual obligation) if he himself has a need for it. For example, one who wants to observe the Prayer; he must learn the rulings regarding the Prayer. Similarly, whoever has wealth must learn the rulings of Zakaah. Likewise, the buyer and the seller must necessarily learn the rulings of buying and selling. Whoever wants to perform the Pilgrimage must also learn the rulings regarding the Pilgrimage. This is Fard Ayn (individual obligation).
As regard other aspects of knowledge, they are Fard Kifaayah. So when a person begins to seek knowledge he should not abandon it, he should rather be consistent, unless some dire necessity prevents him therefrom. This is because the hypocrites are those who begin actions but abandon them.
During the battle of Uhud, about a thousand men went out with the Prophet ﷺ; about a third of them being hypocrites. When they got on the way between Madinah and Uhud, the hypocrites turned back since they had not even advance for the sake of Allah. So, they went back and said,
“They said: Had we known that fighting will take place, we would certainly have followed you.”
Allah - the Exalted - said:
“they were that day, nearer to disbelief than to faith.” (Aal-Imraan vs 167).
In a nutshell, it is necessary that if Allah blesses the Muslim to observe good deeds, among the actions of giving servitude to Allah such as the Prayer or the deeds whose benefits transit such as seeking knowledge that he doesn't slacken or hold back. He should rather be consistent for that is from the lines of conduct of the Prophet ﷺ and his advice as we have in his statement, “O Abdullah! Do not be like so-and-so; he used to stand (for the Prayers) during the night and then he abandoned standing at night.”
Allah alone grants success.