Grade-school: Structure very unclear
See original GitHub issueThe intended structure of the School class is very hard to pin down. All of the add() calls are done directly on the School, but then for the first few tests, things (size, added students) are accessed through an arbitrary middle layer, db()
. After the first few tests, suddenly the calls change from school.db().get({grade number})
to school.grade({grade number})
.
Examples:
school.add("Chelsea", 3);
assertThat(school.db().get(3).size(), is(1));
assertThat(school.grade(5).size(), is(2));
If the point of the exercise is to force adherence to an arbitrary (and frankly ridiculous) structure, then I would consider it a great success.
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (18 by maintainers)
Top Results From Across the Web
Are Letter Grades Failing Our Students? | NEA
In traditional grading, letter grades report the number of points earned in a subject but not very much about what the student has...
Read more >Many elementary schools abandon letter grades
But the new system can be very confusing.” Letter grades remain the standard for middle and high schools nationwide, in part because of...
Read more >Teaching More by Grading Less (or Differently) - PMC - NCBI
Grades awarded can be inconsistent both for a single instructor and among different instructors for reasons that have little to do with a...
Read more >Parents push back against school report cards with no letter ...
A move by some Chicago-area school districts to eliminate letter grades and switch to standards-based report cards has irked some parents.
Read more >8 Classroom Management Mistakes Teachers Make at the ...
Ambiguous classroom policies early on can lead to aggravation for everyone ... Some teachers opt to create rules as a class so students...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@colin-mullikin: I’m pretty sure we could have done without that last sentence (in your initial comment). To suppose a nonsense basis for the work is disrespectful to the person who did it, even though they are not named outright. It absolutely fine to be critical, let’s just keep it respectful, please. Thank you!
@FridaTveit: I like where you’re going with this. I don’t worry too much about breaking existing solutions… the value of Exercism is really in the thinking/conversation around the solutions.
Yeah, death to
db()
! What do you think of the idea of asserting that insertion order is maintained forgrade()
— this would differentiate its output from that ofallStudentsInAllGradesSorted()
?Other name options for
allStudentsInAllGradesSorted()
:grades()
(Rust track did that)studentsByGradeAlphabetical()
allStudentsByGrade()
roster()
@FridaTveit @jtigger I’ve participated in some other discussions on and offline about this exercise, and there was agreement around the thought that one of the valuable points of this exercise actually lives in the “bonus” section of
README.md
– protecting the internal structure from mutation.The sorting issue is some tracks and solutions was solved by sorting on insert, FYI, rather than having a method to trigger sorting on the DB or specifically to return a sorted list. Just a thought there.
Maybe outside of the scope of your proposed changes, but it would be nice to see a test for protection against mutation of the list object…again, just a thought as long as you’re tinkering. 😃