Breathing By Wires
Programming is a creative task, like painting, writing, knitting, or constructing LEGO castles. Like painting a blank canvas, making software has many constraints but endless possibilities.
Sweigart, A. (2020). Automate The Boring Stuff With Python. Retrieved February 4, 2022
When I was a kid, I did not have a big creative ambition. I liked to draw, color, and paint, but I did not want to practice and hone those skill sets. I did not consider myself “creative;” instead I was “logical.” It was a stupid way of looking at creativity. It turns out I had not found anything creative to be passionate about.
I love the quote from Al Sweigart. It perfectly encapsulates my feelings about not only programming, but computer languages in general. Thinking about problems for computers to solve, and then telling them how to do it is an immensely satisfying feeling. It definitely scratches the same creative itches I feel when writing. I did not discover this until I was thirteen years old.
I loved Neopets in 2002. I liked the games and the pets, but I think I had more fun creating my own profile. Neopets allowed me to customize my page using HTML. My brother showed me how to view the source code for any website. If I saw something cool on website, I copied the source code to my Neopets page. I tweaked colors, and other settings to my liking. Without even knowing, I was teaching myself my first computer language. Over the years I have created several web pages and websites using HTML; I still use it today.
HTML is a great markup language, but it does not use logic like programming and scripting languages. I learned programming logic from an unlikely place: StarCraft.
StarCraft has a map editor called StarEdit. I decided to check it out after many hours playing the game. I quickly learned how to modify the terrain, and place units and buildings. However, I could not figure out how to make the AI work, or how to get cool things to happen.
I looked at maps other players had made, and I discovered a thing called triggers. After looking and experimenting with triggers, I began to see their logic. They are basic cause and effect statements. For example, if a player brings a marine to a location, then teleport the marine to another location. My maps started coming alive! I really felt like I was being a creative person when I built maps.
In 2005 I took my first computer programming course. The course taught programming skills using the Visual Basic language. I immediately recognized if/then/else statements as triggers from StarEdit! A few students struggled with the concept, but I breezed through it. I also learned about variables, arrays, loops, and methods. I have used each of these concepts in other computer languages.
In 2006 I took my second computer programming course. This time I learned Java. The course was designed to teach Java syntax, while solidifying the concepts we learned in the first course. I like Java, and I breezed through the course. However, I only applied my newfound knowledge to one project outside of assignments. I created a text-based, choose-your-own, adventure game. I was influenced by Thy Dungeonman. I wish I still had it, because I would like to see if it is any good.
After high school I needed to pick a major for college. I had it narrowed down to two: Computer Information Systems (Tech Support) or Computer Programming. I could not see myself coding all day, so I chose Computer Information Systems.
Computer languages are a tool, and they need a project in order to be utilized. I never could figure out how I wanted to use programming languages. Years passed, and the only languages I worked with were HTML and CSS. I took computer programming courses in college, but I only used Visual Basic and Java for assignments. But then I graduated and got hired for a full time IT position.
In 2013 I watched a demo for Microsoft’s System Center Configuration Manager. It is an endpoint management solution that allows IT professionals to image systems, deploy applications, push out updates, and more boring stuff. I loved the idea of it, and I convinced my boss to get it for us.
Configuration Manager does not run on magic. I do not wave my magic wand and Mozilla Firefox appears on 125 computer lab laptops. No, Configuration Manager needs scripts to make it happen. Not only did I finally find a project to use my programming knowledge on, but found hundreds of projects.
Each application we use at work needs to silently install and configure. For the most part I use Windows Command shell; that’s the Command Prompt if you are on Windows. You can do a lot. Many application installers accept silent install commands. Sometimes I can configure them using additional parameters and arguments, but sometimes I have to copy files or edit the Registry. All of this can be done using Command batch files. This is scripting, another computer language type.
As I needed to do more advance stuff, I learned PowerShell. Command shell is great for basic stuff like copying and deleting files, but PowerShell can do so much more. Microsoft has a ton of modules available through .NET framework.
Creating scripts for work was fun, and it started bleeding into my personal life. I wanted to do more. I could not think of anything to do, so I decided to test myself. I worked my way through Project Euler problems. I used PowerShell, and it was going great.
The “Poker hands” problem really energized me. I used PowerShell to find out how many hands Player 1 won out of 1000 hands. My script worked, but I noticed something; it took awhile to run. I created a second script that generated a million hands; it took almost an hour to run.
I thought about how I could be more efficient. I started playing with Java, but my syntax knowledge had waned since college. Also, I found it clunky, because I had to compile an entire project in order run and test it. I turned to a new-to-me language: Python.
Python has very simple and easy to read syntax. Scripts made in Python do not need to be compiled. Just download Python, use any text editor to write your script (I use Notepad++), and then execute the script. I learned Python by cloning my “Poker hands” PowerShell script. The Python script worked, and it was fast! It only took a few minutes to run.
I got stuck on Project Euler, because I am not good at coming up with math based algorithms. I wanted to do something a little more coding centric. I found Code Abby. I used Python to solve 61 problems, and I had a blast! The problems got me thinking, and I came up with my own uses for Python.
I stopped looking at repetitive tasks as boring. Instead, I looked at them as a problem scripting could solve. Every week I load all of my credit card and banking statements into a monthly spreadsheet. It is so I can see how much I spent vs. how much I earned. It takes a while to manually copy that information. Now, I use PowerShell. It loads up csv files from my statements, and spits it out into whatever format I tell it to use.
I use Python scripts for a lot of things. The stats for my annual “Games of” posts come together using a script. Also, I used Python to grab all of the posts from Roy’s Ruckus, so I could make some format changes, and upload it here. I wrote another script to backup my WordPress posts into HTML files just in case something happens to the database. It also downloads all of the images, and their file structure.
Recently, I wrote a script to grab word counts from all of my posts. I do not know what I am going to do with the data. It is interesting to see the average word count start at 300 to 600 words in the early years of Ruckus, ramp up to 900 and 1200 words in my older archives, and a couple thousand words now.
I love computer languages. They provide me a creative outlet I did not know existed when I was young. I encourage everyone to learn a computer language. There are a ton of free and paid resources to learn, but I suggest thinking about what you want to do. Maybe you want to present data using a markup language like HTML. Maybe you want to gather and format data using a scripting or programming language like Java or Python. Having a goal will help you focus and find a resource that fits your needs.