Last week, the Iranian Supreme Court confirmed the death sentence for computer programmer Saeed Malekpour, whose photography program was used without his knowledge, to upload pornography to the internet.
Canadian resident Mr Malekpour was arrested while visiting his dying father in Iran during October 2008. He was held in solitary confinement in Tehran's Evin Prison for a year without charge, according to Amnesty.
He made confessions, which were later televised, to his charges, which according to the EFF include "acting against national security through propaganda" and "production and publication of obscene materials through computer systems".
However, in a letter sent from the prison in March 2010, Mr Malekpour states, he retracted these confessions, stating they had been given under duress after prolonged interrogation and torture by the "Revolutionary Guards Cyber Counterattack" team. He also wrote that he still not been allowed to visit his lawyer.
A Revolutionary Court sentenced him to death in October 2010 for his alleged confessions but the Supreme Court later overturned the sentence. When referred back to the same Revolutionary Court for reassessment, the death sentence was reinstated.
Last week, the Supreme Court approved this execution.
The Canadian Foreign Minister John Baird is reported to have condemned the Supreme Court's decision, but there is little practical means of challenging this order outside Iran.
This is not the first death sentence for an internet-related crime in Iran. Iranian blogger Vahid Asghari was sentenced to death for allegedly hosting a pornography network.
A broader question that could be drawn from Mr Malekpour's case is to what extent should software creators have control over end use of their programs?
Software designers could retain greater control and lock down end use to prescribed functions, preventing their software being used outside its intended purpose.
Of course, in this context it could prove complicated to implement. For Mr Malekpour, he would have had to invest in image recognition capabilities and impose restrictions if the images were deemed inappropriate. This would move the original program beyond its modest remit.
Importantly, requiring restrictions and lockdown of software might stifle innovation. New ideas and applications are often realised by allowing the end user to tinker. Oxford and Harvard Law Professor Jonathan Zittrain is a proponent of the 'generativity' of technologies that maintain openness and allow modification.
Professor Zittrain accredits the creation of the internet as spawning from such an ideology, but 'generativity' is a double-edged sword and innovation of destructive applications also occurs, with malware being a key example.
All this debate, however, is of little consolation to Saeed Malekpour who is facing a bleak future. He can't have imagined that when he started writing a photography program, his code would put his life in peril.Follow @mooseabyte