RSpec is a behavior-driven testing tool for the Ruby language. RSpec is used in test driven development (“TDD”), where the developer writes the test based on what s/he hopes the program will accomplish, and then creates the program to accomplish the goals of the test. While this would seem to create additional work for the… Read More
Arrays and hashes are common data types used to store information. The main difference between an array and a hash is the manner in which data is stored. Arrays, represented by square brackets, contain elements which are indexed beginning at 0. So if an array contained three elements, the indexes for those elements would be… Read More
Modules are collections of methods and constants. Practically, they’re like a toolbox full of neat tools and supplies. If you wanted to build a house, you might use one set of tools and supplies, whereas building electronics may require another set of tools and supplies. Modules are a way to organize your tools and supplies into useful receptacles.
Classes are useful to help organize objects with similar attributes and methods. Instead of defining multiple objects with similar attributes, we can instead define a single class and create instances of that class.
Comparing Ruby and C.