Answers to frequent questions, either about course policy or course material, will be posted here.
Homework 4 is also now graded. If you come by my office I can let you know how you did and what errors, if any, you made.
Homework 3 is graded and available to be picked up in my office (Upson 5141). I will be here during my office hours Thursday 2:30-3:30 and Friday 3:30-4:30, or check with me about other times you can come by. I strongly encourage you to come collect this homework.
Remember that the next homework is due by 2:30 on Friday (March 30). You cannot pass this class if you do not submit every homework.
Some people have had trouble setting up a cron job to send e-mail. If you cannot get this to work, try using "mailx" instead of "mail" (the same syntax can be used to mail a file as with mail). Also, make sure that the file you are trying to mail is in the top level of your home directory, or that you indicate what sub-directory it is in if it is not at the top level.
You can also test the rest of your cron syntax by setting up a job to copy a test file from one location to another. This could help narrow down if the problem is with your mail command or the rest of the line.
If you missed class on Friday, March 16th, topics were covered that are required for Homework 4. You should be able to read about these topics in the course books or the UNIX man pages, but I've also elaborated on and posted my lecture notes from Friday.
It turns out that I mispoke in class today. For the section of homework 3 where you write regular expressions, you will not necessarily be able to test these regular expressions. Specifically, for problem 2.2, while you can solve this using the regular expression syntax that I described in class, there are parts of the regular expression syntax that are disabled for sed - sed does not support |, \?, or +. The later two can be simulated with other regular expression operations, but there is no trivial way to work around the lack of |.
Because 2.1 and 2.2 ask for regular expressions, and not sed commands, you can still do these problems. Feel free to use any regular expression operation that I described. But you are probably not going to be able to test the full regular expression using sed.
To clarify another question I've received - for parts 2.1 and 2.2, you are just writing a regular expression to match the string(s) described. Regular expressions just match strings, they don't have an action associated with them. They aren't operations; they are syntax for specifying a string that another utility, such as sed, might operate on. So you should just give the regular expression. Don't include it inside a command.
Finally, in 2.2, you don't have to worry about uppercase letters. Just look for "tree" and "trees".
The example from the end of lecture on Friday of using sed to center a file has now been posted on the course website along with an explanation of how that script works. Understanding this example will probably be useful in doing Homework 3.
There are also links to some web tutorials about sed that are very nicely done on the course webpage.
All of these links are on the front page, at the bottom, where the recommended readings for each lecture are listed.
Q: On Homework 2, Problem 1, I can't think of a nice way to find every combination of three vowels. Can you give me a hint? Finding them all by hand is tedious.
A: Finding them by hand shouldn't be too tedious since triple vowels are three occurrences of the SAME vowel in a row (such as 'aaa'); there should only be five cases to check.
As indicated in the write-up for Homework 2 Problem 3, the point is to use the basic UNIX commands we covered with redirection. Do not use sed to solve Problem 3.
Homework 1 was handed back in class today. Many people had trouble with Problem 4 and did not give me access to the 114HW1 directory. If you want to resubmit this problem, fix your directory and file permissions, and then e-mail me by Monday class time and I will regrade the problem. Regrades will only be worth 2 out of the original 3 points.
HINT: Make sure that your directories have read and execute privileges, that your home directory isn't blocking my access, and that I have the permissions necessary to check that these permissions are correct and then right contents are in the right text files.
Some changes were made to Homework 2, mostly for clarification and all in Problem 3. They were announced in class on March 5th and have been updated in the on-line copy of the assignment. Note that the parts of Problem 3 have been renumbered to reflect standard numerical order.
Q: In question 2 on Homework 1, I have found a.txt, b.txt, and d.txt, but I cannot find c.txt. Does c.txt actually exist? Also, I cannot get into one of the subdirectories. Are these permissions set incorrectly?
A: c.txt is located in P2 (possibly in one of its subdirectories). There is not a mistake with the permissions on the "maybe" directory. You do not have to infer c.txt's probable location - when you find it you will be able to actually see it and read its contents.
Q: When I try to send mail using "mail" on babbage, the mail program just hangs and/or won't exit when I enter ctrl-d. What is wrong?
A: There are two things you might be doing wrong:
Q: How can I tell if I've sent e-mail correctly from babbage for Problem 1 on Homework 1?
A: If you send me e-mail as described in Problem 1 of Homework 1 before 5PM on Wednesday, February 28th, I'll send you a confirming e-mail that evening that your message has been received. I'll post to the course web page and the newsgroup when the confirmations have been sent out.
February 28, 5:40PM: Confirmations have been sent: All confirmations for Problem 1 on Homework 1 have been sent. If you think you mailed me and have not received a confirmation, please wait an hour or so in case there is a lag in the mail server, but you then might want to try sending your message again.
Q: I'm having problems telneting from my computer at home.
A: If you are within Cornell "telnet babbage.csuglab.cornell.edu" will connect you to babbage. If you are outside Cornell, you have to use a SSH telnet client to connect to babbage. For information on getting an SSH client, check out:
http://www.csuglab.cornell.edu/Info/FAQ/ssh-x11.htmlQ: I'm trying to add CS114 but the registrar says it is too late.
A: The add/drop deadline for CS114 is Monday, February 26th. However, in addition to an add/drop form, you need to get a petition from your College's registrar office to add the class. If you add CS114, be sure to let me know as soon as possible so we can get an account created for you in the CS Undergrad Lab.
Q: The course description says that CS100 or equivalent programming experience are required. I haven't programmed before - can I take this class?
A: As the course description says, CS114 does assume familiarity with some programming language, though it doesn't matter which one. Basically, I want to be able to assume that you understand things like conditionals, loop structure, and have thought about breaking a problem into its component steps. That said, CS114 is a 100-level course, and I'm not going to assume an extensive programming background. Depending on how easily these concepts come to you, and if you're willing to do a little extra background reading, you may be fine in this class. Probably the best thing would be to look at the web site for one of the previous semesters this course was taught and see how challenging it looks to you.