DOs and DON'Ts of a programming class?

Course Queries Syllabus Queries 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

Disclaimer: I apologize if this is too subjective and perhaps it may be better suited for programmers.stackexchange but I'll try my luck here first.


I'm in need of some advice that has made you successful in a college-level programming course (in my case, C++ and Java). I would especially appreciate it if professors posted what they liked to see from their own students.

I've been writing code for a pretty long time now but due to other interests and some time off school, I've never actually took a programming class. I absolutely have to get an A for GPA reasons and I'm looking for any advice that may help me achieve that goal.

First of all, I'm interested in code styles. What code style is best suited for homework?

Secondly, I'm interested in how much commenting should be done and where it should be done. I've worked as a programmer before and we've had set style/comment guides, but as far as I can tell the professor hasn't put anything particularly set in stone on her syllabus.

Also, how important is the standard. I'm not a huge C++ standard purist -- there are more than enough on SO and on programming newsgroups -- but her first example is something like:

#include 

using namespace std;
void main(void)
{
 // stuff
}

And needless to say, it kind of made me cringe. void main, no return, yuck. I'm just not particularly sure what to take from it.

profilepic.png
manpreet 2 years ago

I hope this will be of some help to you - I used to head TA a CS course at an Ivy League college, which mean I wrote the mark schemes and grading guidelines.

Firstly, everyone does things differently, and in all honesty grading code is as subjective as grading an essay (this always surprises students starting out, because many think writing code is more akin to solving a maths problem). I fully expect people here to disagree with some of my thoughts, mainly because it is just so subjective.

Commenting: my personal opinion was always that code should be self documenting. For example, bad commenting would be as follows:

// For loop to iterate through numbers    
for (int i = 0; i < 5; i++) {
         NSLog(@"%d", i*i); // Prints the result
    }

Hopefully I don't need to explain why that's bad, but just in case - it's pretty obvious what it does, and furthermore the comments don't actually add anything useful.


Moving on to code style: check with your course. If your course has a particular style that's preferred, you should obviously use it. If not, my own attitude was to generally be fairly flexible - as long as you, the student, were consistent from assignment to assignment (enforcing consistency also makes it easier to pick up when someone is cheating).


Finally, as you're probably realising, not every professor does things 'by the book', for better or for worse. They may have their own reasons for doing this, or they may simply be poor. Since your stated goal is to achieve an A (in all honesty, I was always a little disappointed in students who came into courses with a grade in mind, but I understand why GPA can be important to people), you just need to play the system. You could see some truly horrible things being taught, but your goal is to get the highest grade possible. To do that, you'll need to play things by the book, regardless of 'right' or 'wrong' (horribly cynical point: it always helps to make yourself known to course staff, through office hours or similar, because whoever grades you will perhaps be a little more sympathetic. Unless of course you're a total sociopath, but I'm going to assume not! :))


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.