Answered by Sidi Salman Younas
Question: They are planning to have me start work on a software project, the deliverables of which are going to be used by a casino. Is it permissible for me to work on a team that is developing software for a casino? If it is permissible, does the same apply to building software for banks, and insurance companies?
Answer: assalamu `alaykum
It would be permissible to create software for companies that may use them for impermissible purposes, provided the content of the software itself is permissible.
This returns to the discussion relating to assisting in sin. In the Hanafi school, the degrees of assisting another in sin are:
a. direct assistance in sin
b. indirect assistance in sin
c. possible cause for a sin.
It is impermissible (haram) to do something that directly assists in sin, slightly disliked (makruh tanzihan) to do that which indirectly assists in sin, and better to avoid something that may be a possible cause for sin. However, the earnings from work that fall into the latter two categories would remain halal and there would be no sin involved in such work. [Nahlawi, Durar al-Mubaha]
It is clear that working as a software developer is in of itself permissible, as long as the software itself does not have impermissible elements, such as pornography and the like. As such, at most, your work will fall in one of the latter two categories, both of which do not affect the nature of one’s wealth earned nor do they entail sin.
However, at the same time, due the potential dislikedness in the action it is best to try to avoid such work if one can reasonably do so without hardship. Further, if one does decide to undertake such work, one should atleast dislike it slightly in one’s heart.
Checked & Approved by Faraz Rabbani