Travelling to the land of the kuffaar to seek knowledge, and
    helping the kuffaar to make software
Question

                I have seen alot of the questions that you
      have answered and I have come to trust your opinion in complex matters such as which face
      the Ummah at this time.May Allah bestow His Mercy on you for helping the muslims by your
      knowledge. (Amen)My question is whether it is permissible for a muslim to travel in a land
      of the kuffar for the purpose of gaining worldly knowledge.Also is it allowed for us to
      help the kuffar in making software,that they may use for military purposes.eventhough they
      may be a peace with us?Is the money that we get from such jobs halal or haram?Please
      answer this question for me as I am a student and very disturbed about whether what i am
      doing is right or wrong.I have talked with of my friends and they say that it is halal
      because what they do with our software is non of our concern and we are only doing our
      work and getting paid what we cannot imagine in any muslim country.Dear shiekh please help
      me out,May Allah enter you in Paradise for all the good work you are doing.(Amen)
Praise be to Allah.If it is worldly knowledge that is beneficial to the
    Muslims, and it cannot be learned in a Muslim country, then it is OK to go to the kaafir
    countries, on the condition that the person is religiously committed and knowledgeable
    enough to be safe from desires and doubts.
It is not permissible for us to help the enemies of Allaah with
    programs that may cause harm to the Muslims and give the kuffaar more power. Allaah says
    (interpretation of the meaning):
“Help you one another in Al-Birr and At-Taqwa (virtue,
    righteousness and piety); but do not help one another in sin and transgression”
    [al-Maa’idah 5:2]
This applies whether the harm is something that may happen in the
    future, which is the situation when there is peace, or is something that may happen
    immediately, as in the case of kuffaar who are in a state of war with the Muslims. The
    means of earning a halaal income are many, and whoever gives up something for the sake of
    Allaah, Allaah will compensate him with something better.