logo

UTK Notes


General Policies for Dr. Plank’s Classes

This policy file applies to COSC 202, 302, 307, 360 and 367. It does not apply to COSC 494/594. Please see http://web.eecs.utk.edu/~jplank/plank/classes/cs494/494/index.html for the policies for that class.


Canvas

I use Canvas for the following:

  • Announcements.
  • Assignments.
  • Lab Grades.
  • Attendance Grades.
  • Exams.

Please note: I don’t use Canvas to do final grade determinations. So, please don’t take your Canvas grades as your final grade. Your final class grade (and your exam grades) will be communicated to you personally via Canvas. Please seee the link below about final grades.


Piazza

I use Piazza as a way for you to ask questions of each other, and of the TA’s and sometimes me. A few things about Piazza:

  • The TA’s and I respond on a “best effort” basis. This is especially true on weekends.
  • Please do not post code.
  • Please do not send “private” messages to me and the TA’s with code. Use TA office hours instead, or use the opportunity to hone your debugging skills.
  • Please do not be rude. If you’re trying to be funny, please double-check what you’re writing. Innuendo doesn’t come across well in writing, and it’s amazing how often what you think is funny ends up pissing people off.
  • Use Piazza to be helpful for your fellow students. You learn a lot when you help others.

Grading

Please see this link for how your grades are calculated.


Class Attendance

Class attendance is mandatory. I will take attendance using Turning software or by other means. If you cannot make class due to a medical or personal reason, please send me email before class.

You have two “free” unexcused absenses, so if you are going to be absent only twice, you don’t need to contact me about it.

Please see the “final grades” link above for how attendance is graded.

If I’m on travel, I will teach through zoom. Those classes will be rare.


Lab Attendance

COSC 202, 302 and 307: Like class, lab attendance is mandatory. When a lab is two hours, then it is partitioned into two sessions. In the first, you will do one or more Topcoder/Leetcode problems. Your attendance won’t count unless you finish the problems that you are required to finish, so if you are 30 minutes in and struggling, make sure you ask the TA’s for help.

In the second 60 minutes, the TA’s will help you with the next lab. I know from experience that a bunch of you will be working on the previous lab, even though you’re eating late points for it, and you will have questions. The TA’s will answer those, so long as no one has questions about the current lab. In other words, current lab questions get strict priority over previous lab questions.

If the lab session is only one hour, then you only do the topcoder.

I don’t care which lab session you attend, so long as you attend one of them. If we end up having space issues, you’ll need to go to the session for which you are enrolled; however, if there is space, I’m flexible. You may want to bring your laptop, especially if you prefer to work on it rather than a lab machine.

COSC 360/367: Besides the first lab, labs are optional. The TA’s will be there to help you, and they may present material that they find helpful. However, the lab sessions are optional. The only exception to this is when I announce that you must attend lab. Often this is for a quiz.


Homework Stuff

I typically call homeworks, “labs.” Sorry if that’s confusing – you can typically differentiate homework-lab vs. lab-lab from the context in which the word “lab” is used.

In general, labs will be due at 2:00 AM on Sunday night (Monday morning, really). I won’t let you work all night on monday night, because then you either sleep through your classes on tuesday or you skip them. The lab deadlines will be firm. The late policy is simple: you lose 10 percent for each day (uncompounded) that the lab is late. After 7 days, you will not get credit. The TA’s will make every attempt to get your labs graded and back to you within a week of the lab submission.

There will be a correctness script for each lab. That is what the TA’s will execute to test the correctness of your code. It will be worth 85 percent of your grade for each lab. These scripts help you in three ways:

  1. You will have an easier time testing your code for correctness.
  2. The TA’s turnaround time on grading will be quicker.
  3. The TA’s effort in grading will be less, freeing them up for more office hours.

The TA’s will grade your code on the department lab machines. That means that before you submit your code, you should test it on the lab machines (hydras). If it works on your Ubuntu laptop, Windows laptop, your Macbook or your Pi, that is no guarantee that it will work on the lab machines. Port it and test.

You must perform your labs alone. Obviously, you may talk about your labs with the TA’s and with other students, but when it comes time to write the lab, you must write your own code. Otherwise, it is plagiarism.

A corollary of this is to protect your directories so that no one can read them. If you do all of your work in ~/cs202, then right now, do:

UNIX> chmod 0700 ~/cs202

If someone cheats off of you, chances are we cannot determine that, since file access times can be modified. In the past, when I have discovered cheating, both parties (cheater and cheatee) get zeros. Protect yourself.


Homework Submission

Homework submission will be via Canvas. The lab writeup will tell you what to submit. Please submit exactly what you are asked to submit – no more, no less. These classes are large, and every exception that you make burns the TA’s time (or mine). Please pay attention to what you are submitting.


Textbook / Lecture Notes

None of these classes have required textbooks. Instead, I have written lecture notes that are the main reference material. If you see typographical errors in my lecture notes, or mistakes, please let me know, and I will fix them asap.


TA’s and Help

The primary place for you to receive help with your labs is during lab time and during the TA’s office hours. The class is organized so that you can get help starting your labs during the lab time. As you work on your labs during the week, you should solicit help and comradery from other classmates, and the TA’s will have office hours every day during the week. You can try to contact TA’s during non-office-hours as well – However, they are students taking full course loads, so their responses will be best effort.

Over the weekend, you’re back on your own, and again you should solicit help and support from your classmates. You may try to email the TA’s, but again, they may not respond. They have lives too. Obviously, use Piazza at all times – often that will get you more rapid help than emailing TA’s.

I shouldn’t have to write this, but history requires me to. While I love you, and the TA’s love you, this class is not our only responsibility during the semester. Similarly, you are taking other classes, so this class is probably not your only responsibility. Think about that when you do things. For example, a few years ago, a student resubmitted a late lab whose score was obviously going to be lower than his first submission. He submitted it because he was proud of finishing it, and wanted the TA to know. The TA, who was swamped with other classes, simply regraded the submission and gave the student the lower score. The student was outraged – all he wanted was a pat on the back!! Who was at fault? Everybody had good intentions. However, the student should have used the proper channels – if he wanted an “attaboy,” he should have emailed the TA seperately or gone through office hours. This may seem picky, but a matter like this cost everyone time and emotional drama. Including me. The bottom line is to think about your actions before you do them.


Help Each Other

You are all brothers and sisters in this class. While I’m not the biggest fan of interpersonal interaction and conversation, even I will admit that you learn many unexpected and valuable things through interaction. This is when you are both soliciting help and providing it. I encourage you to try to help each other. Piazza is a great vehicle for this.


University Resources

The Academic Success Center provides academic coaching, and tutoring for many subjects. You can request support for my class if you don’t see it on the list of available offerings.


My Pet Peeves

I go over these on the first day of class, but I also write them down so that you have reference material. Every teacher has his/her own style, and after 25+ years of teaching, I know mine pretty well. This list doesn’t apply to all teachers – just me.

  • Crosstalk in class: Evidently many professors don’t mind this. I hate it – it both distracts and irritates me. I find it disrespectful, and I will call it out in class and ask you to stop. I don’t care if you are talking about your labs or even what I’ve just talked about in class. Either ask me, or wait until after class. I don’t mind being interrupted with questions – I do mind when you talk with each other while I am lecturing.
  • Laptops in class: All electronic devices are distractions. You may tell yourself that you’re following along with my lecture notes, or taking notes yourself, but in reality the trappings of social media are simply beckoning you pay attention. I won’t ban them. However, when your laptop is open in class, I will assume that you’re not paying attention.
  • Email in the proper format: When you send me email, it should be in the proper format. That means that it starts with “Dear Dr. Plank”, and it ends with “Sincerely, your name.” You should capitalize, punctuate and spell properly. You should treat me as you would an employer. Frankly, you should do this with all professors.
  • Not paying attention to your requirements, #1. There are two things that fall into this category. First is what you’re supposed to be handing in to the TA’s. You are supposed to be handing in the source code of working programs, with the correct file name, that will compile with the C++11 compiler. You are not supposed to be handing in stray files, binaries, the lab writeup, your input files, the gradescript, etc. You are not supposed to include cpp files from lab directories using #include’s. If you hand in extra things, or the wrong things, then you will lose points. The TA’s will be nice about this with the first lab, but that’s it. When you have a job, or are trying to cultivate clients and investors for your new startup, screwing up the details loses you work and money. Get the details right, and that starts with knowing your requirements for handing stuff in.
  • Not paying attention to your requirements, #2. Second, make sure that your work is being graded. The TA’s will post on piazza when they have graded labs. I will post when I have graded exams. It is your job to see these posts and then make sure that your work has been graded. I wish I could say that I have never had a case where a student sends me email at the end of the class, saying that they never received any graded work, and they have failed, but they did everything and it was somehow misplaced or lost. They assumed that since their programs passed the gradescripts, that they were doing “fine” in the class. This has happened in three semesters now, and for the life of me I can’t understand how the students in question let this happen. I don’t want it to happen this semester.
  • “Dr. Plank, will xxx be on the test?” What’s on the test? Everything that’s in the lecture notes. You don’t need to ask me. I just told you. If I don’t tell my “what’s on the test” story in class, ask me to. It’s a good one.
  • “How about an extension or more points?” There are people who believe “It can’t hurt to ask,” and therefore ask me often and gratuitously for lab extensions and points. Saying “no” wears me out and irritates me. I am very sensitive to your time concerns. I am especially sensitive to when things disrupt the lab schedule. I always attempt to make things fair. So don’t ask just because you think it can’t hurt – Pharaoh’s heart will harden. Have a good reason.
  • Cheating: I shouldn’t have to put this down as a pet peeve, since it’s so obvious, but after watching my children go through college and hearing the tales of cheating that they relay, I will address it. If you cheat, you deserve to be kicked out of school. Does that statement make my views on cheating clear enough? It absolutely disgusts me.

Warm and Fuzzies

  • You are my children: I take a parental view of class. I am your father, and you are my children. My wife says that this can be construed as being demeaning when I say it, so I want to let you know that it is not. I take class and teaching very personally – I really want you all to work hard and succeed with this material. Sometimes that requires tough love, but let it be known that I do care and want you to do well.
  • Non-class issues: This extends to computer-science/school issues that don’t directly concern this class. If you need advice about which classes to take, how to search for jobs, which jobs to search for, how to manage your workload that has gotten out of control, email me and schedule a meeting. I’ve been here at UT for over 25 years – I have a lot of experience and knowledge and am happy to share.
  • Class participation: Although I get all bitchy about crosstalk, I very much like class participation. If you have questions, ask them. They may seem stupid – they may even be stupid – but I won’t treat them as such. If you’re lost and confused, say so. I also don’t mind you being smartasses (so long as you realize that as you give, you may receive). There are times were I deserve to receive some jibes from you…

C++ 11

In COSC 202, 302 and 307, We use C++ 11. Your TA will compile your code with the -std=c++11 flag, and if it doesn’t compile, it is getting kicked back to you with late points. That means that when you develop your code, you need to make sure that it compiles with -std=c++11.

Mitigating your emotions with this decision. I understand that 2011 was a long time ago, and that in the years between then and now, technology and computer programming have come a long way. You may worry that what you are learning is going to put you at a disadvantage in job applications. I believe that this is unfounded. In this class, you not only are learning fundamental algorithms that give you tools for solving all sorts of computer-related problems, but you are also learning how to program in such a way that you actually understand what you are doing, and for the most part what your computer is doing. Learning to program in the manner in which I am teaching you makes you a stronger programmer, and later in your life, if and when you decide to move beyond what I am teaching, you will be better for it.

Yes, I am old. I first learned to program as a college freshman in 1984. I don’t program using the newest standards and tools. However, within the recent past, I have managed a very large, long-lived, multi-developer programming project; I have done thorough examinations of the source code of very successful computer companies; I have exported open-source code that has been in use by many of the top companies in the business. So, even though I am old, I am wise, and I don’t restrict you to C++11 because I am old, but because I am wise. I believe very firmly that I am doing you a service with this decision.

A corollary of this is that when you do your job interview, and they make you program, you can let them know that your dogmatic professor made you program in C++11. If that will be a problem for hirability, then you’ll have to bone up on a later version of C++, or simply program with Python like everyone else.


Commenting Your Code

You will be graded on commenting. Something like 10%. You should comment your code by blocks of comments at the beginning of your files, and before subroutines. Variables should be commented inline. You may also want to comment large blocks of code. You should not comment with a ``running commentary’’ to the right of your code, because that is often useless, hard to maintain, and disconcerting. I have seen comments like the following:

1
2
3
4
5
  if (i == 0) {               /* If i equals zero */
    return;                   /* then return */
  } else {                    /* otherwise */
    exit(1);                  /* exit with a value of one */
  }

The above is an extreme example, but don’t let it happen to you.

Here’s an example of what I would consider a well documented program:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>

/* sumnsquared.c
   Jim Plank
   August 23, 1998

   This program prompts for and reads a value n from standard
   input, and then calculates and prints the sum of squares
   from one to n.  It uses a for loop instead of using the
   closed form expression.
   */

main()                     /* Side note: in 1998, main() didn't have to have a type. */
{
  int n;                   /* The value */
  int sum;                 /* The running sum of squares */
  int i;                   /* An induction variable */

  /* Prompt for and read in a value of n */

  printf("Enter a value n: ");
  fflush(stdout);
  if (scanf("%d", &n) != 1) {
    exit(1);
  }

  /* Calculate sum for each value of i from one to n */

  sum = 0;
  for (i = 1; i <= n; i++) sum += (i*i);

  /* Print the final summation */

  printf("%d\n", sum);
}

Here’s a guide on indentation that you may want to follow.