Clean Code

At our core, we value the importance of writing clean code that is readable, maintainable, and testable.

Our focus is on creating high-quality code that is easy to modify and extend over time.

We believe in designing code with these principles in mind, ensuring that it is well-organised, structured, and follows best practices.

What is clean code?

Clean code is that what is easy to read, understand, and maintain. It is thinking about future readers of your code which, potentially, is your future self when you've long since forgotten the code. Future readers should be able to reason about the code without much effort.

At Yobibyte Solutions, we advocate for clean code, it's a must really. Code needs to be maintainable so it needs to be readable by other developers to help collaborate and work more effectively.

Principles

Here at Yobibyte Solutions, we believe there are a few basic principles that should be followed to ensure clean code is produced.

Adhere to SOLID principles

We believe that SOLID principles should be followed. SOLID standards for Single Responsiblity, Open-Closed, Liskov Substitution, Interface Segregation and Depedency Inversion. It's a popular set of design principles developed by Robert C. Martin in 2000.

By following these SOLID principles during development it facilitates the creation of clean, maintainable, well designed quality code.

Formatting

Maintaining consistent code formatting is crucial for enhancing code readability and comprehension. IDEs often facilitate automatic formatting of code, and it is vital to ensure that such settings are uniform across developers' IDEs.

Even a minor issue such as incorrect code indentation can significantly impede code readability, leading to time-consuming efforts and wasting developers' valuable time and, ultimately, costing the business more money.

Convoluted Logic

Our philosophy is to embrace simplicity as the optimal approach. Instead of lengthy code blocks, encapsulating logic into a method with a descriptive name can convey to another developer everything necessary about the code's purpose.

Keep it simple

Our guiding principle is the KISS approach - "Keep It Simple, Stupid" or "Keep It Short and Simple". Unnecessary complexity should be avoided. We prioritise simple and straightforward solutions that are easy to understand, use, and maintain.

No (or few) comments

If comments are required in the code then it is not expressive or concise enough.

Comments will become stale and in time will cause confusion about a code block that has long since been removed or changed beyond its original intention.