Agree, Turkey and Iran are the only countries in the middle East(and Muslim world to some extent) who have the potential to build their own weapons systems, since they have a proud history(ottoman empire and Persian empire legacy), a scientific tradition, educated workforce, etc.
Turkey is certainly the most secular and democratic Muslim-majority nation in the region, if not the entire world. By law, Turks have a number of freedoms and guarantees which separate them, culturally, from the greater Middle-East.(The Turkish constitution acutely separates religion and state). It is a G20 member(the only in the middle East), and There’s no comparison between the average wages of Turks and those of Egyptians, Tunisians, Moroccans, Syrians, or Iraqis and even Iran etc(who all lag behind). The only handful of Muslim countries with higher GDPs per capita are the Gulf States - Saudi Arabia, the UAE, Bahrain, Qatar, and Oman, and that too is because they rely on the sale of their massive oil reserves(exploited mainly by U.S,British, French, Chinese and Japanese oil companies who have the tech) meanwhile Turkey has no significant natural resources rely on and so has to be more productive/rely on its educated workforce. Turks do much better than people in other populous Muslim-majority nations such as Pakistan and Indonesia. Turkey also has a well-functioning public infrastructure in terms of transportation and social welfare. It has a number of high-speed and bullet trains, and the quality and density of high-speed rail and road networks is very high(I can attest to this as i have visited the country before). Most public transport is very affordable and subsidized by Government. Turkey is also the only Middle Eastern country other than Israel to have a life expectancy higher than 75 years.
All this ws made possible due to Atartuk he was Turkey's saviour as he made Turkey a secular country not an ideologically crazy Islamists/religious obsessed one. . I love this his statement:
"He is a weak ruler who needs religion to uphold his government; it is as if he would catch his people in a trap. My people are going to learn the principles of democracy, the dictates of truth and the teachings of science. Superstition must go. Let them worship as they will; every man can follow his own conscience, provided it does not interfere with sane reason or bid him against the liberty of his fellow-men." ~Mustafa Kemal Ataturk.
A for Iran, they are similar to Turkey in their long proud history, scientific tradition, very patriotic and educated citizens etc Eventhough the Islamic revolution and toppling of the shah considerably slowed down Iran's economic growth/development, but the country is still a resilient country since,Iran has a proud history and culture, and a highly educated population. So it's fundamentals are strong(no matter the government in power). Despite their Islamic rhetoric, they are forwRd looking and smart people. For example many of their officials are western educated(President Rouhani isan alumnus of Glasgow Caledonian University), so they are still quite productive, eventhough I believe they are still under performing since they have the potential to be more productive than maybe even Turkey.