diff --git a/Summer-2024/CS-3424/Assignments/Assignment-1/README.org b/Summer-2024/CS-3424/Assignments/Assignment-1/README.org new file mode 100644 index 0000000..edb75fa --- /dev/null +++ b/Summer-2024/CS-3424/Assignments/Assignment-1/README.org @@ -0,0 +1,33 @@ +* Assignment 1 - CS 3424 + +Name: Price Hiller +ABC123: zfp106 +Course: CS 3424, Summer 2024 + +The source code for this assignment can be located at [[https://git.orion-technologies.io/Price/college/src/branch/Development/Summer-2024/CS-3424/Assignments/Assignment-1]] + +** Some Notes + +Many of these files are dependent on one another. For instance, the ~create.bash~ file actually +/doesn't/ have built-in capability to create anything on its own. You'll notice how bare bones it +is — this is because it is actually wrapping ~update.bash~ which handles creating and updating +files. You'll notice something similar going on with the ~enroll.bash~ script as well, which is just +wrapping ~update.bash~. + +To handle state across files, the ~read.bash~ script is using an associative array to store values +in a global for the current file context. Very ~C~ style. By reading out of this array we can +maintain better create/read/update management across the files. + +Likewise, you'll notice a distinct lack of ~echo~ command usage. I instead opt for ~printf~ which is +better practice and ~cat~ with =heredocs= to output into files. + +You'll also notice a ~err~ and ~log~ function that are used all over the place, with the intent +being that ~assign1.bash~ is the entry point for this program. Attempting to use any script in +isolation without ~assign1.bash~ will likely fail in unexpected ways. + +Another thing to note is at the top of each script I define ~set -eEuo pipefail~ which avoids all +sorts of pitfalls when bash scripting, like early exits on failure, failing pipelines, checking +unassigned variables, and more. + +Last thing, I do *not* use the ~source~ command, instead using the better POSIX standard ~.~ to +source the various scripts within the assignment.