exercism / exercism/clojure-representer

Normalize commutative operations

Đang mở
#40 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Clojure
Star
2
Fork
7
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

It never ceases to amaze me how many unique solution approaches there are even with all the normalizations we're doing. It's like ice cream flavors. 31 flavors sounds like a lot, but that can be achieved with like 5 or 6 basic flavors and their permutations.

After spending some time analyzing its results, the next "low-hanging fruit" seems to be:

Identifying which operations are commutative, and presenting them in some standard order.

At first glance it seems like we're scraping the bottom of the barrel, so to speak. But because of the way the possible permutations are composed, even the smallest thing can drastically reduce the number of unique representations, which practically translates to having fewer approaches to add feedback to to be displayed to the same number of students.

For example, a solution to the lasagna exercise might have: `(+ (num-layers 2) 5)`, and another might have `(+ 5 (num-layers 2))`. Having to repeat the same feedback on every combination becomes tedious.

## Commutative operations which can be normalized

- `=`
- `+`
- multi-arity function bodies
. . .

Again, these seem very minor, but the path to making the representer more effective lies in making these incremental improvements

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.