Variables and Data Types in Ruby — The Real Building Blocks
🚀 CodeCraft Diaries #2: Variables and Data Types in Ruby — The Real Building Blocks “Okay, I’ve installed Ruby... now what?” You stare at the terminal. Cursor blinking. Empty file. Welcome to the starting line, my friend. Let’s talk about the first real step in learning any programming language: variables and data types . It’s where code starts remembering stuff, making decisions, and acting like it knows things. 🧠What’s a Variable? Let me paint a picture. You’ve got a backpack. You drop your snacks into one pocket, your charger in another, and your laptop in the big one. Each pocket = a variable. The stuff inside = the value. In Ruby, you just do this: snack = "Chips" drink = "Coffee" That’s it. No need to declare types or chant any mystical compiler spells. Ruby’s like: “I got you.” 🎨 The Basic Data Types (a.k.a The Stuff You Carry) 1. Strings – Just Text name = "Ruby" You can play with strings like this: puts ...