DOs and DON'Ts of a programming class?
<p>Disclaimer: I apologize if this is too subjective and perhaps it may be better suited for <code>programmers.stackexchange</code> but I'll try my luck here first. </p>

<hr>

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

<p>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.</p>

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

<p>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.</p>

<p>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:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;
void main(void)
{
 // stuff
}
</code></pre>

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