Giter Site home page Giter Site logo

Comments (12)

PurityControl avatar PurityControl commented on July 28, 2024

Going one stage further back than reset-name, as I read it, build-robot should return a robot without a name. The name should only be generated once the robot is initially booted up.

from common-lisp.

kytrinyx avatar kytrinyx commented on July 28, 2024

I would also be happy to make the README more ambiguous to allow for more leeway in the solutions.

from common-lisp.

verdammelt avatar verdammelt commented on July 28, 2024

but reset-name should at least provide the robot with a new name
@wobh

My reading of the README says that reset-name should not give the robot a name, but the robot will get a new name "when asked". So it looks like my implementation (in the example file) is wrong according to the README since it assigns a name to the robot when the robot is created and when the robot is reset.

The API defined/implied by the README & tests does not provide a way to find out if a robot does not have a name. If you ask a robot their name that boots the robot up and a name is assigned.

The tests do not currently force the implementor to the specification defined in the README re: the name.

Perhaps if we separate 'booting' the robot from 'asking its name' so that we can ask the name and check that is not set until the robot is booted.

Or we leave it as is and pushing the implementor to the specification of the README is part of the nit-picking process?

In either case we should reimpliment the example to fit the README.

from common-lisp.

wobh avatar wobh commented on July 28, 2024

I could go along with that. I would want reset to set the robot to it's initial state (the single-state of these robots notwithstanding), where reset-name still seems like it should get the robot a new name.

Maybe this raises higher level questions about the pedagogical values intended for the exercise.

from common-lisp.

kytrinyx avatar kytrinyx commented on July 28, 2024

I would be happy to fix the README on this one. I originally made it after helping a student explore the idea of memoization in Ruby.

from common-lisp.

verdammelt avatar verdammelt commented on July 28, 2024

What changes do we want to make? If we make too many changes then that would affect other languages right?

Maybe we just want to change:

Every once in a while we need to reset a robot to its factory settings,
which means that their name gets wiped. The next time you ask, it gets a
new name.

to something like:

Every once in a while we need to reset a robot to its factory settings,
which means that they will have a different name when they are next asked for their name.

from common-lisp.

wobh avatar wobh commented on July 28, 2024

On the one hand:

https://github.com/exercism/xruby/blob/master/robot-name/robot_name_test.rb#L34
https://github.com/exercism/xhaskell/blob/master/robot-name/robot-name_test.hs#L45
https://github.com/exercism/xclojure/blob/master/robot-name/robot_name_test.clj#L22
https://github.com/exercism/xscala/blob/master/robot-name/src/test/scala/robot_name_test.scala#L29
https://github.com/exercism/xpython/blob/master/robot-name/robot_name_test.py#L42

On the other hand:

https://github.com/exercism/xscheme/blob/master/robot-name/robot-name-test.scm#L32
https://github.com/exercism/xgo/blob/master/robot-name/robot_name_test.go#L40

Neither an exhaustive nor significant sampling, but so far it seems like more languages are testing that the robot has a valid name after reset.

from common-lisp.

kytrinyx avatar kytrinyx commented on July 28, 2024

I like the ambiguity of your second suggestion, @verdammelt:

Every once in a while we need to reset a robot to its factory settings,
which means that they will have a different name when they are next asked for their name.

from common-lisp.

verdammelt avatar verdammelt commented on July 28, 2024

@kytrinyx

It does leave the implementation open. If we wanted to go the other way (stricter reading of robot not having a name after reset until asked) then we'd need to add a new function to the interface such as has-name?, but doesn't seem like it would be useful except for tests.

@wobh

So all those examples test that the name is not the same before and after reset. Some also check that the new name doesn't break the contract of the name accessor function. My opinion is that checking that the name is in the right format isn't needed in this case because one has already checked that in another test.

from common-lisp.

verdammelt avatar verdammelt commented on July 28, 2024

@kytrinyx @wobh

So what is the next step here?

from common-lisp.

wobh avatar wobh commented on July 28, 2024

I'm just going to close this.

from common-lisp.

kytrinyx avatar kytrinyx commented on July 28, 2024

Good call :) thanks, @wobh

from common-lisp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.