Live data from Hacker News

The future of MDN: a focus on web docs

blog.mozilla.org

61–70 of 113 posts

Re: The future of MDN: a focus on web docs

#61
post #12

Yeah for this statement, "...often Web developers are looking for quick examples...", I don't even care if the examples are higher up on the page or not...I just would like more and more examples. Sometimes the examples are too few or don't fully exemplify options of particular functions, etc. Nevertheless, I'm absolutely grateful to all the folks who put in so much work into MDN. If you are one of those people, know…

Yeah, it's a great resource. I'd love to see more examples as well. Bonus points if the examples are runnable and extra-bonus points if there's a 'debugger' version that would let the user jump into a portion of the code to examine the state.

I find one of the first things I do when approaching non-trivial new features is to sketch out an example and then step through the example by adding a few strategically placed breakpoints. The breakpoints allow me to examine both the execution flow and the internal state of the various objects associated with the new feature.

Both Chrome and FF support the handy 'debugger' statement, which you can place directly in your code and which acts as a breakpoint when you run the code with devtools open.

Edit: Apparently the debugger statement is standardized! Neat. Didn't realize that. Thanks MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re: The future of MDN: a focus on web docs

#62

Earlier quoted context omitted.

I've just had to get into the habit of appending mdn to all my web development queries to make it show up at the top. Can't count the number of time's I've done the search "[some new array method] mdn". Invaluable website.

If DuckDuckGo is your default search engine, you can just do !mdn and get the MDN search results page. You can also do the same for stuff like !gweek And get google results limited to the last week (or StartPage ones if you swap the g for and s). It's amazing.

Any reasonable web browser lets you assign keywords to searches. No need to go through a third-party.

Re: The future of MDN: a focus on web docs

#63
A small feature in chrome you might like, there is a quick write up about it at the link listed below. Basically configure the URL search bar for MDN to be a searchable website. Change the keyword from the full Mozilla link into something simple like mdn. Then simply when searching in the url instead of going to google.ca just type 'mdn' and space then it will use the configuration of the search query to look inside the website so something like looking to see how Array.protoype.map() works just type mdn space before that and you'll go straight to the search results.

This isn't limited to just MDN you can use it for Youtube, and other sites that support the query search string.

If you are having trouble finding the settings in Chrome to get to then simply

hit the 3 dots on the top right > settings > then at the top bar search for 'search' > Under the Search heading there will be a button labeled 'Manage Search Engines' click it > and read the article to see how to set it up.

If you have visited MDN before it will show up in the lower section. All you need to do is change the middle text box to mdn and save. otherwise the last box will need to be https://developer.mozilla.org/en-US/search?q=%s&w=3&qs=plugi... the first box is just a label used to display the search name you can leave it at default.

happy searchin!

https://www.wired.com/2013/09/h2-chrome-omnibox/

Re: The future of MDN: a focus on web docs

#64
post #62

Earlier quoted context omitted.

If DuckDuckGo is your default search engine, you can just do !mdn and get the MDN search results page. You can also do the same for stuff like !gweek And get google results limited to the last week (or StartPage ones if you swap the g for and s). It's amazing.

Any reasonable web browser lets you assign keywords to searches. No need to go through a third-party.

Which mobile browsers allow this? Does it synchronise them?

I've used these a lot in the past, but switched to DDG's bangs largely because it was such a pain to change browsers/devices, and none of them ever worked for me on mobile. DDG's bangs are still a little unwieldy (! isn't a very convenient character to type, especially on mobile), so an alternative would be nice. For now though, the consistency everywhere far outweighs any other advantages of the in-built browser feature.

Re: The future of MDN: a focus on web docs

#65
post #39
post #33

Please stop forcing those stupid horrible-quality Portuguese translations upon me!

To the best of my knowledge, if you go to https://developer.mozilla.org you're just served articles in English (that may be because I have English set as my language in my browser, I don't remember what happens if I set it to my actual native language). But I noticed that Google search results actually are pointing me to my native language.

I'm Swedish, and get "redirected" to https://developer.mozilla.org/sv-SE/ if I follow that link, even though I have English set as the language in my browser.

Re: The future of MDN: a focus on web docs

#66
post #33

Please stop forcing those stupid horrible-quality Portuguese translations upon me!

To every native English-speaker on here: If you do this on your site words cannot describe the agony you cause your users.

Not that google listens but they are a huge offender in this area.

Re: The future of MDN: a focus on web docs

#67
post #39

Earlier quoted context omitted.

To the best of my knowledge, if you go to https://developer.mozilla.org you're just served articles in English (that may be because I have English set as my language in my browser, I don't remember what happens if I set it to my actual native language). But I noticed that Google search results actually are pointing me to my native language.

I'm Swedish, and get "redirected" to https://developer.mozilla.org/sv-SE/ if I follow that link, even though I have English set as the language in my browser.

I'm Swedish and I don't get redirected. Are you sure Swedish isn't listed in (firefox) Options -> Content -> Languages -> Choose... ?

(the language of the browser itself is irrelevant)

It's embarrassing how many steps you have to take do this. Why not honor my OS settings huh...

Re: The future of MDN: a focus on web docs

#68

A small feature in chrome you might like, there is a quick write up about it at the link listed below. Basically configure the URL search bar for MDN to be a searchable website. Change the keyword from the full Mozilla link into something simple like mdn. Then simply when searching in the url instead of going to google.ca just type 'mdn' and space then it will use the configuration of the search query to look inside…

Firefox has the same feature. To use it right click on any search box on any website you visit to assign it a keyword. This works great with vimperator, which has tab-completion for search keywords.

Re: The future of MDN: a focus on web docs

#69

I don't know why this was done years ago instead of that web platform push.

The Web Platform was a great idea and had Adobe, Apple, Facebook, Google, HP, Intel, Microsoft, Mozilla, Nokia, Opera, and the W3C as stewards.

Unfortunately, it may have been politics between some of the companies that prevented a real success.

The good news is that we will revive the web platform on WebPlatform.Com as part of OpenDomain - anyone that wants to participate is welcome!

Re: The future of MDN: a focus on web docs

#70
post #62

Earlier quoted context omitted.

Any reasonable web browser lets you assign keywords to searches. No need to go through a third-party.

Which mobile browsers allow this? Does it synchronise them? I've used these a lot in the past, but switched to DDG's bangs largely because it was such a pain to change browsers/devices, and none of them ever worked for me on mobile. DDG's bangs are still a little unwieldy (! isn't a very convenient character to type, especially on mobile), so an alternative would be nice. For now though, the consistency everywhere fa…

> Which mobile browsers allow this? Does it synchronise them?

Opera, yes.

Post reply on HN