Why is it so difficult to copy source code that is not “open source”?

890 views

It’s been in my mind if we are using the software/program or even hardware of a tech company, we can play around, install-unsinstall and more. Then how is it so difficult for someone to “unhide” the source code that the device uses? Technically the code is in the device somewhere hidden in it, so it’s there, but still, it’s almost impossible to obtain the source code. How do they achieve this so no one copies their code?

In: 366

42 Answers

Anonymous 0 Comments

This this something that’s a side effect of what is called **compilation**.

When someone writes source code it is written in a sort of natural language eg “if x do y”, but a computer only understands a set of very simple instructions eg “read value, set value, compare value” (to learn more look up ‘assembly language’).

So in order for source code to actually perform, it has to be translated from the higher level language into a series of the simple instructions that the computer actually knows how to perform – this translation process is **compilation** and produces files like the .exe you might click on to run a program.

If you then were to open up a compiled file, you would see a long list of simple computer instructions that cause the program to run, but is incredibly hard for a human to understand. Additionally, because a single line of source code could compile into more than one instruction, it can be hard to convert it back into the code that it was compiled from.

Though it’s not impossible! There are programs that exist which can reverse engineer, or decompile, the list of instructions and try to make a best guess as to what the original source code looked like, though it might not be an exact replica as some data gets lost in the compilation process.

You are viewing 1 out of 42 answers, click here to view all answers.