There are standards for programming in C/C++ that you must follow when fixing or enhancing the Mozilla products. A number of things that are important include Use the correct coding style There is a code style book for programmers who are working on the Mozilla products. Many of these styles are based on the established C (and C++) styles. Go to http://www.mozilla.org/hacking/mozilla-style-guide.html and read this document about style. Better yet, print it for handy reference. Use the reviewer's guide This guide sets the groundwork for code reviewing. Visit http://www.mozilla.org/projects/seamonkey/rules/code_review.html and read this document, even if you are not planning to be a code reviewer. Follow the rules and tips for coding Again, visit the web page at http://www.mozilla.org/hacking/reviewers.html#rules-and-tips, which spells out exactly what is good practice and what is bad practice. Make your coding portable This means you should not include platform-specific code unless it is absolutely unavoidable. (And it is very rare that it is unavoidable.) Visit http://www.mozilla.org/hacking/portable-cpp.html to read more about making your code portable. A good starting point for coding is http://www.mozilla.org/hacking/coding-introduction.html. This page is a FAQ containing a lot of useful information. Read this document. |