Most of what I learned on the web in my early years was from “View Source”. Then came the books and the conferences.
It makes me sad to see lots of sites minifying code for performance and not releasing the full version of the code so other developers could learn from it. It’s the openness that I really like about the web.
I think there should be a “View Source Alliance” that would set rules on how to release your code in a way that visitors can benefit from the speed of minified code, while web developers can still find your full files and learn from them.
I’ll set a few simple rules here, hoping somebody with more reach picks them up:
- If you minify the files for them, use a simple convention name.min.ext (say jquery.min.js)
- When you deploy minified files, also deploy their full version at name.ext (say jquery.js)
- If you for some reason can’t release the full files next to the minified ones, add this to the top of the minified file: /*viewsource*http://path.to/full.ext*/ (say /*viewsource*http://http://code.jquery.com/jquery-1.4.4.js*/)
This way you will not only help others, but sometimes even stop breaking the law. Because you might be using some open source code with a licence that says you must release your code with a same/similar licence.
While I agree with you on the topic of releasing the source code, I don’t think minification (or even obfuscation for that matter) can be a violation of some open source license. It’s technically still source code, and still public, so it’s actually as released and available as possible. Granted, not readable, but still. :)
Technically that doesn’t really matter that much :)
You started it! :)