User Tools

Site Tools


journal:spring2020:chorton8:week4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

journal:spring2020:chorton8:week4 [2020/02/06 07:03]
127.0.0.1 external edit
journal:spring2020:chorton8:week4 [2020/02/12 23:59] (current)
chorton8 [MONTH Day, YEAR]
Line 1: Line 1:
 =====unix week4===== =====unix week4=====
 ---- ----
-====MONTH DayYEAR====+====02 122020====
  
-Filler text- your entry goes here; remove this line to receive full credit.+Ah, the first journal entry. Lovely.
  
 +=== Course Confusion/Procrastination ===
 +As someone who (almost religiously) promotes Linux, I feel I have taken a laid back approach to this course.
 +<blockquote>
 +Oh problem solving, well I've only been learning that for six years!
 +-My brain
 +</blockquote>
 +From this though, I have gotten behind in my Unix/Linux coursework. Sure, the projects are easy for me to do (manual pages are a great tool for me), and I really don't struggle with content itself, I'm rather struggling keeping track of the content. For example, I don't mind running commands like ''%% $ wcp unix wcp# %%'', but I don't remember to actually do it. Other things like sending emails is something I don't really need to do, since I understand what's going on. Heck, I'm sort of tutoring another student!
 +
 +
 +=== Linux Love Rant ===
 +I love using Linux. Just the power that the command line has and how through it everything is within reach is something I feel drawn to. With Windows, I feel detached from the actual computer, separated by the program Microsoft made with all it's different bits and bobs (things like Control Panel and the Registry). While Linux has it's quirks compared to Windows, everything is so much within our power. I use the example of the command ''%% rm -rf / %%'', which deletes your entire Linux partition (at minimum). 8 characters and a password is how powerful Linux is.
 +
 +Especially now that I'm learing C/C++, I feel even more tied to Linux. The fact that Linux is really GNU/Linux and how gcc works naturally on Linux (yes, I'm looking at you Windows and MinGW) hits home with me. I don't have to go through some complicated loop to get something that should be easy to develop. Need a program on Linux? Run ''%% make %%'' and ''%% sudo make install %%'', then you've got your program working! On Windows for something like C#, you have to have Visual Studio runtimes, .NET, and multiple other things that complicates everything.
 +
 +Linux seems down to the bare basics, and makes developing code a lot easier.
 +
 +=== Scripting ===
 +I'm not sure if this project was from this week or not, but I might as well report on it anyways. On the project pbx0 and pbx1, I made a "file tree" to show what files came from where. All the files that came from a single archive was displayed in a tree view. Here's the example from  pbx0:
 +<code>
 +start.html (gzip) -> lions.in.kenya.gz
 +\_ lions.in.kenya (ascii uuencoded)
 +  \_ not.in.norway (bzip2) -> not.in.norway.bz2
 +    \_ canyon.mid (zip) -> canyon.zip
 +     |\_ data.file.1 (ascii file reversed and unsorted)
 +     \_ sol.exe (cpio) -> sol.cpio
 +     | \_ data.file.2 (use `cat`, `tr -d z`, and `sort -n`)
 +     \_ subnet.pka (uuencoded ascii)
 +       \_ data.file.0 (unsorted file without read permissions)
 +</code>
 +
 +I wanted to make something like this, but with Bash. While Bash is super nice, it isn't object oriented which I'm not quite used to. I'm used to running ''%% split() %%'' on a string to get multiple parts out of it. Bash is a little different, but conceptually works in a similar way. It's hard to get used to. Either way, I was able to somewhat abuse Bash arrays and sed to manipulate the output of ls -R and generate a file tree. It isn't the best and still has quirks, but I like it for how simple it is. Here is an example output from my Mercurial repo:
 +<code>
 +├┬ .
 +├┬ unix
 +│├┬ adm0
 +││├┬ archives
 +││├┬ extracted
 +││├┬ output
 +│├┬ classFiles
 +│├┬ pbx0
 +│├┬ pbx1
 +│├┬ pct1
 +│├┬ pct2
 +│├┬ pct3
 +│├┬ uxi0
 +</code>
 +Granted, it doesn't show files at the moment, but it still is a basis I can improve on at some point.
 +
 +=== Vim ===
 +One question I have is the origin of the name vim. I know vim stands for Vi IMproved, but where does vi come from? I was going to ask this question in class, but perhaps it will forever be a mystery...
 +
 +I have used vim before, and actually switched once I learned that it's not that bad. There are a lot of memes in the programming community about vim, like this one for example: {{https://i.redd.it/ub24f6yxevj01.png}}. I need to get a lot more comfortable with vim, but I enjoy knowing more of how it works now!
journal/spring2020/chorton8/week4.txt · Last modified: 2020/02/12 23:59 by chorton8