- before write code map out you want to do like thses .md file next to each file
- do baby steps don't build all program ad test build each step test it then go for next step
- if you have list of options don't write just if first , second put valid items in array and write condition if is not inside invalid show error
changing the structure of the code without changin its functionality.
Breaking down a large program into samller resusable parts called modules or functions.
Don't Repeat Yourself for sitution that we have sencetive name and one typo mistake can lead to mistake store all of theme in one place to not repeat yourself and have one place to change in future
DOn't use global value as much as possible
each function you create is good to have only one and single responsiblity to do
more you use if statement the code is become much more harder the maintain and understand try to remove other cases as much as you can.
allways try to see all positible way that error might happend and be read for it by handling that error properly like check if user not upload file what happed what happend if that file empty what happend if format wrong , ...
as you go baby setp make sure to test each step before you go for the next one