CLI: Opening the door for the outside world

Posted by Gio Zavaglia on May 16, 2019

The concept of command line it’s very interesting. Regardless of it’s crudeness, CLI applicatios is the first taste that we have on humans interacting with your program.

It’s very exciting when you show a CLI program to someone who has no idea about coding whatsover, and they can finally communicate with a program.

When I first started coding my fiancee was sitting next to me this one time and she ask me if I could write her a little program because she wanted to understand what I was doing. So I wrote her this:

puts "Hello Gianna, I love you"
puts "Do you love me?"
input = gets.strip
while input != "yes"
 puts "Wrong answer... Try again"
 input = gets.strip
 end
if input == "yes"
 puts "yay!!"
 puts ":)"
end

She was so impresed with that and also showed her a little about the possibilities that programming gives.

When we program we’re just trying to model every day life activities. Humans are social animals, we need some sort of interaction with the outside world and with other humans. This is what CLI provides us (in a very simple way). The communication and interaction that we need to continue with our lives.