Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional developer documentation #29

Closed
jeffphilp opened this issue May 25, 2016 · 1 comment
Closed

Additional developer documentation #29

jeffphilp opened this issue May 25, 2016 · 1 comment

Comments

@jeffphilp
Copy link

Hi,

I was wondering if it would be a good idea to add some additional developer level documentation to FNA.

Initially I was thinking it could consist of:

  • Code style
  • Location of the native libraries (for those developing or wanting to try out a bug fix) which people may want to work on.

Code style

This is copied from (flibitijibibo/FNA-MGHistory#147):

  • Tabs: Actual '\t' tabs, NOT SPACES!
  • Blank Lines: NO TRAILING SPACE! Blank lines should be, you know, blank.
  • Characters per line: ~100. When a line gets too long, start splitting it up into multiple lines. The number should only be considered a maximum value; if you find that you're doing a lot of extensive left-to-right reading rather than top-to-bottom, start splitting the lines up.
  • i++/i--: Do i += 1 and i -= 1 instead unless the increment is genuinely being used to its advantage. If it's that painful to do this, consider foreach instead.
  • Do not use var! Use the actual type name!
  • someMethod() rather than someMethod (), someArray[x] rather than someArray [x], etc.
  • (Type) cast rather than (Type)cast.
  • Use braces everywhere! I don't care if the if block is one line, braces! Use them!
  • Single line comments: // This code is derp rather than //this code is derp.
  • Multi-line comments: Use /* */ blocks, rather than multiple lines of //.

Additional

  • Line Endings: Should be Linux style '\n'.

Native Library Sources

Would be interested to know if this seems like a good idea?

@flibitijibibo
Copy link
Member

Wrote this into the wiki (which is flickering between edited and unedited, thanks GitHub):

https://github.com/FNA-XNA/FNA/wiki/8:-Contributing-to-FNA

It's not terribly verbose like other guides, but I imagine the developer that can't guess certain styles based on the ~60k lines of existing code isn't reading much documentation...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants