Skip to content

Conversation

@jiegillet
Copy link
Contributor

@jiegillet jiegillet commented Jun 14, 2025

Closes #95
Sister PR here.

Another very simple rule, especially since it's the same as list-ops.
This time, Cursor wrote the whole thing, I told it was the same as list-ops and gave it the example solutions that use List, and boom, I didn't have anything to add. Bluffing.

@jiegillet jiegillet requested a review from a team as a code owner June 14, 2025 02:50
@SleeplessByte SleeplessByte added x:action/create Work on something from scratch x:module/analyzer Work on Analyzers x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises) labels Jun 16, 2025
comment =
Comment "elm.bird-count.do_not_use_list" Essential Dict.empty
in
describe "solutions that use the List function" <|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I would test all the different uses of List, being as the rule disallows the module completely, and AnyFromExternalModule and similar are already tested, but its not a hill I am going to die on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of these tests is not to check that the rule works properly, like you said this has been tested a lot by now, the point is to show examples of "wrong" solutions that justify why we have those rules in place.

With these code examples, you can conclude "right, if someone writes a solution like that, they won't learn anything about recursion." Conversely, if you are not able to come up with an reasonable example of a solution breaking a rule, then maybe the rule isn't meaningful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can agree to differ on this, but I do take your point.

@jiegillet jiegillet merged commit be38cf1 into main Jun 16, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

x:action/create Work on something from scratch x:module/analyzer Work on Analyzers x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write analysis for concept exercise bird-count

5 participants