Answering language agnostically, the majority of a program is typically error handling. Yoda notation is typically a best practice. The reason for it is to avoid syntax errors in languages that use == as the equals operator. Yoda notation will throw an error if I do 'success' = variable vs variable = 'success' which will cause an assignment to occur and unexpected code execution