Test cases of the problems

Why shouldn't Codechef provide test cases of the problems?

Sometimes it happens that we fail to find bug in our code and hence, we keep thinking about it even after the contest.

I think it would be really great if CodeChef will start providing the test files after the contest.

It will not be a tough task you just have to give a link to the input files after the contest, that’s it. Nothing to write new.

Here, I would also like to request to question setter that please do provide a link of input file?

Thanks, peace.

@includebits it is a really old discussion out here. Though I am also in favour that test case should be provided but you can find their point of view in other posts such as this. there also the most favoured answer was of @admin. And indeed their point of view is also quite valid.

1 Like

The question has been asked many times. I suggest you to search them and see codechef’s PoV, and then give your counter-arguments based on that. The discussion would be more fruitful then, dear. :slight_smile:

Expressing my views on it-

Whats the scenario?

Other sites like Hackerrank, Hackerearth etc. do provide test cases after the contest ends. And its does help many people debug their code. This time, the problem setter of ROBOTG was lenient enough to share the test case of the problem, and I am quite sure that this will help MANY people who are stuck on the problem to debug the code. Sharing test cases does help beginners figure out where there code is lacking, and is not necessarily bad.

What does Codechef have to say on this? Why does it stick to its stand?

Codechef has expressed its opinion that debugging your own code should be done using test cases formulated by you. The concept of “stress-debugging” (debugging using your own test cases) [pardon if I got the term wrong] is encouraged by the team.

Codechef has a point when it says that this encourages people to come up with their own test cases and hence sharpens their debugging skills. What happens when test cases are immediately furnished, is that people don’t even try to debug their code and simply see the test cases. This HAS a negative effect of performance as the same people develop the habit of “being spoonfed corner cases” and are unable to debug their code (or find corner cases) in duration of contest. Also, many people feel that not giving test cases is what that makes codechef ‘unique’ and out-of-the-box, when compared to similar websites.

(If you can give a counter-argument on basis of it, then you have more chances of getting codechef around your PoV.)

How successful is Codechef in this?

From my personal views, I will say quite successful. Yes, it did gave me SLEEPLESS DAYS, there had been times when I was AWAKE TILL 4 AM IN MORING, debugging my code to pass that final corner case, figuring out why my code fails on only 1 out of 25 cases, and what that case is.

Yes, I would have saved a LOT of time had the test cases been immediately given. But, after some time , and some practice on test case finding from other sites, I did develop the ability to find test cases where the code fails.

The Problem with this Approach

The problem is that this is not at all beginner-friendly. Beginners are already struggling pass the easy questions, they have little concept of corner cases and hence get frustrated and demotivated on seeing their code fail continuously on easy questions. Had the test cases been provided, they’d have had a much more enjoyable time coding.

(STRICTLY MY OWN POV.)

The Solution I Saw

What I saw was, that its better to come to codechef after having a little experience at sites like Hackerrank etc. I used to practice finding corner cases where my code failed on hackerrank, and in case I was unable to, when I utterly gave up, I would look at the test case and spot the error Then I would analyse a few things (why it didn’t occur, which part of code failed, how to identify &etc.)

This practice helped me develop enough test-case finding skills to debug my own code at codechef, and since then, my problems due to non-availability of test cases mitigated by a big deal.

What might convince codechef to give out test cases?

Something which wouldn’t deter their aims, and simultaneously satisfy our interests. If some feature/system/method can be suggested, such that people debug their code first and look at test cases ONLY when absolutely necessary, I think codechef would be more ready to give out test cases.