Monday, August 26, 2013

Lesson 10 - Yank It!

The funniest thing today was the new reminder sound for adding a space between the program and the argument (filename). She forgot that a couple of times and I let out a huge O! She might remember next time.We revisited the vkp file again, and pracised copying lines: yy to yank a line and then p to paste it on the next line. It seemed quite easy for her to understand that y stands for yanking (making the computer "memorize" something) and yy stands for yanking the whole line. I explained that many commands in vim can be applied to the whole line by repeating the same letter. Like dd that we used before.She wanted to do it again and again, so I teached her to use the period (.) to repeat the last command. We ended up with eight lines with 7 weekdays on each. I teased her to count the words and we came to the conclusion that the computer is better at it. She used vim quite fluently today. cat vkp|wcThat's how we made the computer count the words. She remembered both programs cat and wc and typed the pipe character like a boss. The output was something like 8 56 456... showing the number of lines, words and characters (I call them letters to her). The number eight was easy to read, but she couldn't interpret the larger numbers, so we practised them. She can count to a hundred now so the number 56 was graspable once I told her that 56 goes like viisi-kymmentä-kuusi.We were both very happy with the lesson and recapped it what was learnt this time. She remembered copying lines, and using yy.Then we googled for pictures of scary ghosts.