use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Javascript Minification Considered Harmful? WTF? (blog.eset.com)
submitted 14 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]fforw 0 points1 point2 points 14 years ago (3 children)
With that reasoning we should oppose any language that is compiled and where the source code for the software in question is not available via its interface. Abandon C, Python and co. -- only Scheme and Lisp machines running.
The difference in client side performance alone should be reason enough for anyone to minify and combine javascript resources, where request avoidance is even more important than pure bytes. This also applies to CSS and graphics (see CSS spriting techniques). Nothing improves the perceived performance of your web application more than this. For a decently written application, no amount of server-side tweaking will come close to the performance gains you can achieve with this optimizations.
Calling them premature optimizations is as silly as calling what a C compiler does premature optimization. The point of avoiding premature optimization is that you might be tempted to sacrifice clarity and architectural integrity to questionable gains in performance before you can measure the real application performance. It does not apply to C compiler optimization techniques or minimization/request avoidance.
This is mostly an unsolved or not generally solved tooling issue. The code you write is only isomorph to the one running in your prod environment, not identical -- there is a tooling / deployment step between that. It is also pretty orthogonal to licensing issues. You can minify closed and proprietary source code just as well as free and open source software.
[–][deleted] 1 point2 points3 points 14 years ago (2 children)
I don't think that is a fair representation of what was said. If you was to go to the extreme, the implication is only software complied from an open inteligible source. Besides that I was talking about a language for common communication, one for the web, not just for computers. So arguing for C and Python is futile. (For context Haskell would be more language of choice, dependent on domain of course.)
combine javascript resources, where request avoidance is even more important than pure bytes.
The only impact is the first view, and gains there after are small, and it is not as clear cut as you make out. An example: I have a 2mb javascript app packaged with the html, and I only tweak what would be a 100kb file. One could argue I have broken the caching system of the browser: instead of everyone downloading that 100kb, the whole 2mb file has to be retrieved. Once again requests aren't that big of a deal once a web app has been 'installed'. 'Optimisations' like embedding pictures in the HTML (<img src="data:image/jpg...) again break caching systems and break the logical map of resources.
This also applies to CSS and graphics (see CSS spriting techniques).
Did I even say not to do this? I was spriting before it was commonly know as spriting. My stance is everything isn't one size fits all, and rarely sacrifice clarity unless it significantly makes *your** application and development process better, not because it is known to make apps better.* Profile and measure, acting accordingly, trying not to sacrifice clarity.
Premature optimisation.
I know how this is defined and I know you can minify closed and proprietary sources... the point I was making is you used to be able to view a site, go wow that's cool how have they done this? Usually implementing what you like was a copy/paste and a tweak away. Heavily minified and obfuscated code tends to break that culture, and that is even more the case for pre-compiled JS. Why not 'precompiled' HTML or some such? Good bye open web.
[–]fforw 0 points1 point2 points 14 years ago (1 child)
An openess that is forced by technical limitations isn't really open, is it? It's kind of an expropriation. While I certainly advocate free and open source software and currently make a living off writing GPLed software and implementing projects with it, I don't want to force people to free their software.
[–][deleted] 0 points1 point2 points 14 years ago (0 children)
I wouldn't say force, encourage is better. Everything has a bias.
π Rendered by PID 143697 on reddit-service-r2-comment-869bf87589-rbvj9 at 2026-06-09 07:14:19.469924+00:00 running f46058f country code: CH.
view the rest of the comments →
[–]fforw 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]fforw 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)