Project 8

Code Breaker

Welcome to the world of encryption, ciphers, and secret messages! Have you ever wanted to send someone a hidden message that only you and the person you’re sending it to could understand? Maybe you came up with a secret code on your own and used it to manually translate a letter or note — but that can be a lot of work. Converting messages into a form that hides their meaning is called encryption, and converting the message back to something that is easy to understand is called decryption. Why not let a computer do that work for you?

In this project, you write a Ruby program that will do the labor-intensive work of encrypting and decrypting your notes. You’ll be able to write your note in your editor and save it as a file. Then you’ll be able to use the project’s program to convert the note into a hard-to-read, encrypted form. The same program will be able to take an encrypted file and change it back to something you can read.

image

Organizing a New Project

In this project, you use Atom to create and edit your program and to create test files with secret messages. You store this project’s source code in a single Ruby file. The secret messages are stored in other files. You use the terminal program to run, test, and play around with the project code.

remember If you ...

Get Ruby For Kids For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.