Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(interview-prep): Porting Rosetta problems #17537

Merged
merged 5 commits into from Jun 19, 2018
Merged

feat(interview-prep): Porting Rosetta problems #17537

merged 5 commits into from Jun 19, 2018

Conversation

NitronR
Copy link
Contributor

@NitronR NitronR commented Jun 11, 2018

Pre-Submission Checklist

  • Your pull request targets the staging branch of freeCodeCamp.
  • Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
  • You have only one commit (if not, squash them into one commit).
  • All new and existing tests pass the command npm test. Use git commit --amend to amend any fixes.

Type of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Add new translation (feature adding new translations)

Checklist:

  • Tested changes locally.
  • Addressed currently open issue (replace XXXXX with an issue no in next line)

Closes #XXXXX

Description

@raisedadead raisedadead added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. labels Jun 11, 2018
@scissorsneedfoodtoo
Copy link
Contributor

@NitronR, thank you for porting over more problems!

Just a couple of things:

First, could you update your PR so that the format is like this?

    {
      "title": "I before E except after C",
      "description": [
        "The phrase   <a href=\"https://en.wikipedia.org/wiki/I before E except after C\"> \"I before E, except after C\"</a> is a widely known mnemonic which is supposed to help when spelling English words.",
        "Using the words provided, check if the two sub-clauses of the phrase are plausible individually:",
        "<ol><li style='margin-bottom: 5px;'><i>\"I before E when not preceded by C\".</i></li><li><i>\"E before I when preceded by C\".</i></li></ol>",
        "If both sub-phrases are plausible then the original phrase can be said to be plausible.",
        "Write a function that accepts a word and check if the word follows this rule. The function should return true if it follows the rule otherwise false."
      ],
      "solutions": [
        "function IBeforeExceptC (word)\n{\n\tif(word.indexOf(\"c\")==-1 && word.indexOf(\"ie\")!=-1)\n\t\treturn true;\n\telse if(word.indexOf(\"cei\")!=-1)\n\t\treturn true;\n\treturn false;\n}\n"
      ],
      "tests": [
        {
          "text": "'<code>IBeforeExceptC</code> should be a function.'",
          "testString": "assert(typeof IBeforeExceptC=='function','<code>IBeforeExceptC</code> should be a function.');"
        }, 
        {
          "text": "'<code>IBeforeExceptC(\"receive\")</code> should return a boolean.'",
          "testString": "assert(typeof IBeforeExceptC(\"receive\")=='boolean','<code>IBeforeExceptC(\"receive\")</code> should return a boolean.');"
        }, 
        {
          "text": "'<code>IBeforeExceptC(\"receive\")</code> should return <code>true</code>.'",
          "testString": "assert.equal(IBeforeExceptC(\"receive\"),true,'<code>IBeforeExceptC(\"receive\")</code> should return <code>true</code>.');"
        },
        {
          "text": "'<code>IBeforeExceptC(\"science\")</code> should return <code>false</code>.'",
          "testString": "assert.equal(IBeforeExceptC(\"science\"),false,'<code>IBeforeExceptC(\"science\")</code> should return <code>false</code>.');"
        },
        {
          "text": "'<code>IBeforeExceptC(\"imperceivable\")</code> should return <code>true</code>.'",
          "testString": "assert.equal(IBeforeExceptC(\"imperceivable\"),true,'<code>IBeforeExceptC(\"imperceivable\")</code> should return <code>true</code>.');"
        },
        {
          "text": "'<code>IBeforeExceptC(\"inconceivable\")</code> should return <code>true</code>.'",
          "testString": "assert.equal(IBeforeExceptC(\"inconceivable\"),true,'<code>IBeforeExceptC(\"inconceivable\")</code> should return <code>true</code>.');"
        },
        {
          "text": "'<code>IBeforeExceptC(\"insufficient\")</code> should return <code>false</code>.'",
          "testString": "assert.equal(IBeforeExceptC(\"insufficient\"),false,'<code>IBeforeExceptC(\"insufficient\")</code> should return <code>false</code>.');"
        },
        {
          "text": "'<code>IBeforeExceptC(\"omniscient\")</code> should return <code>false</code>.'",
          "testString": "assert.equal(IBeforeExceptC(\"omniscient\"),false,'<code>IBeforeExceptC(\"omniscient\")</code> should return <code>false</code>.');"
        }
      ],
      "id": "5a23c84252665b21eecc7eb0",
      "challengeType": 5,
      "releasedOn": "June 8, 2018",
      "files": {
        "indexjs": {
          "key": "indexjs",
          "ext": "js",
          "name": "index",
          "contents": [
            "function IBeforeExceptC(word) {",
              "  // Good luck!",
            "}"
          ],
          "head": [],
          "tail": []
        }
      }
    },

The line breaks between strings in all the arrays and objects just makes it easier to read and maintain.

Also, I went ahead and updated the description of "I before E except after C". You could just copy and past that over the other text.

I'm still reading through the other descriptions to see if they can be updated. I'll leave more comments if I find anything.

@scissorsneedfoodtoo scissorsneedfoodtoo added the status: waiting update To be applied to PR if a maintainer/reviewer has left a feedback and follow up is needed from OP label Jun 13, 2018
@camperbot
Copy link
Contributor

@NitronR updated the pull request.

@NitronR
Copy link
Contributor Author

NitronR commented Jun 13, 2018

Changes are done. Also fixed some other descriptions.

@camperbot
Copy link
Contributor

@scissorsneedfoodtoo updated the pull request.

@camperbot
Copy link
Contributor

@scissorsneedfoodtoo updated the pull request.

@scissorsneedfoodtoo
Copy link
Contributor

@NitronR, thank you for making all of those changes. I really like the method you used in the IBAN challenge to render the <ul>! I'll keep that in mind next time.

I made a couple of minor changes to the descriptions, just spacing and sentence order, really. Seems like there's a problem with the Travis CI tests, though. Going to see what the problem is there before merging.

@camperbot
Copy link
Contributor

@NitronR updated the pull request.

@scissorsneedfoodtoo
Copy link
Contributor

Sorry about that. Missed that final comma unlike here on my laptop. Thanks for fixing it!

Pulled your PR and tested again locally. Everything seems to be fine. @raisedadead, @Bouncey, would it be alright to merge this? Or should we wait for Travis build to pass?

@scissorsneedfoodtoo scissorsneedfoodtoo merged commit aaa73bd into freeCodeCamp:staging Jun 19, 2018
@scissorsneedfoodtoo
Copy link
Contributor

@NitronR, thank you for your patience. The Travis builds are working again! Thank you for your contribution, and looking forward to the next. ✨

@NitronR NitronR deleted the feature/interview-prep branch June 19, 2018 12:54
ValeraS pushed a commit to ValeraS/freeCodeCamp that referenced this pull request Oct 12, 2018
* feat(interview-prep): Porting Rosetta problems

* Objects formatted and description updated.

* Update rosetta-code.json

* Update rosetta-code.json

* Fixed syntax for Identity matrix description array
ValeraS pushed a commit to ValeraS/freeCodeCamp that referenced this pull request Oct 12, 2018
ValeraS pushed a commit to ValeraS/freeCodeCamp that referenced this pull request Oct 12, 2018
* feat(interview-prep): Porting Rosetta problems

* Objects formatted and description updated.

* Update rosetta-code.json

* Update rosetta-code.json

* Fixed syntax for Identity matrix description array
ValeraS pushed a commit to ValeraS/freeCodeCamp that referenced this pull request Oct 12, 2018
# [2.0.0](freeCodeCamp/curriculum@v1.2.1...v2.0.0) (2018-06-24)

### Bug Fixes

* **challenges:** Correct a regex in ES6 read-only challenge ([freeCodeCamp#41](freeCodeCamp/curriculum#41)) ([cf9336a](freeCodeCamp/curriculum@cf9336a))
* **challenges:** fix responsive web design cert claim ([6e02f9d](freeCodeCamp/curriculum@6e02f9d))
* **interview-prep:** Remove duplicates ([816be51](freeCodeCamp/curriculum@816be51))

### Features

* **interview-prep:** Porting Rosetta problems ([freeCodeCamp#17537](https://github.com/freeCodeCamp/curriculum/issues/17537)) ([21930a8](freeCodeCamp/curriculum@21930a8))

### BREAKING CHANGES

* **challenges:** none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. status: waiting update To be applied to PR if a maintainer/reviewer has left a feedback and follow up is needed from OP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants