Programming Languages

Sometimes researchers need to work with specific programming languages to connect with task operations on servers. As a foundational introduction, the two main languages are Python and R, described here, followed by commonly used softwares and tools, namely PyTorch and RStudio and Jupyter.

Python and R are two popular programming languages that help researchers work with data more efficiently and effectively. 

 

Python is a general-purpose language known for its simplicity and flexibility, making it ideal for tasks like analyzing text, automating repetitive work, or collecting data from the web.  

 

R was built specifically for statistical analysis and data visualization, making it a favourite among researchers working with surveys, experiments, or any kind of quantitative data. 

While both languages are powerful tools for modern research, Python is often seen as more beginner-friendly and versatile, while R shines in statistical and data-heavy projects. 


PyTorch is a powerful tool built on top of Python that helps computers learn from data, like how we as humans learn from experience. It's mainly used for machine learning and deep learning, which are ways to teach computers to recognize patterns, make decisions, or predict outcomes. 

While PyTorch is more technical, it's increasingly used in fields like digital humanities, linguistics, and media studies to explore new forms of research using AI.

Why Use PyTorch?

1. Approachable for Learners: PyTorch’s syntax is clean and intuitive, making it easier to learn than many other AI frameworks, but like many programming tools/software, some level of programming knowledge (especially in Python) would certainly help!

2. Highly Customizable: PyTorch allows researchers to fine-tune how their models learn and make decisions, which is helpful when working with complex, non-standard data like poetry, manuscripts, or oral histories.

3. Widely Used and Supported: PyTorch is a leading framework in AI research and has a strong community of users, meaning there are many tutorials and tools available to support new users.

PyTorch Use-Case Examples

1. Image Recognition: A basic example of image recognition is teaching a computer to tell if a photo is of a cat or a dog. In the case of the humanities, we could teach computers to detect recurring symbols in art, categorize styles (e.g. Romantic vs. Modernist), or identify similarities between visual artifacts in large archives.

2. Natural Language Processing (NLP): With PyTorch, you can build models that can analyze and interpret text. These models can help determine patterns such as detecting themes across literary works, classifying genres or authorship based on writing style, or extracting sentiment or emotional tone from historical letters or social media texts. These tasks use NLP tools built on PyTorch to understand language in a nuanced way.

3. Prediction Models: Given a set of data, we can make predictions based on what the model learned (e.g. predicting the price of a home based on its square foot, number of bedrooms, etc.); in the case of the arts, we could calculate answers to questions such as "which themes are likely to appear in novels of a given decade?" or  "how do certain topics in philosophy shift over time across translated texts?".

RStudio is a user-friendly desktop or web application where you can write and run R code. Think of it as Microsoft Word for R programming. It helps you write neatly, check your work, and run commands in an organized space. 

Similarly, JupyterHub is a shared web-based platform that lets you access Jupyter Notebooks, which are documents that combine live code (in Python or R), explanations, and visualizations in one place. JupyterHub allows many users (like students or researchers in a lab) to access the same server and work on their own notebook environments via the browser: no installation required. 

In short, RStudio and JupyterHub make working with Python and/or R more approachable, especially for researchers who don’t consider themselves programmers.  

Both tools are available through UBC ARC Sockeye, so researchers can use powerful computing resources for their work without needing a high-performance computer themselves. 


This guide was written and compiled by Justin Galimpin, directed by DiSA.  Last Updated: August 2025.