Windowing System: Improvement Ideas

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

@SleeplessByte がすでに取り組んでいます。

2022年2月7日 から。

評価

この issue はまだ評価されていません。

説明

discussion :speech_balloon:

After seeing a couple of solutions to "Windowing System" during mentoring, I think the exercise could need some changes to better achieve it's learning objectives.

  • For Position and Size, the constructor and the method have the same implementation. I saw a solution that used the method in the constructor which is not a very typical example.
  • There is no reason to use the methods to update values so students often just set the property values directly.
  • The calculation for the window resize and move is rather involved which does not add value for the actual learning objectives but it seems students spend quite some time finding creative solutions there, e.g.
    image

Some ideas how to improve the exercise:

  • Maybe we should expect some/all properties to be marked as private with the underscore to discourage the direct assignment. That might also make it easier to pick up unwanted code with the analyzer later. (Not sure how to best test in this case though. Either the test disrespects the underscore which is not a good example or the test needs to fall back on some user-implemented serialization function. But if that function is wrong all the tests will fail which is also annoying as everything else the user did could be correct.)
  • The methods on Position and Size could change the values by some amount instead of just setting a value. That would make them distinct from the constructor. (Probably only needed if we stick with "public properties".)
  • Simplify the window resize/move method e.g. by saying some lower bound is always respected
主要言語
JavaScript
スター
652
フォーク
658
平均マージ
13時間 46分
マージ済み PR(30日)
6

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

exercism/javascript のほかの issue

exercism/javascript の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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