Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am not talking about stealing code, or reusing someone's for profit. But I am assuming that if a program or plugin is distributed in a format where I can't readily view the source, that is a deliberate action on the part of the programmer.

Is it acceptable to look anyway, for the purpose of learning? And if so, are there limitations to that freedom?

share|improve this question

closed as primarily opinion-based by durron597, Snowman, GlenH7, Ixrec, MichaelT May 16 '15 at 0:04

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

I assume that you can't "readily view the source" because you've already asked and been turned down? The author might be willing to explain the general approach, would that be good enough without code? You won't know until you ask them. – FrustratedWithFormsDesigner Jun 22 '11 at 13:58
How will anyone tell you've done it? Will the distributor of the program or plugin have the ability to tell? No? Then do it. "Intellectual Property" is false to facts: multiple people often invent the same thing. The prohibition on reverse engineering is a consequence of the false conception of idea-as-property, and has no real moral standing. – Bruce Ediger Jun 22 '11 at 14:17
The case I was considering is a plug in for Outlook 2010 that writes a default reply to: email address regardless of what address the email was sent to. I've already purchased it, and am using it. I'm partly interested in seeing what was done because I want to know why it requires a plug in, and is not a default option. Partly, because I'm a curious bastard, and i like to take things apart. The data I'm after is peripheral to the plug in. I'm not looking for his code or to duplicate his project. – zenbike Jun 22 '11 at 14:38
I'm one guy, and out of their jurisdiction. But I want to do it right. That's why I asked the question. There are macros which claim to do the same thing, but they don't work on reply to. Only new mail. I'm just starting to look into it. If there's a better way, awesome. – zenbike Jun 22 '11 at 14:57
@Bruce. +100 for "The prohibition on reverse engineering is a consequence of the false conception of idea-as-property, and has no real moral standing." Unfortunately it does have a legal standing. If the software gets reverse-engineered, and the vendor finds out, you could get a cease and desist letter, or worse, especially if it is explicitly mentioned in the EULA. :( – Bratch Jun 22 '11 at 21:26
up vote 6 down vote accepted

You indicated in one of your responses that you were more interested in knowing if the author would be upset by it... so if it were me, and you only did it for educational purposes and we met and you told me about it, then no. I would not be upset if you decompiled/reverse engineered my code. If the code in question was very kludgy/hackish and ugly, I might be a bit embarrassed, but I doubt I'd flip out (in fact, I might even be flattered that someone found my code so cool and interesting they just had to find out how it worked and went to such lengths to do so) - and hey, it might even be fun to talk about it!

share|improve this answer
What if he didn't do all these things? And what if he didn't do it for educational purposes? – BЈовић Jun 22 '11 at 14:56
VJo: Then OP would have been asking a different question, and I would have given a different answer. – FrustratedWithFormsDesigner Jun 22 '11 at 15:02
I'd tell him my original code is very beautiful but his decompiler sucks, that's why it looks like crap. :) – Vitor Py Jun 22 '11 at 19:11
I got a lot of great feedback from this question. I'm choosing to mark yours as accepted because it was upvoted most, and the answer most closely followed my original question. – zenbike Jun 23 '11 at 14:19

The legality of decompiling depends on your jurisdiction. This Wikipedia page has some notes on US and EU law in this area. The summary is that the legality depends on why you are doing it:

  • If you are doing it to achieve interoperability, you may be allowed to do it.

  • If you are doing it to "learn" or out of curiosity, you are probably not allowed to do it. (I've never heard of any case law that says that educational fair use doctrine extends to decompiling software. But ask a real lawyer.)

Whether decompiling is an "acceptable" thing to do is a value judgement, and it depends on your perspective. Most IT professionals would probably say it is not acceptable behavior. And certainly the copyright owner is likely to say that it is unacceptable ... and he / she / they are the ones who could decide to sue your pants off!

share|improve this answer
Ok. That last one is more what I'm trying to get a feel for. Don't you have to be doing to learn i order to achieve interoperability? Or does that mean you must be successful in order to be legal? – zenbike Jun 22 '11 at 14:17
@zenbike: Get a lawyer. Seriously. – David Thornley Jun 22 '11 at 14:28
@David Thornley: A lawyer is not an ethicist. – FrustratedWithFormsDesigner Jun 22 '11 at 14:28
@Frustrated No, but he might be able to keep the OP out of jail. – Michael Todd Jun 22 '11 at 14:33
bit inaccurate, as many legislatures allow decompilation for educational purposes. – vartec Jun 22 '11 at 14:46

I'm not getting into morality here, since that's not a real good topic for a Q&A site. Personally, in all likely cases I'm thinking of, I wouldn't mind at all if you did it to my code.

Legality is another matter, and it's something that can't properly be answered here. If you want to know, find yourself a lawyer who specializes in "Intellectual Property" law in your jurisdiction, or whatever jurisdiction you're concerned about. I've read a good many different things about it, and some of them conflict. Do not trust legal advice you read from random people on the Internet who may not even know where you live.

From a practical point of view, nobody's likely to find out about it, so copyright law would come into the picture only insofar as you wanted to stay legal in that respect.

share|improve this answer
Yeah. That why i said wasn't so much worried about legal, as i was about whether it would bother him if he knew. Or coders in general. – zenbike Jun 22 '11 at 14:44
Same here. I would probably never have a problem with it myself and I would be flattered if I knew that someone did. – Echo Jun 22 '11 at 17:58

Reverse engineering is a tried and trusted method in engineering. It is tried and trusted because it is mostly legal. Specifically, with respect to the DCMA, Wikipedia says:

Sec. 103(f) of the DMCA (17 U.S.C. § 1201 (f)) says that if you legally obtain a program that is protected, you are allowed to reverse-engineer and circumvent the protection to achieve the ability the interoperability of computer programs (i.e., the ability to exchange and make use of information).

When isn't it legal? Primarily when you've signed an EULA that says it is illegal, or you've obtained the thing being reverse engineered illegally.

I am not a lawyer

Talk to one if the legalities matter.

I am not an ethicist

Ethics usually pertain to how you were brought up. Talk to you mother / father / brother / sister / cousin and see what they say.

share|improve this answer
Codified law always takes precedence over license. Parts of license that say something contrary to the law in your legislature should be disregarded. – vartec Jun 22 '11 at 14:39
I think the OP was asking more along the lines of "is it ethical?", which is a different question (though legality should be considered, it's not a complete answer). – FrustratedWithFormsDesigner Jun 22 '11 at 14:40
@FrustratedWithFormsDesigner: Agreed. Ethics is how you were brought up. Law is where you live. They are very different, and have very different answers. – Peter K. Jun 22 '11 at 14:42
@vartec: Yes, but if you move jurisdictions you can be in trouble! – Peter K. Jun 22 '11 at 14:43
can I publish reversed-engineered code, for example in github (with reference where it comes from and why I decompiled it)? – Marian Paździoch Mar 30 '15 at 13:00

Is it acceptable

The word "acceptable" is very fuzzy. Each person implies something different, based on his cultural background, unique experience and the set of values. Therefore it's impossible to answer this question.

If we narrow it down to:

Is it legal?

Definite "no" in most jurisdictions.


Is it fair towards the author?

Again, no, if the author wants to keep his work private you must respect that.

There is a policy of "fair use" when you can use parts of the copyrighted work in a certain context but that implies you take the public output of the work, as a matter of speech. Decompilation, or in other words (reverse engineering, legally speaking) is an entirely different activity which has nothing to do with fair use. Here you're trying to restore the intentionally hidden work from what was made public. If they used obfuscation then your decompilation is a fact of intentional breaking of protection mechanisms. And it is punished by law.

share|improve this answer
I meant acceptable. Meaning, to put in its simplest terms, if I couldn't ask you for whatever reason, and I was looking strictly for learning, not reusing your code, for profit or project, would it make you angry? Would you be offended? Would you have a lower opinion of me, should we meet, and I tell you at some point. (Since I can't see another way for you to even know if i stick to the aforementioned restrictions.) I'm looking less at a legal issue, and more at an ethical or socially acceptable level. And frankly, I hadn't even considered asking the author. Which I should have. – zenbike Jun 22 '11 at 14:05
As far as legal, there are exceptions to copyright for fair use for education in most places, so i don't think that is as black and white as you make it out. If it is, explain why. – zenbike Jun 22 '11 at 14:06
This answer is not very useful; it makes definite statements on legal matters and does not even suggest finding a lawyer in your jurisdiction. – David Thornley Jun 22 '11 at 14:27
@zenbike: "OP" stands for "Original poster" - it refers to you (zenbike) because you posted the original post (namely, the question that you asked). – FrustratedWithFormsDesigner Jun 22 '11 at 14:28
@M.Todd: I'm not trying to be obtuse. But I've repeatedly said that I was concerned about whether it would bother you if it was your code. Not the legal implications, which vary widely, aren't at all clear regardless, and would be better served from a lawyer if i was going to skirt the edge of the law. Which I'm not. You keep bringing back to the legal viewpoint, so I wanted to know if you see a difference, or if you are trying to say something I'm not getting. No offense was intended, if you took one. – zenbike Jun 22 '11 at 14:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.