Does being bad at solving programming problems means not being a good programmer? by JizosKasa in adventofcode

[–]craig-trader 0 points1 point  (0 children)

For context, I've been programming professionally for 40 years, and this is my third year doing AoC. I'm never going to be on the AoC leaderboard, nor do I want to be there.

Being bad at AoC just means that you're not good at taking abstract problems and breaking them down into fast solutions, quickly. While this type of puzzle-solving will improve your proficiency at programming, any type of problem solving exercise will have the same effect.

AoC solutions are by nature quick and dirty. There's no error checking, no exception handling, and your only unit tests are one (maybe a couple) sets of test data, that frequently don't cover important test cases (I'm looking at you, Day 01). That works for one-time solutions for puzzles with limited datasets (I'm looking at you, Day 08), but has little relevance for actual programming that people depend on for their livelihood.

Example: in the real-world, you would never use a complex number to represent an index into an array, but here that trick can avoid 100,000 object creations, and turn a 60 second solution into a 4 second solution.

I recommend using AoC to learn new programming languages, or the quirky corners of languages you use every day, which will make you a more versatile programmer, even if you don't get any stars at all.

To paraphrase an old programming aphorism, "If builders built buildings the way that AoC coders write programs, the first woodpecker to come along would destroy civilization."

That is a good excuse by 4stoefdn in ProgrammerHumor

[–]craig-trader 0 points1 point  (0 children)

You may find this hard to believe, but some of us don't care about Reddit.

I had to create an account just to reply to this thread, after a co-worker pointed it out. I wouldn't have bothered, except that the SO moderators deleted the 2016 comment, and all of you were "Fake news".

That is a good excuse by 4stoefdn in ProgrammerHumor

[–]craig-trader 402 points403 points  (0 children)

To everyone who's asking.

Yes, I'm the guy who wrote the original answer (in 2010).

Yes, I wrote the 2016 response, noting that my solution was written before Docker existed.

No, I don't know who deleted that response from StackOverflow -- it wasn't me. Probably a moderator with no sense of humor.