Style guide
This page explains why it is important to adhere to neat style and links to a style guide that we want you to follow during the course. For the graded assignments, we will deduct points if you don't use good style.
What is good style and why is it important?
When writing text in a ‘human’ language, you may structure your text into paragraphs and start your sentences with capital letters. Although following these rules is not strictly necessary to ensure that a text can be read, they do make it much easier for others to read. Similar formatting rules exist in programming languages. Following such rules is not neccessary in order for a computer to 'understand' your code. However, following a 'good style' makes it much easier for others (and future-you) to read your code. For this reason, style guides are often used by companies to make it easier for programmers to collaborate. Furhermore, although it may seem that following a styleguide takes more time, it will often actually save you time as it makes mistakes much easier to spot.
The style guide
The style guide used in Introduction to Programming
only contained some basic principles. In this course (FEB22012 Programming), you will face a stricter and more extensive style guide.
Please reade the style guide before you start your first assignment and make yourself comfortable with it. We do not expect you to learn it by heart, but from experience we know that writing in good style becomes second nature with experience.
As you could see, one of the topics mentioned in the Style Guide is that of Javadoc
comments. You are obliged to write those in your assignments for every class, constructor and method. If you have difficulties with Javadoc comments, please consider the book Think Java
from page 311.