Coder Social home page Coder Social logo

welcome-to-learn-5-b's Introduction

Solving Your First Lab

Now that you've got the Learn IDE up and running, you're going to use it to solve your very first lab on Learn.

Objectives

  1. Open a lab by clicking "Open" on this page on Learn.co
  2. Run the lab's tests with the learn CLI command
  3. Make a change to your copy of this lab
  4. Pass the tests using the learn CLI command
  5. Submit the passing lab with the learn submit CLI command

Instructions

In this this lesson you will practice the workflow that allows you to solve labs on Learn.

1. Opening a Lab

Click on the "Open" link on the lab toolbar above.

Open

After you click on this, your Learn IDE will launch with the lab opened and ready for you to work on.

2. Exploring the Lab in the IDE

You should see all of the files associated with this lab in the Learn IDE's file browser on the left pane.

lab-fail

3. Running the Tests

In the console on the bottom pane, run the test suite by typing learn and hitting enter.

You'll see something similar to:

lab-fail

You can see your test is currently failing, which is fine. We haven't done any work yet, so it makes sense.

The failure reads: Make sure you have edited the file edit-me.txt

Test-Driven Development (TDD) is powerful workflow the best professional developers use everyday to build software. Every lab on Learn provides you with a test suite to make pass by reading error messages and understanding software specifications. As you work on Learn, you are mastering a powerful workflow that will be crucial to your success as a developer.

You should always be reading the test output as it will direct you on what you need to program to pass the lab.

You can always read the test code in the spec directory of a lab, just ignore any files called spec_helper.rb or in support directories and focus on the test files, for example, in this lab, reading the file spec/first_lab_spec.rb will provide some insight into the requirements of the lab.

4. Passing the Lab

To pass this lab, make any change to the content of the edit-me.txt file. You can do this by clicking on the name of the file in the file browser in the left pane; its contents will load in the text editor. Type into the text editor to change the contents of the file, then save your changes. When you've done that, running learn should show you a passing test suite.

Passing Lab

5. Submitting the Lab

Once your local tests are passing, you can submit this lab by running learn submit from your terminal.

learn-submit

You should see this lab pass on Learn.co (if you don't, try hitting refresh, if you still don't, "Ask a Question" and we'll help). Congratulations! You've just solved your first lab.

Video Demo

<iframe width="100%" height="720" src="https://www.youtube.com/embed/R-G9JuXDuCk?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>

welcome-to-learn-5-b's People

Contributors

aviflombaum avatar matbalez avatar talum avatar

Watchers

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

welcome-to-learn-5-b's Issues

Error when clicking "Open"

When I click "Open" from learn.co, rather than open the learn IDE, I am greated with developer tools shouting this error at me...

/Applications/Atom.app/Contents/Resources/electron.asar/common/api/deprecate.js:96 (electron) ipc module is deprecated. Use require("electron").ipcRenderer instead.
index.js:62 TypeError: Cannot read property 'then' of undefined
    at setupWindow (index.js:82)
    at window.onload (index.js:41)handleSetupError @ index.js:62

add a sentence or two about workflow?

we tell students that we're going to practice the workflow of solving labs, but we're not really explaining the "why" of the workfiow.

After instructions, it might be worth adding a few sentence that explain the super basics of tdd.
i.e. All programs are composed of different files and folders. Typically we don't just write our code and call it a day but instead we have what we call "tests" which have requirements that our code needs to pass. The first time we run those tests, our code will fail because we haven't done anything yet. Then we update the program with code, run our tests, and see if they pass. This is the workflow developers use and this is the workflow that you'll use to solve your coding labs.

Error after changing editme file and typing learn command

After making changes to the editme file and saving I typed the 'learn' command and this long error message came up:
/usr/local/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/shellwords.rb:75:in block in shellsplit': Unmatched double quote: "but you're unable to make the change yourself, you should raise a Github issue" (ArgumentE rror) from /usr/local/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/shellwords.rb:73:inscan'
from /usr/local/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/shellwords.rb:73:in shellsplit' from /usr/local/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/shellwords.rb:189:inshellsplit'
from /usr/local/rvm/gems/ruby-2.2.3/gems/rspec-core-3.5.2/lib/rspec/core/flat_map.rb:7:in each ' from /usr/local/rvm/gems/ruby-2.2.3/gems/rspec-core-3.5.2/lib/rspec/core/flat_map.rb:7:inflat
_map'
from /usr/local/rvm/gems/ruby-2.2.3/gems/rspec-core-3.5.2/lib/rspec/core/flat_map.rb:7:in `flat
_map'

Could not access the first lab lesson

When I click on OPEN, the terminal says " could not clone the lesson.
capture

Another Learn fellow advised me to run ssh -T [email protected], and the terminal returns with a "Permission Deinied (Public Key)".

Any advice would help so much. Thank you

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.