Exercise Idea: Bob and Friends

オープン
#1,585 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
haskell, rust
領域
content

調査の方向性

まず、既存の bob exercise とリンクされた Haskell solution を確認し、メッセージの分類と返信を分離するという提案を理解してください。完了とするには、コミュニティが exercise のコンセプトに合意した後、新しい exercise を定義する具体的な pull request を作成する必要があります。

索引モデルが issue の本文から書いたものです。

説明

new exercise idea

Hey, so I am thinking of a new exercise. It is inspired by bob, but it might be better if it is just called reply.

Basically, I am a big proponent of decoupling the logic for classifying messages to Bob from the reply logic. Typically this results in using some sort of Algebraic Data Type or enum variants.

An example of my over-engineered solution in Haskell can be found here.

The benefit, as I see it, is that there is clear separation of logic and responsibilities. A wonderful side effect of that is how easy it becomes to implement reply functions for people other than Bob.

Across paradigms there are many ways that this can be handled. In rust for instance one could use a Reply trait that takes a &str and returns a &str, but it can use an enum named Locution or MsgClass to do the work that isn't related to the struct Bob or Carol or John.

In OOP languages people could use class composition or use interfaces.

Anyway, I made this issue, so I could guage community enthusiasm for this exercise idea.
I think it is still worth it to have the bob exercise (sort of like how the resistor-color exercises keep uping their game at each step).

It seems to me like most students experience bob as an annoying burden. I didn't realize how much I liked the exercise, until I realized there was a massive opportunity to decouple that logic of message classification from response generation thereby making well-compartmentalized code that was general enough to make new responders trivial to write.

Okay, I am always too verbose :/ Please let me know your thoughts about this. If there seems to be some excitement for this proposal, then I will make a PR for this new exercise ;)

主要言語
Ruby
スター
362
フォーク
566
平均マージ
15時間 13分
マージ済み PR(30日)
8

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

exercism/problem-specifications のほかの issue

exercism/problem-specifications の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。