Tom said:
I've worked with git, svn, cvs, and even clearcase. Collisions happen
all the time and they're nasty. That's why file locks exist. The
fewer resources you lock the better.
I agree with Richard nosurname. I've worked on a number of projects with
a number of sizes of team. Even ones where everyone was logged in to the
same account on the Vax editing files, so you actually could edit the
copy someone else was working on if you wanted! Collisions in all
instances happened rarely because members of the team talk to each other
so they know what each other is doing, and the project/product manager
also knows what everyone is doing. Yes, using CVS and Subversion we've
had the occasional conflict, but they've not been hard to resolve.
I group a set of logically related functions in to a file, and if that
makes the file big then it is big. It means I can use static file scope
variables when that makes sense, have shared static helper functions,
and in general keep the interface as tight as possible.
Yes, but its another one of your straw men. My point is that your
arbitrary 500 line limit is bullshit.
First, let me do my impression of you. "ZOMG TOM SAID SOMETHING THAT
I CAN DISAGREE WITH, *drool*, *wipe face*, I SIMPLY HAVE TO POST A
REPLY!!!!"
Then, I never said it was a hard written in stone limit. I have hand
written files that span into 6-7-8 hundred lines long. As a general
rule though if you're writing something [by hand] that gets over 500
lines, there is very likely [but not always] a chance to re-factor the
code to make it easier to work with [and/or a chance for code re-
use].
I don't find the larger files cause a problem with code reuse, since the
larger file has a load of logically related functions so when you are
reusing one you generally want most of the others anyway, and if not it
is still not large enough for a few extra functions to be a big deal.
That's the difference between people like me [with experience] and
people like you [think they know everything].
I disagree with you and I have a fair bit of experience, and have used
everything from manual version control (physically passing files between
people on floppy disk), through having a configuration control system
which was a *person*, through rcs (I was very rare to find a file
locked, since we actually talked to each other in the team), through
CVS, Subversion, MS VCC and maybe a few others I've forgotten.
We can say things like
"most files shouldn't be longer than 500 lines" and understand that it
means "most files shouldn't be super long because you'll probably be
able to factor the code better and achieve code reuse." Whereas you,
with little experience didn't know about that sort of development
strategy and just assumed that I meant "all files must be less than
500 lines because compilers can't handle 501 lines."
I disagree. I don't find a file of over a thousand lines takes long to
control, developers should know what each other are working on so they
know where to expect changes (and so what they might find breaks),
commits should be frequent, all of which means rare conflicts which are
easily dealt with.
tl;dr, sometimes you just have to know when to shut up.
Sometimes you should admit that other peoples experience is also valid.