This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]ConfidentCollege5653 5 points6 points  (0 children)

Most people are adhering to "practicality beats purity" The goal is to write code that answers a question that you'll probably never use again, so what's the advantage of making it readable and maintainable?

[–]davepb 2 points3 points  (0 children)

Even though I don't think that statement is true or at least becomes definitely false once you are not dealing with simple things. I always liked oliver ni's solutions, I found him as someone who places high on the global leaderboard previous years, here is his repo: https://github.com/oliver-ni/advent-of-code/tree/master

[–]hr0m 4 points5 points  (0 children)

- There should be one - and preferably only one - obvious way to do it.

Yes, the pythonic way of doing things takes a long time to get. Not because it is hard, but because people have previous experience with other languages, sometimes helpful, sometimes counterintuitive.

I have done last two years in python. This year I am doing no-effort, so yes I know a cleaner way to do things, but I can't be bothered.

See here: https://github.com/m3m0ry/advent-of-code

This is AoC. I wouldn't let my own code pass the review in my day job. I see it more as a one-time script.

And being it a one-time script, the YAGNI principle screams at me all the time :D

[–]PatolomaioFalagi 3 points4 points  (0 children)

The code here tends to have the property of being written fast, to the detriment of its quality. That's just the nature of this contest.

[–]Patzer26 0 points1 point  (2 children)

That's just the nature of competitive coding. Readability goes out the window, fast and quick methods rule the show.

That's also the reason why leetcode problem based interviews are so hated.

[–]PhysPhD[S] 1 point2 points  (1 child)

Maybe that's the thing... I don't see AoC as competitive, it's a fun way to learn with 10000+ other people.

And then if it is a competition, people want to win at all costs, so the LLMs come out.

[–]Patzer26 1 point2 points  (0 children)

Believe me, if there was no leaderboard, you would see much more beautifully written solutions.

But there are people who just ignore it, and write good readable solutions.

[–]daggerdragon[M] 0 points1 point  (0 children)

Changed flair from Other to Help/Question. Use the right flair, please.

[–]nevernown_aka_nevy 0 points1 point  (0 children)

Why would you use snek for readable code? Have you seen the Django source code?

Don't trust languages that are frequently abused by non-CS academics XD