Why’s Poignant Guide to programming Ruby is aimed at making ruby programming basics simple and fun, with lots of examples children can learn. Perfect for introductory programming classes, self-study or in home-school or classrooms. Packed full of cartoon images of foxes and cryptic stories. Perfect to keep unruly teenagers entertained!
Sample Text from the Book
1. Opening This Book
Pretend that you’ve opened this book (although you probably have opened this book), just to find a huge onion right in the middle crease of the book. (The manufacturer of the book has included the onion at my request.)
So you’re like, “Wow, this book comes with an onion!” (Even if you don’t particularly like onions, I’m sure you can appreciate the logistics of shipping any sort of produce discreetly inside of an alleged programming manual.)
Then you ask yourself, “Wait a minute. I thought this was a book on Ruby, the incredible new programming language from Japan. And although I can appreciate the logistics of shipping any sort of produce discreetly inside of an alleged programming manual: Why an onion? What am I supposed to do with it?”
No. Please don’t puzzle over it. You don’t need to do anything with the onion. Set the onion aside and let it do something with you. I’ll be straight with you. I want you to cry. To weep. To whimper sweetly. The Ruby programming basics is a poignant guide to Ruby. That means code so beautiful that tears are shed. That means gallant tales and somber truths that have you waking up the next morning in the arms of this book. Hugging it tightly to you all the day long. If necessary, fashion a makeshift hip holster for Why’s (Poignant) Guide to Ruby, so you can always have this book’s tender companionship. You really must sob once. Or at least sniffle. And if not, then the onion will make it all happen for you.
A Quick (and Hopefully Painless) Ride Through Ruby (with Cartoon Foxes)
Yeah, these are the two. My asthma’s kickin in so I’ve got to go take a puff of medicated air just now. Be with you in a moment.
I’m told that this chapter is best accompanied by a rag. Something you can mop your face with as the sweat pours off your face.
Indeed, we’ll be racing through the whole language. Like striking every match in a box as quickly as can be done.
1. Language and I MEAN Language
My conscience won’t let me call Ruby a computer language. That would imply that the language works primarily on the computer’s terms. That the language is designed to accomodate the computer, first and foremost. That therefore, we, the coders, are foreigners, seeking citizenship in the computer’s locale. It’s the computer’s language and we are translators for the world.
But what do you call the language when your brain begins to think in that language? When you start to use the language’s own words and colloquialisms to express yourself. Say, the computer can’t do that. How can it be the computer’s language? It is ours, we speak it natively!
We can no longer truthfully call it a computer language. It is coderspeak. It is the language of our thoughts.
Read the following aloud to yourself.
In English sentences, punctuation (such as periods, exclamations, parentheses) are silent. Punctuation adds meaning to words, helps give cues as to what the author intended by a sentence. So let’s read the above as: Five times print “Odelay!”.
Which is exactly what this small Ruby program does. Beck’s mutated Spanish exclamation will print five times on the computer screen.
Read the following aloud to yourself.
exitunless “restaurant“.include? “aura“
Here we’re doing a basic reality check. Our program will exit (the program will end) unless the word restaurant contains (or includes) the word aura. Again, in English: Exit unless the word restaurant includes the word aura.
Ever seen a programming language use question marks so effectively? Ruby uses some punctuation, such as exclamations and question marks, to enhance readability of the code. We’re asking a question in the above code, so why not make that apparent?
While this bit of code is less readable and sentence-like than the previous examples, I’d still encourage you to read it aloud. While Ruby may sometimes read like English, it sometimes reads as a shorter English. Fully translated into English, you might read the above as: With the words ‘toast’, ‘cheese’, and ‘wine’: take each food and print it capitalized.
The computer then courteously responds: Toast, Cheese and Wine.
<end of excerpt>
See more books for School Projects below
WikiJunior Big Book of Fun Science Experiments for Young Children – Book 1-Herewith the Wikijunior big book of Science Experiments featuring the first five featured experiments from Wikijunior. Contents Slime recipes Yucky gooey slime! Isn’t it just great?! We love it! Oobleck – is it a liquid or a solid? Red cabbage indicator Red cabbage indicators are great for showing if something is an acid or base. ...
Ma, Is That You? – Security made simple-Four friends have a secret meeting place, but someone keeps trying to get in. Is it Ma like the person says, or is it a scary monster? The group has 3 forms of security to protect their secret meeting place. This book provides a nice simple explanation of security and why it’s important in a ...
Animals – CKF full activity book for pre-school-Animals is a bumper packed activity book for pre-school brought to us by Core Knowledge Foundation, from tracing lines to matching pictures, songs, and much much more. This book has around 50 pages of activities for pre-school based on an animals theme. Sample Pages from Animals Activity Book Pre-school Animals Activity Book Pre-school End of ...
Why Does A Poori Puff Up? – Baking Lesson-In Why Does A Poori Puff Up we have a fascinating science and baking lesson combined, all in one wonderful book. This is a level 3 book, aimed for children who are learning to read on their own. Brought to us by Pratham’s Storyweaver. Author: Varsha Joshi Illustrator: Sonal Gupta Sample Text from Why Does ...
Civil Rights Activity Book – Southern Poverty Law Center-This beautifully presented Civil Rights Activity Book helps children learn about the US Civil Rights struggle fought for equal rights for people of colour in America. In 1964 President Johnson signed the Civil Rights Act, making it unlawful to treat people differently because of their race, religion, or sex. While the American Civil War ended ...
How to Be Happy – Be Nice Series Book 2 – More Gerty Goat guidance-How to be Happy is a short simple book for young children and beginner ESL reader, promoting values of appreciation and giving, and can be used as an early reader. The book is perfect for building confidence in reading with only 25 words most of which are simple words. This book also teaches kids ten ...
Health and Safety Colouring Book-The Health and Safety colouring book brought to us by the Denver Environmental Health department. The topics covered in this wonderful health and safety colouring book include practical yet simple and well explained concepts easy for children to understand. These colouring pages make a perfect addition to a classroom or home-school, or just great activities ...
NOAA Science Activity Textbook-This NOAA science activity textbook is packed full of scientific content and fun activities and experiments perfect for middle school and many are also suitable for lower high school. Science teachers, with experiments like these your classes never need to be boring again! From making your own compass and learning knots to building an underwater ...
Clouds out my Window – all about clouds from NOAA-Clouds out my window all about clouds from NOAA – is an awesome comprehensive book which explains all about clouds for upper elementary or middle-grade children in a very easy to understand way. This book was written by John Jensenius a Meteorologist with the National Weather Service, a department of National Oceanic and Atmospheric Administration ...
How to Solve a Problem Like Himani – School Journal from the Himalayas-How to Solve a Problem Like Himani, is a school journal from the Himalayas. Himani writes in her journal about life at school and at home in a village in the Northern Indian region of Uttarakhand, on the Southern slopes of the Himalaya range. The story takes you through her diary entries as she learns the ...
Note – if you sign up through these links, it doesn’t cost you any extra, but FKB receives a small donation, which helps us with our project to buy more FREE Hardcopies for kids who need them
All our posts are checked by Grammarly, the FREE online grammar checker (We still receive a donation even if you only sign up for the free account :-):