I’ve been surprised at the number of people who were unaware that Mozilla has a coding style guide. It contains the rules for new files for both JavaScript and C++. You can save your reviewer a whole bunch of time by making sure your code conforms to this before asking for review.
Categories
5 replies on “Did you know we have a style guide?”
When do we get the lint or JSHydra or whatever tool to automatically tell us the errors?
From the JavaScript section:
“Use \uXXXX unicode escapes for non-ASCII characters. The character set for XUL, DTD, script, and properties files is UTF-8 which is not easily readable.”
That has me confused. Are you (as in: Mozilla) really claiming hexadecimal references to Unicode code points are more readable than the actual characters they represent?
I honestly don’t know the reasoning there. You’d have to ask in mozilla.dev.platform.
Ah, right, there is a style guide. I remember seeing it around the time I started with Mozilla. Then I learned the simple rule “just follow the style of the file your are changing” and forgot about it…
Making sense of Firefox startup time…
One of the things that we at Mozilla would like to do better at is the amount of time it takes between when you launch Firefox, and when it starts up and is usable. We’ve been tackling this problem for quite a while, and have already made tremen…