Assignment Learning Outcomes
Ensure you feel you have learned all that is expected from each assignment. The learning outcomes listed below should help focus your review.
A0: Linux Terminal
Expand for learning outcomes...
- Able to correctly apply the following Linux ideas and commands to operate in the terminal:
ls
; know arguments like-l
,-a
- Paths: relative and absolute,
pwd
,cd
,~
,.
and..
- Hidden files (
.
at start of filename);file
man
, and search inside man page with\<search-term>
,n
for next,q
to quit.mkdir
,rmdir
touch
,cp
,mv
,rm
/rm -r
cat
,less
- Terminal Wildcards:
*
,?
,[sv]*
- File permissions: owner, group, others; r,w,x;
chmod
.- Don't need to memorize permission shorthand (octal or binary).
head
,tail
; know arguments likehead -10
ortail -5 myfile.txt
sort
,nl
,wc
(with arguments-l
,-w
,-m
)top
,ps
,kill
sleep
,fg
- Understand regular expressions
egrep
.
,[abc]
,[^abc]
,[a-z]
,^
,$
[a-z]{2}
+
,*
,{n}
- Able to use piping and redirecting:
- stdin (0), stout (1), stderr (2)
>
,>>
,<
,2>
|
- Understand basic
git
workflow including the purpose of the following commands:git clone
git add
git commit
git push
A1: NeoVim
Expand for learning outcomes...
Know NeoVim ideas and commands including:
nvim <filename>
- Command mode vs insert (entry) mode; how to transition between them.
- Know which is the default mode you should be in most of the time you are working with code.
- Save/Quit:
:w
,:q
,:wq
,:q!
- Navigate:
j
,k
,h
,l
,^
,$
,w
,b
,{
,}
- Deleting Content:
dd
,x
,dw
,d5w
- Undo/Redo:
u
,ctrl+r
,U
- Inserting text:
i
,A
,a
,o
,O
- Visual/Yank/Put:
v
,y
,p
,P
A2: Bash Scripting
Expand for learning outcomes...
Able to read, write, and understand bash scripts featuring:
- Shebang (
#!/bin/bash
) - Comments
- Command line arguments (
$#
,$0
,$1
,$2
, ...) - Variables:
$RANDOM
,myvar=51
,$myvar
,read varname
grep "hi[a-z]\{10\}"
v=$( ls | wc )
echo
cat /dev/stdin | sort
- Math:
let "a = 5 + 4"
,let a++
,b=$(( 5 + 4 ))
,((i++))
, `c=$(( count % 2 == 0)) - Branching and Logic:
if [ $a -gt 100 ]
,then
,fi
else
;elif
;&&
,||
- Tests:
-n
,=
,-eq
,-gt
,-lt
- Loops:
while [...]
,do
,done
for myvar in <list>
,do
,done
for i in {1..5}
, orfor ((num = 1; num <= 5; num++))
break
,continue
A3: Compilation
Expand for learning outcomes...
- Know what happen (generally) during pre-processing, compiling, and linking steps.
- How to use
clang
to:- Compile a single .c file
- Compile multiple .c files and .h files.
- Generate object files (
-o
). - Link multiple object files into an executable.
- Understand static libraries vs shared libraries.
- Know what a shared library's name means, like
libpthread.so.0
. - Know how to use
ar
to generate an archive. - Know the
-l
and-L
arguments toclang
. - Know the
LD_LIBRARY_PATH
environment variable.
- Know what a shared library's name means, like
- Understand the following compiler options:
-I
,-g
,-Wall
,-Werror
,-Weverything
,-Wextra
,-fsanitize=...
,-O1
,-O2
,-O3
A4: Make & CMake
Expand for learning outcomes...
Know the following about build systems:
- Purpose of a modern build system.
- Make
- Know how to create a Makefile including using targets, prerequisites,
- Understand and able to write
make clean
, andmake all
- Use variables
x := myfile.c
,echo ${x}
- Able to use wildcards
*
and%
- Know about the implicit rules, but don't have to memorize them.
- CMake
- Know the process for how CMake fits into build system with Make.
- Know the 3 required components of a CMakeLists.txt, and how to use each.
- Know the role of
build/
, and commands to build in this folder (both from insidebuild/
, and from inside the project root directory). - Understand
include_directories(...)
andfile(GLOB SOURCES "src/*.c")
A5: Debugging Tools
Expand for learning outcomes...
- Logging
- Know the purpose of log statements.
- Understand how to use
log.c
logging library (you don't have to memorize it, but if provided, you should be able to use it).
- Assertions
- Know the purpose of
assert
statement with regard to verifying preconditions and postconditions. - Able to write C code using
assert
.
- Know the purpose of
- Static Checkers & Sanitizers
- Know the difference between static and dynamic checkers.
- Know the purpose of a linter and a sanitizer.
- Understand how to enable Clang's sanitizers.
- Fuzzers
- Know the purpose of using a fuzzer.
- Understand how to use LibFuzzer (but not memorized).
- Debuggers
- Know the purpose of a debugger.
- Know how to use
cgdb
, including:- Compiling with debug information (
-g
) - Set breakpoint with
break <...>
- Run/step:
run
,step
,next
,continue
- View info:
print
,list
- Watchpoints:
watch <var>
quit
- Compiling with debug information (
A6: Memory Layout
Expand for learning outcomes...
- Know the memory layout table.
- Know what pointers store and how they operate.
- Know pointer arithmetic vs non-pointer arithmetic.
- Know pointers and arrays are interchangable; able to use them as such in C.
- Understand the text segment: what it contains, how we can read it.
- Understand
objdump
- Understand
- Understand Data and BSS segments: what they contain, how we can read them.
- Able to view addresses of variables in Data and BSS, and interpret layout.
- Know the difference between Data and BSS segments.
- Understand the stack segment
- Know how arrays and variables are laid out in memory.
- Understand how array access works and how out of bounds access works.
- Function calls
- Know how the stack grows and shrinks with stack frames from function calls.
- Know what goes into a stack frame.
- Understand what a stack buffer overflow attack is, and why we should never use
gets()
. - Understand purpose of
getrlimit()
.
A7: Memory Alignment
Expand for learning outcomes...
- Understand what happens when a user program accesses the kernel memory space.
- Know where shared libraries are loaded in memory.
- Know what
malloc()
,calloc()
,realloc()
, andfree()
do. - Know the use of pointers for dynamic memory allocation (using
malloc()
,free()
, etc.). - Know why the heap memory management is considered manual.
- Know how memory leak can occur, why it is a problem, and how to avoid it.
- Understand memory safety issues.
- Understand how raw bytes are represented in memory (endianness), and how different data types are represented in memory (e.g., int, float, double, char, struct).
- Understand the concept of memory alignment, padding, and packing.
A8: Shell
Expand for learning outcomes... (TBA)
- TBA
A9: Memory Manager
Expand for learning outcomes... (TBA)
- TBA
A10: Map Reduce
Expand for learning outcomes... (TBA)
- TBA
A11: Group Chat - Networking
Expand for learning outcomes... (TBA)
- TBA
A12: Blockchain
Expand for learning outcomes... (TBA)
- TBA