Programming in History 396 was not my first time coding or using Python. Before taking History 396, I had taken a couple of introductory Computer Science classes. These classes focused on using both Python 2 and 3, and in them, I learned everything from the definition of an algorithm to how to create a basic relational database. After having taken these classes, I feel quite confident using Python.
For the most part, the Programming Historian lessons were more of a review for me than a new learning experience; I was quite familiar with the various commands and concepts. One aspect of the Programming Historian lessons that was new to me, however, was using Python to publish text to the web. In my previous Computer Science classes, the lessons mainly focused on how to use Python within the programming environment; the lessons were designed to help students master Python commands and logical ways of coding. Because the Programming Historian lessons are meant to show potential coders how coding can be used in tandem with research methodologies, the focus and result of the lessons were a little different. The Programming Historian lessons emphasized how coding can be used interdependently with online resources. For instance, the lessons mainly focused on data that had to be retrieved from The Old Bailey Online website.
One of the first lessons in the Python series involved downloading webpages. Here, I learned how to save a local copy of the data from The Old Bailey Online as well as how to whittle down the downloaded data to just the essentials. Following the lessons, I then altered the data to be a list of words and then modified that list to exclude any special characters and ensure all letters were lowercase. The result was a list of words that could be used for analysis. Aside from downloading the webpages, I felt quite comfortable using Python. The methods used to create and sort the word lists were similar to assignments I had completed in previous Computer Science classes.
Another new concept was the idea of “pretty printing.” According to the Programming Historian, pretty printing is “the process of formatting output so that it can be easily read by human beings.” In the last lesson of the Python series, I used pretty printing to line up some keywords from my word list in one column, with the contextual words justified around the column. After creating a couple of code snippets, I ended up with something like the picture below. My code resulted in some pretty printing that looked almost identical to the example given in the Programming Historian lesson. However, I am quite certain that if I were given the same task without having access to the Programming Historian lessons, I would not be able to complete the task quite as successfully the second time around.
One difficulty I had with the Programming Historian lessons was just due to the sheer amount of windows I had to flip between while trying to complete my coding. In previous courses, where I coded and where the results of the code ran appeared in the same window. With these lessons, where I coded and where the results of the code appeared happened in separate windows. I also had to simultaneously refer to the Programming Historian lessons and open a new browser to see the results of my HTML code. I found this a little confusing, especially when I had a large number of Python files sitting around; it became difficult to remember which code was doing what.
As with the GIS technology in my previous post, I feel that if this were my first time using Python, I would have found it difficult to remember the various commands used in the lessons. The Programming Historian lessons provide a good guide and introduction to using Python. However, I have found that I am more likely to remember how a programming language works if I am forced to problem-solve and create my own code snippets. Because the Programming Historian provides the correct code and algorithms for its users, there is no real incentive to work through the problems without assistance. Thus, the readers of these lessons are liable to just copy and paste the code snippets in order to complete the lessons rather than study the code in order to gain a better understanding of how Python works.
The Programming Historian lessons were very useful in that they explained how simple coding can be used to assist historical research. However, I think to get a truly comprehensive understanding of Python, a person would have to take a couple classes dedicated to that programming language. The Programming Historian lessons are valuable tools to guide would-be coders, but if a person wanted to use Python to create their own code they would have to spend more time working through problems with less guidance and more self-directed learning. Ultimately, the Programming Historian lessons provided a good introduction to Python, as well as real-world examples of how basic coding can be used to assist online research.