I’ve never used Exercism before the AI hype. I’m noticing lots and lots of (Python) solutions are very similar, and sometimes they repeat odd quirks like a very specific variable name.
Or in other cases, like the House exercise, they overwhelmingly use a dumb and primitive method which relies on lots of copy&paste (copy and paste whole “paragraphs” rather than assembling a verse). “House” is an exercise where a precise solution with minimal repetition and lots of string interpolation produces an arguably overcomplicated logic, where a nice middle ground exists in my opinion: a phrase for each object, This is at the start and the house that Jack built. at the end. Maybe people complete this exercise while they’re at a low skill level, or maybe there’s some other explanation.
So before the AI hype, was there so much repetition in community solutions?
I’m aware that you can trivially cheat at Exercism if your goal is to make an account with lots of “solved” exercises, because after uploading your first iteration you get complete access to all community solutions and then can just copy what you think is the best…
It’s hard to say. If people want a profile with all the solutions, good on them. The purpose of Exercism is to practice and get good at coding. If it brings people joy to have a “full profile” and not practice coding, that’s file. It’s not what Exercism is built for, but that’s fine.
It’s really hard to know how someone came up with code. Maybe a lot of people think similarly and ended up with similar solutions. Maybe they came up with something different and a mentor guided them to a common approach. Maybe they solved it themself one way, looked at the community solutions and decided they liked what they saw and wanted to replicate it.
At the end of the day, it doesn’t particularly matter.
Many exercise on the Python track have tens of thousands of solutions. There are only so many ways you can solve House, so yeah, there are going to be lots of duplicates, even for people who are sincerely solving it on their own.
If I’m looking at the community solutions, I’ll typically first sort by reputation to see how the experts do it.
You can look at the community solutions even before you submit an iteration, if you know the URL.
There are people like me who store their exercism workspace in a public github repo. I imagine there are people who copy and paste my solutions. As Isaac says, if that’s what someone wants to do for their own reasons, it’s no harm to me.
I thought a bit about it, and the default sorting method for community solutions is “Most submitted”. This doesn’t directly answer my question, but explains why I see so much repetition in community solutions.
Side note, the search box for community solutions is very limited, to the point where it’s sometimes hard to check if this kind of solution has been submitted, or not. In my case - I made a Python solution to “secret handshake” that uses enum.Flag. It turns out that there’s no solution exactly like that. But the best I can do with this search box is entering one word (like enum) and then doing lots of browsing and reading. I tried enum +Flag, tried "from enum import" (the phrase in quotes was certain to occur) but got 0 results. I think the search box can only find things literally and does basic “OR” for words separated by space. And it’s not case sensitive, so flag or Flag is the same. The most clever I was, was searching for Flag) because that’s how defining a new version of that class will look like (either class <something>(enum.Flag) or class <something>(Flag) depending on import). Hmm, I just had a good idea, it’s the rubber duck effect! Search for flag): (with added colon). 0 results. So this confirms I came up with a genuine new solution. I just found it strips parentheses, so flag( is the same as flag.
Exercism groups similar solutions, but it’s done fairly naively.
When sorting by most submitted, the top five solutions for https://exercism.org/tracks/vbnet/exercises/reverse-string/solutions all revolve around the built-in StrReverse() with minor inconsequential diffferences.
A while back, there was some discussion about creating a set of tags for different approaches in community solutions, but I don’t recall what happened to that project after the initial training data was created. That sounds like something you might find useful since you could look for the enum tag if one existed.
I understand why it’s no longer possible to sort community solutions by “most upvoted” - it had a tendency for the older solutions to snowball, and others were frequently neglected. But pressing the “Favorite” button doesn’t even provide any utility to me. I mean that I can’t find community solutions I personally upvoted. Maybe the “Community Solutions” (for a specific exercise) is not the right place to put it, but it would be useful to bring up a list of solutions (for all exercises, even across all programming languages) that I personally upvoted.