Re: Coding Standards
- From: "Mike Schilling" <mscottschilling@xxxxxxxxxxx>
- Date: Fri, 31 Aug 2007 21:06:47 GMT
"Lew" <lew@xxxxxxxxxxxxx> wrote in message
news:TcidnTxh24np4kXbnZ2dnUVZ_uejnZ2d@xxxxxxxxxxxxxx
Another trick someone showed me years ago for in-code comments (as opposed
to Javadoc comments) is to start them at some defined position, say,
column 45 (1-based). Then you can read down the right side of the source
listing and see comments, down the left side and see code.
Sort of like:
/** Javadoc comments here. */
public void foo()
{
doSomething(); // do a vital thing
cleanUp(); // close all connections
logResults(); // log to system-defined output
fireEvents(); // notify registered listeners
}
He had probably been an assembly-langauge programmer; it was very common for
assemblers, especially those which read punched cards, to have fixed fields
for (say) label, operator, operands, and comments, e.g.
start: mov r0 -(sp) push start address
mov r1 -(sp) push size
mov r2 -(sp) push destination address
jsr copy copy block
.
- References:
- Coding Standards
- From: davidsamith@xxxxxxxxx
- Re: Coding Standards
- From: Sanjay
- Re: Coding Standards
- From: Wildemar Wildenburger
- Re: Coding Standards
- From: Jeff Higgins
- Re: Coding Standards
- From: Lew
- Re: Coding Standards
- From: Martin Gregorie
- Re: Coding Standards
- From: Lew
- Coding Standards
- Prev by Date: Re: How to connect Java application with Oracle Database using JDBC?
- Next by Date: Re: Sun changing its stock symbol to JAVA
- Previous by thread: Re: Coding Standards
- Next by thread: Re: Coding Standards
- Index(es):