Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Code Standards #11

Open
Greatexperiment opened this issue Jun 15, 2018 · 4 comments
Open

Code Standards #11

Greatexperiment opened this issue Jun 15, 2018 · 4 comments
Labels
topic A discussion point usually

Comments

@Greatexperiment
Copy link
Member

We need to agree on coding / comment / file standards that we can all agree on and will use. A big issue we have in 56 is that a lot of code is very lazily written, poorly formatted, badly organized, or just not commented enough. Let's fix that.

This is a higher priority topic, since we need to establish this before starting the recode of any files. I will write up some standards of my own later, but I would like to see what everyone thinks first.

@Greatexperiment Greatexperiment added the topic A discussion point usually label Jun 15, 2018
@Greatexperiment
Copy link
Member Author

Greatexperiment commented Jun 20, 2018

Let's start with comment standards:

  1. Generally, comment often. Maybe this seems obvious, but it's extremely helpful to have a ton of comments in the code. Make it explicit, detailed, and easy for navigating in-file and via global searches.

  2. Standard code comment style...

#####-----> File Header / Ender <><> <><> <><> <><> <><>

###---> Comment <><> <><> <><>

#-> Sub-Comment <><>

@Greatexperiment
Copy link
Member Author

Greatexperiment commented Jun 20, 2018

Examples:

#####-----> Air Techs File by Greatexperiment <><> <><> <><> <><> <><>

###---> Modded Jets <><> <><> <><>

#-> 1954 Jet <><>

#####-----> End File <><> <><> <><> <><> <><>

@Llutozz
Copy link
Contributor

Llutozz commented Jun 20, 2018

Makes sense to me. I also think we should continue sorting stuff by country tags etc.

@Greatexperiment
Copy link
Member Author

General structure:

r56_category_subcategory_name_name

It's long, but I think it's needed. It's way too easy to get lost in the code or files and not know what something is for or does. That's one reason we use the DXT5 graphics standard - it allows for quickly seeing what a file is without opening each one up in a graphics program. The new naming convention would make it very easy to do searches across the code for specific things, and would mean most anyone looking at it could easily figure out what something is associated with.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic A discussion point usually
Projects
None yet
Development

No branches or pull requests

2 participants