It's that time of year again!
-
Advanced Programming in the UNIX Environment
Week 4: The Unix Filesystem
In this video lecture, we begin a closer look at the Unix Filesystem (UFS). We visualize how the filesystem structures the disk and organizes files and directories. We illustrate how directory entries are created and moved around.
Advanced Programming in the UNIX Environment
Week 4: Links
In this video lecture, we'll take a look at the system calls used to create, remove, and rename both hard- and symbolic links. We'll compare expected output against trivial implementations of the ln(1) and mv(1) commands.
-
Advanced Programming in the UNIX Environment
Week 4: Links
In this video lecture, we'll take a look at the system calls used to create, remove, and rename both hard- and symbolic links. We'll compare expected output against trivial implementations of the ln(1) and mv(1) commands.
Advanced Programming in the UNIX Environment
Week 4: Directories
In this video lecture, we take a look at how directories are created and removed, as well as how to move around the filesystem hierarchy. We also learn why the 'cd' command must be a shell builtin in order to work.
-
Advanced Programming in the UNIX Environment
Week 4: Directories
In this video lecture, we take a look at how directories are created and removed, as well as how to move around the filesystem hierarchy. We also learn why the 'cd' command must be a shell builtin in order to work.
Advanced Programming in the UNIX Environment
Week 4: Directory Size
In this video lecture, we dive deep into the structure of the directory on a traditional Unix File System and see how its size is independent of the file sizes of its entries, but dependent on the filename lengths. We'll also use hexdump(1) to cheat a bit and look at the directory structure on disk.
-
Advanced Programming in the UNIX Environment
Week 4: Directory Size
In this video lecture, we dive deep into the structure of the directory on a traditional Unix File System and see how its size is independent of the file sizes of its entries, but dependent on the filename lengths. We'll also use hexdump(1) to cheat a bit and look at the directory structure on disk.
Advanced Programming in the UNIX Environment
Week 4: /etc/passwd
In this short video, we try to answer the awkward question "Mommy, where do UIDs come from?". We look at the /etc/passwd user database and identify the various fields before we look at how things can get weird.
-
Advanced Programming in the UNIX Environment
Week 4: /etc/passwd
In this short video, we try to answer the awkward question "Mommy, where do UIDs come from?". We look at the /etc/passwd user database and identify the various fields before we look at how things can get weird.
Advanced Programming in the UNIX Environment
Week 4: getpwuid(2) and /etc/groups
In this video lecture, we look at the library functions used to look up account information. We learn about how primary and supplementary groups are handled as well as how the hashed passwords are stored outside of the world readable /etc/passwd file.
-
Advanced Programming in the UNIX Environment
Week 4: getpwuid(2) and /etc/groups
In this video lecture, we look at the library functions used to look up account information. We learn about how primary and supplementary groups are handled as well as how the hashed passwords are stored outside of the world readable /etc/passwd file.
Advanced Programming in the UNIX Environment
Week 4: atime, mtime, ctime
In this video lecture, we start looking a little bit closer into what our systems think of "time", something that experts most accurately describe as a big ball of wibbly, wobbly, timey, wimey... stuff. In short, analyze how the atime, mtime, and ctimes of a file connect.
-
Advanced Programming in the UNIX Environment
Week 4: atime, mtime, ctime
In this video lecture, we start looking a little bit closer into what our systems think of "time", something that experts most accurately describe as a big ball of wibbly, wobbly, timey, wimey... stuff. In short, analyze how the atime, mtime, and ctimes of a file connect.
Advanced Programming in the UNIX Environment
Week 4: time(3) is an illusion
Having revisited the atime, mtime, and time in our last video segment, we now have to come to terms with time(3) itself. We'll discuss managing the data structures and handling arbitrary concepts such as leap seconds, timezones, and (ugh) Daylight Savings Time. It gets silly real quick.
-
Advanced Programming in the UNIX Environment
Week 4: time(3) is an illusion
Having revisited the atime, mtime, and time in our last video segment, we now have to come to terms with time(3) itself. We'll discuss managing the data structures and handling arbitrary concepts such as leap seconds, timezones, and (ugh) Daylight Savings Time. It gets silly real quick.
Related to our discussion of time(3), here's a deeper dive into the Unix epoch, its origins, and how the Y2K38 issue actually affects different unix systems well before the heat-death of the universe.
-
Related to our discussion of time(3), here's a deeper dive into the Unix epoch, its origins, and how the Y2K38 issue actually affects different unix systems well before the heat-death of the universe.
Advanced Programming in the Unix Environment
Week 5: The Unix Development Environment
This week, we cover the concept of the Unix userland as an Integrated Development Environment. This introduction outlines the different tools we will cover in subsequent videos, including the editor, the compiler chain, make(1), the debugger, and code revision and management tools. No vibe coding here.
-
Advanced Programming in the Unix Environment
Week 5: The Unix Development Environment
This week, we cover the concept of the Unix userland as an Integrated Development Environment. This introduction outlines the different tools we will cover in subsequent videos, including the editor, the compiler chain, make(1), the debugger, and code revision and management tools. No vibe coding here.
Advanced Programming in the Unix Environment
Week 5: The Editor
In this video lecture, we look at the required feature for a full-fledged programmer's editor and illustrate some of the core functionality by example of vim(1). This includes basic motion commands, setting and moving to markers, using folds, and the use of the ':make' and quick fix lists to address compiler errors efficiently.
(Don't worry, we'll talk about ed(1) later.)
-
Advanced Programming in the Unix Environment
Week 5: The Editor
In this video lecture, we look at the required feature for a full-fledged programmer's editor and illustrate some of the core functionality by example of vim(1). This includes basic motion commands, setting and moving to markers, using folds, and the use of the ':make' and quick fix lists to address compiler errors efficiently.
(Don't worry, we'll talk about ed(1) later.)
Advanced Programming in the Unix Environment
Week 5: The Compiler Chain, Part I
In this video lecture, we begin our discussion of compilers as part of the Unix programming environment. We provide a high-level overview of how compilers process input source code and turn it into an executable.
-
Advanced Programming in the Unix Environment
Week 5: The Compiler Chain, Part I
In this video lecture, we begin our discussion of compilers as part of the Unix programming environment. We provide a high-level overview of how compilers process input source code and turn it into an executable.
Advanced Programming in the Unix Environment
Week 5: The Compiler Chain, Part II
In this video lecture, we look at the preprocessing stage of the compiler and observe how it invokes the cpp(1) command to include header files or replace macro definitions in place.
-
Advanced Programming in the Unix Environment
Week 5: The Compiler Chain, Part II
In this video lecture, we look at the preprocessing stage of the compiler and observe how it invokes the cpp(1) command to include header files or replace macro definitions in place.
Advanced Programming in the Unix Environment
Week 5: The Compiler Chain, Part III
In this next-to-last part on the compiler chain, we look at the compilation proper and the optimization and assembly of the intermediate code into an object file. (We will revisit some of this when we take a closer look at shared libraries in week 11.)
-
Advanced Programming in the Unix Environment
Week 5: The Compiler Chain, Part III
In this next-to-last part on the compiler chain, we look at the compilation proper and the optimization and assembly of the intermediate code into an object file. (We will revisit some of this when we take a closer look at shared libraries in week 11.)
Advanced Programming in the Unix Environment
Week 5: The Compiler Chain, Part IV
In this video lecture, we conclude our discussion of the compiler chain, analyzing the last step in the process: linking the object files into the executable. We identify aspects of the C Runtime libraries as well as the standard C library that we need to include and cover a few of the most important flags to ld(1).
-
Advanced Programming in the Unix Environment
Week 5: The Compiler Chain, Part IV
In this video lecture, we conclude our discussion of the compiler chain, analyzing the last step in the process: linking the object files into the executable. We identify aspects of the C Runtime libraries as well as the standard C library that we need to include and cover a few of the most important flags to ld(1).
Advanced Programming in the Unix Environment
Week 5: make(1)
Moving on from the compiler, we now look at how the make(1) utility can be used to help us selectively build our code project.
-
Advanced Programming in the Unix Environment
Week 5: make(1)
Moving on from the compiler, we now look at how the make(1) utility can be used to help us selectively build our code project.
Advanced Programming in the Unix Environment
Week 5: Debugging your code
Next in our discussion of the Unix _development_ environment, we start a short series on the use of a debugger by example of gdb(1). First, we illustrate just why exactly we might want to use a separate tool instead of sprinkling "printf" statements all over our code...
-
Advanced Programming in the Unix Environment
Week 5: Debugging your code
Next in our discussion of the Unix _development_ environment, we start a short series on the use of a debugger by example of gdb(1). First, we illustrate just why exactly we might want to use a separate tool instead of sprinkling "printf" statements all over our code...
Advanced Programming in the Unix Environment
Week 5: Using gdb(1)
Alright, let's look at gdb(1)! We begin by using it to troubleshoot our failing programs and immediately identify the location of our program where it segfaults. We also see how to inspect variables and call functions from within the debugger.
-
Advanced Programming in the Unix Environment
Week 5: Using gdb(1)
Alright, let's look at gdb(1)! We begin by using it to troubleshoot our failing programs and immediately identify the location of our program where it segfaults. We also see how to inspect variables and call functions from within the debugger.
Advanced Programming in the Unix Environment
Week 5: Using gdb(1), part II
In this video lecture, we continue to explore the capabilities of the debugger. We show how you can set a breakpoint to pause the program and how to step through the program while watching our code.
-
Advanced Programming in the Unix Environment
Week 5: Using gdb(1), part II
In this video lecture, we continue to explore the capabilities of the debugger. We show how you can set a breakpoint to pause the program and how to step through the program while watching our code.
Advanced Programming in the Unix Environment
Week 5: Using gdb(1), part III
In this video lecture, we'll use our newly learned debugging skills to analyze and fix yet another flawed program. In the process, we learn to debug code from multiple source files and find out how to change the value of variables while the program is running.
-
Advanced Programming in the Unix Environment
Week 5: Using gdb(1), part III
In this video lecture, we'll use our newly learned debugging skills to analyze and fix yet another flawed program. In the process, we learn to debug code from multiple source files and find out how to change the value of variables while the program is running.
Advanced Programming in the Unix Environment
Week 5: Using gdb(1), part IV
In our last segment on gdb(1), we use the debugger to examine memory locations in a running program and illustrate how pointers and arrays work in the C programming language.