8 ms·
Ah here it is again, 25 days of writing increasingly complex input parsers.
by bargainbin 2y ago
Ah here it is again, 25 days of writing increasingly complex input parsers.
- Jcampuzano2 2y agoThose are the problems I loathe the most, where the real problem is figuring out how to parse the input into something more workable. Once its parsed its ezpz.
- zelphirkalt 2y agoAre you solving all puzzles? I find usually that the parsing isn't my problem, but some of the puzzles puzzle me (ha, couldn't resist), because they expect some kind of graph knowledge or some mathematical trick or so. Last year got stuck at day 17 for example. Usually some learning in it then, but parsing, while possibly annoying day after day, wasn't usually what stopped me from completing puzzles.
- underdeserver 2y agoClaude will do it for you.
- timeon 2y agoWhy bother.
- reocha 2y agoWhat is the point in doing a programming challenge if you aren't learning anything
- ghjfrdghibt 2y agoDepends if you're really stuck on a problem. I'd rather learn by getting a look at how it's done, even if the code is incorrect, than be completely suck with no idea why or what to do.
- rnewme 2y agoBeing stuck with no idea why or what to do is what gets you exploring and figuring things out. That's the whole point...
- ghjfrdghibt 2y agoThat all well and good until you hit a brick wall you cannot pass. At this point a helping hand and/or the answer is the only way forward or to learn.
- miningape 2y ago> you cannot pass This is his entire point: getting to this brick wall is _where_ the real learning happens. When you start scrambling, reading old stackoverflow posts, and breaking out the calculus text book you're pushing the boundaries of what is possible for you. Body builders don't grow by watching other people lift weights.
- ghjfrdghibt 2y agoAgree to disagree. Don't see any difference with finding the answers on SO, or in textbooks, and having an AI provide the same. And at the start, novice body builders will of course watch other body builders to learn how it's done. Unless you're exceptional you're not teaching yourself anything unless it's by learning from others. Few are the pioneers in any field.
- rnewme 2y agoHow do they become pioneers? By digging into the body of knowledge. They know what books and authors are good, what blogs to read, they posted questions on SO. They don't search for direct answers, but instead they search for the knowledge that allowed the person who made the question to make the question, and person who found solutions to find the solution. Looking how it's done doesn't equal you doing it. It's apples to oranges. OP was referring to needing to do work in the gym to get results. You didn't get results if you looked at others and did the same in the advent of code etc. You are merely entertaining yourself, but you are not competitive participant. With that approach you'll never be on top. There are people who use frameworks and people who write frameworks. The first group struggles when there is no official documentation or tutorial on a topic they need. The second group when faced with the same goes through the source code and gets the answers. Bottom line is the question of what you want to achieve - just go through the problems and be done with them, or deep dive into new topics ans material, to widen your knowledge?
- underdeserver 2y agoMaybe I'm interested in solving the algorithmic problem and less interested in writing input parsers...
- 98codes 2y agoFor me, it's my ability to give feedback directly to a dev team building out an imperative language for use in our products: what was easy, what's a PITA, what are big, glaring gaps making things impossible, etc.
- mbrameld 2y agoHere's your opportunity to learn something: Different people can get enjoyment from the same thing in different ways, and you can learn things about data structures and algorithms without learning the syntax of a particular language to implement them.
- talldayo 2y agoSo will Fiverr. Who cares?
- tirpen 2y ago"Running a marathon is hard work, but a car will do it for you." Sure, but then what's the point?
- reocha 2y agoIt's input parsing with a fun story
- cactusfrog 2y agoWhy isn’t the input a csv?
- Jtsummers 2y agoSometimes it is, or very nearly is.
- 63 2y agoAfter a few days I cave and just use regex, which I of course forget every year and need to relearn.
- coolThingsFirst 2y agoHahahaha, this is so true. Regex is so easy to forget.
- tonymet 2y agoi find ScanF and state machines are a lot more effective than split / explode style parsers.
- deleted 2y ago[deleted]
- xdavidliu 2y agothe input parsers don't get increasingly complex over the days. The problems themselves do. Even on the most difficult days around 22 or 23, the inputs are all just lines of space separate ints or some grid of points or something, just like the trivial problems on days 1-3
- ricardobeat 2y agoFrom last year: hot springs, the pipes problem, gears, pulses, range math.. half the problem is turning the text input into the correct data structures to solve it.
- williamdclt 2y agoyes, that kinda is what the reality of programming is. Correctly representing the problem so that the solution easily follows. Various famous people have various quotes about this, for example Rob Pike: "if you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident".
- ricardobeat 2y agoAoC used to be more fun than that. I already have enough reality at my day job :)
- akx 2y ago... and inevitably, a virtual machine
- fdrs 2y agoRust + nom makes it easier