exercism / exercism/problem-specifications

About Robot name

Offen
#1,673 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Ruby
Sterne
358
Forks
563
Ø Merge
18 Std. 41 Min.
Gemergte PRs (30 T.)
2

Beschreibung

Instructions for the "Robot name" problem ask for two independant things:
- at any time, each robot name has to be unique;
- when reset, a robot gets a new random name.

From that, what I understand is that:
- when creating a robot, we have to check for *current* names of robots *currently* up;
- when reseting a robot, we do the same, given that obviously this one is currently up and has a current name.

Most solutions I saw are checking against all already given names: they not only ensure that names are unique in "space", but also in "time".
We may think that's not a big deal, but something else makes this kind of solution unsatisfying. From instruction, we may deduce there are 676000 possibles names:
- so a right implementation should handle the case were there is no more name to give, to avoid bad things;
- in a strict interpretation, that means 676000 possible different robots, while in the mainstream one it's about 676000 names attribution, which makes a big difference.

To me, the strict interpretation is more interesting. Anyway, instructions should be refined to help people to get it, or they should be reformulated to reflect how most people currently understand them (still an interesting problem).

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.