I was tired of programming (Yes, sometimes it happens to me!) and then decided I needed to read a bit to relax.
Libraries are like Paradise to me. Or, better saying, if there is a Paradise, and by any chance I go ther someday, it will be like a library to me.
And there I was, with my noble computer and a few books, trying to decide what would suit me better, when a few teenagers, boys and girls, sat close to me and started studying Math.
Now, if there is something that appeals to me, maybe even more than programming and books, is Math, my old passion. I've been in love with Math since my early childhood.
I was listening and trying not to interfere in their study. Young people must be allowed to make their onw discoveries. Don't meddle with them when they are doing this. Besides, they were doing pretty well. One of the boys was the leader of the pack and this reminded me of myself, 35 years ago, at National Libray in Rio the Janeiro, leading my own team and preparing to enter college with no money to pay for a prep school.
They were suddenly discussing permutations. And they had an insteresting problem related to the permutations of the Portuguese word CONQUISTA (meaning CONQUER in English).
They wanted to know, first, how many permutations this word has. Then how many of these permutations started with a vowel. Then how many would start and end with a consonant. Finally, how many of them would have the letter "C" before the letter "A".
And using Ruby I could give the answers in a few seconds, by using ths program.
Of course I haven't given them the answers. As I said above, I just don't like to interfere with young people learning. They can learn by themselves. But you may notice some interesting uses of Ruby idioms.