read the transcript!
Sometimes you print out an object, and it just prints the class name and reference ID, like this:
Illustration of a frowning stick figure with curly hair.
person (thinking): “ugh, thanks, very helpful… “
Implementing a custom string representation for a class you’re often printing out can save a LOT of time. The name of the method you need to implement is:
Also, pretty-printing libraries (like
pprint in Python or
awesome_print in Ruby) are great for printing out arrays/hashmaps.