User:Combuster/Manual Of Style draft

From OSDev Wiki
Jump to navigation Jump to search

This is a draft and hence NOT official. The official version is located here

This page is a guideline for those writing new articles or contributing to existing ones. Being a guideline, these rules are in no case binding, though we expect that the articles follows the concepts as appropriate. Hence these rules can be overridden by common sense.

Article Naming Conventions

  • Titles start with a capital letter (as if it were the start of a sentence)
  • Words are separated with spaces, each new word starting with another capital
  • Further capitalizing and use of non-character symbols is to be done according to the English language.

examples:

  • kbc commands -> KBC Commands
  • gcc cross compiler -> GCC Cross-Compiler

bad titles:

  • hardware (rule 1: should start with a capital: Hardware)
  • FileSystems (rule 2: words are separated with spaces: should be File Systems)
  • Cpuid (rule 3: The Intel manual defines this in all-caps: should be CPUID)


Article Contents

Articles should be informative in style. FAQ style is discouraged. Tutorials are allowed, but try to keep instructional content separate from enyclopedic content.

Code Snippets

Code snippets can be used on any page where useful.

Code snippets should be readable and understandable:

  • Proper identation: little trouble for a largely increased readability. By convention Allman style (the opening { appears unindented on the next line) is used.
  • Avoid long lines: these break the layout as well as making things very difficult to read. 40 characters should be fine.
  • Comments: Use common sense. Short snippets might not need any, longer ones are more likely. Assembly code can in general use more comments than higher level languages.
  • Language: The preferred language is either C or Assembly, as most programmers know these. Try however to minimize mixing of languages (inline assembly).

Code blocks can be marked with <pre>...</pre> tags or a leading space for each line:

int main(void)
{
    return(0);
}

Tables

use

{| {{wikitable}}
|-
! bold text 1
! bold text 2
|-
| normal text 1
| normal text 2
|}

for tables. Additionally you can use the {{Yes}} and {{No}} for comparison tables

Numbers

  • 1 KiB = 1024 bytes, 1 MiB = 1024 KiB, 1GiB = 1024 Mib, etc. Use of these units is recommended over KB, MB and GB
  • KB, MB, and GB should in most cases equal KiB, MiB and GiB, unless there's a compelling reason not to (e.g. the standard size of 1.44 MB floppies, where 1 MB equals 1000*1024 bytes)
  • Hexadecimal numbers should be formatted using the 0x prefix rather than the h suffix: 0x1234CDEF
  • Avoid octal numbers and numbers with other uncommon bases

Discussing articles

Issues that might need a discussion should be posted on the talk backpages. When you do, use four tildes to sign your message: ~~~~.

More important issues should be posted on the wiki forum, as well anything not directly related to any single article, as these are checked by more people.


References and Links

The format for further references is as follows:

See Also

Articles

  • Article1
  • Wikipedia:Article2

Threads

  • Thread1
  • Thread2

External Links

  • http://www.link1.net
  • http://www.link2.net


Sandbox

Each member has his own userpage, in which he is free to try things as needed. Please try to minimize Category:xxx links as they cause links to appear to your article.

You can have a look at some other people's user pages for ideas.

Minor Edits

Minor edits are only used to inform of changes that will not need any checking from other people. Things that can pass as minor edits are, among others, fixing of typographic errors, rewording sentences, and to some extent the reordering of blocks, as these edits do not alter the informational content of the article. Be careful with the minor edits when altering code blocks as even small changes can change the net effect of algorithms.