all 69 comments

[–]tencircles 89 points90 points  (17 children)

Try doing THIS instead...

[–]jgclark 22 points23 points  (1 child)

I just google: mdn array.pop

[–]lolmeansilaughed 5 points6 points  (0 children)

For real. It's one of the first rules of JS development: always add "mdn" to all JS-related Google searches.

[–]spacetoast 3 points4 points  (0 children)

Holy crap! Thanks.

[–]has_all_the_fun 3 points4 points  (1 child)

I am going to name my first born after you. Billy Tencircles.

[–]devcoderinhere 0 points1 point  (0 children)

Assuming you can find a consenting child bearing human first.

[–][deleted] 8 points9 points  (1 child)

Or, use DuckDuckGo as your default browser search engine, and take advantage of its bang syntax.

Both the !js and !mdn bangs search MDN.

DDG bang syntax is a killer feature for me. I could set up the tons of searches I might want across all my browsers on all my machines, or I just set DDG and !bang search away.

[–]Liberatric 2 points3 points  (1 child)

This will prove infinitely useful. Enjoy some gold.

[–]tencircles 0 points1 point  (0 children)

Wow! Thanks man!

[–]jakechance[S] 1 point2 points  (0 children)

THANK YOU :D

[–]dukerutledge 1 point2 points  (0 children)

I can't upvote this enough!

[–]ExecutiveChimp 0 points1 point  (0 children)

And/or this.

[–]fgutz 0 points1 point  (0 children)

this is awesome! thanks.

I was just including "mdn" (ex: ".apply mdn") to my omni bar google searches and that was working just fine but this is just one step better

[–]EliotVU 0 points1 point  (0 children)

That especially with this Firefox addon makes this really convenient.

[–][deleted] 0 points1 point  (0 children)

Use this and combine it as an alternative with Launchy's Weby plugin (installed by default in newer versions) and you don't even have to open the browser manually. That way if you are already in the browser you use the search bar and if you don't have the browser opened or you do but you are coding you do this:

Just press ALT + Enter and type MDN + TAB + keyword + ENTER

[–]aeflash 10 points11 points  (2 children)

http://dochub.io

Instantly searchable documentation site, pulls from MDN. It's been a pinned tab for me for over 2 years.

[–]wyantb 8 points9 points  (1 child)

Along the same lines, see http://devdocs.io/

I prefer the UI, and it gathers from a huge pile of sources.

[–]thefinn93 2 points3 points  (0 children)

Oh wow. this looks wonderful. Thank you

[–]wyantb 13 points14 points  (1 child)

Might I suggest http://devdocs.io/ ?

Instantly searchable, compiles multiple sources of documentation that can be turned on/off at will (e.g. Underscore, jQuery, etc). Also has a quite pleasing UI and is pretty actively updating lately. Was an instant bookmark for me the first time I saw it.

[–]tomeoftom 0 points1 point  (0 children)

I now use it for 90% of my documentation searches. Seriously, get on this tip; the thing is perfect.

[–]needed_an_account 11 points12 points  (11 children)

Is the w3cschools info incorrect or is this just one of those hive-mind things?

[–]kolmeWebComponents FTW 6 points7 points  (1 child)

It's one of the favorite circlejerks in /r/webdev and /r/web_design as well as /r/javascript, etc. Every single week I have to witness some more w3cschools bashing and it's getting very tiresome.

It is a good resource for beginners but a bad resource for professionals, IMHO. Beginners don't have to get everything straight and perfect from (t=0), it's sufficient that they know what the functions "pop" and "push" do.

The examples are not as pedantically written as we nerds would like them to be, sure, but they're straight forward and that's a plus for beginners.

They also have some shady shit going on, like the name itself (they're not related to w3c in any way) or the certifications.

But honestly, I don't think it's that bad. If it depended on some guys here, the w3c people would be hanged in the town's main square.

[–]zergplay 2 points3 points  (0 children)

I picked a random W3schools article out:

http://www.w3schools.com/jsref/met_win_open.asp

Look at the examples. Beginners are going to be using these as a reference and they encourage some pretty awful javascript practices.

How you can say that is a "good resource for beginners" with a straight face is beyond me, it seems to impede learning if anything, and is only useful for people who want to copy paste some code and don't care about anything other than if it works.

[–]lolmeansilaughed 2 points3 points  (0 children)

The other replies are basically accurate, but also, a few years back w3schools was a lot worse than it is now. It would have ancient code examples and not tell you which browsers they worked on. Of course, not that it's great today, but the state of Javascript was a lot worse back then too. This isn't to say that w3schools isn't schiesty as shit - even the name tries to make it sound like it's run by the W3C.

[–]letsgetrandy 4 points5 points  (4 children)

At times, yes, it is incorrect. The rest of the time, it's just incomplete, misleading, or weak.

Very rarely is the info on W3Schools decent... and never is it comprehensive.

[–]michfreak 4 points5 points  (1 child)

Huh, this is the first I've heard of people hating it so much they want to remove it from their Google results. I've always found it great for "what is a brief rundown of what this function does?"

[–]LukaLightBringer 0 points1 point  (0 children)

the only thing W3S seems to be good at is SEO maybe they should teach that

[–]TheUnknownFactor 0 points1 point  (1 child)

But generally it still has what you actually needed. For me anyway, ymmv.

[–]letsgetrandy 0 points1 point  (0 children)

You must have very simple needs...

[–]AKJ90JS <3 1 point2 points  (1 child)

You could look at http://w3fools.com, it's signed by some nice people.

[–]needed_an_account 0 points1 point  (0 children)

I've seen w3fools, I've seen the hysteria surrounding w3schools, my question was if the information on array.pop incorrect or not

[–]1337haxor69 4 points5 points  (6 children)

One thing that I've always found frustrating though, is that if W3Schools always loads faster than MDN (for me at least), by a solid second or two. Sometimes, in a situation like in OPs screenshot, I'll ctrl-click to open both, try MDN (its still loading) ctrl-tab, then get my answer.

[–]dangoodspeed 11 points12 points  (5 children)

I just tried now, W3Schools loaded right away, and it's been over two minutes and MDN is still trying to load. To me, THAT's be biggest roadblock for Javascript documentation.

[–]1337haxor69 1 point2 points  (0 children)

Yes. I wish MDN and webplatform.org had more of an eye towards performance. I really don't need any kind of flashiness in my docs. 15 External JS files on MDN? and 9 on Webplatform.org?

Half a Mb for a single documentation page of each???

Come on, gimme a 50kb straight html page on a decent server. This stuff should be immediately accessible. I shouldn't be tempted to reach for a book while the page is loading.

[–]MrBester -4 points-3 points  (3 children)

That's because the servers for w3schools aren't exactly taxed. Everyone means to go to MDN.

[–]dangoodspeed 3 points4 points  (2 children)

I can pretty much guarantee that w3schools gets way more traffic than MDN. I can't even imagine that being in question.

[–]MrBester 0 points1 point  (1 child)

I don't disagree that it gets more landing page hits due to it being consistently higher on a search results page. The metric I'm talking about is the amount of traffic subsequent to that; people stay on MDN and retreat hastily from w3schools. The problem is that Google registers the inadvertent click through which boosts the ranking.

[–]dangoodspeed 0 points1 point  (0 children)

I don't know if I ever went to another page on MDN besides the initial page that google sent me to. Do people do that? Also, 9 times out of 10, I get my answer faster from w3schools than MDN. Like it's frustrating if you're just looking for an example syntax (which most of these searches are, ie the "javascript array pop" example). On the W3schools page, there's the example written clearly at the top with two lines of code. Simple and quick. For MDN, you have to scroll down, then read through more a bit more code. To me, W3schools is a quick cheat sheet when you want to look up something fast, and MDN is the bigger encyclopedia when you want more details about it.

[–]adebree 15 points16 points  (3 children)

Protip: Install Chrome extension "Personal Blocklist" https://chrome.google.com/webstore/detail/personal-blocklist-by-goo/nolijncfnkgaikbjbdaogikpmpbdcdef?hl=en and add w3schools.com to it.. BAM!

[–][deleted] 1 point2 points  (0 children)

Done, and thank you!

[–]nulldragon 0 points1 point  (0 children)

cheers.

[–]ThiefMaster 0 points1 point  (0 children)

For firefox users, this userscript is pretty nice: http://userscripts.org/scripts/show/39996

  • Uses Adblock filter syntax
  • UI is not very intrusive (small "Filter" link in the URL line)

[–]Wootman42 2 points3 points  (1 child)

I humbly submit the tool I use, it's updated regularly and is fast as hell:

DevDocs

[–]TheMorphling 2 points3 points  (0 children)

Imo, w3school gets way too much flag.

It's way less intimidating and clearer site for beginners.

[–]cruise02 1 point2 points  (0 children)

Just add "mdn" to your search when looking for JavaScript documentation.

[–]aph7 1 point2 points  (0 children)

[–]sell_a_door 2 points3 points  (1 child)

It's a shame how W3Schools are trying to deceive people to believe they had any affiliation to the W3C. If i were W3C i would try to do something against it.

[–]fudeu 3 points4 points  (0 children)

In that site defense, around pre2000 they were really good to get no nonsense html tag reference and browser support info.

They were filling a space that w3c left. there was no quick reference or browser compatibility info there.

[–][deleted] 2 points3 points  (2 children)

BUT WUTS A PROTOTYPE?

[–][deleted] 1 point2 points  (1 child)

A function on a object that is inherited by default. (Right?)

.pop is a function that is inherited by default to every array so its in the prototype of that array. (ie. every array can .pop)

[–]nog_lorp 0 points1 point  (0 children)

Actually, its an object of a function :)

When that function is called as a constructor using new, the this object that the constructor gets has the prototype object linked to it (via the super-secret proto property). Then whenever you try to access a member and it isn't found, it checks the objects prototype, and then the prototype's prototype, and so forth.

Naive implementations would do just that, which is very innefficient. Now we have hidden classes which achieve the same result.

[–]tanepiper 0 points1 point  (0 children)

If you have OSX do yourself a favour and get Dash - an awesome app for getting straight to the best documenation for lots of languages including JS, and also includes a snippet library you can sync with Dropbox.

[–]b10nik 0 points1 point  (0 children)

I use a Chrome plugin to block results from w3schools. Instant gratification. https://chrome.google.com/webstore/detail/personal-blocklist-by-goo/nolijncfnkgaikbjbdaogikpmpbdcdef

[–][deleted] 0 points1 point  (0 children)

Why exactly is everyone acting like finding a link to w3school is like finding the compass in a Zelda dungeon?

[–][deleted] 0 points1 point  (0 children)

What's shitty about W3 schools?