The assignments listed here should take you between 1.5 and 2 total hours.
To start this assignment:
- Click the button in the upper right-hand corner that says Fork. This is now your copy of the document.
- Click the Edit button when you're ready to start adding your answers.
- To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.
- From your command line, make a directory
git_and_gh_practicewith two files inside:hobbies.txtandtravels.txt. - Initialize git, and your two files, and make an initial commit.
- Use your text editor to open
hobbies.txt. - Add some text about your hobbies.
- Add the changes and commit.
- Use your text editor to open
travels.txt. - Add some text about your favorite vacation or travel experience.
- Add the changes and commit.
- On GitHub, create a new repository.
- Add the remote to your local repository.
- Push your repository to GitHub.
- Paste the link to your repository here: https://github.com/sirsaw/git_and_gh_practice
- Fork the Mod 0 Resources repository.
- Open your terminal
- Clone your fork to your computer (
git clone <url>). cdinto your cloned repository.- Make a new file with the pattern
lastname_firstname_resources.md. - Open the file you just created in your text editor.
- Create a list of some of your favorite resources so far related to coding/Turing/git/GitHub/etc. These resources do not need to be ones that we've discussed in class. They can be anything that has helped you so far in your journey to learn software development.
- Add your changes.
- Commit your changes with a properly formatted commit message.
- Push your changes to your fork.
This next part is not something we discussed during Session 4 and will involve some figuring out on your own.
- Use the
site:help.github.comGoogling trick to search GitHub's help area to figure out how to create a pull request from a fork. It may also be helpful to figure out whatpull requestmeans. - Open a pull request for your changes.
- Once your pull request is open, you're done! You don't need to submit or paste anything since we will get a notification that you've opened a pull request.
Use about half of a blank sheet of paper to draw out a diagram that shows how you understand the git workflow. Then, use the other half to show how this workflow fits with GitHub.
- Post this diagram on the Mod 0 Slack channel.
- Watch this video. Then choose your own real-world class and objects of that class. In the space below, define and name the attributes and methods for your class and the associated objects.
Class (singular): Chair
Instances / Objects:
- Office
- Dining
- Stool
- Recliner
Possible Attributes:
- Armrests (boolean)
- Color (string)
- Height (integer)
- HeightAdjustable (boolean)
- MaxWeight (integer)
- Spinnable (boolean)
- Tiltable (boolean)
- Wheel_Count (integer)
- Wheeled (boolean)
- Width (integer)
- Inner_Material (string)
- Outer_Material (string)
Possible Methods (verbs / actions):
- Break (occurs if
MaxWeightvalue is exceeded by user's weight) - ChangeHeight (available if
HeightAdjustableboolean is true, and will alter theHeightattribute) - Lean (available if
Tiltableboolean is true) - Roll (available if
Wheeledboolean is true) - Spin (available if
Spinnableboolean is true)
Question: Is it too redundant to have two attributes for wheels? If a chair has no wheels, the Wheel_Count value could be set to 0, and I assume that could still be used to check if the Roll method is available. I included a boolean because I wasn't 100% sure. Also, I assume there must be some way to say that a value of 1 or 2 would be invalid for the Wheel_Count attribute since that wouldn't be possible on an actual chair, right? Looking forward to learning more!
Note to Tim: FYI, it looks like this video on bottles was included twice for Session 4, once here in the "Practice Tasks," and once in the "Readings and Responses."
@sirsaw great question. I would say you could make the assumption that the chair is "wheeled" if the wheel_count is greater than 1. And you're jumping ahead on validating for wheel_count values. But you're right, you could set up your software to do that check.
Also, thanks for the note on having this in two places!