Slashdot is powered by your submissions, so send in your scoop


Forgot your password?

Comment Re:It depends on whatcha mean when you say style (Score 1) 479

Seriously? You are reading the code, fixing bugs, and you find formatting problems. So you back out your half-complete changes, fix the formatting, commit that change, then re-apply your fix-in-progress? You actually do that? Of course you don't.

The better policy is that code must be formatted correctly when it is committed the first time. Which is why we have style guidelines in the first place.

Coders should spend their time looking at the code, not getting distracted by style variations.

Comment Whatever you chose, make it automatable (Score 1) 479

Whatever style you choose, make sure that it can be generated with whatever automatic formatting tools you have available. This allows you to cut-n-paste code from other sources, and not waste precious time hand-formatting it (or leaving it in the wrong style). It also avoids the problem of lazy programmers feeling butt-hurt when somebody points out that their code does not follow the style. They can simply run their sloppy code through the pretty-printer before committing it.

Comment naive (Score 1) 479

If you think the only way anybody will ever view your code is in a "sane IDE", you are mistaken. Just because your current IDE can compensate for your bad formatting, that doesn't make your bad formatting a good practice.

Comment alignment can matter (Score 1) 479

I wonder how long you have been writing code, if you don't yet realize that sometimes aligning things vertically across several lines can increase clarity. If everybody gets to set their own indentation amounts (by changing tab width), then this benefit is lost. Tables were invented for a reason, and sometimes code is tabular. And if you think a tab character is how you get a table, you are sadly mistaken.

For example, having same-line comments start at column 60 (when possible) makes code easier to read. If you go changing the tab character to 4 spaces, that alignment is ruined.

Also a reason for not using proportional fonts.

Slashdot Top Deals

The world is coming to an end--save your buffers!