TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Minification Is Evil

46 pointsby tpetrinaover 1 year ago

20 comments

jmull3nover 1 year ago
Don’t agree with this take. Sacrificing the performance for all my users so a minuscule percentage of them can poke around a little easier? All the JavaScript is likely transpiled anyway. They can use dev tools to unminify most of it. Deploying with source maps for production might be a better ask?
评论 #38380416 未加载
评论 #38380502 未加载
评论 #38385126 未加载
评论 #38380320 未加载
评论 #38380628 未加载
评论 #38380497 未加载
PaulHouleover 1 year ago
Not minifying your code is evil from the viewpoint of people who have to wait for your page to load.
评论 #38380128 未加载
评论 #38380025 未加载
评论 #38380447 未加载
评论 #38380367 未加载
评论 #38380505 未加载
评论 #38380185 未加载
评论 #38380605 未加载
lcnPylGDnU4H9OFover 1 year ago
The three lines of not-haiku made me want to write a haiku.<p><pre><code> Do not minify Your front end is insightful Let people inspect</code></pre>
评论 #38380200 未加载
Zealotuxover 1 year ago
I don&#x27;t understand; I&#x27;m not going to increase the size of my assets just to please the very small minority of hackers who want to play around. I&#x27;d rather open-source my code.
评论 #38380646 未加载
评论 #38380289 未加载
donatjover 1 year ago
With GZIP and moreso Brotli the difference in actual data transfer is negligible anyway.<p>Minification doesn&#x27;t really achieve much other than obfuscation these days.
评论 #38380455 未加载
评论 #38380591 未加载
评论 #38380413 未加载
sanitycheckover 1 year ago
Sadly, not minifying source code can often lead to your idiot customer discovering that their web app is not a magic binary blob and complaining that it&#x27;s &quot;insecure! anyone can see how it works!&quot;, which then in turn leads to your idiot PM agreeing to a new &quot;obfuscate all code&quot; feature without bothering to involve anyone technical.<p>Deliberately obfuscated JS is <i>far</i> more evil, take it from someone who&#x27;s had to debug 3rd-party obfuscated JS libs.
评论 #38380601 未加载
gustavusover 1 year ago
Minification always struck me as a cargo culting type way that &quot;badass rockstar programmers would get every last ounce of performance&quot; out of their code.<p>Because as noted below minification is much less impactful than compression, but going even further, if you really care about performance the solution is as simple as not shoving 20 metric boatloads of JavaScript in your website in the first place.<p>If you&#x27;re argument I&#x27;d &quot;muh rural customers&quot; then maybe you should actually look at how your website is designed and ask yourself if you need to ship 3 different frameworks to accomplish what you need to do, or maybe start by stripping out the bloated analytics and ad nonsense in your code.<p>At the end of the day the author is right, the arguments about whether minification is useful is a teachincal argument, but the business will always want it for the purposes of obfuscating their code, and so we need to push back against the idea of it being an industry norm otherwise managers will push to make it so.
JodieBenitezover 1 year ago
Hey... good to see this. I was never convinced about this for small to medium JS code base while serving through mod_deflate or similar.
toss1over 1 year ago
Soooo long gone are the days of the really compact website<p>There used to be a contest for best website that would fit into 5k bytes. [0]<p>Now, the bloat is so bad that there is a serious suggestion to nevermind the website, just make people download the entire cargo load and use it locally, merely to get acceptable performance.<p>If this does not tell us that the entire framework thing has gone too far, abstracted everything from actual speedy code, larded everything up with so much &#x27;just in case&#x27; baggage code, etc... IDK what will.<p>[0] <a href="https:&#x2F;&#x2F;www.the5k.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.the5k.org&#x2F;</a>
explaininjsover 1 year ago
Lots of folks outing themselves as never adding comments with remarks like &quot;compression works nearly as well as minification&quot;.<p>In some of my more logically involved code, the bulk of the bytes are in comments - and they barely compress at all.<p>Just minify. Nobody cares about your source code; if they do and you want them to, publishing on GitHub is far better as it allows for viewing the TS&#x2F;ESNext version and separate files too (don&#x27;t tell me you aren&#x27;t bundling!!); and working with minified code is not hard, especially now that dev tools have built-in maxifiers.
评论 #38382591 未加载
tpetrinaover 1 year ago
In the modern era of minifying JS to squeeze out bytes, in certain cases, for smaller, non-commercial sites, it might be better for devs to learn from reading each other&#x27;s source code.
qweryover 1 year ago
This is cute. It&#x27;s refreshing to see such a simple idea published on the internet in such a way. I also got a kick out of the URL.<p>Thanks for submitting it!
nsonhaover 1 year ago
Why is everything on the web has to serve some random tinkerer who do not benefit the creator of the website in any way? How about we apply this thinking to other kind of products? An app has to be designed for tinkerers to? A cars, a rockets?..., so everything has to be open source? Why?
staredover 1 year ago
I have my personal website on GitHub. It gives much more than &quot;not minified code&quot;. And actually, I had one interesting email on a widget I created (weighted sorting of blog posts, so it is up to the user to weigh novelty, popularity, my opinion, etc).
Havocover 1 year ago
Surely better tools to analyse stuff is a better answer.<p>Think ASM disassemblers - arguably a harder task and people do fine with it
Veuxdoover 1 year ago
Think of the lives lost to javascript minification.
eloyover 1 year ago
I think minification should be done on another layer: HTTP compression and HTTP parallelization and that kind of stuff. And just don&#x27;t make a complex web app, so it will be fast.
评论 #38380581 未加载
incrudibleover 1 year ago
No.
djaouenover 1 year ago
Didn’t read the article, but I agree with the title lol
评论 #38379926 未加载
colesantiagoover 1 year ago
Hard disagree.<p>Nobody cares about the source, let website authors do what they want.