4 ms·
I’m surprised Python is so high and ahead of everything else. The problems in AoC are quite easy, broadly speaking. So to me the appeal is to use a novel tools
by rich_sasha 5y ago
I’m surprised Python is so high and ahead of everything else.
The problems in AoC are quite easy, broadly speaking. So to me the appeal is to use a novel toolset. New language, new platform, etc. Someone on HN mentioned org-mode+CL.
Python is great, but not very novel. Are there that many people learning it on AoC? Or am I missing the point?
- iovrthoughtthis 5y agoi think for many, they are not easy
- jstx1 5y agoEvery AoC problem boils down to the task of "read and parse this text file, write a small script with an algorithm to compute something with the input (maybe doing this for time) and you aren't bound by the performance of your machine or your language". Python is one of the best languages for that task. If you had to do anything similar in the real world, you wouldn't I also don't think that the problems are that easy. With Python I can focus more on solving the problem instead of trying to fight a new language (or to force a language into a task for which it isn't all that great).
- sokoloff 5y agoI’m using AoC to learn Clojure this year. I found Day 14 part 2 to be performance-bound (the naive solution that worked fast for part 1 didn’t for part 2). I have to cycle back to it to use a smarter algorithm for part 2.
- jstx1 5y agoRight but you aren't performance bound by the language - rewriting the brute force for day 14 part 2 in C won't get you anywhere. I think that Eric tries to design the puzzles and the inputs in a way that - a well implemented smart solution runs in a reasonable time even in a slow language on a slow computer (this is what I meant by not being performance bound) - some of the exponential growth puzzles can't be realistically brute-forced even with a fast machine and a performant language (like the example you mentioned)
- sokoloff 5y agoAh. I get what you’re saying and agree strongly. I mis-read your intended (but clear enough) message the first time.
- keyle 5y agoLearning python might not be the primary reason. A lot of developers spend their life glueing frameworks and APIs together, so they do AOC for practicing/learning algorithms. Python3 allows you to be mostly reasoning about logic at a high level without worrying about much else than the algorithms.
- dogsandcats 5y agoHonestly, most of my junior-level coworkers would not even be able to do the first days without help. Those AOC tasks are training for skills most developers don't really need or train much (except maybe reading comprehension). Most code is quite boring, especially web dev stuff. Most of the interesting stuff is handled by external packages, you are just supposed to pipe it all together. It is still quite complicated work sometimes but in a very different way. It is only few developer that get to work on truly interesting stuff on their day job. So the great thing is that AOC has something for everyone. A junior can take his programming skills to the next level, flexing some muscle he doesn't otherwise get to use. Advanced people can use it to either get to know a new language or take on code golfing and learn to abuse their favorite language in a new way.
- globular-toast 5y ago> Honestly, most of my junior-level coworkers would not even be able to do the first days without help. Many of my senior level colleagues can't do them either. This says more about job title inflation than the difficulty of these puzzles, though. I did it in Python (well, most of it) because this isn't the stuff I usually do. I use Python for moving data around mainly, with maybe once per year I do something more exciting. So for me it's about exercising my favourite language in ways I wouldn't otherwise be doing. I did actually give up this year, though. When it came to the 3D coordinates puzzle I realised I would have to learn numpy and a bit of linear algebra and I just didn't have the time. Maybe I will pick up where I left off over the holiday period.
- weatherlight 5y agoI noticed this as well. A lot of my coworkers had given up by day 4 this year. I decided to go outside my comfort zone and do it in a language that I don't work in. (I work primarily in Ruby, did it this year in Elixir.) I had a blast honestly! I was a great way to learn a language and get some daily practice in.
- fulafel 5y agoThey're not that easy for a daily calendar, lots of experienced people have reported spending hours on many of the tasks.
- MattRix 5y agoYep, and it’s also worth noting that the tasks get harder over the month. If someone only looked at the first few days, that would seem easy. On the other hand, the past few days from day 19 onward have been quite tricky.
- rjh29 5y agoProblems beyond day 10 or so start to get more difficult and take 30-60 minutes to complete. Learning a new language on top of implementing the algorithm would make it take even longer. Not all of us have that much free time.