IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Ooh. That's evil.
You mean a "diff" tool these days isn't smart enough to understand non-critical differences in formatting (not things like tabs in python code)? That's pretty bad.

So what are professional teams supposed to do these days? Is it standard to have a "This is How We Write Code Here and You Better Do It This Way Or Else" rule for new hires? Is there a "Style Gateway Check" rule before code is checked into the repository?

I think NASA and "Our Code Has To Be Correct and Audited to Be Correct or People Will Die" places have rules like that, but is it common elsewhere?

Should it be? Would code jockeys put up with it? Do universities teach the importance of things like this for teams?

Thanks.

Cheers,
Scott.
New Yes and no
Diff tools can ignore whitespace, so that helps. Modern dev tools can apply standard formatting when you save or check in.

Most shops will have local style, it's up to time and determination to enforce it. Mature developers know that matching local style is more important than your personal preferences and adapt.
--

Drew
New Most proper software shops...
...have a Coding Standards document that says how you format your code, amongst other things.

If you go through and reformat code, things change. If you touch it, the risk of breaking it increases by 100%, compared to not touching it. And it's not just whitespace - changing brace style moves characters from one line to another - like :


void myfunc(char * thing)
{
....stuff();
}

vs

void myfunc(char * thing) {
....stuff();
}


(full stops substituted for spaces, which get eaten by the post parser thinger)

I can't speak for other companies, but not following the Coding Standards in our gaff is the software equivalent of coming to work whenever you like, wearing dirty underpants as a hat, eating fried fish at your desk, and peeing in a bucket in the corner of the office.

Point being: it's not just your code.
     Spaces! Tabs! Vim! Emacs! - (drook) - (24)
         unalias vi -NT - (boxley)
         Heh - (pwhysall)
         I agree with him - (crazy)
         Re: Spaces! Tabs! Vim! Emacs! - (mvitale) - (19)
             Neat. - (Another Scott) - (18)
                 When I work on someone else's code I don't reformat the whole thing - (drook) - (17)
                     Ah, excellent point. -NT - (Another Scott)
                     +5, Useful. - (static)
                     Never mind that - (pwhysall) - (6)
                         You mean ... ? - (drook) - (1)
                             Exactly so. -NT - (pwhysall)
                         Ooh. That's evil. - (Another Scott) - (2)
                             Yes and no - (drook)
                             Most proper software shops... - (pwhysall)
                         Definitely comes down to standards. - (malraux)
                     My solution for mutlple authors... - (hnick) - (7)
                         Command line Emacs is pretty fancy... ;-) -NT - (malraux) - (6)
                             True... - (hnick) - (5)
                                 "Just edit files" - (malraux) - (4)
                                     I notice you didn't dispute "second operating system" -NT - (drook) - (1)
                                         UNIX is a subprocess that runs under Emacs. -NT - (malraux)
                                     Oh, I know... - (hnick) - (1)
                                         :-) -NT - (malraux)
         Silly. - (malraux)

I took the liberty of fixing the punctuation.
92 ms