Wouldn't it be a pain if we had to rewrite the same code every time we wanted to perform the same task?

Like this code that's used to greet a user.