Dear All,
I have little experience in coding. For a c++ code with 30,000 lines,
It is large or small? For two average programmers, usually how long
does it take to finish the code? The code should have no algorithm
difficulties. But It indeed need some design because we hope to
maintian and extend it in the future.
The amount of time it takes to write code is related to the size of the
project -- in a small project, you can crank out the code in a hurry. As
the codebase grows, so does the amount of time it takes to write a
particular amount of code.
If you really want to get into this in detail, Barry Boehm is the guru
of software estimating. His COCOMO and COCOMO II models are probably the
most widely recognized in the industry. His book (_Software Estimating
with COCOMO II_) includes a CD-ROM. You can also find various other
implementations (E.g. Cosmos) that work quite nicely.
My own take is that you're generally better off basing your estimates on
function points than lines of code. They're a lot easier to figure from
a functional specification, and they help to factor out some factors
such as coding style that affect the number of lines of code without
materially affecting effort.
Cosmos will allow you to just enter 30000 SLOC, and tell you that it
should take 135.4 person months of effort and a schedule of 13.9
calendar months. You can also enter various factors such as required
level of dependability, level of experience with the language, etc., to
refine that estimate -- claiming superb personnel, minimal requirements,
etc., would reduce the estimate to 14.7 person-months of effort, and 6.4
calendar months. Going in the opposite direction, it would increase to
8913 person-months of effort and 60.3 calendar months for the schedule
(and all of these are ignoring some things such as the type of project
-- for example, an embedded system with the same parameters otherwise
would increase the estimated effort to 10920.1 person months).
This may help explain some of the wild variation in the numbers that
have been thrown around here -- they really do vary pretty widely,
depending on requirements, capabilities, tools avialability, and so on.
Fortunately, quite a bit of work has been put into figuring out how each
factor affects the overall amount of effort and time needed to finish
the project -- in fact, as far as I can tell, Barry Boehm has virtually
devoted his life to it. Of course, he's not the only one.
There are other estimation models out there too -- though many (if not
most) are fairly directly based on Boehm's work, with various minor
enhancements in particular parts (e.g. some allow you to include reuse
of exising code, which would probably be helpful in your situation).