question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Grade-school: Structure very unclear

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
jtiggercommented, Jan 19, 2017

@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 for grade() — this would differentiate its output from that of allStudentsInAllGradesSorted()?

Other name options for allStudentsInAllGradesSorted():

  • grades() (Rust track did that)
  • studentsByGradeAlphabetical()
  • allStudentsByGrade()
  • roster()
1reaction
matthewmorgancommented, Jan 20, 2017

@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. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found