Handy Ruby Methods

I love doing little code challenges, little simple puzzles that have big solutions to everyday coding. But the most common of them never get old because they’re the most important problems to solve in today’s technology. Make a palindrome detector. Find this string within that string. Search for all the common letters. Today’s biggest problems on the internet involve parsing through a humongous heap of data that we’ve been building for decades. The information is out there, but it’s in constant need of archiving and api development.

These challenge are fun and if you’re a beginner you employ loops like a madman to get at these solutions! That’s great! I was (and still am) pretty proud of my loopy solutions, too. We have to start somewhere and that’s a great place to be when you’re getting it right even if your solution is wildly inefficient.

I’ve been learning a new Ruby method each day and while doing so I’ve found some methods that would have made those challenges far simpler when I first started. I’ve decided to compile a list of those methods along with the the challenges they’re good at solving. For those just getting started in Ruby, I hope this is a useful guide to learning new Ruby methods while you continue to polish up your looping skills. Of course, there are MANY and many solutions, and that’s the beauty of Ruby so don’t ever stop seeking different ways of solving problems. This is hopefully only a good place to start.

This list could go on forever and I promise to keep adding to it whenever I have the time. Until then, keep at it and make learning new methods a daily endeavor.


Leave a Reply

Your email address will not be published. Required fields are marked *