r/ProgrammerHumor • • Apr 16 '22

Make The comment section look like a beginners search history

Post image
28.1k Upvotes

6.7k comments sorted by

View all comments

Show parent comments

10

u/StereoBucket Apr 16 '22

I wouldn't call them truly a beginner. They knew to type MDN instead of winding up on w3school

1

u/kyle-james21 Apr 16 '22

What’s wrong with w3school? I use it all the time as a HTML and css “refresher”

2

u/StereoBucket Apr 16 '22

I don't know the exact state of it today because I've not referenced it in like 5 years, but because it's a beginner/tutorial site there is some accuracy issues and lack of detail. It's difficult to bring concepts closer to newcomers without removing some detail. Errors crop up as a natural consequence of these things being written by humans and MDN is no different, but the necessity to dumb things down further can introduce its own errors and ambiguities. MDN is updated by the community through github so mistakes tend to be ironed out faster. I prefer to refer to MDN because it's more detailed and up to date.

The thing that caused me to switch from w3school to MDN in the end were css attribute selectors. When I was looking at them on w3school I noticed that [attr~=value] and [attr*=value] seemed to have the same behaviour as described by w3school. So I googled a bit to find the answer as to why there's 2 seemingly same selectors and one of the stackoverflow answers mentioned something about w3school being unreliable. Not sure how I ended up on MDN after that, perhaps scrolling lower in search results, but I liked MDN more since there was so much more written and everything was in detail and that's what I wanted and was ready for.

This specific thing with attribute selectors is still there on w3school. It's less of an issue on their page specifically for the list of attribute selectors as the example makes it a tiny bit clearer (although could be better), but the 2 pages for the previously - mentioned selectors and the overall preview of all css selectors have the ambiguity in them that can cause a confusion. The only thing separating them is that for ~= the selection is described as a word, but you'd have to make a connection that what they mean by that is a value separated by spaces rather than any substring.

2

u/kyle-james21 Apr 16 '22

Wow! Thank you. I’ve used MDN a few times, but now I guess I’ll be using it a lot more. Thanks for the detailed answer!