Giter VIP home page Giter VIP logo

assignments's People

Contributors

cato-hga avatar

Watchers

 avatar

assignments's Issues

Attributes, accessors, instance variables and private methods

This is assignment 21 and is due on Feb 05, 2015.

  • Write a Person class and some code to use it, following the directions below.

First

  • Create a Person class with attributes: first name, last name, and birthdate.
  • First name and last name should not be able to be written to, but should be readable.
  • Birthdate can be set and read.
  • Create a public instance method called name that takes the name and sets the first name and last name instance variables. This is so the first name and last name attributes are set by passing in one name.
  • Create a public instance method called age to calculate and return the user's age.
  • Now, outside the Person class, ask the user their information and use it to create the Person object.
  • After asking each user their information, output the user's age.

Next

  • Create a class variable that will count the number of people that enter in their information. After you output the person's age, also output the number of person they are so far (using the class variable).
  • Loop to allow another user to enter their information. (exit when user enters \q for name). Create a Person object for each user.
  • Create a private method called calculateAge. This should contain the functionality you previously had in the age method. The public age method should now call this new private calculateAge method.

Walmart API for Invoices (Bonus)

This is assignment 26 and is due on Feb 11, 2015.

  • This is a bonus assignment for those who are caught up on your past homework and are able to finish the HTML/CSS assignment quickly.
  • Take what we did in class with the Walmart API, and combine it with what you created in assignment 23
  • Prompt the user to search for a product and allow the user to enter the product id (from the search results). For the product indicated, create an InvoiceItem object and add it to your Invoice object
  • After the user adds a product to the invoice (using your InvoiceItem class), loop and allow them to search again
  • When the user hits ENTER instead of a SEARCH term or a product id, print out the same result as in Assignment 23.
  • Bonus to the Bonus: add a category attribute to your InvoiceItem and set it from the Walmart API. Include the category on the output invoice.

Creating models, migrations and scaffolding

This is assignment 33 and is due on Feb 18, 2015.

  • Read about the available data types
  • Read about migrations
  • Review ActiveRecord basics
  • Read the generate section of this guide. Note: this will review creating scaffolds
  • https://github.com/ctran/annotate_models
  • Create a new rails app and a scaffold for any kind of object you would like to track in your app: People, Movies, Books, Beer, etc.
  • Present the user with a home page telling them what your site is "tracking", with a link to the first CRUD page.
  • User should be able to create, update, delete and list the items they have created.
  • Refer to Annotate gem
  • Install annotate gem and run it on your models
  • Push the new Rails app to Github

Using Gems and ActiveSupport

This is assignment 20 and is due on Feb 04, 2015.

  • Note: Please check in your Gemfile and Gemfile.lock
  • write a Ruby script that uses the Rails ActiveSupport gem, installed via a Gemfile and bundler
  • the script should do the following when run:
  1. Show the date of the beginning of the current week
  2. Show what the date will be in 30 days
  3. Show what day of the week today's date will fall on next year
  4. Show what day of the week the user's birthday will be on this year
  5. Using the String class, pluralize a singular word the user enters and show the singular for a plural word the user enters
  6. Using the String class, truncate a phrase the user enters to 20 letters
  7. Using the Array class, convert an array of three words to a sentence with one command

The Half Way Challenge

This is assignment 46 and is due on Mar 09, 2015.

We are half way through as of tomorrow. This is why I wanted to review all we've been doing. Additionally, I want to give you opportunity this weekend to get caught up before we begin the 2nd half.

Therefore this weekend's homework will not be any coding. Instead I want you to answer some questions in written format, to help get things clearer in your head. Beyond that, please use the time wisely. You do not want to remain behind on homework any longer. It will be too difficult for you to catch up and then focus on your demos, which are critical in summarizing all you've learned and launching yourself into your new career.

The Challenge

  • Please do this assignment first, before all others, even if you are behind.
  • Answer these questions using your own words. This is not an assignment you may collaborate on, nor copy and paste from any other sources. Answers must be original in your own words.
  • The goal of this assignment is to give you an opportunity to get these very important concepts straight. If you aren't sure, do research online until you are. Answer them as thoroughly as you can.
  • Fork this repository: https://github.com/theironyard-tampabay/Jan2015, clone it down to your laptop, and add your answers. Then create a pull request back to this original repository in order to turn in the assignment.

A Guessing Game

This is assignment 13 and is due on Feb 02, 2015.

  • Create a guessing game
  • The user must guess the number chosen by the app
  • Provide feedback to the user as to if their guess is lower or higher than the number
  • Count the number of guesses and output at the end

Create a checklist for a new Rails app (group assignment)

This is assignment 49 and is due on Mar 11, 2015.

  • Create a checklist of things to do to create a new Rails app, version control it in git, share it in GitHub and finally, get it running on Heroku.
  • Use Markdown to create the list. Put it in your Assignments git repo and push it to GitHub.

CarrierWave, S3 and environment varaibles

This is assignment 37 and is due on Feb 25, 2015.

  • Convert the app from assignment 36 to use Amazon S3, via Fog, instead of local file storage.
  • Remember to use the dotenv gem and heroku config so you aren't storing your S3 private access keys in GitHub
  • Deploy to Heroku (and GitHub as always)
  • Please provide the link to the repo AND your Heroku app in a comment here.

Debugging a Rails Application

This is assignment 48 and is due on Mar 11, 2015.

Hiring and Firing Employees

This is assignment 24 and is due on Feb 09, 2015.

  • Take the Employee and Company classes, and create functionality to allow the company to hire and fire an employee.
  • Create a Ruby app that will use those classes to do the following:
  • prompt the user to enter information for the company.
  • prompt the user to enter each employee. It will then "hire" each of them.
  • show a list of employees, with ids, then ask the user if they would like to fire an employee by entering that id.
  • fire the employee by id and show an updated list with that employee no longer in it.

Creating Variables and Literals

This assignment is due on Jan 28, 2015.

  • Create code for each comment in this gist
  • Run the code and paste the output into your issue as a comment for this assignment
  • It should list all the proper class names and all class tests should result in 'true'
  • Before you run it, can you guess what will happen with the constant code you've created?

Seed Data and Image Uploading

This is assignment 36 and is due on Feb 24, 2015.

  • Add some seed data to assignment 35 using the Faker gem.
  • Add image upload support to your Rails app from assignment 35, using CarrierWave gem.
  • You can add image uploads to any existing models in that app.
  • For this assignment, use file storage.
  • Your user should be able to browse for a local image and upload it along with your other model attributes in the form.
  • The uploaded images should show on both the index page (thumbnail size) and the show page (a larger size).
  • Feel free to experiment with sizes and versions.
  • Please include the URL to your Github repo for this app in a comment in this issue.
  • Note: do not deploy this to Heroku yet

Load questions from a file

This is assignment 15 and is due on Feb 02, 2015.

  • Copy and then modify assignment 12 to read the questions from a file instead of the hard coded array
  • Load them into an array so the rest of the program can remain the same
  • If your assignment 12 is coded correctly, you won't have to change the part that asks questions
  • Can be done with two lines of code
  • Remember to have the text file of questions in the same directory where your Ruby code is

Build Pinterest

This is assignment 42 and is due on Mar 02, 2015.

  • Should have these models: User, Pin, Board
  • The home page should show "pins" from all users, and not in a table format but a grid
  • Should use pagination with Kaminari on the pin page
  • User should be able to create new pins, uploading an image to represent them.
  • A Pin should have these attributes and belong to the user who added it: title, description, board, url, pin image
  • A user should be able to create boards to pin items to. Every pin belongs to one board. A board has a name and belongs to a user.
  • When the user clicks on a pin from the home page, it can either pop the pin up like Pinterest does, or go to a separate show page.
  • There should be a search form to search the descriptions of the pins and show those matching (across all users).
  • There should be a nav providing links to the home page, the user's pins, and the user's boards
  • Bonus: make it look amazing!

Regular Expressions, Gsub, Split, Matching

This assignment is due on Jan 29, 2015.

  1. Take the string "Hello World" and split it on whitespace. Show two ways to do this.

  2. Use the Peter Piper tongue twister and split it on 'pick'

  3. Use gsub only to change the first passage to the second in the fewest amount of commands:

    Original: "You have brains in your head. You have feet in your shoes. You can steer yourself any direction you choose. You're on your own. And you know what you know. And YOU are the one who'll decide where to go..."

    Result: "I have brains in my head. I have feet in my shoes. I can steer myself any direction I choose. I'm on my own. And I know what I know. And I'M the one who'll decide where to go..."

  4. Write code to determine how many times 'sh' occurs in the following phrase:

    There once was a man who had a sister, his name was Mr. Fister. Mr. Fister's sister sold sea shells by the sea shore. Mr. Fister didn't sell sea shells, he sold silk sheets. Mr. Fister told his sister that he sold six silk sheets to six shieks. The sister of Mr. Fister said I sold six shells to six shieks too!

  5. In the same phrase above, how many times does 'sh' occur when followed by an 'o'? Show the code.

  6. Match the word foot but not football in this phrase: "He played football despite having an artificial foot.""

  7. Match the last sits in a phrase using this phrase: "I saw Susie sitting in a shoe shine shop. Where she sits she shines, and where she shines she sits."

Happy Birthday!

This assignment is due on Jan 28, 2015.

  • Create a Ruby script to ask the user for their name and then wish them a Happy Birthday by name
  • Add some comments to your code
  • Put this code in a gist and paste the link from the gist in a comment of this issue

Bonus

  • Add another prompt for birthdate
  • Show the birth date in parenthesis after the greeting
  • Note: user must enter date in like: 2014/09/22 or 2014-09-22
  • Change the output formatting to: Friday, April 1, 1974
  • Capitalize the user's name

Working with Loops

This assignment is due on Jan 29, 2015.

  • Request input of a number from the user.
  • Iterate the number of times indicated by the input number
  • Within the loop, print the number of the iteration
  • Do this for each of these methods of looping: while, for i in rage, loop, until, .times with counter, until, range
  • All should print from 1 to the number input by the user

Checkboxes for Many to Many

This is assignment 38 and is due on Feb 25, 2015.

  • Note: This is a bonus assignment for those all caught up on homework.
  • Using the app from 36 and 37, add checkboxes to a form for a many to many relationship.
  • Review the Railscast for this topic

Using Memoization, Scopes, Flash, and Authorization

This is assignment 43 and is due on Mar 03, 2015.

  • Read about memoization
  • Review the ActiveRecord Scopes guide
  • Review using model scopes in ActiveAdmin. Scroll down to the Index Scopes section
  • Review my troubleshooting guide
  • Read about the Flash
  • Add three scopes to any model and implement in ActiveAdmin too
  • Scope all your user owned models (ex. pin and board), and use within your controller so your site cannot be hacked (denying other's from accessing records they don't own).
  • Add flash display on site (within layout). Use a flash notice when denying access to a record the user doesn't own. Note: once in the site wide layout, you'll want to remove the notice displays your scaffolding put in place, or you'll have them repeating on those pages.
  • Add an admin attribute to your user model. Restrict any admin only actions from your views.

Multipe models, Scaffolding, and Heroku Deploys

This is assignment 35 and is due on Feb 23, 2015.

  • Create a new Rails app, in it's own folder (not within the previous Assignments folder)

  • This new Rails app should have three models. Two of them should have scaffolds. They should all have associations, so pick three models that are related in some way.

  • Ensure all associations can be set within your Rails app views (no longer just in the console)

  • On the index view of a parent model, show the count of children it has (the has_many relationship). Example: how many books does that library have?

  • Add a Procfile to your app with this line: web: bundle exec thin start -p $PORT (note: this is to get it working on Heroku)

  • Add the following to your Gemfile (please read the comments to remind yourself why each Gem is necessary):

    # User the 'thin' server instead of the default webrick
    gem 'thin'
    
    # Use postgres and the Heroku rails gem for Heroku
    group :production do
      gem 'rails_12factor'
    end
    
  • Deploy to Heroku

  • When you submit the assignment, paste the URL to your Heroku app in a comment within this issue.

Using Codepen

This is assignment 27 and is due on Feb 11, 2015.

  • Sign up for an account (login with GitHub)
  • Here's mine
  • Create one codepen with HTML and CSS of anything. Include the link in this issue.

Blog Rails App

This is assignment 31 and is due on Feb 16, 2015.

  • Review the UrlHelper
  • Review the AssetTagHelper
  • Review the table HTML tag
  • Create a new Rails app. It should go inside your assignments repository.
  • This will be a blog app.
  • You'll want a posts controller with an index action and actions for the individual posts.
  • The "root" of your blog app should be the posts index page, showing links to the posts.
  • Add an about me page with real information about yourself. This should go in a 'welcome' controller. Tip: don't forget to setup your routes.
  • Use Twitter Bootstrap to make this look as nice and as real as you can make it. I'm going to pick the best and show it to other instructors at TIY in our weekly meeting. Remember you can install Bootstrap using the simple CDN method.
  • Create and use at least one helper method. It could be used to format a date, for example.
  • Use the image_tag in at least one place.

Using Git

This assignment is due on Jan 26, 2015.

  • Clone down the repo we created in class.
  • Add your name to the students.txt file.
  • Add, commit, and push the file to the repo.
  • Mark the issue completed and paste a URL to the commit in the comment of the issue.

Improve the Movie Query app

This is assignment 30 and is due on Feb 16, 2015.

  • Alter your existing app so you are no longer returning the synopsis in an instance variable, but instead returning the entire first movie result. We will assume for this exercise that the first movie that comes back is the one we want.
  • Using all the information returned for the movie, recreate a movie information page like this one on IMBD or this one on Rotten Tomatoes. Note it does not have to have their branding but should nicely layout as much of the movie information as possible. Ex: poster, ratings, synopsis, tomatometer, some cast, running time, etc.
  • The goal is to create your own movie information page as though you were creating one for a client's movie app.

Parsing JSON

This is assignment 17 and is due on Feb 03, 2015.

  • Read about HTTP
  • Read review on using JSON in Ruby
  • Look thru some JSON Examples
  • Copy assignment 15 and modify to now read in questions from a JSON file
  • This means you need to create a JSON file of you questions
  • Read and parse the JSON into an array so the rest of the app remains the same

Restricting ActiveAdmin access

This is assignment 44 and is due on Mar 05, 2015.

  • Adjust your Pinterest app to only allow "admin" users to access the /admin section

More Learning Git/GitHub

  • Create a folder in the example repo using your first name.
  • Add two new files inside the folder. One should be a text file named aboutme.txt, in which you tell me five things about yourself. The other can contain anything.
  • Push these to the repo.
  • Use git rm filename to remove the second file (where filename is whatever you named it. Then commit the deletion and push to the repo (removing the file from GitHub too).
  • Read Chapter 1 of the Git book. Sections 1.1 through 1.4
  • Finish try.github.io if you didn't finish it for the prework.

More work with classes, getters and setters (in class, pairing)

This is assignment 25b and is due on Feb 10, 2015.

  • Design and code a Blog and Post class.
  • These classes should model a system where a user can create a blog, which will have posts.
  • A Blog can have a name, a user_name, and the collection of posts
  • A Post can have a name, a summary, the body of the post, the published date, and a word count.
  • Since both a blog and a post MUST have a name, override the initializer so that when an object of either class is created, a name must be supplied.

Adding a User model and scoping your app to the current user

This is assignment 39 and is due on Feb 26, 2015.

  • Modify the app from assignment 36-38, to have a User model
  • Also, modify any models that should be scoped to a User, to belong to a user object
  • Only show the user's records when in that context
  • Create a User guest record in the seed file
  • Default your app to always use that User
  • Modify at least one model's create to be automatically associated with that User when it's created.
  • Deploy to Heroku
  • Paste the link to your Heroku app in a comment here for my review

Extending String with PigLatin

This is assignment 19 and is due on Feb 04, 2015.

Extend Ruby's String class to have a "pigatize" method that will turn any string into pig latin.

Should use the same code you wrote before, but now you are extending the String class and putting the functionality in there.

Asking Questions

This is assignment 12 and is due on Feb 02, 2015.

  • Create an array of questions (Strings)
  • Iterate over the array using each, asking each question to the user
  • Bonus: Save all the answers with the questions, and print a summary at the end

Create a blog

This is assignment 28 and is due on Feb 11, 2015.

  • Read Separation of Concerns
  • Read MVC
  • Refer to HTML Element Reference
  • Refer to CSS Reference
  • Create a home page with the title of your blog, and your name as the author
  • List out at least 3 pretend blog posts with their title, word count and summary. Hyperlinking them to their own HTML Post pages.
  • On the individual Post pages, should show a link back to the home page, the blog title, the post title, the body, and the published date.
  • You should have four HTML files that all link to each other and one external css.
  • Include an image in at least one blog post
  • Bonus: Use at least one custom font from Google
  • Put these files in an assignment_28 folder and check into github

Working with Strings

This assignment is due on Jan 29, 2015.

  • Take a string from the user, reverse it, remove the last character and reverse it again (no shortcuts)
  • Be sure if the user enters whitespace on either side of the input, that you remove it first
  • For the original text input by the user, count how many words (as separated by spaces) and print this count.

Custom Rake Tasks

This is assignment 45 and is due on Mar 05, 2015.

  • Read about Rake tasks in Rails

  • Create a custom rake task for your Pinterest app that will output the current count of all your models. Example:

    Teams: 4
    Users: 10
    Books: 15
    Authors: 2
    Movies: 1

Pre-Work

This assignment is due on Jan 26, 2015.

Expectations

Mind Set

The following resources will help you better understand your current mindset and how the learning process works. I firmly believe, "Failure is not the opposite of success, it's part of success."

Send me an email with the following

  • Which mindset, from the article above, do you most associate with and why?
  • What challenges do you think you will face in completing this course and why?
  • What distractions are you likely to have during the class that might make it hard for you to handle the work load?

Development Environment Setup

  • Sign up for GitHub and send me your GitHub username
  • Make sure to add a profile picture on your GitHub account and your full name, since this will help me learn your name.
  • Use installrails.com to install Xcode (note, current version is 6.1.1), Homebrew, git before the class. Stop after Git. Do NOT install RVM and Ruby or anything else.
  • Install Atom
  • Install Atom shell commands: (Inside Atom, click 'Atom' in upper left, then click on 'Install Shell Commands')

Read these articles

Hour of Code

Do this no matter what your experience level. It's fun. I did it with my kids last year. They loved it and I actually enjoyed it myself. It's only an hour. Watch the videos as well. They really did a great job of explaining programming paradigms.

Using a Mac

As you know, we use Macs for all development. I would guess that about 99% of all Rails developers use Macs. It's a much easier platform for this type of development. If you aren't familiar with using a Mac, please go through the tutorials below.

Understanding the Command line (from Treehouse)

The console is where you will do much of your work. It's crucial to understand it and become comfortable in it. If you haven't used it before, this will definitely be a learning curve. Reading and working through the resources below will help you to be better prepared for day one.

Git

We will be using Git for all source control. This tutorial will help you understand how Git works. We will cover Git and GitHub from the very first day in class.

  • Work through the online TryGit tutorial.

HTML/CSS

HTML and CSS are fundamental technologies necessary for all web developers. The tutorial below will give you an introduction to these technologies.

  • Complete the Dash course, which covers HTML, CSS, and very basic JavaScript. This should take you approximately 8-15 hours, depending on your prior experience.

Typing

Of course, typing is a huge part of being a web developer, because it's how you communicate with the computer. If you are not a proficient touch typists please do the first tutorial below. The second tutorial is a good one for practicing typing some of the commands and more unusual characters used in development.

*Note: Treehouse requires a monthly subscription of $25/mo but there is a 14 day free trial you can use for the prep work.

**Note: Be sure, if you are reading this via an email notification, that you click through to visit this issue on the site. You can check the checkboxes right on GitHub.com to show your progress, or leave questions in the comments

Classy Pig Latin

This is assignment 14 and is due on Feb 02, 2015.

  • Using the structure of a class as I've laid out in this gist, finishing creating the PigLatin class to translate a word into pig latin
  • Bonus: modify the app to convert an entire phrase (one word at a time)
  • Note the pig latin rules in the comment of the skeleton app

First Rails App: Find a movie's synopsis

This is assignment 29 and is due on Feb 12, 2015.

  • Review Ruby Rails guide up to section 5.
  • Create a new rails app called movie_query
  • This app and it's folder should be inside your assignments app.
  • Generate a 'movies' controller with a 'search' action.
  • Paste all your Ruby code from the movie query app into your search action
  • Note: you don't need to require active_support any more. Try not requiring libraries until you get an error.
  • Put the first movie's synopsis in the results into an instance variable
  • In your ERB, index.html.erb, use Rails expression display the movie synopsis

Invoicing

This is assignment 23 and is due on Feb 09, 2015.

  • Create an InvoiceItem class and an Invoice class (two classes in two separate files)
  • The InvoiceItem class should have the following attributes: product_name, sale_price, quantity, tax percentage
  • The invoice class should have a getter and setter for an attribute called: items to hold an array of all the InvoiceItems
  • Create an instance method in Invoice that will calculate a total of all it's invoice items
  • Use reject or select methods in order to remove any InvoiceItem objects that have a zero quantity
  • Create an instance method in Invoice to sum up the invoice items and get a total
  • Ask the user to enter in the attributes for each invoice item, hitting ENTER on product name when done
  • With each invoice item entered, create the object and add it to the collection of invoice items within a single Invoice object.
  • Then output each line item.
  • Show a sub-total without the tax, then a line item for the tax, then the total.
  • Bonus: make the invoice look like a real world invoice in the terminal

Movie Querying script

This is assignment 18 and is due on Feb 04, 2015.

  • http://developer.rottentomatoes.com/
  • Use Rotten Tomato's movie querying script to create a command line app which prompts the user for a movie title
  • Using the entered movie title, search via the API for the movie's synopsis and output to the user
  • If more than one movie comes back, show all the movie title matches with their synopsis

Math and Comparisons

This assignment is due on Jan 28, 2015.

Use the following code to create a Ruby file and run it. The file can be run either by ruby filename or, if you choose, you can set the executable bit (chmod +x filename) and add a shebang.

puts 3 > 4
puts (3 * 2) > 10
puts 2 == 3
puts (1 > 0) && (2 <= 1)
puts 2 != 2
puts (14 <= 10) || (2 >= 3)
puts 10 % 2 == 1
puts (10 ** 2) == 1000
puts 1000 / 300 > 4

Now change the code above so that when you run it, all the equations are true.

Please create a gist of the final code and paste the url of the gist in an issue comment.

Movie Query app form - in class

This is assignment 32 and is due on Feb 17, 2015.

  • Change your movie query app and add an HTML form to prompt the user for a movie title and submit to the controller/action you already have.
  • You can still use the HTTP GET method in this case, because we want the old way of passing it in the request url to work.
  • Use bootstrap to improve the look of the form.
  • Refer to Bootstrap form stylings
  • Refer to Rails form helpers

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.