John Resig

johnresig.com · Personal blog · on HN since 2017

John Resig, creator of jQuery, writes about JavaScript, programming practice, and his experience writing technical books.

What HN saysHN commenters recommend his interactive Learning Advanced JavaScript tutorial and cite his posts on book profits and on the jQuery selector engine.
35HN people shared it
25linked it in comments
11stories submitted
133story points
6 months agolast shared
2017people per year2026

Most-shared posts

  1. 1
    Write Code Every Day (2014)
    4 people · 5 points · first shared 2019 · discussion on HN
  2. 2
    Learning Advanced JavaScript (2008)
    4 people · 1 points · first shared 2017 · 1 comments on HN
  3. 3
    Re securing json
    4 people · first shared 2017
  4. 4
    Programming Book Profits (2008)
    3 people · 75 points · first shared 2018 · 35 comments on HN
  5. 5
    John Resig – ECMAScript Harmony (2008)
    2 people · 4 points · first shared 2021 · discussion on HN
  6. 6
    Accuracy of JavaScript Time
    2 people · 1 points · first shared 2018 · discussion on HN
  7. 7
    Javascript performance rundown
    2 people · first shared 2019
  8. 8
    Web workers
    2 people · first shared 2017
  9. 9
    JavaScript: Search and Don’t Replace (2008)
    1 people · 42 points · first shared 2020 · 43 comments on HN
  10. 10
    getBoundingClientRect Is Awesome (2008)
    1 people · 2 points · first shared 2022 · discussion on HN
  11. 11
    Twitter vs. Mastodon
    1 people · 2 points · first shared 2022 · discussion on HN
  12. 12
    10th Anniversary of jQuery (2016)
    1 people · 1 points · first shared 2026 · 1 comments on HN
  13. 13
    Ukiyoe
    1 people · first shared 2018
  14. 14
    Versions of javascript
    1 people · first shared 2020
  15. 15
    Html5 shiv
    1 people · first shared 2020

What HN people wrote when they linked it

xrd · 2022-05-04
John Resig (inventor of Jquery) has written books across a variety of publishers. He has also written extensively about how he fared financially. These are worthy counter points to the discussions here about "only 10%." https://johnresig.com/blog/programming-book-profits/ https://css-tricks.com/so-you-want-to-self-publish-books-and-courses-o… TL;DR: for a person as Internet famous as John, discoverability and getting a full click on the "buy" button are still very hard problems.
talkingtab · 2020-02-19
A problem with learning JS is the old versus new. The language has evolved enormously. Callbacks vs async, functions and arrow functions, and "this" are a few examples. So learning JS perfectly and completely, is a bit like learning not only English, but old English as well. There is very little (if any) JS that is no longer accepted, but there are many parts that are no longer best practice. I have found that understanding prehistoric JS provides a good base for making sense of where JS is today. John Resig's (jquery) writings were very helpful, and this site is an absolute must for me. https://johnresig.com/apps/learn/
otoburb · 2019-11-25
>>He also started Khan Academy which is one of the best online learning resources to date. I agree with your points about John Resig (great choice!), except I'm pretty sure that Resig joined Khan Academy in 2011[1] while Salman Khan[2] was the sole founder in 2008[3]. [1] https://johnresig.com/blog/next-steps-in-2011/- [2] https://en.wikipedia.org/wiki/Sal_Khan [3] https://en.wikipedia.org/wiki/Khan_Academy
hliyan · 2017-07-31
If you truly want to grok JavaScript, I can recommend no better tutorial than this: https://johnresig.com/apps/learn/ It is how I finally grokked JS and it is the same tutorial that I put all new additions to my team through...
tipiirai · 2024-02-07
Absolutely yes. jQuery selector engine was developed before the official Selector API, which ended up being almost exactly the same. Except for a few exceptions which John wasn't too sure about when they asked for feedback: https://johnresig.com/blog/thoughts-on-queryselectorall/
simoneau · 2023-07-18
These green squares helped John Resig for about 4 years: https://johnresig.com/blog/write-code-every-day/
zeven7 · 2023-03-09
All of this was hashed out during the "Harmony"[1] days. Versioned-JS was of course one possible future. Maybe even still is. But the prevailing decision coming out around that time and leading to ES5 and ES2015: We'll add "use strict" as a single-point-in-time breaking opt-in upgrade to fix a lot of the common problems, but let's otherwise stick to "One JavaScript"[2]. You may find [2] and [3] especially enlightening to understanding this thinking, and any other discussions from ES Discuss on the topic if you fell like digging into history. [1] https://johnresig.com/blog/ecmascript-harmony/ [2] https://2ality.com/2014/12/one-javascript.html [3] https://esdiscuss.org/topic/es6-doesn-t-need-opt-in
dmix · 2020-06-15
You can define your own arbitrary HTML < /> tags and style them or use JS with them in modern browsers (which is what hstack and vstack are, which seems to be inspired by the pylon framework and SwiftUI). If you need to support really old browsers than using an HTML5 shiv will be sufficient for any <tag /> to work: https://johnresig.com/blog/html5-shiv/ There's a longer discussion here about pros/cons: https://stackoverflow.com/questions/16867332/html5-why-not-use-my-own-… I have a feeling this is one of those things that will become more common with this broader support for HTML5 and web components but at the moment it's not very common and there are some debates on whether you should break web standards/specs.
runawaybottle · 2020-04-29
You have to go back a bit and see why the fuss over rendering performance even exists: https://johnresig.com/blog/the-dom-is-a-mess/ If the vdom can do the diff and sync all the changes to one DOM update, you only trigger one re-layout. That’s one of the main reasons to have the vdom, to offset shitty DOM performance by using app memory. The browser really sucked/sucks. I urge everyone to keep track of the history of JS frameworks, and why we even gravitate towards these frameworks.
uk_programmer · 2020-02-25
Well to nitpick your nitpick. Internet Explorer did allow you to use vbscript to manipulate the DOM. http://www.herongyang.com/VBScript/IE-Browser-DOM-API-Document-Object.… Also you can use XSLT to create a new DOM tree in a browser from an XML document. http://www.informit.com/articles/article.aspx?p=24032&seqNum=9 EDIT: I forgot about JScript vs JavaScript vs ECMAScript. https://johnresig.com/blog/versions-of-javascript/ However much of this isn't relevant today.
jashmatthews · 2020-01-04
The point is Mozilla, Apple and Adobe did enormous work on JS before Chrome was released. nbody and Fannkuch are meaningless for real world performance on a client side JS app. V8s benchmarks were widely considered to be unrepresentative of what browsers actually do. Sunspider and derivatives were the most realistic tests at the time and Chrome wasn’t a dramatic improvement. https://johnresig.com/blog/javascript-performance-rundown/ Chrome’s marketing was incredibly successful in getting more people to use a browser better than IE but it didn’t have a dramatic improvement over FF or Safari.
Mathnerd314 · 2019-08-30
I found https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-sui… with a graph at the end, but of course that is written by Webkit (JSC) developers. Then there is https://johnresig.com/blog/javascript-performance-rundown/ from 2008. https://www.railsmine.net/2017/12/browser-benchmark-safari-11-chrome-6… from 2017, similar results to the JetStream 2 post.
krapp · 2019-08-24
>JS of the past was the wild west. You want to add a bookmark? Go for it! You want to trigger a print dialogue? Why not! Yeah. People forget that in the bad old days you could even do things like redefine the global Array constructor[0]. [0]https://johnresig.com/blog/re-securing-json/
Boulth · 2019-08-04
The biggest pain point in these security guidelines is context. For example this Array override issue has been fixed in major browsers 11 years ago [0]. Unless someone codes for IE6 I'd consider this not a real problem. [0]: https://johnresig.com/blog/re-securing-json/
RandyRanderson · 2018-10-25
rems don't work either because there are instances where you need to have things line up exactly. For example, if you have 3 columns. You will be one pixel out. There are no good ways to fix this. See [0] https://johnresig.com/blog/sub-pixel-problems-in-css/ CSS should only be used to appease those ppl in your org that read/write more blog posts than code. Use JS if in doubt. You're welcome.
shuzchen · 2018-08-23
Fetching time in the browser isn't accurate because a lot of trackers exploit timing in order to fingerprint users. A lot of browsers now purposefully reduce the precision of the clock. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Glob… https://johnresig.com/blog/accuracy-of-javascript-time/
dsissitka · 2018-06-12
Some people had to wait four years. The MEAP was released in 2008. Three years later Manning brought in a second author to finish the book. It was released in 2012. A couple of quotes from https://johnresig.com/blog/secret-omens/: > ...I got caught up in coding and stopped focusing on writing. I had to prioritize my time and I chose to prioritize doing more development and focusing on my personal life. > ...I would absolutely not write a technical book again.
speedplane · 2017-10-19
>I'm not so sure. Static, printed 2D paper isn't nearly so limiting as you'd think. The real benefits of e-textbooks aren't little interactive animations, but substantive learning-by-doing. For example, having a real interpreter or simulator built into the learning software. A good example of this concept is Resig's advanced javascript tutorial (https://johnresig.com/apps/learn/), but you could easily see something similar for learning accounting or other areas where software is integral to the concepts.
weberc2 · 2017-05-30
> https://johnresig.com/blog/web-workers/ Sorry, I should have said "JS doesn't support shared memory parallelism for all intents and purposes, so memory sharing concerns are a moot point". > https://softwareengineering.stackexchange.com/questions/2455... This supports my point; not sure why you're posting this... > http://www.ilikebigbits.com/blog/2015/12/6/the-fastest-code-... This is also congruent with my points; if this is meant to be contradiction, you'll have to clarify. > http://www.ilikebigbits.com/blog/2015/12/6/the-fastest-code-... I'm not spending any more of my time skimming these mysterious links; this is a very straightforward question and you've evaded it several times and then referred me to an 8 kiloword document. What gives?
gavinpc · 2017-05-07
The John Resig post linked by TFA indicates that this was originally dealt with by locking the constructor altogether: function Array(){ alert("hello, I found something of yours!"); } // ERROR: redeclaration of const Array But it appears that the restriction now applies only to literals, as I can do this in at least Chrome and Firefox: function Array() {console.log("hope")} undefined var x = new Array(3); hope undefined https://johnresig.com/blog/re-securing-json/
hdhzy · 2017-05-06
Note that these protections are only needed because Google supports every imaginable browser version even outdated ones. You most certainly do not need to do the same. Array and object globals cannot be overridden now (since 2007) for literals [0] and for ambient authority problem with CORS just check the Origin header. [0]: https://johnresig.com/blog/re-securing-json/
cbhl · 2018-12-06
Frankly, I think we're seeing the results of the new era of Python paradox. Except it's not Python 3, it's TypeScript, VS Code, and React. If you look at the education space, many of the deployments are either Chromebooks or iPads. Back in 2012, the "learn to code" sites (like Khan Academy or Code.org) ended up building their lesson plans around JavaScript. https://johnresig.com/blog/introducing-khan-cs/ People who were in 3rd- and 4th-grade in 2012 would now be finishing up high school. Someone in 7th- or 8th- grade would have just finished a bachelor's, or maybe be looking for their second job after two or three years in the industry. For these folks, TypeScript/VS Code/React would be a short jump from these learn-to-code-JavaScript-in-the-browser sandboxes. As for Go... I suspect that's the set of people who can handle Google-scale software complexity. So either former Google employees, or people who are in the kubernetes ecosystem.
jeresig · 2018-10-31
Uh - woah! This is incredibly unexpected. I'm really glad people are interested in my database and in Japanese prints! From a technical perspective there've been a lot of interesting open source projects that I've made to support this site: https://johnresig.com/projects/ukiyoe/ I've also written a number of papers and given presentations on the work that I've done here (and elsewhere in the digital humanities). https://johnresig.com/research/ This is a talk that I gave in 2014 about the construction of the site and my reasons for building it: https://codeascraft.com/speakers/john-resig-analyzing-japanese-art-wit… I've since worked on a number of other projects like a database for a consortium of Art History Photo Archives: http://images.pharosartresearch.org/ And I'm building another one now on Japanese Picture Books (from the 19th century and older). These are all my "spare time" fun hobby projects, my day job is still at Khan Academy as a Frontend Architect. I just enjoy getting to explore other types of applications and problem spaces! Happy to answer any questions anyone might have!
chubot · 2018-05-07
Really useful, thank you! I had saved this post of John Resig's from 10 years ago (!), which also gives some numbers: https://johnresig.com/blog/programming-book-profits/ (I'm not sure if my expectation is reasonable, but I would have thought that a book the most popular JS framework author would have sold more / made more in profit.) I know you said you weren't planning to write another book, but I wonder if in retrospect you would have self-published? I feel like the publisher provides a few things: 1) Editing 2) Marketing 3) Writing tools, typesetting, etc. It seems like you had to take control of #1 yourself to some extent. As for #2, you got unexpected "sponsorships" income, which is very interesting, but it seems like you also had to take control of it yourself. I was surprised that between the 2 of you, you would only make about $2 per physical book and $1 per e-book for a $40 book. If you end up having to do work in areas #1 and #2, why have the publisher at all? I would have expected them to give you more of a sales bump. Here are some other posts I saved: https://news.ycombinator.com/item?id=13876514 How I Made $70k Self-Publishing a Book about Ruby on Rails https://news.ycombinator.com/item?id=14334845 Why We Are Self-Publishing the Aviary Cookbook Anyway, thanks for sharing! I am just trying to think of what the publisher adds. The main thing I think would be marketing / sales / distribution. It's better to make a smaller amount on a larger…
hacker_9 · 2017-05-30
> JS is not parallelized https://johnresig.com/blog/web-workers/ https://ponyfoo.com/articles/understanding-javascript-async-await > Python is also compiled to a bytecode before interpretation; were still don't call it a compiled language. https://softwareengineering.stackexchange.com/questions/24558/is-pytho… > macros aren't significantly faster > you can always precompile your abstraction on program load at the expense of slower start times http://www.ilikebigbits.com/blog/2015/12/6/the-fastest-code-is-the-cod… > How can I ask it what type a function returns or what types it's arguments should take? http://www.braveclojure.com/core-functions-in-depth/

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