Code should be written to be readable and not just runnable.
Any code we write at Adafruit is ‘read’ by a many thousands of people with varying levels of experience with the software and hardware they are working with.
That puts a unique burden on us to produce code that doesn’t just ‘work’, but is also easy to understand and maintain.
In a conscious effort to improve our own code in this area, we’ve put together this simple guide to writing code that’s easier to read, maintain and understand.
While everything suggested here is somewhat personal, and largely a reflection of my own habits working in C over the years, as Adafruit continues to grow as a company we want to put more emphasis on code quality, in the same way we’ve focused on the quality of our HW designs and tutorials.
We’ve tried to keep these guidelines as general as possible recognizing that everyone has (and has the right to) their own style, but there are some things we think are worth insisting on in the interest of readability and keeping things accessible for customers.
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Maker Business — American startups are having an increasingly smaller share of the market
Wearables — Switch the advantage
Electronics — Don’t float!
Biohacking — Optimizing the Warm Up
Python for Microcontrollers — CircuitPython 3.0.0 released!
No comments yet.
Sorry, the comment form is closed at this time.