5 ms·
>> ...but why would I write anything like that (or even imagine it) Because in the example explaining the steps, it shows you that? I.e., 'The measurements in
by lostcolony 5y ago
>> ...but why would I write anything like that (or even imagine it)
Because in the example explaining the steps, it shows you that? I.e., 'The measurements in the first window are marked A (199, 200, 208); their sum is 199 + 200 + 208 = 607. The second window is marked B (200, 208, 210); its sum is 618'; even how the text is aligned on the page, the 200 and 208 are almost directly above/below each other.
Sure, yes, if your goal is just to solve it as quickly as possible for the internet points, by all means do the naive thing. But if you already "had to take a step back and notice a few things to come down to such (a) concise solution", it seems like maybe solving it as quickly as possible wasn't your goal.
- seba_dos1 5y agoSolving it quickly is the goal before sending a solution, since that's the only thing that officially counts in AoC. After doing that, I could take a step back, think about it and make it concise as a self-imposed challenge - which of course also involved not counting the sums.
- lostcolony 5y agoKinda presumptuous to call it "the goal", given the reason this submission even happened came from someone for whom it -wasn't- the goal. Not to mention the fact submissions don't close after the leaderboard fills. "Officially counts" - sure, in the sense of being officially counted. Not in the sense of even what Eric recognizes as the reasons for Advent of Code existing (as there are a number of reasons why people might use it in the About section).
- seba_dos1 5y agoOf course you're right that not everyone cares about speed, but... why are you even saying this? This subthread started with an explicit "When you try to write this kind of thing quickly", and even the article itself asks "How can I come up with solutions to puzzles more quickly?", and yet you got here to argue that speed doesn't matter. For the purpose of this discussion "the goal" is clearly defined, but I'm afraid you missed it.
- lostcolony 5y ago>> For the purpose of this discussion "the goal" is clearly defined, but I'm afraid you missed it. Like how you apparently missed the other two bullets the article listed? Fair that your original comment was about speed, but, you're also dismissing the discussion after that (i.e., you had to notice various nuances to the problem that slowed you down, and that this optimization was something directly noticeable just in the example given in the problem discussion), as well as the comment (i.e., mine) that started this thread, that was about the quality of code being pulled from Github and informing Copilot, and NOT about the speed of coming up with a solution on your own under time pressure, which is unaffected in this instance when using Copilot. In short, you're saying "It's about speed; everything else doesn't matter", and I'm saying "It neither was about speed in my original post, nor is that the only possible goal". You're insisting the place you moved the goalposts is the only place they've ever existed.
- seba_dos1 5y ago> you had to notice various nuances to the problem that slowed you down How can I ignore my own argument in this discussion that proves my point? :D > In short, you're saying "It's about speed; everything else doesn't matter" Of course not, I'm saying "various people have various goals, and noticing that you can simplify sliding windows doesn't matter when you're after speed and naively calling `sum` is faster to type".