JavaRush /Java Blog /Random EN /Validator, understand and forgive

Validator, understand and forgive

Published in the Random EN group
Even after completing the jr course, I still sometimes come here to the help section to suggest something and help. Almost always the question begins with the phrase “I did everything correctly, but the validator won’t let me in” or something similar. It was these headlines that made me write here. From now on, I propose to accept it as truth - the validator is always right. Sometimes bugs pop up, but each time there are fewer and fewer of them. Therefore, if you receive a refusal from a validator, I suggest you assume that you made a mistake somewhere. And now, in order not to bang your head against the wall, you need to start mastering testing. There are several articles on this topic ( JUnit part I JUnit part II ). Moreover, it is not “convenient cases” that need to be tested. For example, let's take the task task1916 . Very often, after writing a solution, people check on ideal options. The ideal option passes, which means you can submit the task. And then the refusal arrives. So what needs to be done? That's right, write another test example. And then another and another until the validator passes testing. For example, how would the code respond to an empty second file? What about the empty first one? Here are the latest examples https://javarush.com/help/15861 Now it is important for you to understand that the developer not only writes the code, he must test it himself, and not rely on a tester. To be honest, I'm still a little scared when development moves into the testing phase. I believe that my code should work fine and there should be no errors. I always feel bad if I give away code that doesn't work. It turns out that I wrote something and didn’t check it, i.e. wasted someone's time. Of course, later at work you will have a list of requirements and from the tester you will be able to get a set of test cases for your software and adapt to it and it will be easier, but I wouldn’t count on it. Your code is your responsibility, and tests help ensure that everything works as it should. Now you have a great opportunity to improve your tester skills. When entering the help section, do not write an answer to the author in the form of code. Come up with a test example that won't work for him. This way you will improve yourself and help the author without solving the problem for him.
Validator, understand and forgive - 1
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION