P

Perfection Kills

perfectionkills.com · Personal blog · on HN since 2010

Perfection Kills is Juriy Zaytsev's (kangax) blog on JavaScript, the DOM and CSS internals, plus performance and tooling experiments.

What HN saysHN links it for deep dives such as global eval and the HTML minifier experiments, which commenters cite when discussing those topics.
65HN people shared it
17linked it in comments
64stories submitted
941story points
4 years agolast shared
2010people per year2026

Most-shared posts

  1. 1
    Understanding delete in Javascript
    9 people · 220 points · first shared 2010 · 8 comments on HN
  2. 2
    Profiling CSS for fun and profit
    7 people · 37 points · first shared 2012 · 2 comments on HN
  3. 3
    You thought you knew Javascript
    7 people · 21 points · first shared 2010 · 1 comments on HN
  4. 4
    Global eval. What are the options?
    7 people · 9 points · first shared 2010 · discussion on HN
  5. 5
    The poor, misunderstood innerText
    6 people · 227 points · first shared 2015 · 32 comments on HN
  6. 6
    What’s wrong with extending the DOM
    6 people · 9 points · first shared 2010 · discussion on HN
  7. 7
    Exploring canvas drawing techniques
    5 people · 200 points · first shared 2013 · 35 comments on HN
  8. 8
    Experimenting with html minifier
    4 people · 23 points · first shared 2010 · 9 comments on HN
  9. 9
    State of function decompilation in Javascript
    3 people · 9 points · first shared 2014 · discussion on HN
  10. 10
    Optimizing HTML
    3 people · 7 points · first shared 2010 · discussion on HN
  11. 11
    JavaScript quiz, ES6 edition
    2 people · 9 points · first shared 2015 · discussion on HN
  12. 12
    Tag is not an element. Or is it?
    2 people · 8 points · first shared 2010 · discussion on HN
  13. 13
    Refactoring single page app
    2 people · 7 points · first shared 2014 · discussion on HN
  14. 14
    HTML minifier revisited
    1 people · 99 points · first shared 2014 · 41 comments on HN
  15. 15
    Extending Native JavaScript Objects. Evil or Not?
    1 people · 17 points · first shared 2011 · 2 comments on HN

What HN people wrote when they linked it

javajosh · 2012-07-11
I really admire Resig, and this post contains a few gems: 1. Knew about PPK[0], didn't know about JZ[1] 2. Feature detection came about from writing this book! Which generalizes too: writing is a great way to innovate (something pg has said, too). 3. A nice little jab at GRRM, who thoroughly deserves it. 4. An exciting glimpse into the future of computer science pedagogy by way of JavaScript in the browser. (And I can't help but wonder if this is an oblique response to the recent Alan Kay Dr. Dobbs interview, where Kay asserts, "The Web, in comparison, is a joke. The Web was done by amateurs."[2]) 5. Points out that even the best of us can get stuck in a procrastination loop. 6. Resig is going to finish a JavaScript book [3] [0] http://www.quirksmode.org/ [1] http://perfectionkills.com/ [2] http://www.drdobbs.com/architecture-and-design/interview-with-alan-kay… [3] http://jsninja.com/
Nzen · 2021-05-25
I'm of the impression that it is an internet reimplemented on top of the internet that we are using right now. So, you download a vm emulator, like uxn [0]. This able to use a specific protocol to reach out and communicate with other vm emulators of its kind. But, like the tls namespace, my vm doesn't just reach out to macwrite.com/index.html . It has to go through my switch, through a series of switches of my and other commercial ISP datacenters, until it reaches the server that manages 'com' and then finds the server with the webpage I want. But, that requires people to forward that traffic with their own vm emulators. So, Tlon, the organization that sponsors the urbit ecosystem, sold address space for 'galaxies', which are like the top level domains. They are expected/encouraged to lease out address space to many others, as 'stars', who will relay traffic up and down. Finally, laggards are expected to rent address space and subscribe for bandwidth from the star operators as a 'planet'. A vm without a star, a comet, to, I don't know, sign its traffic, can not communicate with other vms on the network. That is what I've concluded urbit is. Urbit is sold as the opportunity to reimplement all of computing on top of this system. Like compilers ? They have a language they are building this stuff with. Like OS ? They need to flesh out the vm that you use. Like some application thing ? They probably need that too, reimplement all the things: text editor, web server, build…
niftich · 2017-02-08
Wow, this takes me way back -- but that 'way back' was only 10 years ago. So much has changed in that span of time, it's mindboggling. Around the time that MooTools appeared, Prototype and Dojo were the cutting-edge of DHTML, freshly made cool again by the term 'Ajax'. Prototype was very much a series of ugly hacks driven by the get-shit-done monkeypatching mentality of Rails, but it was fantastic. Meanwhile Dojo was fast-sprawling ecosystem of community and corportate contributions and plugins and whatnot, backed by a non-profit Foundation, and supported by major companies like IBM and Sun -- I can't firsthand speak to its quality (some have said it was quite good), but the contrast was night and day. Script.aculo.us emerged built on top of Prototype to add tasteful interactivity (like DOM element dragging), and its branding targeted style-conscious developer-designers (the sort who'd read CSS Zen Garden but were tempted by JS). As the MooTools team noted, the weaknesses of Prototype started to show as its capabilities were pushed -- and it was getting kinda big. It was into this landscape that jQuery, Moo.fx, and MooTools arrived, and the rest is now ancient history. There were many things that set jQuery and MooTools apart, but a notable one was their differring philosophies on extending native JS objects, or in contemporary parlance "extending the DOM". jQuery specifically didn't do this, while MooTools followed in the vein of Prototype and actually extended more…
DustinBrett · 2022-06-10
I've been using https://github.com/terser/html-minifier-terser to get this kind of HTML for my personal site for a while. It passes W3C so I'm happy. After reading the connected blog post http://perfectionkills.com/experimenting-with-html-minifier/
brudgers · 2016-06-20
The linked article that goes into more detail: http://perfectionkills.com/global-eval-what-are-the-options/
je42 · 2015-01-13
MMh. Using toString to serialize a JS function breaks for some functions doesn't it: https://github.com/mentum/lambdaws/blob/master/lib/LambdaHelper.js#L79 It seems here is a discussion about the topic: http://perfectionkills.com/state-of-function-decompilation-in-javascri…
kangax · 2014-12-12
Your comment inspired me to write a post on References in Javascript :) http://perfectionkills.com/know-thy-reference
ricardobeat · 2014-09-05
After a certain point the number of selectors does affect parsing time and selector matching time, in a very significant way. Performance has improved a bit since this post but it's still relevant: http://perfectionkills.com/profiling-css-for-fun-and-profit-optimizati…
mmastrac · 2014-05-19
Good tip -- it's also a good reason why you should never use eval() or Function() inside your application code. You should always try to capture a global eval instead: http://perfectionkills.com/global-eval-what-are-the-options/
frederickf · 2013-10-06
The responsive design view is very handy. It switches the size of the view port without changing the size of the whole window. I still use firebug most of the time, but there are some issues with firebug you have to be careful of. See this post for an example http://perfectionkills.com/understanding-delete/#firebug_confusion
masklinn · 2013-06-28
Correct. Not only is eval not a good idea in general, but it's a very weird beast in javascript. See http://perfectionkills.com/global-eval-what-are-the-options/ for a very complete exposition of its weirdness.
jarek-foksa · 2013-06-05
I would expect an expert to know the correct answers to most questions in kangax's quiz: http://perfectionkills.com/javascript-quiz/
tlack · 2012-07-07
(1,eval)('2*2') evaluates in the global context, so it may be slower I would think. Here's a really long and insanely detailed post about this odd feature: http://perfectionkills.com/global-eval-what-are-the-options/
pfraze · 2012-06-15
I'd add also that Javascript proto inheritance is more about composition than type checking, since `instanceof` has its frames problem [1]. As a result, I'm increasingly inclined to do data-structure objects and composable functions, which seems similar to Go's approach. 1 http://perfectionkills.com/instanceof-considered-harmful-or-how-to-wri…
lucaswoj · 2011-07-05
The example in this document of using the delete operator on a function is wrong. http://perfectionkills.com/understanding-delete/
simonw · 2010-10-16
I believe MooTools still makes extensions to built-in DOM classes, which other libraries avoid - even Prototype is moving away from that technique, and they were the first to popularise it. http://perfectionkills.com/whats-wrong-with-extending-the-dom/
acdha · 2012-05-04
That statement is too broad to be correct: modern browsers have had work optimizing selector performance (see http://calendar.perfplanet.com/2011/css-selector-performance-has-chang… and you really need to measure before drawing conclusions, particularly when the alternative of cargo-culting less semantic, harder to maintain code has its own costs and doesn't get as much performance attention as browsers do. Since there are are now CSS profilers for Chrome, WebKit and Opera (see http://perfectionkills.com/profiling-css-for-fun-and-profit-optimizati… you can also make the better comparison: your actual site. Examples: http://stevesouders.com/efws/css-selectors/csscreate.php?n=1000&se… http://stevesouders.com/efws/css-selectors/csscreate.php?n=1000&se… http://stevesouders.com/efws/css-selectors/csscreate.php?n=1000&se… http://stevesouders.com/efws/css-selectors/csscreate.php?n=1000&se… All four are very close in time in Chrome and Firefox - within 10ms or so. In all permutations of this, what really makes the most difference continues to be the question of how quickly the browser can narrow the set of nodes under consideration, which usually comes down to how well your markup makes expressing relationships natural rather than syntax tricks.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close