Monday, September 24, 2018

Learning Python

Several months ago I embarked on a project at work that made me question my decisions in life.  Well, ok, that's a bit melodramatic.  But it definitely made me question my choice of programming languages.  I thought I had on my hands a simple, straight forward problem.  Loop a couple arrays, can a handful of command line utilities.  Oh I know, I'll use shell script (bash)!  It was not long before I was asking what I'd gotten myself into.

I was too far in to turn back, and I ended up with a 1000+ line monstrosity over a handful of files.  I hated bash... seeing my kludgy attempts at modularity made me want to claw my eyes out. The first few lines of every function were devoted to parsing the parameters. It was an unholy mess, and I knew I needed something better.  I knew I needed Python (ironically, I ended up rewriting it in Java, funny how things work out)...

I put together this post to describe my experience with several learning resources I took advantage of.