Dan Schnau

Learning Something New

This morning, I had some free time.

After coffee and a workout, I sat down for an hour to learn something new to me in the world of software: Python. I decided on Python because it appears at the top or near the top of most "popular programming language" lists I've seen. I've written gobs of C# and plenty of JavaScript/TypeScript in my days, but hardly any python.

I wasn't sure what I would build, so I started with hello world.

print("Hello, World!")

I was surprised to learn that ending ; characters are allowed in python. I thought they were illegal. It turns out they're just not used much.

print("Hello, World!")

Then I spent some time learning to work with the argparse using this tutorial: https://docs.python.org/3/howto/argparse.html#argparse-tutorial.

After much fiddling, this was the result:

import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-n", "--name", help="Your Name", default="Anonymous")
args = parser.parse_args()

print("hello, %s%s!" % (args.name, "Bar"))

I between installing python, deciding what to do, and finding some docs to work with, I spent an hour. Given that, maybe I should reconsider the estimates I give user stories at work.