Rubies Are A Girl’s Best Friend

Ruby is a fashionista

The Ruby language has a very specific style that she follows, which makes it more streamlined for anyone who is reading and writing her code. She’s particular about things like: snake_case formatting for methods, variables, or file names, uppercase constants, CamelCase formatting for class names, and comments begin with a # at the start of their line. When each programmer has the same expectations of the code, it makes interpretation a lot easier.

Ruby wears a lot of jewelry

RubyGems (or just “gems”) are a collection of Ruby files, or library, that each perform certain tasks, with the goal of speeding up development for the programmer. A gem is a bundle of code written by someone to solve a useful problem. Because our hero programmer has already addressed this task, we are able to decrease our workload. To install a gem, simply type

Ruby likes a big O{bject}

In Ruby, everything is an object. Every piece of information or code can be given its own properties and actions. Object-oriented programming calls properties by the name instance variables and actions are known as methods. So, if everything in Ruby is an object, and an object is a part of a class, and that class has a lot of really neat methods that can be called on it to perform and accomplish a lot of different things. Being so object-oriented makes Ruby really really really really powerful.

Ruby is a giver

Ruby will always return something. That something might actually be nil (which ironically means nothing), but even a nil is something. Because pretty much everything in Ruby is an expression, and expressions are evaluated, Ruby is always going to give her programmer something, even if it’s an error. While other programming languages may require a return statement, Ruby implicitly returns. Whether you ask her to or not, she is going to give you some type of response.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store