Symph is dedicated to creating high-quality, sustainable software. Our commitment is reflected in our adherence to best practices, including Clean Code, SOLID, DRY, and KISS principles. These guidelines ensure our code is not only functional but also clean, maintainable, scalable, and expressive without relying heavily on comments.
- Readability and Self-documenting Code: We believe in writing code that is easy to read and understand. Our code should effectively communicate its purpose and logic, minimizing the need for comments.
- Purposeful Names: Opt for meaningful variable, function, and class names that clearly express their intent and usage. Well-named constructs eliminate the need for explanatory comments and make the code self-documenting.
- Simplicity: Keep code as simple as possible. Simple, clear code is inherently more maintainable and understandable than complex code laden with comments.
- Single Responsibility Principle (SRP): Each module or class should have only one reason to change, focusing on a single functionality. This principle supports clarity and maintainability.
- Open/Closed Principle (OCP): Software entities should be open for extension but closed for modification. This principle encourages modularity and extensibility without altering existing code.
- Liskov Substitution Principle (LSP): Objects of a superclass shall be replaceable with objects of its subclasses without breaking the application. This ensures that a class and its derived classes must be substitutable for each other.
- Interface Segregation Principle (ISP): Clients should not be forced to depend on interfaces they do not use. Smaller, client-specific interfaces are better than one general-purpose interface.
- Dependency Inversion Principle (DIP): High-level modules should not depend on low-level modules. Both should depend on abstractions. This principle reduces coupling and increases modularity.
- Ensure every piece of knowledge has a single, unambiguous representation within the system. Avoid code duplication to facilitate maintenance and scalability.
- Strive for the simplest possible solution. Complexity complicates maintenance, understanding, and extension of the code.
- Minimize Use of Comments: While comments can be useful for explaining why certain decisions were made, we prefer code that explains itself through clear logic and naming conventions. Comments tend to become outdated or misleading over time, whereas purposeful names and clean code structures convey lasting clarity.
By embracing these coding principles, we aim to craft software that is robust, efficient, and easy to maintain. Our emphasis on meaningful names over comments underlines our commitment to writing code that is self-explanatory, reducing the reliance on external documentation and making our codebases more accessible and intuitive for developers.