First things first: Design before you code
Why design first? why not just jump into code and start writing it? I remember one of those old good days when I was learning to code a 8051 microcontroller in assembly language, I attended a lab session where there was a task to write a clock program....