Wednesday, October 15, 2014

My Ada Lovelace Day Moment

for my students who are learning to program this week


This is what a person who can program a computer looks likes

Portrait of Ada by British painter Margaret Sarah Carpenter (1836)


Yesterday was Ada Lovelace Day, an annual commemoration of the all too awesome yet long ignored woman now known as the first computer programmer.

While I admire Ada to no end, I don’t code unless I have to because I’d rather spend my time writing history.  Still there are times when you need to be code literate in order to get the history written.

I will, if possible, use almost anything to avoid programming.   Today I was trying to combine a bunch of historical sources that have been converted into .txt files.  I have the sources separated by item for use in Antconc, a concordancing software because to do a linguistics analysis I need to be able to identify not only who wrote the source, but which particular source the results I’m analyzing came from.  However to use in Wmatrix, a semantic tagging software, I need the historical sources all combined into one .txt   Because i have a Mac, generally I do this through Automator, which worked well for one set of sources, from Women and Social MovementsBlack Woman Suffragists Database, but not so well for the subset of documents I’d assembled from the History of Woman Suffrage (which took forever by the way. That is where the whole doing history not programming comes in).

A quick google search brought to me to this how-to page that explained how to combine .csv files from the command line.  Here is where basic code literacy saved me a ton of time.  I needed to be able to 

1. read code
2. understand file extensions
3. navigate from the command line

 to change the snippet of code to combine .txt files from four subfolders and then combine into one .txt file to use with wmatrix.   

If I couldn’t do this then I would have been stuck opening 96 separate files and cutting & pasting them all together.   Imagine how much history-writing time that would have eaten up!  And that is why I advise my humanities students, who are this week working on their own programming skills, that at minimum you have to be code literate.

UPDATE, in order to finish up more of the project I'm working on I needed to use a regular expression (know as a regex).  I hate writing regex, but again with a google search I was able to find a snippet already written, and change it to serve my needs.  In this care it wasn't a question of saving time, but rather making the historical analysis I wanted to perform possible. 


No comments:

Post a Comment