Re: Average, Best and Worst: Cost and Time to Produce Software Code

2011-05-11 Thread Richard O'Keefe

On 11/05/2011, at 10:25 PM, Paola Kathuria wrote:
> 
> 2) is a call to an existing function "re-use"?
> 
> I've been the PHP developer for the-racehorse.com since 2006 and
> have produced over 30,000 lines of code. However, I'm calling
> some functions written earlier in new code? Is that counted as
> re-use?

Yes.
> 
> 3) is using an open-source CMS code "re-use"?

Yes.
> 
> 
> 4) Is using a CMS "re-use"?
> 
> This year I'm working as a contractor as "Drupal Developer". Drupal 6.*
> is such that most site builds consist of going through configuration
> forms created by third-party modules. I'm working on a multi-lingual
> site but I've only written 500 lines of code and that's for managing
> custom login with cookies. I don't think that spending days installing
> and configuring modules in forms is development. But is it software
> re-use?

If you are using software that was not developed for the project at
hand, it is re-use, whether you can see the code or not.
> 
> 5) Fashion changes
> 
> Over time, people's choice of programming language evolve. PHP,
> Python, Ruby on Rails, Java, you name it.
> 
> Software re-use presumably assumes a consistency of language.

The implementations of these languages themselves re-use a lot of
code, and many of them provide ways to pull in compiled code.  In
2005, "PJE on Programming" wrote:

But it's the impure libraries that give (C/J/Iron)Python
most of its current value!  Be it database access, number
crunching, interfaces to GUI toolkits, or any of a thousand
other uses, it's the C, Java, or CLR libraries that make
Python useful.  CPython is basically a glue language for
assembling programs from C libraries, and to the extent
that Jython and IronPython are successful, it's because
they're glue languages for assembling Java or CLR components.

Once upon a time I used to moan to classes about how little reuse we
did; now we have so much to reuse that a major part of our effort is
*finding* the stuff (and yes, installing/configuring once found).


-- 
The Open University is incorporated by Royal Charter (RC 000391), an exempt 
charity in England & Wales and a charity registered in Scotland (SC 038302).



Re: Average, Best and Worst: Cost and Time to Produce Software Code

2011-05-11 Thread Paola Kathuria
John Domingue wrote:
> I would like to convey to a non-computer scientist
> audience the significant effort that goes into software production in
> order to motivate software and component re-use. Otherwise a naive
> person may ask "why not just create the software you need on demand
> every time?".

I've been thinking about this core question. I wonder whether you're
looking for answers along the lines of:

- it took 3,000 hours at a cost of 300,000 to build [x]
- it took 300 hours at a cost of 3,000 to build [y] which reused code

I've been a software developer since 1989 and have been doing the
plans and costs for my own Internet company since 1995. If re-use
means copying code from one program to another, I am hard pressed
to think of any examples where re-used software affected the price
quoted to the client.

To explain:

1) the client owns the software developed

Usually the client owns what they pay for unless the contract says
otherwise. Developers can only reuse code for future projects for
the same client.

2) is a call to an existing function "re-use"?

I've been the PHP developer for the-racehorse.com since 2006 and
have produced over 30,000 lines of code. However, I'm calling
some functions written earlier in new code? Is that counted as
re-use?

3) is using an open-source CMS code "re-use"?

the-racehorse.com is built on Drupal. Drupal is an open-source CMS
core with modules (functionality add-ons) developed by the community.
Is using an extendible CMS "software re-use"?

We used Drupal for the-racehorse.com because the client wanted a site
within a few weeks. We previously built sites from scratch. The site
we launched in time - and my first module was based on an existing
module by someone else - but subsequent additions to the site have
always been constrained by how Drupal works. Some additions we haven't
been able to do at all because they'd take too long within Drupal.

The trade-off HAS ALWAYS BEEN:

a) write from scratch for more time/money for ultimate flexibility
b) customise an off-the-shelf solution for less time/money for narrow 
flexibility

As soon as you want to make an off-the-shelf system do something
other than what it's intended, you spend MORE time/money than if
you'd built the thing from scratch.

Given the same requirement, approach (a) and (b) could end up costing
the same in the long term.

4) Is using a CMS "re-use"?

This year I'm working as a contractor as "Drupal Developer". Drupal 6.*
is such that most site builds consist of going through configuration
forms created by third-party modules. I'm working on a multi-lingual
site but I've only written 500 lines of code and that's for managing
custom login with cookies. I don't think that spending days installing
and configuring modules in forms is development. But is it software
re-use?

5) Fashion changes

Over time, people's choice of programming language evolve. PHP,
Python, Ruby on Rails, Java, you name it.

Software re-use presumably assumes a consistency of language.
My feeling is that commercial Internet projects get redeveloped
every few years.

John, I'd still like to know what kind of an answer you were
hoping for with t

> I'm looking for pointers to how much time and cost is associated
> with producing software code.

"3 weeks and 4,000 pounds" is an answer to that question. But would it
have been useful? Or is the "pointers to" key?


Paola
--
http://www.paolability.com/

-- 
The Open University is incorporated by Royal Charter (RC 000391), an exempt 
charity in England & Wales and a charity registered in Scotland (SC 038302).



Re: Average, Best and Worst: Cost and Time to Produce Software Code

2011-05-11 Thread John Domingue
Hi Frank, at the risk of going off topic for this list there are  
several reasons for targeting non-specialists. Lindsay mentioned  
funding agencies to which I would add below.


At the Open University we have a general background interest in this  
as we do not have formal requirements for our courses. We also have  
goals including widening participation (to higher degrees) to which  
our VCs often say that we are very proud to: " break the insidious  
link between exclusivity and excellence".


There's also a related interest in promoting the public understanding  
of science which motivates us to develop BBC science content.  
Obviously, others do this too e.g. there's the Carl Sagan Award for  
Public Understanding of Science and the University of Oxford has a  
Chair in this. I also have a requirement as I'm asked to give more and  
more talks to non-technical audiences.


John

_
Deputy Director, Knowledge Media Institute, The Open University
Walton Hall, Milton Keynes, MK7 6AA, UK
phone: 0044 1908 653800, fax: 0044 1908 653169
email: j.b.domin...@open.ac.uk web: kmi.open.ac.uk/people/domingue/

President, STI International
Amerlingstrasse 19/35, Austria - 1060 Vienna
phone: 0043 1 23 64 002 - 16, fax: 0043 1 23 64 002-99
email: john.domin...@sti2.org  web: www.sti2.org









--
The Open University is incorporated by Royal Charter (RC 000391), an exempt charity 
in England & Wales and a charity registered in Scotland (SC 038302).



RE: Average, Best and Worst: Cost and Time to Produce Software Code

2011-05-11 Thread Lindsay Marshall
>+ in all seriousness, who cares what naïve people think about anything?

Quite often they are controlling the purse strings. (though who has a purse 
with strings these days? Surely it at least has a zip)

L.


-- 
The Open University is incorporated by Royal Charter (RC 000391), an exempt 
charity in England & Wales and a charity registered in Scotland (SC 038302).



Re: Average, Best and Worst: Cost and Time to Produce Software Code

2011-05-11 Thread Frank Wales

Hi, John.

John Domingue wrote:
John and Paola, thanks for your comments. I understand that there are 
many variables. I would like to convey to a non-computer scientist 
audience the significant effort that goes into software production in 
order to motivate software and component re-use.


It's very difficult to construct a case to persuade hypothetical,
uninformed people of anything, because, by definition, you don't
know what they don't know.

> Otherwise a naive person may ask "why not just create the software
> you need on demand every time?".

Two things:

+ in all seriousness, who cares what naïve people think about anything?

+ to answer the question asked: "because it's obviously a waste of effort
  to repeat any non-trivial activity if you don't have to."

Who, specifically, are you trying to inform, and what's at stake
if they remain ignorant?

If you want some fun, get together an open-source developer,
an in-house Agile project manager, a sales person from a big
consulting firm, and flight-systems engineer from an aerospace
company, and get them to agree on what the cost of developing
software is.

Bring popcorn.

If its not possible to give anything near an 
order-of-magnitude-industry-average-answer or range I understand.


my ($time,$cost) = Hypothetical::PieceOfString::Factory->new();

Now, that's code re-use! :-)
--
Frank Wales [fr...@limov.com]

--
The Open University is incorporated by Royal Charter (RC 000391), an exempt charity 
in England & Wales and a charity registered in Scotland (SC 038302).



Re: Average, Best and Worst: Cost and Time to Produce Software Code

2011-05-11 Thread John Domingue
Thanks a lot Richard and John for the extensive comments. These more  
than satisfy my needs.


best

John

On 11 May 2011, at 04:20, Richard O'Keefe wrote:



On 10/05/2011, at 5:55 PM, John Domingue wrote:

John and Paola, thanks for your comments. I understand that there  
are many variables. I would like to convey to a non-computer  
scientist audience the significant effort that goes into software  
production in order to motivate software and component re-use.  
Otherwise a naive person may ask "why not just create the software  
you need on demand every time?".


If its not possible to give anything near an order-of-magnitude- 
industry-average-answer or range I understand.


Suppose I go to someone who works with wood, as in fact I did this  
morning.
Q. "I'm looking for pointers to how much time and cost is associated  
with

   projects that work with wood."
A. Well, it depends on a lot of things.  Can you be more specific?
Q. If it's not possible to give anything near an order-of-magnitude- 
industry-average-answer

  or range I understand.
A. Well, look:
  - producing a bag of kindling might take about 3 minutes
  - fixing your broken kitchen drawer might take half an hour
but it will probably be a week to find a spare half hour [it did]
  - building you a whole new kitchen will take a couple of days  
[dream on]

  - repairing your outside wall might take us a day to assemble the
materials and a day to do it, but it'll be another day to put up  
the

scaffolding and we'll have to wait until the hire firm have some
available, and then you'll need another day for the painting,  
and of

course weather can hold it up [still dreaming]
  - tearing the whole tumbledown house apart and building a new one  
in its
place will take, ooh, months, and how much money did you say you  
had?

[This will have to wait until I win Lotto, or, since I never buy a
 Lotto ticket, the Greek Calends.]

I could make up a similar story about building a dam: 5 minutes to  
drag a
few twigs across a gutter, an afternoon to make an earth dam on a  
farm,

years to make a hydroelectric dam.

Last week I wrote a program that was 3 pages of code.  It comes to  
about
120 "SLOC" (Source Lines Of Code).  An industry figure is 10  
documented

tested deliverable SLOC per day.  It took me one day to write it and
another day to test and document it, so 60 SLOC per day, but that's
because it was a very small program and I had written two like it  
before

(one of which I never got working).

The Microsoft Research Kernel is about 800,000 SLOC.  So let's say  
that

was somewhere between 10,000 days and 80,000 days.  It's derived from
Windows.  Let's say it took 10 years to get to its current shape, and
take a typical figure of 200 work days per year.  Now this is MUCH  
harder
code to write than my little 3-pager.  The difficulty goes up faster  
than
linearly.  So if we take 800,000 SLOC / 2,000 (SLOC/year) and say  
that's

400 work-years, we are probably underestimating the cost seriously.
These aren't your run-of-the-mill programmers; these have to be  
seriously

expert, so £45,000 per year is probably on the low side.  So it's
400x£45,000 = £18,000,000 for programmer salaries, and a common rule  
of
thumb is to double that to account for buildings, computers,  
resources,
other staff.  To make something that big and complicated, we're  
probably

looking at £40,000,000.

I'm going to do some programming for a local company.  I'll probably
bill them for about 3 hours, maybe £240.  I'll do it in my spare time
over a week.  That's not developing new software, that's making a
change to an existing program, probably about 30 SLOC (but making it
the *right* SLOC!).

I should point out that the Windows Research Kernel is not, by today's
standards, a particularly large program.  You will find statements  
like

this:
indeed, modern cars have reached 7 figures when measured in
lines of code, distributed across up to 100 micro-processors.
-- l.hat...@kent.ac.uk

That's "7 figures" as in "two to three million".  That explains why I
would never buy a new car even if I could afford to.

One industrial project I know of  took 4,000 programmers about
five years and it was abandoned unfinished.

So here's a range of 30 lines to 40 *million* lines.  How could one  
give

a single order of magnitude estimate for such a wide range?

If you want to get people to understand "why not create new software
every time", try asking them this:

   I want you to write down a complete, correct, unambiguous,
   straightforward description of how to take a date in the
   Gregorian calendar (year number, month number 1-12, day
   number 1-31), add a given number of days to it (let's say the
   shift is in the range -999,999 to +999,999), and report the
   answer in the Gregorian calendar again.  Your method should
   assume the person who will be following it can correctly do
   all the