It depends on exactly what you’re talking about, for a web app the source code, at least for the front end, is exposed in some degree to the user if they knew where to look. It would be nearly impossible for them to read however due to some obfuscation techniques that get used. The two primary means of obfuscation we use at my place of work is minificafion and uglificafion. Minification is pretty straight forward to understand, a compiler will remove all unnecessary white space, line breaks, comments, unnecessary brackets and semi colons, and even go through and replace variable and function names with one or two letters. This has the advantage of making the file sizes significantly smaller as well, but it becomes virtually impossible for a human to read it. At that point, it can go through a process called uglification, which does what you think it does, it makes the code ugly and even harder to read. By the time this is done, it would be exceedingly difficult, albeit not impossible to reverse engineer the code.
You also have to consider that even pretty and verbose code isn’t always easy to understand for someone who just sits down for the first time and tries to read someone else’s code. Generally speaking they’ll either need to spend a lot of time digesting what everything is doing, or have people familiar with the code base explain things. Totally jumbling up the code with extreme short hand, no punctuation, and performance optimizations will ruin even the best developers time.
Latest Answers