Giter Site home page Giter Site logo

ruby_drills's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ruby_drills's Issues

Are multiple alternate solutions acceptable?

@value = "bobcat"

Remove 'bob' from this string in order to return a much tamer version.

Use a non-destructive method to remove 'bob' from this string and return "cat":

>> @value.sub("bob", "")

Not yet...

I would expect any of these (and more) to work:

  • @value.sub("bob", "")
  • @value.gsub("bob", "")
  • @value.tr("bo", "")
  • @value[3..-1]
  • @value.gsub(/[bo]/, '')
  • etc

Enumerable methods on Array and Hash

Enumerable methods behave slightly differently on Array and Hash. I think the Enumerable drills that exist (which are all based on Array) should move to Array and we should add separate drills for the same methods on Hash. WDYT?

Please ignore random crap in your data collection

My .inputrc settings make the REPL blow up when I try using vim keybindings to navigate. I know I shouldn't do this, but my fingers type it before my brain is on board.

I don't expect this to be fixed, I just wanted to give you a heads up that the data my sessions are providing are not going to be very helpful to your statistical analysis. (feel free to close this as soon as you've seen it).

Code snippets in instructions are ambiguous

One of the instructions for a String drill said:

Take this string and turn it into a symbol. The output should be
:mouse:

Knowing beginners, there is reason to believe that they might expect the output to be :mouse: rather than :mouse.

Would it be worth adding backticks around code snippets to make it clear what is code vs what is English text?

UPDATE: I had to put backticks in the quoted text, because GitHub turns :mouse: into ๐Ÿญ.

The right answer to the merge drill is treatead like the wrong one

It seems like comparison of an input and a reference is done the wrong way, since comparing hashes - unordered collections - as strings simply won't work as expected.
Consider the reference solution from the merge drill:

"@matched_animals.merge(@mismatched_animals) { |key, v1, v2| v1 }"

Passed through to Pry.run_command, it produces the following result:

"=> {\"cat\"=>\"meow\", \"dog\"=>\"woof\", \"frog\"=>\"ribbit\", \"pig\"=>\"oink\"}"

My proposed solution

"@mismatched_animals.merge(@matched_animals)"

gives the following result:

"=> {\"cat\"=>\"meow\", \"dog\"=>\"woof\", \"pig\"=>\"oink\", \"frog\"=>\"ribbit\"}"

Hence comparison of the two strings results in false.

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.