Advice for embedded and IoT development teams
Often, when we are developing a new product, there is pressure to cobble something together for a quick prototype or proof-of-concept. Management or marketing needs to see something. Or perhaps you are looking for funding and you need to demonstrate the key product functionality.
There is nothing inherently wrong with prototypes. They are very useful in helping define and understand the intended product. The problem comes when we use the prototype code as the starting point for the real product development, because who wants to go back and rewrite everything. The code you slung together just to make something demonstrable is never good code. It was written in haste, barely debugged, and it has many large gaps in functionality...
If a prototype or proof-of-concept is an important in early development, make the commitment that you will not live with that code but will start fresh when the project is funded. Institute a formal software development process. Start with a series of well understood, testable requirements. Write your software to those requirements.
Agree on a coding standard. MISRA-C is a good place to start. You don’t need to comply with every rule. Select the rules that will help you avoid dangerous or bug-prone constructs. This will also give a level of consistency among the code from different developers on the team.
And check the complexity of your code as you go. Studies have shown that the more complex your C functions are, the more prone to bugs and maintenance problems (it’s really just common sense). Tools like the code complexity analysis tool in Atollic TrueSTUDIO Pro give you a complete picture of your function complexity in few moments. The scoring system (the higher the number; the greater the potential problems) will help you identify which functions should be reworked or rewritten into several functions.
Someone once said that life is about the journey; not the destination. I think the same goes for software development. If you only focus on finishing something and ignore the process for how to get there, the result will not be reliable, maintainable code and your project will suffer. Atollic TrueSTUDIO development tools give you a trustworthy guide for your software development journey.
Find out more about how Atollic TrueSTUDIO Pro can help you maintain a healthy project