Advice to HS Students Interested in Pursuing CS

In today鈥檚 digital age, computer science has become an increasingly essential field with numerous opportunities for career growth and innovation. High school students who are passionate about technology and interested in pursuing a degree in computer science can benefit greatly from proper preparation and guidance. In this blog post, I鈥檒l provide advice and insights for high school students interested in pursuing a degree in computer science. By following these guidelines, you can set yourself up for success and achieve your goals in this exciting and dynamic field....

May 2, 2023 路 7 min 路 Jeremie Bornais (with help from ChatGPT 馃槑)

Introduction to Classes, Structs, and Objects in C++

If you鈥檙e familiar with programming in C++, you鈥檝e likely heard of classes, structs, and objects. These concepts are at the core of object-oriented programming and are essential for creating efficient, reusable, and modular code. In this article, we鈥檒l take a closer look at what classes, structs, and objects are, how they work, and provide examples to illustrate their use in C++. Classes and Structs A class is a user-defined data type that encapsulates data and functions together into a single entity....

March 21, 2023 路 11 min 路 Jeremie Bornais (with help from ChatGPT 馃槑)

Tiny Language Grammar (COMP-2140)

The following is a copy of the official definition of the Tiny programming language used in COMP-2140 at the University of Windsor, as first defined by Dr. Lu here. The Lexicon of the Tiny Language Keywords WRITE READ IF ELSE RETURN BEGIN END MAIN STRING INT REAL Single-character separators ; , ( ) Single-character operators + - * / Multi-character operators := == != Identifiers An identifier consists of a letter followed by any number of letters or digits The following are examples of identifiers: x, x2, xx2, x2x, End, END2 Note that End is an identifier while END is a keyword The following are not identifiers: F, WRITE, READ, ....

March 2, 2023 路 3 min 路 Jeremie Bornais

Transposing a 2D List in Python

Transposing a 2-dimensional list in Python is especially useful when reading data that鈥檚 formatted similar to this: X Y Z 1 2 9 2 5 6 3 6 5 ... Usually, you鈥檒l parse the input line by line and end up with an array that looks something like this: >>> print(data) [[1, 2, 9], [2, 5, 6], [3, 6, 5], ...] This usually isn鈥檛 useful though, as we normally want the x, y, and z values grouped together....

February 8, 2023 路 1 min 路 Jeremie Bornais

Converting CRLF Line Endings to LF in Linux

Dealing with CRLF can be extremely annoying on Linux, as it can cause errors when attempting to execute scripts or compile files. It is especially problematic when working with text files that were created on Windows, as they are formatted differently than Linux. Fortunately, there are easy ways to fix this issue. Traditionally, this has been done by using the dos2unix command, which can quickly and easily convert Windows-formatted text files to Linux-formatted ones, allowing you to avoid the headache of dealing with CRLF....

February 7, 2023 路 2 min 路 Jeremie Bornais

Getting Started and Working With XV6

Introduction XV6 is a re-implementation of the Unix operating system that was developed as a teaching tool for MIT鈥檚 operating systems course. It is based on the original Unix operating system, which was developed in the 1970s at Bell Labs. XV6 is written in C and runs on x86-based computers. In the upcoming semester, I will be taking the Operating Systems course COMP-3300 at the University of Windsor, where we鈥檒l be working with XV6....

December 27, 2022 路 4 min 路 Jeremie Bornais

COMP-2310 Formula Cheatsheet

Contained here are the main equivalences and inference rules for the COMP-2310 class at UWindsor. Equivalences E1. \( \alpha \land \sim \alpha \equiv false \) E2. \( \alpha \lor \sim \alpha \equiv true \) E3. \( \alpha \land \alpha \equiv \alpha \) E4. \( \alpha \lor \alpha \equiv \alpha \) E5. \( \alpha \land true \equiv \alpha \) E6. \( \alpha \lor false \equiv \alpha \) E7. \( \alpha \land false \equiv false \)...

September 4, 2022 路 3 min 路 Jeremie Bornais

How to Disable the Bell in Windows Terminal

If you鈥檙e someone who uses Windows Terminal (and if you鈥檙e not, you should be), you鈥檝e probably encountered an annoying bell sound at one point or another. Whether it鈥檚 from hitting backspace too many times, or pressing tab when you shouldn鈥檛 have, this bell sound shows itself just often enough for it to be worth going through the steps to remove it. Luckily, it鈥檚 a very straightforward process to disable the sound....

August 14, 2022 路 1 min 路 Jeremie Bornais

How to Add a Directory to the PATH Variable in Bash

If you ever wanted to install something from source, or create handy scripts to use anywhere in bash, you鈥檒l need to update the PATH variable. Simply put, the PATH variable is a string consisting of colon-separated (:) directories. Whenever you type a command into the terminal, all of these directories are checked for executables that match the command you typed. Now, let鈥檚 say we have a directory we created, ~/.bin/ which contains our homemade scripts/executables....

June 14, 2022 路 1 min 路 Jeremie Bornais

How to Enable Mouse Support in Tmux

While I wouldn鈥檛 necessarily recommend using the mouse too often when using Tmux, it鈥檚 likely that you may want it to be enabled at some point, so it may be better to enable it before you need it. The process is simple, you simply need a config file .tmux.conf in your home directory which contains the text set -g mouse on. You can do this automatically with the following command:...

June 13, 2022 路 1 min 路 Jeremie Bornais

Becoming a UWSA-Ratified Club

(note: this article is meant for UWindsor students. If you aren鈥檛 a UWindsor student you may want to skip this one) Just want the instructions? Head over to the instructions section. Why You Should Become a UWSA Ratified Club There are many reasons why you should consider becoming a UWSA ratified club. Whether you鈥檙e starting a new club or thinking of taking your existing club to the next level, becoming UWSA ratified may be incredibly useful!...

April 18, 2022 路 4 min 路 Jeremie Bornais

Instructions to Install Java Cup on Linux

Just want all the commands? Check them out here Or, run this one command to do everything: curl -o- https://blog.bornais.ca/scripts/javacup-install.sh | bash Prerequesite Software These instructions are for Linux machines. If you鈥檙e a Windows user, I recommend using the Windows Subsystem for Linux (WSL). The only prerequesite software required is Java. If you鈥檙e on a Debian-based system and don鈥檛 have Java installed, you can install it via sudo apt install default-jre and sudo apt install default-jdk....

April 17, 2022 路 2 min 路 Jeremie Bornais

Instructions to Install JLex on Linux

Want all the instructions in one code block without the explanations? Check out the appendix. Before Starting Prerequesite Software These instructions are for Linux machines. If you鈥檙e a Windows user, I recommend using the Windows Subsystem for Linux (WSL). The only prerequesite software required is Java. If you鈥檙e on a Debian-based system and don鈥檛 have Java installed, you can install it via sudo apt install default-jre and sudo apt install default-jdk....

April 16, 2022 路 2 min 路 Jeremie Bornais

Welcome to My Blog!

I鈥檝e wanted to create my own blog for a little while now, but finding the motivation to actually get it set up was always difficult. What tipped the scale for me was when I realized I could use a blog like this instead of GitHub Gists to post my guides/tutorials. I鈥檝e used gists in the past to create guides for my students as a TA, and they鈥檝e always worked well for that....

April 13, 2022 路 1 min 路 Jeremie Bornais