TPU ChatChat on IRC
Internet Relay Chat?
Java Applet client
Who's on IRC?
How to write programs larger than 100 lines
Introduction and Legible Coding | Solid Code, Handling Exceptions, and Style | Comments, planning, and tools
Comments, planning, and tools
Comments can make parts of a program more easily readable. But don't put in any comments unless you are going to keep them up-to-date.
Write at the begining of each file at least what is in it and what external dependencies it has.
Give at the begin of each function a short explanation what the functions is about.
Use comments to explain what a certain calculation is.
Don't use comments to make unclear code more readable. Rather make the unclear code readable.
And don't write comments that simply repeat the code.
value = value + 1 ; add one to value
First know what you're going to build. Write down what it will have to do. Then break this description up in modules, then split it up in routines and functions.
By planning it first, it will be easier to write the code for it, because then you can focus on smaller parts.
Short: Know your tools; know what they can and can't do.
Know what your compiler can do. Know how it can optimize or help to find bugs.
Know your debugger. hunting down a bug can make a difference between a night's rest or a night full of stress.
Know your profiler: Don't optimize a function that is executed only once. Optimize those that are frequently called. Don't assume a function needs more speed; check it first. Don't optimize before it works.
The same goes for a whole series of other tools too.
This is a short explanation on this subject. One of the sources that can give you a much deeper insight of this matter is Code Complete (see bibliography). This is one of the most important things to master, because it allows you to write useful, bug-free programs with parts that can be reused in later projects.
Plan your project. Write clear and solid code with style, and remember that you have to write your program to be read by a human who doesn't know what the project is about. The compiler will make it understandable for the computer. There is nothing that can make unclear code understandable for a human (except some tools to make a better layout).
Code Complete: A practical handbook of software construction.