TheIronYard--Orlando / ROR--2015--SPRING

Resources and homework for the Ruby on Rails cohort at @TheIronYard--Orlando for Spring 2015
Creative Commons Zero v1.0 Universal
6 stars 7 forks source link

02 -- High Functioning -- Kelly Strickland #18

Closed QueVee closed 9 years ago

QueVee commented 9 years ago

Tasks

Description

That git is a real shot in the tucchus, isn't it? We'll play with that some more.

Today's big new things were functions and methods. A function is just a way to manipulate data. A method is a function that is attached to an object of some kind, like a number or a string or what have you. The data that gets manipulated by a function has to be given to it as one or more arguments. A method can have arguments as well, and it can access some of the data in its object as well.

Inside a function or method you can have other functions and methods, and data types. You can also have control structures, like if and else and while and until, and comparisons like <, >, or == (which is not the same as =), as well as logical operators like && and ||. That's about it.

For today's assignment, you will write a function that takes the English word for a number and turns it into an actual number. For example: terrible_method_name("one") #=> 1 terrible_method_name("twelve") #=> 12

Your function should (a) have a better name than that, and (b) work for any integer up to at least 100. 1_000_000_000 would be better.

Start by writing expectations for some return values given some inputs. Then write out in English the rules for how numbers are named. Then translate your English into Ruby. Include some expectations in your file so you know it works.

Objectives

Learning Objectives

After completing this assignment, you will have a better understanding of some aspects of git:

what branching represents the relationship between a branch in git and a folder what a remote is what the arguments to git functions mean You will also know a lot more about Ruby:

how to write a function or a method including arguments how to control flow how to determine a return value how to set precise expectations in English for your code what it should return what its internal logic should accomplish Performance Objectives

After completing this assignment, you will be able to:

write and execute code that can solve interesting problems use git to clone a repository, perform work in a branch, and merge your local changes into the original repository Deliverables

A WIP Issue in the class repo titled "02 -- High Functioning -- #{YOUR NAME}" with: checkboxes as below under Requirements estimates for the top-level checkboxes Update your TIY-Assignments repo wiki: Add your thoughts on today's assignment to the existing reflections page Edit the lightbulbs and struggles pages A branch in your TIY-Assignments repo named feature/02--High-Functioning that contains: a series of commits after each milestone or hour (whichever comes first), with an informative commit message for each A folder called docs/ that contains: data_types.md -- a Markdown file containing names, definitions, methods, and uses for each data type you've learned about so far A folder called code/ that contains: some_expressive_name.rb A Pull Request (PR) in your TIY-Assignments repo: from the branch feature/02--High-Functioning (head) into the master branch (base) description that links to your WIP Issue in the class repo using Github Flavored Markdown two :thumbsup: comments from peers who have reviewed your work Comments on your WIP Issue for the following: a link to your wiki (absolute URL) a link to your PR using Github Flavored Markdown ### Requirements

QueVee commented 9 years ago

Wiki Pages https://github.com/QueVee/TIY-Assignments/wiki

Pull Request https://github.com/QueVee/TIY-Assignments/pull/2

QueVee commented 9 years ago

Pushed both day_1.rb and some_expressive_name.rb but I do not see it anywhere to do a pull request.

bgates commented 9 years ago

The pull requests got sorted out on later assignments, so....