Best development practices to grow as a programmer.

Here you can find out this article in spanish

Excellent development practices that can help you maintain clean, organized, and easily maintainable code

wolfcito workstation

Let's start thinking outside of the box

  1. Avoid leaving unused code whenever possible:

    // Avoid leaving unused code like this
    // const unusedVariable = "I'm not used";
    
  2. Comment your code when it's very extensive and/or complex to understand:

    // Commenting on complex code can help other developers understand the logic
    if (condition) {
      // Complex logic here...
    }
    
  3. Use version control software (GIT): Version control systems like Git allow you to track changes and collaborate with others.

  4. Do not version commented-out or erroneous code:

    // This commented-out code should not be in version control
    // const obsoleteCode = "I'm not needed anymore";
    
  5. When making a commit, provide a descriptive comment of what is being versioned:

    git commit -m "feat: Add new feature to the project"
    
  6. When working with classes/components, use camelCase naming:

    class myComponent {
      // Class name in camelCase
    }
    
  7. When working with methods, attributes, and variables, use names in lowerCamelCase format:

    const myVariableName = 'example' // Variable name in lowerCamelCase
    
  8. When working with constants, use descriptive names in uppercase separated by underscores if necessary:

    const IMPORTANT_CONSTANT = 42 // Descriptive constant name in uppercase with underscores
    
  9. If paths for URL(s) are required, use descriptive lowercase names separated by hyphens:

    <a href="/my-descriptive-url">Link</a>
    <!-- Descriptive URL with hyphens -->
    
  10. Associate a component with a single view whenever possible:

// A component associated with a single view
  1. When dealing with associated resources, use descriptive names referencing their functionality:
const homeScreenImage = 'image.jpg' // Descriptive resource name referencing its use
  1. To validate functionality, methods, APIs, libraries, etc., use a branch named "Test":
git checkout -b test/feature-name // Creating a test branch for validation

Estos ejemplos ilustran cómo aplicar cada una de las prácticas mencionadas en tu lista.