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

872 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

when you code a program, lets say in C++, after you are done, to make it actually into a program you need to compile it.

compiling turns human-readable code into machine code, which literally tells the CPU which bits in the ram to set to 1 and which to 0, its very hard for humans to read, and takes *a lot* of work for someone to figure out the c++ code again without knowing the source code. (this is called reverse-engineering),

but even when you figure out the c++ code from machine code, it wont even be exactly the same as the source code, as all comments will be lost (since when compiling they are removed as they would only take up space), and it basically just be very hard for anyone to understand.

when you compile a program from source code to machine code, its not meant to be reversed or read by a human, it only meant to be an .exe file that your computer can read.

“Open Source” means that a person simply decided to openly share the source code to their program for others to check how it works and potentially use parts of it in their own code (if the owner allows it)

also note, that reverse-engineering “Closed Source” might be illegal, and if a developer choosed a closed-source model, they almost certainly wont allow someone to use their code in other programs anyway.

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