Oct 252012
 

After years of wishing we had a complete reference to events supported by Firefox (both standard events and non-standard ones, including those used just for add-ons), we finally have one! Louis-Rémi Babé has produced the Mozilla event reference! He scoured specifications, existing documentation, and the source tree, hunting down every event and documenting it. At this point, if any are missing, it’s purely an oversight. Please feel free to contribute additions and corrections as needed. In particular, we could really use help building out compatibility tables for each event.

When I first joined Mozilla 6 ½ years ago, one of the first things I noticed was that we had no thorough reference to events. Indeed, even what little documentation we had for events was strewed haphazardly through the docs, such as bits of documentation for certain DOM events being contained within pages about the DOM objects that send them. Over time, occasional abortive attempts were made to unify or at least standardize this content, but not much ever came of it. Finally, Louis-Rémi got on the job late this summer and pounded it out.

There’s likely some clean-up work left to be done, and odds are we could use more examples of how to make use of some of these events. However, the fact that we finally have an easy way to hunt down the right event for the task at hand is a victory for the MDN community and for the broader Web development community.

Well done, Louis-Rémi! Thank you!

 Posted by at 9:12 AM
Oct 082012
 

For much of the past year, Mozilla has been working along with an astonishing collection of Web superpowers to help create a new resource for Web developers. When you get Mozilla, W3C, Adobe, Facebook, Google, HP, Microsoft, Nokia, and Opera all working together to ensure that the content on a site reflects the realities of the modern open Web, the result is bound to be exciting.

And it is! The new Web Platform Docs site is nowhere near complete yet — this is a huge job! — but it’s off to a great start. All of these organizations have contributed some content, funding, and content to the site, and have vowed to continue to do so going forward. The result, over time, should be the most accurate resource for open Web developers on the planet.

Of course, you may ask, “What does this mean for MDN?”

In the short to medium term, not much. We do encourage our contributors to consider putting their content on both sites (keeping in mind that the licenses are different; we use CC-SA and WPD uses CC-BY). Over the long term, once WPD takes off and is a success, hope to move toward putting all open Web content there, and using MDN solely for Mozilla-specific content. Time will tell.

In the meantime, welcome WPD! I look forward to watching you grow up.

 Posted by at 4:30 PM
Oct 052012
 

Note: You may see “documentation process” and think this doesn’t apply to you. You’re almost certainly wrong! If you contribute to the Mozilla project, this almost certainly does apply to you, so please read on!

The short version

Because the rate of development at Mozilla is accelerating faster than the MDN developer documentation team can keep up, it’s time for us to establish a process by which development teams request that the documentation team produce content to cover new features, APIs, and technologies. I have produced a document that outlines a proposed new process by which this will be done, outlining how documentation requests will be handled and prioritized, how we will interact with the developers, and the responsibilities of the writers and the developers in terms of getting the documentation produced.

The long version

Mozilla developers rock. Like… they rock hard. Odds are, if you’re reading this, you’re one of those amazing developers. If you are, you need to understand, first off, that the MDN team knows you’re almost frighteningly good at what you do.

Because of that, we’re totally swamped! With so many amazing new technologies and APIs coming from your keyboards to our to-do lists, we simply can’t keep up. As Mozilla has grown, the amount of material that the developer documentation team needs to produce has skyrocketed. Think about it: we’re documenting one of the most popular Web browsers in the world, a popular e-mail client, open Web standards from HTML through CSS and JavaScript to new technologies like WebAPI, how to write games and apps online, a brand new mobile operating system (Firefox OS), concepts like security, identify management, and the like, and more.

And we do it with a paid staff of four full-time and one part-time writer and a community of contributors who, while amazing, can’t always have the time to document this much cool stuff.

Most large organizations that have technical documentation requirements have a process by which that happens. Mozilla never has; we’ve done our documentation in a very free-form way: a writer sees something needs to be documented and writes about it. A lot of things fall through the cracks because the writers didn’t know they existed, or were ready for documenting.

The time has come for that to change. In an attempt to improve the responsiveness of the documentation team, increase both the quality and the quantity of material we can produce, and help enhance communication between the development and writing teams, I have proposed a documentation process by which development teams will request that writers produce material for their work.

I urge you, if you contribute to Mozilla, to read the proposal and offer your thoughts. I think this will help everyone. Our developers will see their work get properly documented both better and more quickly. Our writers will be able to avoid wasting a lot of time searching for information they shouldn’t have to search for. And our users will get top-notch documentation for the amazing Web of the future.

To offer your feedback, you may either post to the mozilla.dev.mdc mailing list, send me email, or comment on this blog post.

 Posted by at 9:26 AM
Oct 042012
 

It’s rare, when writing documentation, that questions don’t arise. When writing documentation, we try to avoid hassling the engineers with questions, but it’s almost inevitable that we’ll run into something we’re not able to figure out on our own. When that happens, we need to know who to contact with our question.

And, all too often, we have no clue at all who we should reach out to. We’ll ask blindly on IRC and sometimes (but not as often as we’d like) get the answer we seek. Then we’ll ask on mailing lists. Often that’s a dead end. Then we resort to emailing people at random until the answer is found.

There’s a way to make this better. I’ve created a new page on the MDN site on which I’d like to try to build a list of subject-matter experts (SMEs). SME is a lingoistic way to describe a person who’s an expert at a technology to the point that they’re the right person to go to when you have questions about the technology, its implementation, and its usage.

Having this list will save our writing team a lot of time, and will help us produce quality documentation for your technologies more quickly, efficiently, effectively in the future.

Please take a look at the list and fill out any contact information you can, or add new rows to the table if we’re missing technologies (which I’m quite sure we are!).

Thanks in advance from the happy, helpful documentation gnomes of Mozilla!

 Posted by at 2:22 PM
Sep 052012
 

If you hadn’t noticed, the pace of development at Mozilla has really picked up lately. Between the ongoing rapid progress on the Boot to Gecko project, the six-week development cycle of Firefox, the web apps, marketplace, and Persona projects, not to mention other projects, it’s become clear that we need to start being more careful about our documentation workflow.

For that reason, we’re going to make some changes to our documentation process.

What’s changing?

In the past, too many person-hours of writing work have been used documenting technologies that were so far from fully-baked that we’ve had to redo (sometimes more than once) these documents. Often, the docs never get properly updated (I’m looking at you, IndexedDB). This is a huge waste of time in an era in which our excellent developers are pumping out so much new code and so many new APIs at a faster pace than ever.

Instead, we will only document new APIs when we can be given a reasonable degree of assurance that they’re stable.

  • For an API that is expected to be standardized, it has, at a minimum, been submitted to the appropriate standards body and gotten through at least one round of feedback and revisions. This will work out enough of the kinks that we can feel good about documenting it.
  • For an API that’s expected to be Mozilla-specific, it has settled down and the developers behind it are able to convince the docs team that it’s stabilized.

This likely means there will be times when the documentation team doesn’t feel that something is ready for documentation as soon as other groups would like to see the docs written. This is an unfortunate side effect of the remarkable productivity level of our development team! Someday, I hope our documentation team will be large enough to keep up with them. But until then, we’ll have to be more selective.

How you can help

If you’re a developer, the first, easiest thing you can do to help is to ensure that your code and headers are well commented, and that you use the dev-doc-needed keyword to mark any bugs that will require documentation updates.

A better, and in the end possibly even more helpful, thing you can do is to provide information! Send email (or, better, add notes to bugs) explaining what’s changed and what needs to be documented. Much of the time, dev-doc-needed means that we have to chase down the right people and ask a lot of questions that could have been avoided with the addition of notes to a bug.

You can go even further and actually update the docs yourself. This may not necessarily always be a viable course of action, but if you’re an expert on a topic, it may make more sense for you to spend a few minutes or an hour or two writing about it than to have the writing team have to do all the research of something you already know. It’s a better use of everyone’s time for you to write down a quick bit of information that we can clean up and turn into beautiful docs than for you and us to go around and around for ages until something’s finally written!

If you write a blog post about something that you think should be in the documentation, please either put it in the docs or at least let the docs team know about it!

The writing team hangs out in the #devmo channel on IRC. Feel free to drop in and ping us with your input or suggestions.

At this point, it’s all about making the best possible use of everyone’s time while turning out not just great code, but great documentation. Because what good is your awesome code if nobody can figure out what they can do with it, right?

 Posted by at 9:30 AM
Aug 092012
 

If you’re fiddling with automation, or want to be able to pull information out of the Mozilla Developer Network wiki, there are some helpful queries you can do with URLs that may help you out. Today, I’m going to share those.

The Kuma API

While we don’t yet have a writable API (we know this is a problem, and a design for it is underway), we do have various ways to access useful information about pages in the wiki.

Command Description
?raw Instructs Kuma to return the raw content of the page, without any of the skin material, such as the headers, footers, and so forth. This does not execute templates or scripts. For example, https://developer.mozilla.org/en-US/docs/HTML/HTML5?raw
&macros Instructs Kuma to execute all the templates in the page. For example: https://developer.mozilla.org/en-US/docs/HTML/HTML5?raw&macros
&include Tells Kuma to strip out any blocks that have the class “noinclude” on them. This is useful to get the output as it would appear when included in another page, rather than as a standalone page. Often this will remove sample code and the like (although not always).
&section=[section-id] Instructs Kuma to return the content from only the section with the specified anchor name; for example: https://developer.mozilla.org/en-US/docs/HTML/HTML5?raw&section=Introduction_to_HTML5
$json Tells Kuma to describe the page in a JSON object; this object is essentially the same one you would get using the KumaScript routine wiki.getPage(). For example: https://developer.mozilla.org/en-US/docs/HTML/HTML5$json

These offer a lot of capability, and hopefully will be useful for people building developer tools and other utilities.

Kuma feeds

In addition to the API described above, we also offer a number of feeds. There will likely be more in the future, and some of these are still something of a work in progress, but this information may still be useful for you.

All feeds start with the string “https://developer.mozilla.org/<locale>/docs/feeds/<format>/”, where <locale> is one of the standard locale strings, such as “en-US”, “ja”, and so forth. Note that at present, the locale you specify doesn’t impact the output, but it may eventually do so (indeed, I hope it will). <format> is one of “atom”, “rss”, or “json”.

Feed Description
all All recently changed articles, in order of modification date. This includes newly created articles. All changes are combined into one entry in the feed for each article.
revisions Each revision made to an article, in order by modification date, including newly created articles. Each revision has a separate entry in the feed.
tag/<tagname> Recently changed articles, in order by modification date. Only articles that have the specified tag are included in the feed.
files Recently changed or uploaded files.
needs-review[/<reviewtype>] A list of articles that have the specified review request checked, or all articles with a review requested if you don’t specify a review type. The review type can be one of “tech”, “editorial”, or “kumascript”.

So, for example, you can get an atom format feed of recently changed articles tagged with “JavaScript” thusly: https://developer.mozilla.org/en-US/docs/feeds/atom/tag/JavaScript.

Wrapping up

Hopefully these are useful! There’s more to come, but these are a great start! Enjoy!

 Posted by at 9:15 AM
Aug 032012
 

At just after 10 AM today, we switched over from our MindTouch based wiki to our new, Mozilla-built Kuma wiki platform for the Mozilla Developer Network, as I announced yesterday that we’d be doing. So far, all’s well!

Over the next week or two, I will be sharing a few suggestions, tips, and bits of advice about the new platform. This is the first of those posts. Today, I’ll be talking about the new template system.

A little bit of history

When we switched to MindTouch a few years ago, one of the key appeals was their incredibly powerful template system. This system made it possible to write complex scripts to automatically generate content. It could be used for everything from simply styling text to looking up information and generating complicated chunks of material. And over the years we used MindTouch, we grew to rely heavily on it.

A key requirement we had from the beginning was that Kuma support similar capabilities, and as a result, Les Orchard and the rest of our development team built KumaScript, an engine for building exactly this sort of scripting. KumaScript is, in essence, server-side JavaScript implemented using Node.js, with provided additional routines to make it possible to access wiki data and inject material into page content at load time. It has powerful caching in place that make it work incredibly fast, and has proven to be an incredibly useful tool for us.

Introduction to KumaScript

If you’ve done any scripting on MDN in the past, you’ll have to adapt a little bit. Les wrote an excellent guide introducing KumaScript, and I can’t recommend it enough. If you plan to do any scripting, or are curious about the system’s capabilities, read that over.

The truly brilliant thing about KumaScript is that it’s fast and is all JavaScript syntax, so it’s incredibly easy to pick up. If you’ve done any web development, you can script on MDN. The only “trick” is that because it’s so powerful, we do require that you get special privileges to edit or create templates on MDN. You can contact me to get those permissions.

If you’d like to take a look at existing templates to see how they work, there’s a page that lists every template. Look them over and get a feel for things!

About templates that are unconverted

Most of the most-often-used templates have already been converted from MindTouch DekiScript into KumaScript templates. There are some that have not been. Because of this, you may occasionally run into pages that don’t look quite right, or even display a box at the top of the page with an error message. Feel free to ping someone in #devmo about this, or fix it yourself if you have the privileges and the time.

If you’d like to see a list of the templates that are known not to have been updated, there is one! If you update one, please toggle off the “Template review” checkbox at the bottom of the page and add the tag “ks-fixed” to it.

We have spent much of the last few months converting templates, and you shouldn’t run into pages with broken ones very often, but it absolutely can happen.

Key differences you should know about

If you use or write templates, there are a few differences you should know about, other than the obvious syntax differences due to being JavaScript instead of Lua-based.

  • There’s no longer a weird syntax you have to use for templates with a dash (“-“) in their names. You can use them just like any other template: {{foo-bar(“some parameter”)}}.
  • You can’t run KumaScript outside a template like you could with DekiScript. All KumaScript code must be in a template; MindTouch would let you run arbitrary script on any page. For security reasons, we no longer allow this. This does have the side effect of making it no longer possible to nest template calls; you can’t do {{foo(bar())}} like you could in MindTouch.
  • You can use JSON as the only parameter to a template. This gives you a way to create templates that accept, in essence, named parameters.
  • Although we’ve implemented clones of a number of MindTouch APIs as a short-term solution so that we could get online, they should typically not be used by new templates. In addition, only APIs we actually needed have been implemented. From here on out, we will add new Kuma-specific APIs.
  • Templates are heavily cached. The output from a template is saved for every set of inputs it receives. If you change a template, it doesn’t get re-interpreted for a given set of inputs unless someone forces it to be by shift-reloading a page that uses it with those inputs; however, doing this does affect all users, not just you. This vastly improves performance but does mean you have the chance of template changes not being seen by everyone right away.
  • Some locales’ identifier codes have changed.
  • URL paths have changed: instead of /en/JavaScript, for example, it’s now “/en-US/docs/JavaScript”. Server rewrite rules are in place to automatically redirect existing links, but new templates should do it the new way.
  • You can’t apply a “nowiki” or “plain” class to text to keep it from being interpreted as a template anymore. Instead, add a backslash in front of the first “{” in the template invocation. This is useful when editing docs about templates, for instance.

Give it a try!

That’s a quick overview of what KumaScript is and what’s different about it. There’s certainly a lot more to discover, so be sure to read the Introduction to KumaScript and feel free to ask for help on IRC if you need it!

 Posted by at 3:52 PM
Aug 022012
 

That’s right! We’re finally ready to throw the switch! Tomorrow (that is, Friday, August 3, 2012) we intend to switch from the current MindTouch-based wiki to our new Kuma platform for the Mozilla Developer Network wiki. The changeover should happen at about 10:00 AM Pacific Daylight Time.

At that time, there should be, at most, a few moments of downtime, then the site should be running on the new system.

A few things you might need to know:

  1. There’s lots more stuff we’re planning to do to make Kuma even better than it already is. You may even notice some stuff that isn’t done yet. However, weeks and weeks of testing have told us that it works very well, so we decided it was time to go ahead and launch.
  2. We have updated documentation for using the wiki that you might like to look over, as well as an updated Editor guide.
  3. Things are different! You will run into stuff that doesn’t work the way you’re used to. It should look pretty familiar, by and large, though, and most people won’t notice the changes unless they look closely.
  4. There’s a big “Report a bug” button at the top-right corner of the window. Please use it! Any time you have a problem, concern, see something that looks wrong, or have an idea for a brilliant way to improve the system, click it and follow the handy wizard that will help you file your bug. We want the MDN wiki to rock, and you can help make it so.

We will be sharing additional information about where we are and where things are going over the next week or two, and, of course, for the foreseeable future as we continue development. Indeed, the MDN development team is getting together for a week of meetings next week to rehash processes and sort out priorities for what to work on next.

 Posted by at 7:44 PM  Tagged with:
Jul 262012
 

After an unexpectedly long hiatus, editing of MDN has officially returned. Starting a few hours ago, clicking the “Edit” button on MDN automatically reroutes you to the beta Kuma wiki site, which is located at https://developer-new.mozilla.org/. You will have to log in again using Persona (formerly known as BrowserID) when you get to the new wiki, but once there, you can edit to your heart’s content.

While you’re there, feel free to poke around, check out the scene, and file a bug or two if you have any problems. There’s a handy “Report a bug” button at the top right of every page!

For the time being, the existing site will remain the primary site for reading (which means, yes, the content is going to start growing stale). However, we hope to officially launch the new wiki in the next couple of weeks, assuming things continue to go well. My fingers are crossed, because we’re having a team meeting to talk about our successful launch and what to do next to continue to improve the site in the second week of August!

 Posted by at 9:58 PM
Jul 262012
 

I’ve been here in Porto Alegre, Brazil for a few days now for FISL13 (13° Fórum Internacional Software Livre), where my mission is to get people interested in helping to write and translate developer documentation for the Mozilla Developer Network. There are a lot of people here, and the enthusiasm level is quite high. The Firefox mascot is getting mobbed every time he goes out on the floor, almost like a rock star.

Girls love the fox!

Tomorrow, we’ll be having an MDN Apps Hack Day, for people interested in learning to write web apps. Then, on Saturday, is what is for me the main event: a brief presentation by myself on MDN and how to use it followed by a mini translation sprint, where we’ll hopefully have a bunch of people working on translating documentation from English into Portuguese and Spanish.

As we work toward the eventual launch of Boot to Gecko in South America, it’s becoming increasingly important that we have thorough, current documentation in these languages. So building a documentation community and getting them excited about helping build great documentation in Spanish and Portuguese is very important.

We have a ton of great people here, including both paid Mozillians and awesome, awesome contributors from the local and regional community. It’s really exciting to see so much enthusiasm for Mozilla, Firefox, and Boot to Gecko!

The whole Mozilla gang out for dinner and a show!

 Posted by at 3:30 PM