Here are a couple of questions that I got from Willy:


Good questions, Willy:   

Firstly, as to your questions about the differences between vi and Word.  Well, firstly let's think about the ways in which these two software packages are similar.  They are both types of EDITORS, right?  (You use them to make changes to a file.)  They are both used to edit TEXT (in contrast to editing IMAGES or something like that.)  We could probably come up with other similarities -- like the tools they provide (search, for example).   

Now let's think about ways that vi and Word are different.  The vi editor edits only TEXT -- there is no ability to control things like fonts or embedded images or margins or anything like that in vi the way there is in Word.  Word is a GUI (Graphical User Interface) program, meaning that it interacts with the mouse, has buttons and icons and menus and so on, whereas vi does not -- vi only interacts with the keyboard.  You could probably think of more differences.   

As for your second question-- it's not entirely clear from your message which question you are talking about from the review sheet, but I think it is this one:  Suppose that you have a file in the current directory called test.data.  Suppose that your C program creates a new file for output and calls it “test2.data”.  Both test.data and test2.data are in the same directory.  Physically, on the computer’s hard drive, are these files close to each other?  How does the computer know where to find these files on the hard drive?   

If so, this is an interesting question -- you might remember that we actually spent a day talking about this stuff while sitting in the conference room.  Basically, this gets to the heart of the reality that the whole business of "folders" or "directories" or whatever is just a metaphor-- the computer is NOT really storing the files "next to each other" on the hard drive, just because they are "side by side" in a folder.  Rather, when the computer needs to create a file, it just finds some empty space ANYWHERE on the hard drive and starts writing.  The operating system then maintains a "file allocation table" that keeps track of where each file is (actually, where each file STARTS) on the disk.   Inside the file allocation table, there is information about what "folder" or "directory" the file is (hypothetically) in.  So, for example, when you type "ls" in linux or open a folder in windows, all that is REALLY happening is the file allocation table is telling you which files are listed as being "in that folder" -- even though, in reality, they could be literally ANYWHERE on the hard drive.   I hope that this information helps!   Jon  
From: Sedlacek, William T.
Sent: Mon 5/2/2011 9:58 PM
To: Schrage, Jon M.
Subject: ATS 315 questions


Hi Dr. Schrage,
 
Well, I don't see any questions on the website yet, but I have a couple. The first is about comparing and contrasting vi and Microsoft Word. I have some idea of how they are similar and different, but I'm not quite sure how I would articulate it on the exam. The other question I'm not sure about is #2 under the questions that pertain to working with files in C.
 
Willy

 


Comments




Leave a Reply