What is A Matrix & How to Use It in Ruby?

A matrix is a 2D (2-dimensional) array that can be used to store & work with spreadsheet-like data. They can be used for: Representing a board in a table game (chess, checkers, etc.) Statistics & data analysis Generating plots & graphs Because this is a powerful data structure it’s helpful to learn how to use … Read more

How to Create Ruby Objects That Describe Themselves

In this article you’ll learn how the Ruby inspect method works & why do we use it. When you print a string or array you see its contents. Example: puts [1,2,3] 1 2 3 But when you print your own objects… You see this: #<Cat:0x29458e0> Why? Because you haven’t told Ruby how to display this … Read more