2022 Blog Archive (2022)
Does Audting Courses at CarletonU Fullfill Required Course Load?
November 20, 2022
tldr: Auditing courses does not fullfill 4 courses per semester requirement for co-op and for student health insurance Auditing courses is a formal registration to participate in a course without being required to submit coursework nor write the final exams. However, this is not free and requires students to pay the same cost as any other course. The question one may ask is why? Auditing courses allows one to learn and gain full access to the course materials and resources as any other registered student. One could ask the instructor to informally audit a course but that is a different...Debugging Symbols - A Basic Look at Separating Debug Symbols
October 31, 2022
As a note to myself, I would like to explore how to generate a symbols file but ship to the customer a stripped binary lacking of any debugging symbols but still be able to debug customer’s issue. When compiling, developers can enable a debug flag to generate debug information in the binary. Debug information is generated by the compiler or assembler to produce information that is useful to debuggers such as GDB and retains symbol names (such as variable and function names) in the binary. While I am not too familiar with what sorts of data is stored in the...Shellbang Character limit
October 4, 2022
A short blog, more like a note to myself about the character limit on shebang. Shebang in the UNIX-like world is the characters #! at the beginning of a script to indicate the interpreter’s path. tldr: character limit is 256 on modern Linux systems including the shebang specified by BINPRM_BUF_SIZE TOC: Introduction Introduction - What is a Shebang A script is essentially a textfile that is useless without a program to interpret the commands. Unlike a program where there exists either a static or dynamic program loader, a script is “interpreted” line by line by a program called the interpreter...Testing GithubPages Repo and Directory Conflict Resolution
September 4, 2022
A question arosed in my head when I was answering some questions about Github Pages to a student. What happens when you have a github page that corresponds to your Github name that contains a directory with the same name as another repository on your account. To elaborate, all Github pages on your account is a directory under a domain name reserved for each account which follows the following pattern: <username>.github.io So the domain name reserved for my github account is https://zakuarbor.github.io. Every repository including this blog is treated as a spearate directory under that domain name. For instance, I...PHYS1004 - A Review on Introductory Electromagnetism and Wave Motion
August 30, 2022
TLDR: Be comfortable with Math Labs take a lot of effort and time Professor: Mustafa Bahran Lab Supervisor: Maria Paula Rozo Martinez and Jesse Lock Course Delivery: In-Person Class Size: About 80 students Semester: Summer Description: This calculus-based course introduces potential energy, work, electricity, magnetism, oscillations and waves. The cover of the Manga Guide to Electricity. I should read this one day as I know it's somewhere in my brother's room Note: Please feel free to submit a bug report (link is above, just below the title) about anything incorrect what I am saying. I will admit I do not...MATH2107 - Linear Algebra II
August 25, 2022
This is a course review of MATH2107 - Linear Algebra II taken at CarletonU in the summer of 2022. The course took a “reverse-style” classroom teaching where the lectures were pre-recorded and students were expected (but was optional) to attend lectures to solve problems relating to the lectures. The tutorials were also in-person. The review will be split into two main sections, a long commentary about what the course is about and a section dedicated to reviewing and discussing the organization of the course and how I studied for the course. last major edit: 2022-11-29 TLDR: Less theoretical compared to...Document Feeder and PDF Utilities - How to Scan Big Documents with the help of Document Feeder and PDF Utilities
August 23, 2022
When the semester ends I often scan my notes but it has always been a huge pain to scan large amounts of papers. A few months ago my brother was telling me how he scan his old notes and introduced me to the document feeder where you can place your notes into the feeder and all the pages will be scanned automatically. This amazed me because I’ve been painstakingly scanning each page individually, scanning the same paper twice but on a different face (side). An illustration how to use an automatic document feeder (ADF). Adapted from Epson However, there is...Rust - Invoking Closures in a Struct
June 28, 2022
Closures are very neat and are similar to Javascript’s arrow functions or anonymous functions in other languages. The neat thing about closures is the ability to capture the environment or take a snapshot of the state of the environment within its scope (i.e. the environment outside the closure but within the scope it is defined in). let x: i32 = 5; let foo = || x; println!("value of foo is {}", foo()); //prints 5 Caption: An example of a closure where the value of x is captured in the closure so the value of x does not need to be...CarletonU QNX License Request Policy
June 17, 2022
tldr: licenses will only be distributed for the use in the classroom or faculty-led research As I got no research done on anything technical, I thought for this month I would go over CarletonU’s QNX license request policy for those who are studying at CarletonU. As some may know, Blackberry QNX in 2021 started some research initiative that gives CarletonU access to multi-year QNX licenses for education. The Research Computing Services (RCS) at CarletonU is responsible for distributing the licenses to classes and to researchers alike. Being a student at CarletonU, I was curious if I could obtain a QNX...Rust - Exploring the Assembly Code between Mutable and Shadow Variables
May 10, 2022
Recently I have started to learn Rust through a program called Summer of Rust led by a Computer Science student at Carleton University. While I had plans to explore C++ and assembly for the summer, I thought it would be a good time to learn Rust instead with a group of students since learning anything by yourself requires a lot of effort. A student asked in the Discord chat about what would be more efficient, using mutable variables or shadow variables. While the two have different purposes, it was an interesting question. Mutable variables allows a programmer to mutate the...GDB - Mix Source Code with Assembly
May 9, 2022
Have you ever wonder how to view the assembly code generated for the particular line of code written in C before? Perhaps you have used Compiler Explorer by Matt Godbolt to play around with the source code to examine the behavior that is occuring behind the scene. tldr disassemble /s allows you to view the generated assembly code for each line of C code (i.e. annotations) Do not enable TUI if you want to mix assembly with the source code. It doesn't seem to work as it splits the assembly and source code into two separate windows GDB is a...MATH2052 - Calculus and Introductory Analysis II
April 30, 2022
This is a course review of MATH2052 - Calculus and Introductory Analysis II taken at CarletonU in the winter of 2022. The lectures were asynchronous prerecorded lectures with online synchronous tutorials that were recorded. There was one in-person tutorial open to students who were both comfortable and available to travel to the University. Note: The course was taken in 2022 during the pandemic so my experiences may be unique TLDR: Less theoretical compared to MATH1052 Assignments heavily depend on the tutorial that is held 2 days before it’s due Covers integrals, sequences and series more in-depth compared to normal/regular Calculus...QNX - An Introduction to Adaptive Partitioning Scheduler and How to Bankrupt Partitions
April 17, 2022
In preparation for my presentation on QNX APS (Adaptive Partitioning Scheduler), I decided to write a blog that goes through what partitions are, how to control resources in QNX, and what APS are. Though a lot of the information is just based on the QNX documentation all put into one page but with examples and referencing other publically available resources (i.e. foundary27, papers, blogs, and what I found from playing around with APS). This page will not go through how to use APS through the Momentics IDE nor will it cover the various C API’s to configure the partition. There’s...QNX - The Search for the Release Notes
April 1, 2022
Looking at QNX for the past 3 months has been enjoyable for the most part. But the thing that annoys me the most is the difficulty of finding the release notes for each QNX SDP. While I do have some internal access to a document that links to all the QNX release notes at work, I found it annoying how it cannot be easily obtained through a google search. (imagine if web search and web indexing services did not exist, the internet would be unnavigatable). So I decided to spend about 30 minutes to see whether or not if I...recvfrom - Obtaining the Return Address
March 26, 2022
Have you ever wondered how to obtain the IP address from a client when working on a socket application? That is what recvfrom() API comes in handy. tldr recvfrom() requires src_addr and addrlen to not be null and addrlen to be initialized with the size of `struct sockaddr` From my limited experience with sockets, I have always used the read() API to receive messages from the client or server. However, there are various methods to read messages from a socket such as recv() and recvfrom(). The manpages provide an excellent summary of the differences between read() and recv(): The only...Ducky One 2 Mini - Replace Caps Lock as Function Key
February 21, 2022
Last month I got interested trying out a 60% keyboard which is a keyboard that does not have a numpad, Function keys, navigation keys (i.e. page up), and arrow keys. During my research, I found the Ducky One 2 Mini is one of the two best 60% keyboard for Linux users. To utilize the stripped out keys such as the arrow keys, users need to press the function key which is inconveniently on the right side of the keyboard. This makes it extremely uncomfortable to use the arrow keys (ijkl keys) which I use very frequently when I write. Proposed...Dev Blog - Bufferoverflow
February 12, 2022
Being bored and not wanting to study, I randomly checked up my Github repo and realized the static analyzer flagged a critical vulnerability in my code. For those of you not familiar with static analyzer, it is a security tool that reviews/analyzes code to determine if there are any obvious security vulnerabilities in your code. On Github, there is a pipeline workflow feature that allows you to execute specific scripts/actions for any code changes you push called Github Actions. Github has made it convenient to setup security analysis on your repo. The static analyzer I am using is called CodeQL,...How to Check if an Application is PAM-Aware
February 6, 2022
PAM stands for Pluggable Authentication Module and its purpose from my understanding is to separate application developers from writing an authentication scheme into their program. Think of it as an authentication “API” for “privilege granting” applications but is flexible how each application authenticates the user. System administrators are given the control and decision to how each application authenticates a user by modifying PAM configs (policies) that could be found in locations such as /etc/pam.d (location may vary depending on the OS). intended that an application treat the functions documented here as a ‘black box’ that will deal with all aspects...You shall not slay the client
January 31, 2022
Recently, I got the opportunity to attend a two-week-long training in Real-Time Programming For QNX Neutrino RTOS where I am learning the ins and outs of QNX, a real-time microkernel operating system that is a UNIX-like OS. On one of the demos, the trainer showed us a behavior that I thought was impossible. This shook the foundation of my understanding of IPC (Inter-Process Communication) and on signals. However, this is a feature in QNX that does not exist on Linux from my understanding. The demonstration involved a client and server communicating with each other. Nothing out of the ordinary with...PHYS1001 - A Review on Foundations of Physics 1
January 1, 2022
TLDR: Intimidating at first especially to freshman students new to the University Prepared for a lot of Derivations Be comfortable with Math Labs take a lot of effort and time Do not take Monday 8am labs Professor: Jesse Heilman Lab Supervisor: Igor Ivanovic Course Delivery: Hybrid lectures (i.e. can join on Zoom if you cannot come) Tutorials and labs are in-person Class Size: Less than 50 students Description: In this course, you will go over Classical Mechanics (also called Newtonian Physics) covering topics such as kinematics, dynamics, energy, and oscillatory motion. This is a calculus-based course is intended for students...MATH1152 - Introductory Algebra 1
January 1, 2022
TLDR: Intimidating at first when learning about fields Easier than MATH1052 Remember Non-singularity Theorem Professor: Brandon Fodden Course Delivery: Asynchronous lectures with sync quizzes Class Size: Less than 90 students Description: The course begins with modular arithmetic and fields before teaching concepts in linear algebra such as solving linear systems, linear dependence, spanning sets, subspaces and linear transformations. It’s a more proof and theory based linear algebra course. A snippet from the Manga Guide to Linear Algebra. I never read it so I don't know how good it is. Review: Note: The course was taken in 2021 during the pandemic...MATH1052 - Calculus and Introductory Analysis 1
January 1, 2022
TLDR: Intimidating at first when learning about fields More difficult than MATH1152 Know your delta-epsilon proofs and other definitions to prove whether a sequence or function converge Professor: Charles Starling Course Delivery: Asynchronous lectures with quizzes that have a 24-hour window Class Size: Less than 75 students Description: The course begins with fields, how to find the max and min from a set (along with finding the supremum and infimum of a set), the archimedean property, the denseness of $\mathbb{Q}$. Then the course covers sequences and how to find the limits for sequences and the limit laws for sequences (including...