Skip to content

Instantly share code, notes, and snippets.

@dbc-challenges
Created November 1, 2013 17:19
Show Gist options
  • Save dbc-challenges/bd23c7ba314d0592e48c to your computer and use it in GitHub Desktop.
Save dbc-challenges/bd23c7ba314d0592e48c to your computer and use it in GitHub Desktop.

Unit 2, Week 1: Object-Oriented Design

By the end of the week, you should be able to:

  • Recognize a class structure and be able to identify the instance variables and methods
  • Explain how the instance variables and methods represent the characteristics and actions of an object respectively.
  • Infer a class structure from driver test code
  • Create, access and traverse nested arrays and understand how they can model a real world object like a board
  • Understand the difference between procedural and object oriented programming and how to convert from one to the other
  • See an object in the real world (say a pez dispenser) and have an idea of how to represent it as a ruby object
  • Recognize a user story and be able to translate it into driver code
  • Comfortably write driver code to access and manipulate a ruby object
  • Understand that there are tradeoffs and costs/benefits to using different ways of structuring the objects in a program

Assignments and Challenges:

Assignments

  • Give feedback on your previous pairing partner if you haven't yet. Use Feedbackinator.
  • Take part in at least 1 pairing session without a teacher guiding

Coding Challenges

For each challenge:

  1. Formulate pseudocode before solving the problem (include it as a comment when appropriate).
  2. Write good test code that includes an expectation and an output. (eg puts car.doors #=> prints the number 4)
  3. Refactor each solution so the names are clear and the code is concise and D.R.Y. (Don’t Repeat Yourself). Your methods should be short and have a single responsibility. Make sure your naming accurately denotes that responsibility.
  4. Reflect on your process and understanding (see section below). Include your reflection as comments in your solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment