Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3675632
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:59:59+00:00 2026-05-19T02:59:59+00:00

Disclaimer: I apologize if this is too subjective and perhaps it may be better

  • 0

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 <iostream>

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T03:00:00+00:00Added an answer on May 19, 2026 at 3:00 am

    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
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Disclaimer: I apologize if this is not an appropriate question to ask here... I
Disclaimer : I kept this because some things may be useful to others, however,
Disclaimer: I apologize that this question is so long. I have added code as
Disclaimer: i have searched genericly (Google) and here for some information on this topic,
Disclaimer: This is not actually a programming question, but I feel the audience on
Disclaimer: This is for a homework assignment, but the question is not regarding the
Disclaimer: this question may not have practical value, it's more of a puzzle/curiosity question.
Disclaimer: I know this type of question has been asked here before, I just
Disclaimer: I'm a rails newbie, so I apologize if I'm going at this problem
Disclaimer: I'm sure this has been answered before but I cannot find anything on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.