APIMatic September 28, 2017

Introducing Coding-Standards Compliant SDKs

Coding standards compliance and code linting are among the concepts widely recognized in the software industry as markers of better code quality. At APIMatic, we’re obsessed with the quality of the code we generate, and as another step towards better code, we’re introducing SDKs that are compliant with industry-accepted coding standards.

For each language, we have employed a widely accepted style for writing code. Therefore, the generated code is shipped just the way most developers like it and expect it to be written. We’ve chosen the coding standard for each language depending on its popularity with the developer community.

Coding standards compliance also improves the readability of the generated code. Since the personal preferences of the developers are eliminated, the shipped SDK will be the same in code quality no matter who is working on the code generation engine.

For the users who have already implemented coding standards in their development workflow, the generated SDKs fit in seamlessly with their existing codebase. This brings more consistency to their projects.

Coding standards compliance gives our users a guarantee from our end that the shipped code will be free from syntax errors and inconsistencies so that they can focus solely on their applications without having to worry about anything else.

Node.js code sample generated before the SDK was coding-standard compliant

Node.js code sample generated after the SDK was coding-standard compliant

Apart from helping the consumers, coding-standard compliance and linting improve the code generation process at our end as well. It saves time since linting identifies and points out the errors or inconsistencies before the generated code is shipped.

Compliance is particularly useful in the case of weakly typed languages. Since weakly typed languages are not compiled, errors can only be detected at runtime. So linting acts as an extra layer of protection in this case, checking the code for inconsistencies to ensure that all bugs are caught out and fixed before release. This way, the generated code is tested rigorously with linting checks and unit tests at our end, and quality SDKs are shipped out.

Currently, our C#, PHP, Node.js, AngularJS and Python SDKs are coding-standards compliant, while compliance for Ruby and other languages are coming up pretty soon. For details about the coding standards being used and the changes made to SDKs, have a look at here.

If you have suggestions to help us improve our code quality further, please don’t hesitate to contact us.