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

Document Code in C# Scripts #96

Closed
jimenezz22 opened this issue Oct 22, 2024 · 19 comments · Fixed by #104
Closed

Document Code in C# Scripts #96

jimenezz22 opened this issue Oct 22, 2024 · 19 comments · Fixed by #104
Assignees
Labels
documentation Improvements or additions to documentation external-contributor Available for external contributors good first issue Good for newcomers

Comments

@jimenezz22
Copy link
Contributor

Scope

We need to document all the code in the files inside Assets/Scripts path

To do:

  • Understand the all the code/classes/methods/functions in the files and their conecctions with other classes in other scripts
  • Document these files in a format similar to JavaDoc for example, but for C# scripts.
  • Explain what each class, each method, each function, each flow control, etc. does. We need to have all these scripts fully documented.

How to apply?

Please follow the contribution guidelines in the readme file

@jimenezz22 jimenezz22 added the documentation Improvements or additions to documentation label Oct 22, 2024
@Iwueseiter
Copy link
Contributor

Iwueseiter commented Oct 23, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi @jimenezz22 can I work on this?
I'm a frontend and smart contract developer, I'm also a technical writer and I'd love to contribute to this project.

How I plan on tackling this issue

Here are the links to some comprehensive documentations I've contributed here on onlydust that have also been merged: Flex-NFT-Marketplace/Flex-Marketplace-Contract#107,
sivicstudio/starkludo#102,
horuslabsio/tokenbound-contract-docs#12

@NueloSE
Copy link
Contributor

NueloSE commented Oct 23, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

@jimenezz22, Am a software developer with some intermidate level expertise in C# scripting around MonoBehaviour and SceneManager. With some proficiency level in codebase analyzing, Identifying relationships between classes and methods and documenting them comprehensively. My experience spans across UI management, which aligns well with the scripts provided.

How I plan on tackling this issue

Observing the files in the codebase for example: Assets/Scripts, i would approach it as follows:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

/// <summary>
/// Represents an entrance to an area in the game world.
/// </summary>
public class AreaEntrance : MonoBehaviour
{
    /// <summary>
    /// Gets or sets the name of the transition associated with this entrance.
    /// </summary>
    public string transitionName;

    /// <summary>
    /// Initializes the component.
    /// </summary>
    void Start()
    {
        // Check if the player is transitioning to this area
        if (transitionName == PlayerController.instance.areaTransitionName)
        {
            // Move the player to the current position of this entrance
            PlayerController.instance.transform.position = transform.position;
        }

        // Fade from black and stop fading between areas
        UIFade.instance.FadeFromBlack();
        GameManager.instance.fadingBetweenAreas = false;
    }

    /// <summary>
    /// Called every frame.
    /// </summary>
    void Update()
    {
        // Currently empty, but could be used for continuous checks or actions
    }
}
  • In addition I would adhere to some general approach for documenting C# scripts in Unity, like:
  1. Use XML documentation comments (///) for classes, methods, fields, and properties.
  2. Provide a brief summary for each class, method, field, and property.
  3. Explain the purpose and functionality of each part of the script.
  4. Include parameters and return values for methods.
  5. Describe the behavior of event handlers like Update() and OnTriggerEnter2D().
  6. Use consistent naming conventions throughout the script.
  7. Group related elements together (e.g., all public variables at the top, private variables below, etc.).
  8. Add comments to explain complex logic or important decisions made in the code.

previous code doc by me:

kindly assign

ETA 3-5days

@jimenezz22
Copy link
Contributor Author

Hi @NueloSE @Iwueseiter
thank you for your interests to contribute to ByteBeats, we will start assigning issues when the ODHack 9 starts on October 24 and issues will be assigned through OnlyDust

@jimenezz22 jimenezz22 added the external-contributor Available for external contributors label Oct 24, 2024
@zleypner
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi! I’m Anwar a Software Developer with +3 years of experience, and I would love
continue making contribution to this project
I'm also a member of the Dojo Coding community From CR.

How I plan on tackling this issue

I will carefully go through each file, class, method, and function, and identify how they connect with other scripts and components.
I will explain:
What the class is responsible for.
The purpose of each method and its parameters.
The logic behind flow controls

The documentation will ensure that the entire structure is clear and concise, making the code easier to understand and maintain.

For reference, I have experience in documenting projects, including my contribution to Horus Labs Tokenbound Contract Docs, and I have worked on documentation tasks in ByteBeastsBackend.

@akintewe
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have vast experience producing clear, comprehensive documentation in both JavaScript and C#. My expertise with C# development has given me a solid understanding of object-oriented programming ideas and documentation guidelines.
:)

How I plan on tackling this issue

For this documentation work, I would first go through all of the scripts in the Assets/Scripts directory to understand their functionality and linkages. I'd use C# XML documentation comments to describe classes, methods, and properties, assuring IntelliSense compatibility. I would focus on documenting method arguments, return values, and class relationships in C#, comparable to JavaDoc approach. I would be excited if i am granted to work on this task :)

@martinvibes
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

ello @ i'm a frontend developer and an experienced technical writer i would love to work on this issue
Pleasee kindly assign :)

@od-hunter
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello can I be assigned this please? I am a blockchain developer and I'm also good at documentations. Below are some of the documentations I've done that were merged:

dojoengine/book#308,
keep-starknet-strange/joyboy#143,
Scaffold-Stark/ss2-docs#31,
horuslabsio/Starknet-Scaffold#94,
Hyle-org/examples#15,
Hyle-org/examples#16,
horuslabsio/tokenbound-contract-docs#11.

How I plan on tackling this issue

Here are some documentations I did that were merged:ByteBuildersLabs/ ByteBeastsFrontend #96

Hello can I be assigned this please? I am a blockchain developer and I'm also good at documentations. Below are some of the documentations I've done that were merged:

dojoengine/book#308,
keep-starknet-strange/joyboy#143,
To write a comprehensive and correctly formatted documentation:

  1. I’ll start by carefully reviewing each C# file inside the Assets/Scripts directory, to understand how each class, method, or function interacts with others, noting dependencies, inheritance, and flow control.
  2. ⁠I’ll make sure to add comments, and tags like , , and to explain functionality.
  3. ⁠I’ll run a build and check if all tooltips and comments are properly displayed in my IDE.

Please I’m ready to work, assign me please.

@suhas-sensei
Copy link
Contributor

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

i have experience in game dev as well as blockchain previously as personal projects and OS, so hoping to make use of them here and mark my first odhack contribution

How I plan on tackling this issue

let me put my documentation skills to use

@mexes20
Copy link

mexes20 commented Oct 24, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, can I be assigned to work on this issue as a first time Contributor.

ETA: One Day

@BrunoAmbricca
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hey guys, Bruno here from the dojo coding community. I´ve been working for the past 4 years with c# and in big companies like the one Im right one (Mercado Libre) so I have encountered a lot of documentation.

How I plan on tackling this issue

I would read the current docs and all the code that needs to be documented and understand what each class, function, etc... works.

@ShantelPeters
Copy link
Contributor

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have a strong background in C# development, which includes extensive experience in understanding complex code structures and effectively documenting them. My expertise in programming standards enables me to provide clear, concise, and comprehensive documentation that enhances code maintainability and facilitates easier onboarding for new contributors.

How I plan on tackling this issue

To document the code in the Assets/Scripts directory, I will thoroughly review each script to understand its functionality and interactions. I will use a JavaDoc-like format tailored for C#, providing detailed explanations for each class, method, and flow control. Consistency in style and terminology will be prioritized, and I will seek feedback from maintainers to ensure accuracy and completeness. This approach will create clear and valuable documentation for current and future contributors.

@josephpdf
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi!, my name is Joseph Poveda.
I am a student of the Systems Programming degree, I am a recent member of the Dojo Coding community, where I am getting started in the world of Web3.
I have basic knowledge of different programming languages ​​and thanks to this I hope to be able to resolve the issue.

How I plan on tackling this issue

To address the problem, I would start by reading the Redme, a step that I have taken, because in previous days I was studying the project to understand it in a better way, after this I would understand each section of the code to see how it works and with this document it, so that it is more understandable.

@mimiprosper
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I started my programming career as Java developer. I have a very strong background in object oriented programming and writing professional code documentations.
Am also a frontend Developer, smart contract developer and technical writer. Am familiar with c# syntax and deeply understand its object oriented programming approach. I have written several technical articles. I have written a succefully merged documentation in OD hack. I can write professional code documentations for your c# program similar to JavaDoc for Java programs.

How I plan on tackling this issue

My first approach in writing a professional documentation for this task would be to understand the code/classes/methods/functions in the files and their connections with other classes in other scripts. This would help me breakdown and understand every class, each method, each function, each flow control, etc. in the code base. After a detailed understanding of the code base i would write a simple, clear, concise and professional documentation that a 12 year old can read and understand.

@YarexEspinoza17
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello
I am a software engineer from Costa Rica and a member of Dojo Coding. I am new to the community. I have worked with technologies such as JavaScript, Node.js, PHP, Java, C#, Typescript. I also have basic knowledge of using git. I would love to have the opportunity to help with this problem and contribute to your project.

How I plan on tackling this issue

  1. Understand the Code
    To create excellent code documentation, I think the key is to understand the code, know the purpose of the classes and methods that were implemented, and understand the flow control, identify control structures such as loops, conditionals, etc., and how it affects the overall behavior of the system.

  2. Add Comments
    The next thing to do is add comments to the classes with a brief description of what they represent and what they do. After that, the description of the variables is done. Regarding the control flows (such as loops, conditionals, etc.), a brief description of what they do is done, and what the conditions are for a loop to start or end, for example. And finally, comments on class connections, if a class or method is related to another class or script, add explanations in the comments to clarify these connections.

  3. Recommendation Some considerations to take with the documentation, I have seen documentation that is done in XML style to follow a standard.

Personally, it can take 2 to 5 days to complete a well-done documentation depending on the project's completion
.
We look forward to receiving your comments!

Kind regards, Yarex Espinoza Naranjo.

@aniruddhaaps
Copy link
Contributor

I'm a javascript dev. A new-comer here, willing and ready to contribute to solve the issue.

@emarc99
Copy link

emarc99 commented Oct 24, 2024

I’d like to help with this.

I have strong research skills (5+ years) in computer engineering works, which makes a suitable candidate for this role. I

@jimenezz22 jimenezz22 moved this from TODO 🥷 to In progress in ByteBeasts - External Board Oct 24, 2024
@jimenezz22
Copy link
Contributor Author

gm @NueloSE assigned to you

@jimenezz22
Copy link
Contributor Author

gm @NueloSE any updates?

@NueloSE
Copy link
Contributor

NueloSE commented Oct 28, 2024

gm @jimenezz22 making a PR today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation external-contributor Available for external contributors good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.