This short course has covered the fundamentals
In the previous lessons you have first learned meta-skills around Python programming:
You have also learned the basics necessary to understand how Python works:
This course has covered the following fundamental programming skills:
Finally, you have written two small programs:
All of these skills are transferable and extendable beyond the bounds of this lesson. They give you a foundation not just for working in Python, but for thinking code can address research problems in different Humanities research and teaching areas.
You are possibly wondering what you can actually accomplish now, and what trajectories your learning can potentially take going forward. At this level you should be able to:
So what is the next appropriate step? That is dependent upon your goals. If the exercises in this course make sense to you, you are ready for an intermediate level course. If all you need to know how to do is basic file handling, then you will only need to research some extra commands that we did not have the space to cover in this course, but the syntax should not be confusing. If you want to begin rightaway with a field-specific module you have found, you are certainly equipped with the basics.
Let’s take each of these paths in turn.
There are many, many Python courses online. Some are free, and some are expensive. One thing that the vast majority have in common is that they tend to be geared toward STEM scientists, rather than researchers in the Humanities. Since this introductory course was tailored for Humanities researchers, you have had the benefit of becoming acquainted with Python without this STEM overlay. However, going forward you may have to learn to work with a STEM overlay in intermediate and advanced courses in order to get the skills necessary to make full use of the many Python modules that have been developed for Humanities research. One way to make this easier is to approach those classes with the goal of always drawing any concept or application back to your own familiar research context. Ultimately, do not be discouraged; once you have the basics down, gaining further skills is less of a learning curve in coding.
Another possibility is that you need to do some other more hardcore data analytics. In that case, you are encouraged to take the Introduction to R course which this Cookbook hosts as well. R is a programming language designed specifically for statistics, and has some very powerful packages for data analysis, machine learning, and visualisation – some even better than Python.
We covered some fundamental file handling commands:
However, this was all dealing with the most basic kind of .txt file. Next steps would be to identify the file types with which you need to work, and go read up on Python modules that create and save files as those file types. pypdf is one such one for PDF files.
If you have a particular module that you want to use, you can now try reading the documentation in more depth. The best place to start is to go to the module’s GitHub repository (if one exists, though it’s unusual for one not to exist). First, look at the README file. These give essential details about the software and how to use it. You can also search online for the module name and potentially find tutorials and .io websites that give more step-by-step information.
As you progress along your journey of learning to code, it is inevitable that you will get stuck. You will feel like a task is impossible, or a problem is unsolvable. Those who progress utilise a few strategies when this happens:
Regardless, do not be discouraged when you hit roadblocks. They are inevitable, and part of the coding learning process. Be encouraged that you are not alone; someone else has encountered the same error messages you have, otherwise, the error messages would not exist to begin with!
This Cookbook is meant to link a wide variety of methods using programming languages such as R and Python. If you want to continue learning coding methods for Humanities research, this Cookbook is constantly growing with new methods that world-class researchers have developed and taught. Working through these lessons will sharpen and extend your newfound skilset.
Written by Estara Arrant, 2025-04-16
Licence: CC BY-SA 4.0