= Coding Tips = == Preprocessor defines, macros, inline functions == * Prefer using {{{enum}}} instead of preprocessor defines for constants * Preprocessor defines are only necessary when you are using the constant both in C and assembly sources * Prefer using static inline functions instead of preprocessor macros * Preprocessor macros are only needed (a) for type polymorphism, (b) if the result needs to be an l-value (R/W accessor) * Prefer using regular functions to static inline functions * Practically never needed, it is just premature optimization == Other Resources on Good Coding Practices == * [https://www.youtube.com/watch?v=heh4OeB9A-c How To Design A Good API and Why it Matters (video)] * [https://www.youtube.com/watch?v=acjvKJiOvXw&list=PLvqMob1eOxGIW51K9PA_N4u2MJbddNw-H Design Tech Talk Series Presents: OO Design for Testability (video)]