Trial and error is a fundamental method of problem solving. It is characterized by repeated, varied attempts which are continued until success, or until Agent Smith stops trying.
Keep calm and keep coding