exercism / exercism/elixir

log-parser improvements

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

Mô tả

There are some improvements to this exercise proposed in the initial PR that got postponed so we can see how the exercise is doing first and maybe collect more improvement ideas first.

## Exercise doesn't teach that different delimiters can be used for regular expressions

Maybe add a step that involves parsing several `/` and ask them to use another delimiter for readability. Can be checked via the analyzer because the delimiter is kept in the AST.

## Exercise doesn't teach about compiling regex with variable content

I wanted to add some step that would require an interpolated regex with escaping a variable, but I couldn't come up with anything thematic that wouldn't be better done with `String.starts_with?`.

How about adding a step to `tag_with_user_name/1?`
Maybe something like bolding the user names whenever they are mentioned without "User"?

```elixir
LogParser.tag_with_user_name("[INFO] User Alice created a new project.")
# => "[USER] Alice [INFO] User Alice created a new project"
LogParser.tag_with_user_name("[INFO] User Alice created a new project. Alice has a reputation of 643.")
# => "[USER] Alice [INFO] User Alice created a new project. **Alice** has a reputation of 643."
```

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

Mở hướng dẫn đóng góp

Đá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.