Insights

Code principles
to a standard

An insight into Hexis coding principles.

in Software development By Carlos Camara, Managing Partner

Code principles are a best practice that we foster its application to all Hexis Technology Hub projects. The importance of the code principles Hexis follows also translates not only to the flexibility that clients are expecting but also as a standard definition that the current practices and own principles applied transpose into the quality of delivery. The impact on the quality of delivery and value add to the client is across multilayers of the project, where ultimately brings to cost savings, stability and an easier handover.

We have resumed the way we follow our code principles in 5 main topics, which we have standardised across projects.

1. Don't Repeat Yourself (DRY)

We strive for a minimalist design philosophy and effective code writing, applying the principle that code blocks should not be repeated over and over again, providing clean and stable code and bug replication control. Regardless of the project size, this principle optimises memory allocation and garbage collection control in any programming language.

2. Code Style Consistency

Code Style enforcement is essential in all corporations and Hexis as a software house is no exception. Code Style helps guide our developers' eyes through a codebase, helping them understand the project structure and scaffolding quickly. For this reason, depending on the tech stack, we like to follow well known and maintained Code Styles on the community. As an example for all our Javascript based projects, we use the Airbnb Code Style (https://github.com/airbnb/javascript), and for all our Java-based projects, we use the Code Style recommended by Google (https://google.github.io/styleguide/javaguide.html).

All the projects developed by our team follow a consistent code styling, that helps the code integration and on-board of new elements in any project, despite the size. In case the indentation applied doesn't match the in-house client style, Hexis team will adapt to follow and use the same principle. Consistent indentation is critical for any project from a simple MVP to a large-scale project.

3. Readable Code

Levels of nesting can be considered a good practice up to the extent that makes the code read challenging to follow. Through the constant scrum sessions applied in all projects, the volume of nesting levels is raised as a bad principle and commented as an action to review and improve. This principle allows our team to make a more straightforward handover of code to our clients or among team members.

4. You aren't gonna need it & Test-driven development (YAGNI & TDD)

In Hexis, we apply rigorous software development techniques that allow fast feedback and assurance that our code works the way expected to. We strive to prove our design theories using pragmatic, lightweight quality assurance tests. This principle encompasses our development processes, frequently demoing to our customer to verify that we are building the right thing.

5. Keep it stupid simple (KISS)

The software developed in the scope of any project in Hexis is designed to be as simple as possible, writing to the libraries we recommended as a best practice that has been properly tested and documented. Pursuing simplicity provides a risk of the wider context being overlooked. The simplicity applied always considers the teams and clients that we work with, and how the code applied and commenting will impact the value created and simplicity of the big picture.

Get in touch