Hacker News new | ask | show | jobs
by yoavm 3836 days ago
I suspect too many web applications are going use WebAssembly to obscure their code and the way they work, thus making it impossible to learn by studying their code. As someone who learned programming mostly by looking at other people's code, I'm afraid the web will change in a way that would make it a lot harder to do so.
5 comments

Being able to view source is a design goal of WebAssembly, according to [0].

If an organization doesn't want you reading their JS, there are already plenty of tools to make it nearly impossible as-is. Do you really learn anything from reading minified, obfuscated code? At some point you're just reverse engineering, which is obviously still possible with WebAssembly.

'Open source by default' is a problem to be solved at a cultural level, not a technical one.

[0] https://github.com/WebAssembly/design/blob/master/FAQ.md#wil...

Do you really read other people's minified/obfuscated js?
It was far less common to minify JS code when I started doing that, but yeah, even now I much rather have minified JS code than no code at all.
So decompile or disassemble WebAssembly?
Basically, you took it for granted that web had source as the binary, unlike the rest of the world (native binaries are not the source).

You'll still be able to find and read source of open source web projects, like like you can for open source non-web projects.

> 'Open source by default' is a problem to be solved at a cultural level, not a technical one.

Highly agree.

I'm not taking it for granted, I think it makes a better world. I'd rather my oven to come with a book saying how it was assembled and how should I fix common failures it might have, and I rather a chair to come will a little paper saying what kind of colors were used on it so I can repaint it when it gets old. I feel one of the things that made the web great is "View Source".
Agree. So previously "View Source" was enforced to be there due to technical limitations. In the future, it should continue to be there, but it will have to be as a result of cultural decisions.
There are plenty of open source projects to help you do that (re: github). Proprietary software's source code is not meant to be read unless the developers specifically want it to be. The web allowing it for JavaScript was a happy accident, that is basically gone now with the uglifiers.
Just because the source is viewable doesn't mean that you're allowed to do anything with it. Your fears are already true. Any IP you or someone else creates is automaticially under copyright unless you choose a proper opensource license but then the real source code is probably already available on github.