This may sound counter productive, but encountering errors when learning a language is a good thing. It helps you to understand how the language works and how to debug the code. All code has errors, whether it is syntax or logical. Logical errors are usually the hardest to find because the program is still working, it’s just not doing what it should be doing. It could be as simple as something like setting a database column to Tiny Int, but then trying to store a Integer size value in there. It will store the value, it just won’t be the value you started out with. You may not even know something is wrong until you go to view the value and you notice that it is obviously incorrect.
Syntax errors however are generally mistypes. An upper case letter in a class name, versus a lower case letter, missing semi-colon, undeclared class, etc. All of a sudden the system is complaining that it can’t find a class and you have to figure out why. Even though in general syntax errors should be easier to find, especially if you develop in a module format, constantly testing the modules as you go along, it can be very difficult when just learning.Continue reading