Comet-Robotics / chessBot

♟️ control software for the chess bot project
http://chessbots.cometrobotics.org/
MIT License
6 stars 3 forks source link

[Client]: Write in-code comments for client side #77

Closed xXDMOGXx closed 8 months ago

xXDMOGXx commented 9 months ago

Task Description:

The code that is written in the client has no comments. This makes it hard for anyone not already familiar with that code to understand it. Even if you are familiar with the code, having helpful comments can greatly increase efficiency due to not needing to decode your own code.

Implementation Steps:

Go through all of the .tsx files in src/client and read through the code. Please also ask plenty of questions if you get stuck anywhere. As you go through and understand what things do, go ahead and write a clear and concise comment that describes what is being done.

  1. Go through each file in src/client
  2. Figure out what each segment of code does
  3. Comment above and within the code segment
  4. Make sure to work with an experienced ChessBot member for review and suggestions

Difficulties:

  1. To be able to write helpful comments, you must properly understand the code
  2. This will require general programming knowledge, and a willingness to research

Relevant Links:

If you need help with general programming knowledge, please check out some of our resources in the Resource Library.

Time Estimate: ~1 hour

If you have any questions while working on this task, post in the Programming Channel on Discord, reply to this issue on GitHub, or ask Jason, Alex, Colin, or Dylan at one of our meetings.

AlexKempen commented 9 months ago

This issue needs additional attention/detail. At a minimum, it needs to have a list of classes/objects/methods to document.

xXDMOGXx commented 9 months ago

This issue needs additional attention/detail. At a minimum, it needs to have a list of classes/objects/methods to document.

You say at minimum, what would be required for an "at maximum"? Since I'm the one who made the issue, it's hard for me to know where all the attention/detail is lacking except for what you explicitly pointed out.

Btw, since you unassigned those two, does that mean they are working on something else now?

democat3457 commented 8 months ago

I think providing examples of comments to make would be a good idea; it may be unclear what to document in the first case, like classes, methods, or even particular lines of code.

"In general, it's probably a good idea to document a line of code if it seems confusing. A method should be documented if it performs anything more complex than a getter or setter operation, and a class should almost always be documented."

And examples of comments would also illustrate how to word them and show how much detail a comment needs to go through (does it need to go into the implementation or just describe a high-level concept? what tense should it be written in?).