Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Help for estimate the development time (http://www.velocityreviews.com/forums/t460773-help-for-estimate-the-development-time.html)

shuisheng 02-27-2007 07:55 PM

Help for estimate the development time
 
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.

Any suggestion and comments are welcome !

Thanks a lot ! ! !

Shuisheng


Victor Bazarov 02-27-2007 08:15 PM

Re: Help for estimate the development time
 
shuisheng wrote:
> I have little experience in coding.


Where is the emphasis? "Little" or "experience"? Are you being
modest or are you admitting to being green?

> For a c++ code with 30,000 lines,
> It is large or small?


Small.

> For two average programmers, usually how long
> does it take to finish the code?


Coding is not a process, it's a state. You cannot finish it,
you can only move onto a different state.

Many years ago IBM estimated the productivity of an average
programmer to be about 10 LOC/day. With the advent of new and
improved tools nowadays some can argue that 100 LOC/day is not
unheard of. So, for two people it would take about 150 days
to get 30K LOC into a shippable condition. That involves design
and coding/debugging, of course.

> The code should have no algorithm
> difficulties. But It indeed need some design because we hope to
> maintian and extend it in the future.


Add documentation to that and you might need to stretch the time
30-50%.

But what does it all have to do with C++?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask



Mark P 02-27-2007 09:39 PM

Re: Help for estimate the development time
 
shuisheng wrote:
> 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.
>
> Any suggestion and comments are welcome !
>
> Thanks a lot ! ! !
>
> Shuisheng
>


I suspect your question is too vaguely specified to generate any useful
responses. 30k lines is fairly small for a project, but a substantial
amount of work for two people. Especially if they're merely "average".

But I don't understand what it is that they're to do? Is the code
already written? (How else do you know it's 30k lines?) Is this a
maintenance job?

dave_mikesell@fastmail.fm 02-28-2007 01:40 AM

Re: Help for estimate the development time
 
On Feb 27, 2:55 pm, "shuisheng" <shuishen...@yahoo.com> wrote:
> 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.


What is the application? Are there existing libraries that can do
some of what you're planning to write?



shuisheng 02-28-2007 05:58 PM

Re: Help for estimate the development time
 
On Feb 27, 4:39 pm, Mark P <use...@fall2005REMOVE.fastmailCAPS.fm>
wrote:
> shuisheng wrote:
> > 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.

>
> > Any suggestion and comments are welcome !

>
> > Thanks a lot ! ! !

>
> > Shuisheng

>
> I suspect your question is too vaguely specified to generate any useful
> responses. 30k lines is fairly small for a project, but a substantial
> amount of work for two people. Especially if they're merely "average".
>
> But I don't understand what it is that they're to do? Is the code
> already written? (How else do you know it's 30k lines?) Is this a
> maintenance job?


Your guess is right. I posted a message in the comp.software-eng group
to ask for suggestion. Please see below. And I appreciate your kind
help.

http://groups.google.com/group/comp....967ec36cc0bcad

Dear All,

We major in computational electromagnetics. Our research object is to
develop efficient algorithms to model electromagnetic waves in complex
media. After years of reserach, we developed some good algorithms. We
tried to commercialize our research. So we started a software project
a year ago.

We hired two guys. One worked on GUI, and the other on Kernel. We
hoped to finish the project in three months. But the results was not
as we expected. Even now, the project is not finished. We just have a
coarse version to run some simple cases. And the code is full of bugs
and bad smells (repeated code, switch/case on type id, large classes,
large functions (some have more than 1000 lines), no consistent coding
style ). In fact, the code size is not very large. It is about 60,000
lines. And we think it can be compressed into less than 30,000 lines
if removing the repeated codes.

Now we are reading some project management and software design books.
And we found that our project in fact has no management. We are just
coding, repeatedly give a task deadline and ask the developers to
finish it, though the deadlines can never be met. There is no
requirement analysis, no system design, no testing, and so on.

We don't want the project fail. What should we do in the next step?
Modify our current ugly version, or renew one and do it accroding to
what the software project books teach us (we still have no experience
on it)?

We appreciate your kind help!

Shuisheng


Michael DOUBEZ 02-28-2007 09:19 PM

Re: Help for estimate the development time
 
shuisheng a écrit :
> [snip]
> We major in computational electromagnetics. Our research object is to
> develop efficient algorithms to model electromagnetic waves in complex
> media. After years of reserach, we developed some good algorithms. We
> tried to commercialize our research. So we started a software project
> a year ago.
>
> We hired two guys. One worked on GUI, and the other on Kernel. We
> hoped to finish the project in three months. But the results was not
> as we expected. Even now, the project is not finished. We just have a
> coarse version to run some simple cases. And the code is full of bugs
> and bad smells (repeated code, switch/case on type id, large classes,
> large functions (some have more than 1000 lines), no consistent coding
> style ). In fact, the code size is not very large. It is about 60,000
> lines. And we think it can be compressed into less than 30,000 lines
> if removing the repeated codes.
>
> Now we are reading some project management and software design books.
> And we found that our project in fact has no management. We are just
> coding, repeatedly give a task deadline and ask the developers to
> finish it, though the deadlines can never be met. There is no
> requirement analysis, no system design, no testing, and so on.
>
> We don't want the project fail. What should we do in the next step?
> Modify our current ugly version, or renew one and do it accroding to
> what the software project books teach us (we still have no experience
> on it)?


Without seeing the code and the general design, who can tell.
Now, if it is badly designed, it can poison your project for years;
don't be afraid to throw bad code (though it is hard for those who
worked on it and for the project manager).

A good approach would be to hire an experienced C++ consultant for a few
months (depending on your cash and on your needs) and *learn from
him*; good software engineering is caught, not learned, especially in C++.
Idealy, once he has set the project back on sound foundation and good
tracks, you can continue on your own.
In order to gain time, prepare specs for him to build from and some
background reading if he is not in your application field.


Michael

John Harrison 02-28-2007 10:24 PM

Re: Help for estimate the development time
 
shuisheng wrote:
> 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.
>
> Any suggestion and comments are welcome !
>
> Thanks a lot ! ! !
>
> Shuisheng
>


When I was at uni we were told that the average programmer managed 10
lines of code a day.

john

dave_mikesell@fastmail.fm 03-01-2007 03:44 AM

Re: Help for estimate the development time
 
On Feb 28, 12:58 pm, "shuisheng" <shuishen...@yahoo.com> wrote:
<snip>
>
> We don't want the project fail. What should we do in the next step?
> Modify our current ugly version, or renew one and do it accroding to
> what the software project books teach us (we still have no experience
> on it)?


- Download CPPUnit (http://cppunit.sourceforge.net/cppunit-wiki/
FrontPage)

- Cover the code base with working unit tests and make sure they all
pass

- Refactor, test, repeat

You used the term "bad smells", so it sounds like you already have a
copy of "Refactoring" by Fowler. If not, that would be a good
purchase to make as well.

There's a business model here. The C++ code you describe is more the
norm in my experience.


JussiJ 03-01-2007 05:43 AM

Re: Help for estimate the development time
 
On Feb 28, 6:55 am, "shuisheng" <shuishen...@yahoo.com> wrote:

> 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?


FWIW back in the days when I worked on IBM projects, if I recall
correctly, they assumed an average developer produced about 50
lines of tried and test code per day.

This means 30,000 lines of code is about 600 man days of work.

Now assuming a programmer works 5 days a week, 52 weeks a year this
comes in at 2.3 man years.

So two IBM programmers will have the job done in about 1.15 years ;)

> But It indeed need some design because we hope to maintian
> and extend it in the future.


At IBM design time would have been extra.

Jussi Jumppanen
Author: Zeus for Windows IDE
http://www.zeusedit.com


Jerry Coffin 03-03-2007 02:49 PM

Re: Help for estimate the development time
 
In article <1172606103.317875.194650@a75g2000cwd.googlegroups .com>,
shuisheng75@yahoo.com says...
> 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).

--
Later,
Jerry.

The universe is a figment of its own imagination.


All times are GMT. The time now is 06:09 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.