How to Write Your Own Caesar Cipher Encoder

Have you ever heard of the Caesar cipher? Julius Caesar used this technique to conceal secret messages from his enemies! The Caesar cipher is one of the most primitive encryption techniques. The main idea behind this system is to rotate the letters an x number of positions on the alphabet. For example, with x = 1, an … Read more

How to Parse HTML in Ruby

Are you trying to parse HTML with Ruby? This task can be a bit difficult if you don’t have the right tools. But today you’re in luck! Because Ruby has this wonderful library called Nokogiri, which makes HTML parsing a walk in the park. Let’s see some examples. First, install the nokogiri gem with: gem … Read more

Ruby String Formatting

Let’s talk about how you can format strings in ruby. Why would you want to format a string? Well, you may want to do things like have a leading zero even if the number is under 10 (example: 01, 02, 03…), or have some console output nicely formatted in columns. In other languages you can … Read more