Understanding that you probably don't need to optimize code
Programmers in general, and new programmers in particular, often have the idea that all code needs to be fast. Now, there are certainly some environments where super-fast code is a requirement. If you are designing high-frequency trading software, modeling complex astrodynamics or fluid mechanics, or programming in a real-time environment where code must execute in a given number of microseconds, you want to make sure your code is as fast as it can be.
However, if you are using Ruby, that's unlikely to be the case. For one, compared to many other programming languages, Ruby is slow. This isn't a complaint about Ruby. To be fair to Ruby, no language that is as dynamic, easy to use, and programmer-friendly as Ruby is as fast as Ruby. However, Ruby is not known for its performance, at least not in a positive light. If you are using Ruby, it is likely in an environment where the flexibility and ease of use of...