Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0782a7
commit 6be700e
Showing
4 changed files
with
32 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
# Code Standards | ||
|
||
These code standards are goals of the code in the Towel project. They are not set in stone, but they | ||
should be followed if possible. | ||
This is just some syntax preference notes for Towel. They are not strict rules and will not be enforced at this time. Just follow them if it makes sense. :) | ||
|
||
### Runtime Algorithmic Complexity | ||
|
||
One of the goals of Towel is to have members documented with algoritmic complexity using the `runtime` XML tag. Here is the notation in use: | ||
|
||
- O(...): upper bound | ||
- Ω(...): lower bound | ||
- Θ(...): upper and lower bound | ||
- ε(...): expected average | ||
|
||
Examples: | ||
- `/// <runtime>O(1)</runtime>` the member has constant time | ||
- `/// <runtime>O(n), Ω(1), ε(1)</runtime>` the member may have to iterate n items, but it will generally run in constant time | ||
- `/// <runtime>Θ(n)</runtime>` the member iterates n items | ||
- `/// <runtime>Θ(n^2)</runtime>` the member iterates n items and has a nested loop | ||
|
||
### Tabs | ||
|
||
Please use tabs rather than spaces. | ||
|
||
### Fields First | ||
|
||
When declaring types, all fields (instance + static + const) should come before other members and be | ||
outside any "#region" or other code groupings. This makes it easy for people to understand the structure | ||
and purpose of a type. | ||
When declaring types, all fields (instance + static + const) should come before other members and be outside any "#region" or other code groupings. This makes it easy for people to understand the structure and purpose of a type. | ||
|
||
### Runtime Algorithmic Complexity | ||
### Internal Over Private | ||
|
||
One of the goals of the project is to have members documented with algoritmic complexity using the "runtime" XML tag. | ||
Here is the notation in use: | ||
In general, prefer `internal` over `private`. If people want to access `internal` members for whatever reason, they can just download the code and add an `InternalsVisibleTo` attribute to the code so they can access internal members. | ||
|
||
- O(...): upper bound | ||
- Ω(...): lower bound | ||
- Θ(...): upper and lower bound | ||
- ε(...): expected average | ||
### Expression Boded Members Are Prefered | ||
|
||
_Note: Runtime documentation is not a requirement for pull requests._ | ||
In general, prefer expression body definition syntax `member => expression;` over traditional C# syntax `member { expression; }` where applicable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,13 @@ | ||
# Contributing to the Towel project | ||
|
||
## How Can You Help? | ||
# Contributing to Towel | ||
|
||
#### Open An Issue | ||
|
||
If you notice anything that can be improved about the Towel project please [create a new issue](https://github.com/ZacharyPatten/Towel/issues/new/choose) on the GitHub repository. This could be a bug fix, a possible enhancement, or anything else regarding the project. Creating an issue is just a public post that anyone can see and comment on. | ||
|
||
#### Share The Project | ||
|
||
Sharing the project with other programmers is a big help. The more eyes on the project the more input can be provided to make the project better. | ||
|
||
#### Writing Tutorials, Articles, and Blog Posts | ||
|
||
Towel is lacking proper documentation. Writing tutorials, articles, and/or blog posts about the project would be a big help. Let the [project developer(s)](https://github.com/ZacharyPatten/Towel#developers) know about your content, and it might be linked to from the project README. | ||
|
||
#### Show Off How You Use Towel | ||
|
||
If you use the Towel in a project and are willing to show it off, message the [project developer(s)](https://github.com/ZacharyPatten/Towel#developers) and your project or branding might be linked to from the project README. Showing an active user base would be a big help. | ||
If you notice anything in Towel that may be improved, please [create a new issue](https://github.com/ZacharyPatten/Towel/issues/new/choose) on the GitHub repository. This could be a bug fix, an enhancement, or anything else regarding the project. Creating an issue is just a public post that anyone can see and comment on. | ||
|
||
#### Chat on Discord | ||
#### Reference Your Content | ||
|
||
You can chat with the developer(s) on [Discord](https://discord.gg/4XbQbwF). They can give you more specific information on what would currently benefit the project. | ||
If you create any content relavent to Towel (blog posts, articles, tutorials, videos, a project that uses Towel, etc.), message the [project developer(s)](https://github.com/ZacharyPatten/Towel#developers) and a link to your content may be added. | ||
|
||
#### Development | ||
|
||
If you want to help out with the development of the code, contributing will involve the standard GitHub processes of forking the code and creating a pull request. Any issues marked as [Good First Issue](https://github.com/ZacharyPatten/Towel/contribute)s will generally be the best starting points for helping out. Visual Studio 2019 is the prefered environment for development. Just open the Towel.sln file and the project should build without any configuration. | ||
If you want to help out with the development of the code, it will involve the standard GitHub processes of forking the code and creating a pull request. Any issues marked as [Good First Issue](https://github.com/ZacharyPatten/Towel/contribute)s will generally be the best starting points for helping out. You can chat with the [project developer(s)](https://github.com/ZacharyPatten/Towel#developers) on [Discord](https://discord.gg/4XbQbwF) for more information. See the [Development Environments](https://github.com/ZacharyPatten/Towel/blob/master/.github/Pages/Development%20Environments.md) page for information on the recommended development environemnts. There is a [Coding Standards](https://github.com/ZacharyPatten/Towel/blob/master/.github/Pages/Code%20Standards.md) page, but the coding standards will not be strongly enforced at this time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters