Shakespeare Literature and Coding Guidelines | Cypress Semiconductor
Shakespeare Literature and Coding Guidelines
Unlike Mr. Pearson’s mom who told him: “don't play ball in the house”, my mom always tried to advise me on what to say and what not to say. After I grew up to be an engineer, my thesis advisor would guide me on what to write and what not to write, what to code and what not to code.
When I was reviewing my growth algorithm code with him, instead of sharing the joy of the improved model with better accuracy, he leaned back in the chair, and said something that I had never expected from a professor in a computer science department:” You should consider taking a Shakespeare literature class.” I’ve kept this guideline in heart since that day. William Shakespeare has been regarded as the greatest writer in the English language. And what is common between literature writing and embedded coding? In the literature world, it is about not a word less, or not a word more to resonate with the audience. In the embedded system world, it is about not a byte more, or not a byte less to achieve the optimal usage of both memory and timing.
Any repeated function block in the code should be regulated as reusable functions, which is equivalent to the concept of APIs, user modules and components in the development software. Since PSoC devices comprise embedded microprocessors (M8C, 8051 and ARM Cortex M3) along with a programmable digital and analog arrays, we need tools (PSoC Designer and PSoC Creator) that can combine hardware blocks, or components, with software APIs to simplify and optimize the development.
I went back and re-wrote my program that day after the review, and achieved another level of understanding Shakespeare’s literature, as an engineer.