News for hackers. Stuff that matters.
Re:Ask HN: What are these low quality “code snippet” sites? by kilburn on Wednesday December 01, 2021 @02:49PM (#29408298)
> Has it accidentally become a halfway useful site?

It has. It is nowhere near the quality of MDN, but also nowhere nearly as bad as it used to be.

W3Schools has less information than MDN. This is bad for the experienced, but a relief for people who are entering the trade.

As an example, consider an inexperienced web developer that wants to do something when a button is clicked. They google for it and find these two pages:

- https://www.w3schools.com/jsref/event_onclick.asp . Right there in the middle of the page is an example snippet that will get the job done. If I scroll down I see other ways to do it, all of them fully contained (i.e.: I can copy-paste it to some website and they will work).

- https://developer.mozilla.org/en-US/docs/Web/API/Element/cli... . There's a table of things I don't understand (Bubbles? Cancellable?), two lengthy discussions about weird edge cases in some browsers, and (finally!) a single not-so-simple example that is not even enclosed in <script> tags.

What website do you think they'll pick?

There are no comments on this comment yet.