Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GreysonElkins/1b57048408beff1fba30c8ce1126115f to your computer and use it in GitHub Desktop.
Save GreysonElkins/1b57048408beff1fba30c8ce1126115f to your computer and use it in GitHub Desktop.
Mod 0 Session 3 Readings and Responses

Session 3 Readings and Responses

The readings and responses listed here should take you approximately 35 minutes total.

To start this assignment:

  1. Click the button in the upper right-hand corner that says Fork. This is now your copy of this document.
  2. Click the Edit button when you're ready to start adding your answers.
  3. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

Assignment 1 (20 min)

Read David's article on Git and GitHub

  • Use the article and outside resources (Google!) to describe the general process of a collaborative git workflow in the space below.

Collaborative workflow in git revolves around forking and branching. The idea is that any group of users can be working on copies of the same material off of the master (where any code is ready to be deployed). Whether you fork a copy to make changes, or create branches to work on specific aspects of the project, you can make pull requests at any time. These bring the rest of the team or specific members into the loop to make comments or work with the code. I believe in most cases they have access to the work at all times, pull requests serve as a "look here" or "ready for the team" flag.

Assignment 2: OOP and Bottles (12 min)

  • Watch this video. Next, create an idea for a class of your own. In the space below, outline your class idea. Include a name for your class, at least 3 examples of instances of your class, 3 attributes of the class with data type listed, and 3 methods of the class with an explanation of what the method would do. Remember to consider naming conventions!

class Pillow

instances of pillow class

  • throwPillow - this is probably not the best name since it could be confused with a method.
  • bedPillow
  • bodyPillow
  • beanBag
  • couchCusion

attributes of pillow class

  • volume (float)
  • size (float)
  • color (string)
  • isComfy (boolean)

methods of pillow class

  • useCusion, acts as a soft object to put on a hard place to increase comfort.
  • propUp, can be used to prop bodies and objects up into more comfortable positions.
  • throw, can be thrown at any number of objects, including other people with pillows.
@francepack
Copy link

@GreysonElkins
Very great guide to a collaborative github workflow! One idea to consider is how to maximize the use of your pull requests during group projects- throughout Turing, putting extra effort into reviewing code through github will not only expose you to that much more code, but it will create a viewable record of a skill employers look for.

I really like the class ideas- I think you have a good grasp of this. Couple notes here:

  • Since you are going into the FE program, attributes and methods can be written in standard javascript camelCase. Class names, however, are always PascalCase across different coding languages.
  • For your boolean, you may try adding a prefix to better communicate what the variable tracks. An added prefix can make it almost read as a question/answer. What might you try there?
  • For methods, try to bring the action to the front of the name. I think cushion and prop could both potentially use modifiers to better show what the method dose, and your last method name could be shortened to be a simple action. This isn't to say my opinions are the gold standard, but maybe give these another shot and I can let you know how they read, or fill you in on what I may try.
  • Your comment about 'throw pillow' made me chuckle- yes this totally sounds like a method! But no worries- something like an instances name will be held as a value of a variable rather than the variable itself. For example, we would likely access the value 'throw pillow' by entering code that looks something like pillow.name, so it wouldn't actually be confusing looking through the code, if that makes sense.

Let me know if you have questions!

@GreysonElkins
Copy link
Author

Hey @francepack

Thanks for the feedback. I was definitely getting confused about formatting throughout the class. I worked in your comments - please let me know if I should keep working on this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment