Coding Practices for Embedded Systems
Far too often, students focus on creating a working project without any regard for the quality, readability, and maintainability of their code. Students are not usually made to realize how learning and applying good coding practices can improve the success of their projects and make them more valuable to future employers. By adhering to a set of simple coding practices, students can create projects that are easier to read, maintain, predict (no unexpected features or "ghost" effects), and reuse. Many students have developed a misconception that a copious amount of commenting can make up for the shortcomings of code that is poorly organized and/or difficult to understand. Although good commenting is important and can make the purpose of code blocks clearer, paragraphs of explanation do more to clutter a project than they do to improve its quality. Proper commenting should be used in conjunction with other important practices in order to create a project with the cleanest and clearest code possible. Distinctive naming of components (files, variables, constants, etc.) and a logical layering of code can help to make changes to code far simpler, less time-consuming, and produce more predictable results. This paper provides a guide to good coding practices. Some of the topics covered will include proper use of commenting, code modularization, layering, descriptive naming, cohesion, and avoiding race conditions.
Pook, Michael; Loo, Sin Ming; Planting, Arlen; Kiepert, Josh; and Klein, Derek. (2010). "Coding Practices for Embedded Systems". ASEE Annual Conference and Exposition, June 20-23, 2010, Louisville, KY, .
This document is currently not available here.