Is a person sinful if they studied in the field of Islamic Studies for a year and then switched from it to another field—such as programming—with the aim of earning more money?
The first thing an individual is obligated to learn is the rectification of their creed and the rulings of their obligatory acts of worship. This is an individual obligation (fard ayn). As for other religious or worldly sciences, they are communal obligations (fard kifayah). If you understand the individual obligation, then there is no harm in specializing or moving to worldly sciences that benefit a person in their worldly life and help them in their religion. The threat of punishment came for those who learned religious sciences, seeking thereby the pleasure of Allah, but only to gain worldly things. On the authority of Abu Hurayrah, the Messenger of Allah, peace and blessings be upon him, said: "Whoever learns a science by which the Face of Allah, the Mighty and Sublime, is sought, but he learns it only to attain a worldly gain thereby, will not find the fragrance of Paradise on the Day of Resurrection." Sheikh Al-Uthaymeen mentioned that there is no harm in a person seeking worldly gains through worldly sciences.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/111434