Lessons
Projects
Bootcamp
Blog
Ruby Objects
Tiers
Next Lesson
No site found for codelikethis.herokuapp.com; using CodeLikeThis content.
Videos
Slides
The CPU is a Honey Badger
Honey Badger Don't Care
To a computer, it's all ones and zeros
Abstractions make your code make sense to
humans
Tiers of Abstraction
Variables
give a name to a chunk of data
Functions
give a name to a chunk of code
encapsulate input, output, and local variables
Data Tiers
Structs
put several pieces of related data together
Data Structures
List, Stack, Queue, Hash, Tree, Heap
Code Tiers
Closures
function plus scope of defining function
allow several chunks of code to share state
Combining Code & Data
Objects
encapsulate data
and
behavior
allow several chunks of code to share extra state
Classes
reuse code and data for different instances
Other Abstractions
Immutability
values (like variables that you can't modify)
adding this constraint can make your code simpler and more scalable
More...?
Outline
The CPU is a Honey Badger
<img src="honeybadger.jpg" width="720" height="538">
Honey Badger Don't Care
Tiers of Abstraction
Data Tiers
Code Tiers
Combining Code & Data
Other Abstractions
Show Slides
Ruby Objects
Tiers
Next Lesson