Difference between revisions of "OOP344 - Success - 20102"

From CDOT Wiki
Jump to: navigation, search
m (Member List: Changed link for mjschranz blog post)
(Rules to follow: Add some explonation to rules)
Line 51: Line 51:
 
4. Only use breaks in switch statements
 
4. Only use breaks in switch statements
  
5. Begin each class with #ifndef
+
5. Begin each class with #ifndef (we will learn it later)
  
6. Do not use redundant statements (i.e: if (x != 0) )
+
6. Do not use redundant statements (i.e: if (x != 0) because it same as if(x) )
  
7. Comment with '/*' example: /* insert comment here */. Do not use '//' because that is use in c++ (we're coding in C)
+
7. Very important - we shouldn't use TAB for indention.
 +
 
 +
Because size of tab is different in different compilers and code could look messy
 +
 
 +
if to open it different compiler. Lets use space instead.
 +
 
 +
And each of us should set up Visual Studio to turn off TAB otherwise we can lose marks.

Revision as of 15:16, 19 May 2010


OOP344 | Weekly Schedule | Student List | Teams | Project | Student Resources

Team Success

Success is the Key

Project Development

Project Development Page

IRC meetings

IRC meeting logs

Member List

Success - Member list
ID Last Name Name Seneca Username Section Blog Url IRC Nick SVN ID My Contributions Role
A Pliats Aleh apliats A http://oleg-oop.blogspot.com/ oleg_pliats n/a Contributions
B Quan Jason jquan4 A http://jasonquan.wordpress.com/ JQuan n/a Contributions
C Schranz Matthew mjschranz A OOP344 Blog Posts mjschranz n/a Contributions
D Balzamova Irina ibalzamova A http://bikarin.blogspot.com/ iIra n/a Contributions
E Park Hong Geung hgpark A http://goldenration.wordpress.com/ goldenration n/a Contributions

Rules to follow

(this is just an example, lets discuss it)


1. Two spaces for indentation

ex/

 int main 
 {
   int i;
   int j;
   if (i == 0) 
   {
     i = 1;
   }
 }

2. camel for vars ex: char thisIsCamel; int forLoop;

3. Do not create variables that are never use

4. Only use breaks in switch statements

5. Begin each class with #ifndef (we will learn it later)

6. Do not use redundant statements (i.e: if (x != 0) because it same as if(x) )

7. Very important - we shouldn't use TAB for indention.

Because size of tab is different in different compilers and code could look messy

if to open it different compiler. Lets use space instead.

And each of us should set up Visual Studio to turn off TAB otherwise we can lose marks.