What are Industry Standards?

When we talk about coding standards or code/programming style, we're talking about how your code looks - proper indentation and spacing, self-documenting identifiers, an appropriate amount of documentation, etc. Sticking with programming standards is important for any professional programmer. Writing code that doesn't follow industry standard is considered amateurish, or what some call "Mickey Mouse" programming (no offense to famous rodents). That kind of bad programming has a negative effect: it makes it difficult for you to go back and find errors, make changes, see how you solved a difficult algorithm; it makes it difficult for other programmers to do the same things. This costs a company/client more money and time. Following good programming style and standards prevents you from wasting your client's valuable time and money.

A program that is syntactically and logically correct will run and function just fine, but a program that does not follow industry standards when it comes to coding and UI design is just as bad! Why?

Programs that follow industry standard are:

Industry Standards for Java

Chapter 1.9 of your textbook gives you a number of guidelines that you should follow. There is additional information in the textbook supplement Expanded Guidelines on Programming Style and Documentation

Additionally, be sure you read the Coding Standards for this course. It is expected that all work you submit will follow these standards.

You should become familiar with these guidelines, not just for this course, but also for later courses, and eventually for any professional work you do outside the college.

The standards and guidelines include:

Exercises

1. Reformat the following code segments by hand so that they follow proper standards:

a)

public class BadCode { public static void main(String[] 
args){ System.out.println("Flowers for Algernon");}}

b)

public class 
BadCode { public static void main(String[] 
args){ System.out.print("6/4*2 is ");System.
out.println(6/4*2);}}

2. Add documentation to each of the corrected code segments above.