Mentioned elsewhere in the thread are really good ideas to internalize. HDL isn't programming. You aren't merely writing instructions for a state machine, you are describing the state machine. It is very important to learn how hardware constructs are described by HDL. The best practice is to design tbe hardware on paper and then describe that architecture in HDL.