On 17/05/2010 7:07 AM, Andreas Leitgeb wrote:
I'd prefer this:
private static final String HEADER = ""
+ "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+ "<initech:tps-report><initech:coversheet> etc";
I'm a bit over-biased towards simple diffs,
I seem to recall, from about 30 years ago, the company I worked at had
similar formatting rules (details escape me) exactly so that simple text
diffs would work better. In your example the reason would have been that
the real first line of the string (line 2) shouldn't look any different
from the later ones, so that it would not change if one added another
string before it, e.g.
private static final String HEADER = ""
+ "some other new string"
+ "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+ "<initech:tps-report><initech:coversheet> etc";
A simple diff would show a 1-line insertion, with no change to the other
lines.
The thing is, with current programming environments, is this still an
issue for anybody?