Rynchodon / ARMS

ARMS mod for Space Engineers
Creative Commons Zero v1.0 Universal
18 stars 17 forks source link

reorg, doc, & cleanup - Logger, Core, Readme #15

Closed zrisher closed 9 years ago

zrisher commented 9 years ago

AutoPilot.Core added documentation reorganized changed logging statements to make use of new Logger helpers renamed build to findNavigators removed unused code

Utility.Logger renamed ShowNotification to notify renamed ShowNotificationDebug to debugNotify refactored notify functions to take a severity level instead of font color - I think attaching a severity level to notifications, just like what we give log messages, will make this easier to use, DRYer, and with more consistent output.

Readme Merging getting started documentation with the wiki page and linked to it

removed unused classes Autopilot.AutopilotLink and Autopilot.Gridworld

zrisher commented 9 years ago

FYI, there should be no functional changes to Core. I removed a bunch of unused stuff and renamed some logging functions, but it should behave exactly as before.

Rynchodon commented 9 years ago

Too bad System.Runtime.CompilerServices does not work, eh? How come you are not using intellisense tags?

zrisher commented 9 years ago

Hey @Rynchodon , this and my brief foray into ingame programming are my first and only exposure to any flavor of C. I believe intellisense tags are the xml-style function comment markup tags I've seen above some of the functions, and they require System.Runtime.CompilerServices, right? I haven't been using them because they seemed designed to document an internal API to external users - that is, primarily for people who aren't actually reading your code. In this case, no one would be referring to your documentation if they weren't also browsing your code, so I avoided them in favor of simple inline comments and attribute tags. However, this is your repo and I'm happy to follow your and C best practices.

Rynchodon commented 9 years ago

They probably are not actually called "intellisense tags", but I was referring to the xml-style mark-up tags. They do not require anything.
All the IDEs that I am familiar with makes use of the tags (particularly <summary>). The syntax will also be familiar to anyone who has used C# before, or other languages that use similar tags.
That being said, there are some comments that obviously do not belong inside these tags.

zrisher commented 9 years ago

You must be a C guy, because I can't find any other languages that use XML comment markup. : ) That said, this looks to be very much the standard and I'm happy to use it. Linguistic peculiarities keep coding interesting, and I'm sure what I'm used to would seem peculiar to many people.

When do you think we should use nothing vs a summary vs all the param & return tags? It seems like some good targets might be:

Also, do you have a C# style guide that this repo should try to abide by?

Rynchodon commented 9 years ago

I am not a C guy, I am simply flexible. I have seen you use @ tags, xml should be an easy transition.

I am not a stickler for comments, as you have probably noticed. Write them when you feel the need to. Comments that pertain to a function should be in <summary> or <remarks>; comments that pertain to a subsection should be in-lined. In a perfect world, all functions would have summaries and all non-private functions would have <param> and <returns>.

I do not have a style guide.

zrisher commented 9 years ago

Makes sense, thank you.

I may run some style questions by you then once I have a better handle on the prevailing ways to write C#.