r/adventofcode • • Sep 22 '21

Other why does waiting time increase every time i enter the wrong answer ?

every time that happens i just swapped some variables or something that i can fix within 2 seconds but then i have to wait even more time than before...

why is this a good design choice ?

0 Upvotes

19 comments sorted by

6

u/sim642 Sep 22 '21

If you've submitted enough times already for the wait time to become long enough, then clearly it wasn't a 2 second fix...

2

u/dlsspy Sep 22 '21

I've got the right answer, but wrong clipboard before. Heh

-2

u/[deleted] Sep 22 '21

mr.conan what you said doesn't make any sense.

if i finally fixed all the problems in my code but made a simple mistake and submitted the wrong answer how is that not a 2 second fix ?

3

u/sim642 Sep 22 '21

You should (automatically) test your solution on all the given examples and them pass before submitting anything. 90% of the time that's also enough to pass the actual input and get it right on the first submit. No waiting time at all!

99

u/thomastc Sep 22 '21

It prevents brute force guessing.

6

u/Wolf_4501 Sep 22 '21

it should be, so none brute forcing it in millions times per second lol

2

u/Forbizzle Sep 22 '21

I think there were issues with bots brute forcing in the first year.

1

u/Wolf_4501 Dec 04 '21

ye AoC 2021 puts 1 minute

52

u/CKoenig Sep 22 '21

why this is a good idea was already answered

I hope you don't mind me giving you some advice though:

Use the provided examples to test your code/changes first - you'll have no wait time with this.

Usually the examples provide enough help to indicate misconceptions/errors in your code - I can remember only a few times where the examples passed but my solution was wrong

42

u/[deleted] Sep 22 '21

This, never submit an answer without testing your code works for the examples!

Better yet, use (one of) your languages testing setups of choice and automate those tests. It's a great chance to learn about testing or try out test driven development.

16

u/1544756405 Sep 22 '21

This, never submit an answer without testing your code works for the examples!

Submitting an answer without testing is one of the most exciting things you can do! It feels so dirty!

15

u/askalski Sep 22 '21

Exactly! That's how I ship all my code to production.

The thing is, I used to be able to deploy all my changes right away. But after just a couple critical bugs that took down the site (repeatedly), the operations team started getting in the way with their "processes" and now I have to wait days, sometimes weeks to deploy. It's maddening!

8

u/Markavian Sep 22 '21

Never submit an answer without testing

And waste precious seconds to get in the top 100?! Madness!

I mash that answer button at least three times before begrudgingly debugging my code against the samples.

4

u/CKoenig Sep 22 '21

I don't think you can get any highscores or points by now ...

-2

u/Markavian Sep 22 '21

But they said "never" which means all times of year. If you're practicing for December, it's useful to know what the constraints are. I got called out for caution using "autosubmit" libraries in my template project - yes it sounds things up - but it can damage the servers for everyone else. /offtopic

Obviously I see nothing wrong with caution in submitting answers outside of the December / <24 hours window of opportunity.

3

u/CKoenig Sep 22 '21

I don't want to argue here but I think if you are good enough to get into the score (I'm surely not) then you can probably guess that you don't have to read the story or look at the examples etc.

If you know that you'll not make it into the leaderboards (which is true for virtually everyone I guess) then I think it's a good idea to take your time and understand the problem before you start ... it's more or less like work just with more interesting problems ;)

1

u/Markavian Sep 22 '21

Learning to scan read the story and pick out the underlying comp science problem is a skill, and then selecting and implementing / combining the right algo ... it's all part of the game. All advice is given in context, we wouldn't have a wonderful archive of problems to solve without the competition and discovery phase on the day of release - that's part of what makes AoC so amazing to me.

-1

u/[deleted] Sep 22 '21

Pahaha! SHIP IT!!!