The University of Toronto’s Student Newspaper Since 1880

Share on facebook
Share on twitter
Share on email

How to learn to code LaTeX, Python, and R

Free resources from U of T, the internet
Share on facebook
Share on twitter
Share on email
Free, online resources are making it easier than ever to learn coding languages like Python. TAHMEED SHAFIQ/THE VARSITY
Free, online resources are making it easier than ever to learn coding languages like Python. TAHMEED SHAFIQ/THE VARSITY

Coding has become increasingly important in today’s digitized world. Programming languages encompass a broad spectrum of functions, such as data analysis, research, web design, and engineering. While their breadth and scope may seem intimidating, experience with even a few languages gives students a leg-up in the job market. 

A degree in computer science can help develop vital skills in problem-solving, logic, and flexibility, but there are also many free resources available for students to develop proficiency in the majority of programming languages. LaTex, Python, and R are three popular languages that are especially useful in research and university-level work. 


Free resources: Overleaf, Sublime Text, and VSCode.

LaTeX differs from other programming languages in the respect that, instead of coding applications or programs, it typesets scientific and technical documents. LaTeX is built on the principle that individual formatting wastes valuable time and often produces confusing, substandard manuscripts. 

Thus, LaTeX is encouraged in computer science, math, and physics courses to produce uniformly formatted documents, homework, and lab reports with complex equations, figures, and custom formatting. It is particularly important in mathematical and engineering research, which require clear, standardized representations. 

LaTeX may initially appear cumbersome and confusing to beginners. However, free online editors such as Overleaf can ease the learning process by providing manuscript templates and collaborative tools. Overleaf assists with formatting as the user types the document, so little prior knowledge of the language is required. Other editors include Sublime Text and VS Code. With these editors, students can learn how to format a document using LaTeX in only a few hours.


Free resources: Harvard CS50x on edX, “Learn to Program: The Fundamentals” on Coursera, and CodingBat.

Python is one of the most popular languages for beginning and experienced coders alike, offering relatively intuitive syntax, open-source libraries, and strong community support. The language is extremely flexible in its applications, but is especially important in data analysis and visualization, and is highly utilized in machine learning research. At U of T, Python is used as an mandatory introductory coding language to teach students the principles of computer science. 

The Harvard CS50x course offered for free on edX is a useful starting point for students who want to jump into programming. While it does not focus primarily on Python, it helps develop a foundational understanding of computer science as a whole and offers a surface-level experience of several different languages, including Scratch, C, and Swift. 

For a Python-specific option, U of T offers “Learn to Program: The Fundamentals” on Coursera, which introduces the fundamental building blocks of Python. Other free Python-exclusive resources include online textbooks — A Byte of Python, Automate the Boring Stuff with Python —  and YouTube video tutorial playlists “Python 3.4 Programming Tutorials,” “Python MIT Lectures,” and “Python for Absolute Beginners.” Sites such as CodingBat also walk students through writing simple programs. 

While the time it takes one to master the language is largely dependent on the student, mastering the basics takes roughly two months, depending on the pace of the introductory course, and creating complex independent projects can take several weeks to several months. 


Free resources: Swirl, “Learning Statistics with R,” and “Learning R” on LinkedIn Learning.

R is primarily used to develop statistical programs and perform data analysis. It is commonly used in research to find and analyze patterns in large and complex data sets, extract key information, and create data visualizations. Like Python, it is free and open-source software with strong community support. 

Users can also expand R functionalities by implementing packages that include advanced statistical programming. STA130 — An Introduction to Statistical Reasoning and Data Science is an introductory statistics course that uses R to teach statistical principles and reasoning. 

LinkedIn Learning is free for all U of T students and offers several courses on R, such as the popular “Learning R” course, which takes students through the statistical techniques R uses through lectures and examples. 

Learning Statistics with R” is a free online textbook that reviews the key statistical principles underlying the language and provides a strong foundation for new students. Finally, Swirl offers several interactive courses from beginner to advanced levels of R that turn the R console itself into a learning environment.