Follow the below stated 10 steps to be perfect in coding:
Step 1: Understand that there are no substitutes or shortcuts to learn programming codes.
Step 2: Find a trust-able site on the internet where you can learn programming online with the execution
Step 3: Start with the basic fundamental programming
Step 4: Try writing code on your logics
Step 5: Read the sample code (syntax) and try implementing those based on the logic provided
Step 6: Keep practicing daily - Dedicate a specific time for practicing daily
Step 7: Try writing code for others
Step 8: Start with small projects
Step 9: Write a program at least two or three times
Step 10: Breakdown your program; try permutation and combination to avoid errors.