3 ms·
My theory: (Competitive) programming speed is largely a function of how intimately you know your chosen set of tools and standard libraries. Time spent reading
by Retr0id 4y ago
My theory: (Competitive) programming speed is largely a function of how intimately you know your chosen set of tools and standard libraries. Time spent reading docs is "wasted" time.
If you've written your own language, assuming it's a decent one, then:
a) It has all the tools you need to be productive.
b) You know exactly how it works and what the APIs are (assuming the implementation details are still fresh in your memory).
c) The features are tailored to exactly how you like to use them, personally.
- saagarjha 4y agoI use a custom Python preprocessor for Advent of Code (n.b. I don't come very close to winning). It definitely beats writing pure Python for me but given that I only use it once a year it's hard to keep all of it in my head. So YMMV, I guess. IMO, high-speed competitive programming is part knowing your tools well, but also a lot about coming up with abstractions on the fly very quickly. If you watch the top Advent of Code solvers they'll carve up the problem in seconds, and they're really good at picking just the right amount of complexity for the problem at hand and not investing any more than that. Coupling that with a touch of cleverness ("let's eval the input", "who needs a tree when I can shove everything into a dictionary") and a very low error rate (I would hit the leaderboard but almost always lose a significant time to debugging…) and they come out on top.
- modernerd 4y ago> If you watch the top Advent of Code solvers they'll carve up the problem in seconds, and they're really good at picking just the right amount of complexity for the problem at hand… Any recommendations of who/where to watch? I’d love to see what their process looks like.
- mattgruskin 4y agohttps://youtube.com/@jonathanpaulson5053 https://youtube.com/@jonathanpaulson5053 is usually near the top of the leaderboard and takes time to explain his approach after each solve
- saagarjha 4y agoSure, here's an example of a speedrun (done after the fact): https://www.twitch.tv/videos/854280596 https://www.twitch.tv/videos/854280596
- pedrosorio 4y ago> My theory: (Competitive) programming speed is largely a function of how intimately you know your chosen set of tools and standard libraries. Python is a very popular language to use in AoC. My theory: If Guido van Rossum were competing, he would not be on the leaderboard at this point.
- Retr0id 4y agoGuido van Rossum did not build python with speed-programming competitions in mind.
- pedrosorio 4y agoI quoted the relevant portion of your comment. Guido knows his chosen set of tools and standard libraries like very few. He certainly knows Python much better than everyone using Python who is currently on the leaderboard. He wouldn't be on the leaderboard because "knowing your tools and standard libraries" is only a small component of what makes you good at competitive programming.
- Retr0id 4y agoI don't think anyone in this thread was implying that language devs are usually good speed-programmers, the relationship was in the other direction.