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

Code needs to be commented #8

Closed
sguergachi opened this issue Oct 6, 2012 · 3 comments
Closed

Code needs to be commented #8

sguergachi opened this issue Oct 6, 2012 · 3 comments
Assignees
Milestone

Comments

@sguergachi
Copy link
Owner

We need to add comments to code following this: http://antjanus.com/blog/web-design-tips/best-comment-separator/

@sguergachi
Copy link
Owner Author

Ok, so here is the multi line comment wrapper I think we should use. Simple title, max of 2 paragraphs to be used for main methods. Just copy and paste, the spaces have been put in place so editing shouldn't be necessary.

/**
* .------------------------------------------------------------------------.
* |    
* .------------------------------------------------------------------------.
* |
* | 
* | 
* | 
* |
* | 
* | 
* | 
* | 
* |
* |
* |
* .........................................................................
*
* @
*
 */

Here is an example of what it should look like:

/**
* .------------------------------------------------------------------------.
* |    DashboardUI :: Aurora Screen Class
* .------------------------------------------------------------------------.
* |
* | This class contains the UI attached to an appropriate *Handler*
* | and *Logic* class which handle the actions caused by the UI
* | components found here
* |
* | This class must follow the rules stated in the AuroraScreenUI
* | Interface. The *Handler* and *Logic* classes
* | The Handler class is called: DashboardHandler
* | The Logic class is called: DashboardLogic
* |
* |
* |
* .........................................................................
*
* @author sammy <sguergachi@gmail.com> carlos <>
*
 */


/**
* .------------------------------------------------------------------------.
* |    DashboardUI()
* .------------------------------------------------------------------------.
* |
* | This is the Constructor of the Dashboard UI class
* |
* | The Constructor of Screen Classes must initialize/create both a
* | Handler and a Logic object which should contain the UI as a parameter
* |
* ..........................................................................
*
* @param auroraCoreUI AuroraCoreUI
* @param startScreenUI StartScreenUI
*
*/

let me know if you like it.

@sguergachi
Copy link
Owner Author

Dealing with long lines.

Notice what is placed first in each line, notice the space after the comma, plus or whatever.

- Has commas:

BEFORE:

btnLogout = new aButton("Aurora_Logout_normal.png", "Aurora_Logout_down.png", "Aurora_Logout_over.png", SIZE_btnLogoutWidth, SIZE_btnLogoutHeight);

AFTER:

    btnLogout = new aButton("Aurora_Logout_normal.png"
            , "Aurora_Logout_down.png"
            , "Aurora_Logout_over.png"
            , SIZE_btnLogoutWidth
            , SIZE_btnLogoutHeight);

- Has commas and other stuff:

BEFORE:

coreUI.getPnlTop().setPreferredSize(new Dimension(coreUI.getPnlTop().getWidth(),coreUI.getPnlTop().getImageHeight()+coreUI.getPnlFrameControl().getHeight()));

AFTER:

    coreUI.getPnlTop().setPreferredSize(
            new Dimension(coreUI.getPnlTop().getWidth()
            , coreUI.getPnlTop().getImageHeight()
            + coreUI.getPnlFrameControl().getHeight()));

- Long If Statments:

BEFORE:

if (storage.getStoredLibrary().getBoxArtPath() == null || storage.getStoredLibrary().getBoxArtPath().isEmpty()) {.

AFTER:

    if (storage.getStoredLibrary().getBoxArtPath() == null
            || storage.getStoredLibrary().getBoxArtPath().isEmpty()) {

sguergachi added a commit that referenced this issue Oct 18, 2012
sguergachi added a commit that referenced this issue Oct 23, 2012
sguergachi added a commit that referenced this issue Oct 23, 2012
-Moved random game generator in Dashboard UI to Logic
-Renamed all DashboardUI size fields and getters and setters to convention
-More refactoring of loadUI and buildUI in DashboardUI
sguergachi added a commit that referenced this issue Oct 30, 2012
sguergachi added a commit that referenced this issue Oct 31, 2012
- Cleaned DashboardLogic commenting
- Refactored all variables for AuroraCoreUI
- Removed unnecessarily commented stuff in AuroraCoreUI
- Added some comments to varibles of AuroraCoreUI
- Added CONTRIBUTING markup doc for coding style documentation
@ghost ghost assigned camachado Nov 1, 2012
sguergachi added a commit that referenced this issue Nov 1, 2012
-AuroraApp commented and refactored
- Implemented new AuroraScreenHandler and AuroraScreenLogic to classes
- some cleaning here and there
- added more stuff to CONTRIBUTING.md
@sguergachi
Copy link
Owner Author

Closing this, comment code you edit or create, overtime we will comment the rest of the codebase

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

2 participants