J
John
Our project leader is making the decision to enforce coding standards
through the use of our IDE. While standards and consistency are
beneficial, I'm unhappy with one limitation of our IDE (IntelliJ IDEA
4.5), namely its inability to preserve extra spaces. I've found that
a judicious use of spacing can often make code much easier to read and
consequently to understand. Below is an example of before and after
formatting. For me, the formatted code seems to blur together and is
much harder to read. I'm wondering what opinions others might have.
Original code fragment:
private FormSetupComponent formSetupComponent;
private FormSetupProperties formSetupProperties;
private FormProperties formProperties;
private MsgManager msgManager;
private AbstractProperties selectedProperties;
private ResourceBundleHelper mBundle;
edgeBoundary[0] = createBoundaryLine(x, y, x, y + h);
edgeBoundary[1] = createBoundaryLine(x + w, y, x + w, y + h);
edgeBoundary[2] = createBoundaryLine(x, y + h, x + w, y + h);
edgeBoundary[3] = createBoundaryLine(x, y, x + w, y);
With extra spaces removed:
private FormSetupComponent formSetupComponent;
private FormSetupProperties formSetupProperties;
private FormProperties formProperties;
private MsgManager msgManager;
private AbstractProperties selectedProperties;
private ResourceBundleHelper mBundle;
edgeBoundary[0] = createBoundaryLine(x, y, x, y + h);
edgeBoundary[1] = createBoundaryLine(x + w, y, x + w, y + h);
edgeBoundary[2] = createBoundaryLine(x, y + h, x + w, y + h);
edgeBoundary[3] = createBoundaryLine(x, y, x + w, y);
through the use of our IDE. While standards and consistency are
beneficial, I'm unhappy with one limitation of our IDE (IntelliJ IDEA
4.5), namely its inability to preserve extra spaces. I've found that
a judicious use of spacing can often make code much easier to read and
consequently to understand. Below is an example of before and after
formatting. For me, the formatted code seems to blur together and is
much harder to read. I'm wondering what opinions others might have.
Original code fragment:
private FormSetupComponent formSetupComponent;
private FormSetupProperties formSetupProperties;
private FormProperties formProperties;
private MsgManager msgManager;
private AbstractProperties selectedProperties;
private ResourceBundleHelper mBundle;
edgeBoundary[0] = createBoundaryLine(x, y, x, y + h);
edgeBoundary[1] = createBoundaryLine(x + w, y, x + w, y + h);
edgeBoundary[2] = createBoundaryLine(x, y + h, x + w, y + h);
edgeBoundary[3] = createBoundaryLine(x, y, x + w, y);
With extra spaces removed:
private FormSetupComponent formSetupComponent;
private FormSetupProperties formSetupProperties;
private FormProperties formProperties;
private MsgManager msgManager;
private AbstractProperties selectedProperties;
private ResourceBundleHelper mBundle;
edgeBoundary[0] = createBoundaryLine(x, y, x, y + h);
edgeBoundary[1] = createBoundaryLine(x + w, y, x + w, y + h);
edgeBoundary[2] = createBoundaryLine(x, y + h, x + w, y + h);
edgeBoundary[3] = createBoundaryLine(x, y, x + w, y);