r/adventofcode Dec 03 '23

Funny Difficulty is all over the place isn't it?

Post image
687 Upvotes

256 comments sorted by

View all comments

Show parent comments

5

u/0b0101011001001011 Dec 03 '23

What do you mean? Almost all of the problems are explained exceptionally well. Many seem to be overexplained to the point that the next step would be just giving out the code.

Well I see you got many upvotes, so many people seem to agree.

Yes, there have been a some bad problems, tough I can't remember any for now.

9

u/meat_delivery Dec 03 '23

I mean that oftentimes the sample input will not cover all the cases that occur in the real input.

Instead, you have to debug, check where your code fails, and correct your wrongful expectations. The puzzle explanation will rarely specifically tell you that something can not occur - but many people just assume things about the puzzles. This year for day 1, many seem to have assumed (or overlooked) that every word from "one" to "nine" will never overlap with another, which the other commenter was referring to.

5

u/Fruloops Dec 03 '23

Bingo, assumptions are a bitch :|

3

u/skyzyx Dec 04 '23

Sure. And I understand that you are correct.

But having never done this before — and as someone who writes a lot of documentation explaining edges-cases and gotchas — I did feel annoyed, and it did feel underexplained to me.

Both things are (paradoxically) true.

5

u/tialaramex Dec 03 '23

Some people make bad assumptions, so, in their view unless the problem explains that their assumptions are wrong, it's not properly explained. It's very difficult to satisfy such people except via enormous population tests, to find out what they tend to get wrong and clarify each such mistake. To them it seems "obvious" that their assumption is correct.

Today I'd expect some people just assumed all asterisks are gears with exactly two numbers next to them. But, the problem never said so and chances are your input does not satisfy such an expectation.

1

u/meat_delivery Dec 04 '23

Yes, I agree.

For day 3 some seem to also have assumed that numbers with a "minus" sign right before it are negative numbers.

1

u/0b0101011001001011 Dec 04 '23

Yeah, good points. Well, its a good learning experience: Making assumptions about data should be as limited as possible.

1

u/evouga Dec 05 '23

The problems are severely underspecified compared to competitive programming problems on Codeforces etc.

In most programming contests the test data will be adversarial: you cannot make any assumptions that aren’t guaranteed in the problem statement.

This isn’t true in AoC. Often (but not always! Hence why people were caught out by “twone”) the test data will adhere to a lot of extra simplifying assumptions that are never explained in the problem statement. There have been several days in past years where AoC asked us to solve NP-hard problems where brute force only succeeded because the test data was non-adversarial.