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

C# specific standards #159

Closed
michaelachrisco opened this issue Apr 8, 2020 · 6 comments
Closed

C# specific standards #159

michaelachrisco opened this issue Apr 8, 2020 · 6 comments

Comments

@michaelachrisco
Copy link
Contributor

michaelachrisco commented Apr 8, 2020

I don't currently see any C# related docs in the repo.

I am thinking somewhere in: https://github.com/Shift3/standards-and-practices/tree/master/best-practices/server-side/framework/dotnet

Related to #65

@Karvel
Copy link
Contributor

Karvel commented Apr 9, 2020

I think we should chat about this. There is already a @Shift3/devs-dotnet organization team. I've got some ideas more for .NET Core patterns and tooling than C# in general. I know Corey does as well.

@michaelachrisco
Copy link
Contributor Author

@Karvel Absolutely, I have some thoughts, mostly just clean code kind of patterns etc... There are C# specific ones that may work better for the env but I would rather get everyones thoughts before we start on actually changing what we already have.

@coreyshuman
Copy link
Member

So we're in the awkward position where we've pretty much never really done any .NET projects from scratch at Shift3 (exception Sinclair), we're always inheriting and maintaining legacy software from clients or working in staff augmentation settings where we follow the client's standards. That said, once we get around to the .NET server boilerplate, that will be a great opportunity to start developing some best practices.

@HansHKam
Copy link

HansHKam commented Jun 7, 2021

Do we need standards such as a variable naming convention or more like code structuring?
I recently watched an episode of Silicon Valley about spaces vs tabs, it convinced me that spaces are inferior to tabs.

@michaelachrisco
Copy link
Contributor Author

Do we need standards such as a variable naming convention or more like code structuring?
Great question. Im thinking that variable naming convention might be good to discuss and figure out. What does Microsoft themselves recommend?

I recently watched an episode of Silicon Valley about spaces vs tabs, it convinced me that spaces are inferior to tabs.

Its a good show. A little too real sometimes haha.
I also prefer spaces, but as far as a specific standard, im thinking as long as the project is consistent, its good. Since a majority of our .Net projects are pulled in from existing outside client work, im thinking it would make more sense to keep with whatever standard they are using within their code...within reason. If they use both, then yeah we should totally standardize.

@Karvel
Copy link
Contributor

Karvel commented Jun 8, 2021

I agree. Fighting over spaces versus tabs is a waste of time. It's a religious fight and people basically don't change their minds. The project should use what it's already using. If it's a new project or the project needs to consolidate two clashing indentation choices, the lead can choose. It's not personal code so if the choice doesn't line up with a personal choice it doesn't matter.

I've taken to wiring up an extremely opinionated linter in my JS projects that runs as a pre-commit hook. I don't actually like some of its style decisions, but this way nobody on the project needs to worry about style, and the pre-commit hook ensures that all commits apply the linting.

That scene is one of my favorites from the show though.

@michaelachrisco michaelachrisco removed their assignment Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants