Doubt? ASK ME

     Later, he patted me on the head and said never mind, he’d teach me to cook. He also taught me to write my name and said he would soon teach me to write whole sentences and to add numbers. I was grateful. I knew that once I could write like an educated man there would be no limit to what I could achieve.
     It was quite pleasant working for Anil. I made the tea in the morning and then would take my time buying the day’s supplies, usually making a profit of about a rupee a day. I think he knew I made a little money this way but he did not seem to mind.
     Anil made money by fits and starts. He would borrow one week, lend the next. He kept worrying about his next cheque, but as soon as it arrived he would go out and celebrate. It seems he wrote for magazines — a queer way to make a living!
     One evening he came home with a small bundle of notes, saying he had just sold a book to a publisher. At night, I saw him tuck the money under the mattress.
After some time, Anil patted the thief's head and told him that he would teach him how to cook. He also taught the thief how to write his name. In addition, he said that he would soon teach him to write full sentences and add numbers. It shows the goodness of Anil. He did not consider the narrator as a servant. He thought of giving him a good education and making him earn money.

After hearing that, the thief felt very grateful. The thief had thought that if Anil taught him how to write and learn, there would be no limits to his work. For instance, the narrator doesn't have proper education, and if he had an education, he wouldn't have chosen his profession of stealing. He could have earned income by working in a respectable profession. Also, he thought that if he got proper education, he could achieve more.

The thief enjoyed working for Anil. He used to prepare tea for Anil in the morning and then buy groceries for the day. He would also profit one rupee every day from the money that Anil used to give him for daily groceries. The thief also had a notion that Anil must have known about it earlier, and he didn't ask him anything regarding that.
The narrator would buy groceries from  the shop

Anil did not have any stable income. He made money by fits and starts. The idiom "fits and starts" means anything that works on and off and functions irregularly. Here in this context, the narrator did not work regularly, so he did not get a regular income.

Also, the narrator did not have any fixed job. The thief says that Anil used to be worried about his paycheque, but he would go out with friends and celebrate as soon as he received a cheque. Anil used to write for the magazine. After telling that, the narrator says what a strange way to make a career! He might have said that people had to find out different sorts of jobs for a living. He only knew stealing. While seeing Anil earning in such a way, he might have made this statement.
Then, one evening, Anil came home with some money and told the thief that he had just sold a book to a publisher. Before going to bed, Anil put the money under his mattress. The thief observed him stuffing the money under it.
Meanings of the difficult words:
Pat Touch quickly and gently with the flat of the hand
GratefulFeeling or showing an appreciation for something done or received
Lend To give something to someone for a short period of time, expecting it to be given back
Borrow To get or receive something from someone with the intention of giving it back after a period of time
ChequeA printed form, used instead of money to make payments from your bank account
Magazine A type of thin book with large pages and a paper cover that contains articles and photographs and is published every week or month
Queer Strange, unusual, or not expected
PublisherAn organisation that publishes text or music
Tuck To put something into a safe or convenient place
MattressThe part of a bed made of a strong cloth cover filled with firm material that makes the bed comfortable to lie on
Money The coins or paper currency which can be used to buy things
National Council of Educational Research and Training (2007). The Thief's Story - Ruskin Bond (pp. 08-13). Published at the Publication Division by the Secretary, National Council of Educational Research and Training, Sri Aurobindo Marg, New Delhi.