Week 15 Day 1 - Shell Scripting, Github
Today I coded live a solution for the hash table assignment, it took about an hour or so from start to finish. I used power of two sizes for my hash tables to avoid needing to do expensive modulus operations.
I then went over an example of shell scripting, covering things like backticks (``) which are a really need feature in UNIX shell scripting that allow you to run a command, and the result of the command is inserted *as code* in the shell script. Or you can just do something like vim `which compile` to edit the shell script named compile (which locates where a command is on the system).
I use TCSH instead of BASH just because it is easier on my brain (it is closer to C++ syntax). BASH is infinitely better from a technical perspective.
There's a lot of magic $ variables in UNIX shell scripting, I went over a number of those, as well as how $variables can be embedded in strings and UNIX shells will swap in the value of the variables into the string automatically, which is neat.
We talked about the difference between wall clock time and CPU time.
Finally we got to a topic I normally cover in 2nd semester computer science - how to use GitHub to coordinate with your partners. For this upcoming homework assignment, you will do exactly half a problem, compile it as a statically linked library, share it on Github with your partner, and they have to figure out what the hell you're doing. And vice versa.