3 ms·
I do wish this was less common. It's kinda hostile to any users who might want to fire up a debugger for learning or solving a problem with your site, and as w
by capitainenemo 3y ago
I do wish this was less common. It's kinda hostile to any users who might want to fire up a debugger for learning or solving a problem with your site, and as we can see can mess with developers too.
And while it does speed up load time a bit in JS engines, this was never a measurable amount in any JS library I used. Bytes pushed out from the site were only slightly lower than the non-minified, since both were compressed in transit anyway.
- strbean 3y agoThat's what source maps are for (assuming they work). Still leads to strangeness when the minified code doesn't have statements that corresponds 1:1 with the original code.
- capitainenemo 3y agoAssuming they are working and were created yeah. It just seems like another hack layer on top of something that really doesn't seem to add much in the first place. I mean, if you're wanting every last bit of performance, maybe just use WASM or something? Bonus, always obfuscated.
- capitainenemo 3y agoHm... I guess the user hostile could be a feature not a bug. Obfuscation.
- aragonite 3y agoExamining this kind of (unintentionally) obfuscated code can be a learning opportunity as well. Forgetting the intuitive meaning of symbols is often helpful in doing mathematical proofs (I think Weyl has a famous quote about that). Who knows, maybe the same is true of programming! I've been trying to train myself to to read code purely based on their form, replacing variables names by purely unsuggestive random letters and training myself to visually pattern match first elementary, then increasingly complicated patterns. Still too early to tell whether this will lead anywhere. But in some cases it definitely saved me time by removing the temptation to wonder what the original author's "thinking" was behind this or that choice of variable/function name.
- gitgud 3y ago> It's kinda hostile to any users who might want to fire up a debugger for learning or solving a problem with your site It’s intentional, as commercial sites don’t want you to know how it actually works, as you could steal it. Business cannot exist without secrecy…