Random Link ¯\_(ツ)_/¯ | ||
Oct 16, 2020 | » | 06. Version Control (Git)
4 min; updated Nov 27, 2024
Version Control Systems track changes to a folder and its contents in a series of snapshots. Each snapshot encapsulates the entire state of files/folders within a top-level directory. Git’s interface is a leaky abstraction. While the interface is at times ugly, its underlying design and ideas are beautiful. A bottom-up explanation of Git therefore makes more sense. The abstraction is leaky in the sense that to wield it effectively, the user must understand the underlying data model, e.... |
Feb 6, 2020 | » | 01. The Shell
4 min; updated Sep 18, 2022
Topic 1: The Shell. missing.csail.mit.edu . What is the Shell? At their very core, shells are all roughly the same: they allow you to run programs, give them input, and inspect their output in a semi-structured way. Potpourri of Shell Utilities and Programs We can find out which file is executed for a given program name using the which program, e.g. $ which python gives me /Users/dchege711/anaconda3/bin/python... |
Feb 11, 2020 | » | 02. Shell Tools
4 min; updated Sep 5, 2022
Topic 2: Shell Tools. missing.csail.mit.edu . Unlike other scripting programming languages, shell scripting is optimized for shell related tasks, e.g. reading from STDIN and saving results into files are primitives. At the cost of being painful on the eyes. Python scripts are way more readable (and cross-platform) than shell scripts. Pesky Whitespace foo = bar # Doesn't work because it's interpreted as calling the foo program with the args '=' and 'bar' foo=bar # Now that works!... |
Jul 2, 2022 | » | Debugging
7 min; updated Sep 5, 2022
Debugging 101 Definition? Debugging involves inspecting a program’s internal state. printf Debugging and Logging In printf debugging, one adds print statements and keeps iterating until enough information has been extracted. Using logging has several advantages over printf debugging: varying logging destinations (e.g. standard output, files, sockets, remote servers, etc.); severity levels (e.g. INFO, DEBUG, WARN, ERROR, &c) that support filtering of output; color-coding for readability. Terminals have varying levels of color support: plain color; ANSI escape codes (16 color codes with bold/italic and background); 256 color palette; 24-bit truecolor (“888” colors, aka 16 million, e.... |