I bet they'd invent a great language for smells.

cost per line of code

Might be useful to you guys, I found it so.

http://vladnevzorov.com/2011/01/31/how-much-does-it-cost-to-develop-a-line-of-code-sloc/

Using assumptions that experienced specialist developers make $60k, including taxes and benefits, and work 1850 hrs a year (150 less than the typical US minimum), code costs between $12 and $19 a line.

Approaching the problem separately, and assuming a lot of free open source contributions, he comes up with $103 per line of code and $52 for two different projects.

So a reasonable range is $12 to $103 per line.

That's within an order of magnitude, which is better than what we knew before.

Also, you know how much to charge for that 10,000 line custom project that the client thinks will just take you a few days and should be either free or something like $25.
Permalink Scott 
April 8th, 2013 7:26pm
Lines of code is a very silly way to measure software...
Permalink Shylock, Denman's a twit 
April 8th, 2013 7:40pm
What do you prefer?

I like it as an at the glance measure
Permalink Asseby 
April 8th, 2013 7:54pm
That's because you're an idiot who is unable to accurately measure cost or time needed to deliver projects with a given scope, a skill I and others mastered decades ago and perform with exceptional accuracy.
Permalink Scott 
April 8th, 2013 7:54pm
That was in response to the "silly way" comment.

What does he use? He pulls a hair out of his ass, measures it, converts length to days, then doubles the estimate and move it to the next unit.
Permalink Scott 
April 8th, 2013 7:55pm
Customer: About how much will this custom project cost?

Smart person: We've done things similar to that level of complexity before and we have the right staff to work on it. These projects are most efficiently written in Language X and such a project would be around 10,000 lines of code. So it will cost somewhere between $150,000 and $1.2 million.

Clueless unprofessional (ie Shylock): I dunno. Maybe I could do it in a couple weeks. So I guess $500?
Permalink Scott 
April 8th, 2013 7:58pm
Shylock's law: the more you know what needs to be done, the less you know how long it will take and how much it will cost. The more you know how much time and money you have, the less you know what you will get. This is a law of nature that I've discovered.

So Mr. Smarty Pants, how do you measure dynamic code?
Permalink Shylock, Denman's a twit 
April 8th, 2013 8:13pm
"the more you know what needs to be done, the less you know how long it will take and how much it will cost"

Translation: "Hey everybody I don't know what the fuck I am doing! Obviously since I am so smart, no one else must know either!"

Not considered: That others do know what they are doing because they are professionals.
Permalink Scott 
April 8th, 2013 8:34pm
Scott,

You're a piss poor imitation of Idiot at his most grandiose, but without the tongue placed firmly in cheek.
Permalink Send private email Voltaire's Dog 
April 8th, 2013 8:38pm
The OP here has useful information.

The response that "but LOC is dumb" is retarded and deserves to be called out as such.

The industry is in a horrible state. Only a small number of people are professionals with any measure of competence and we are drowned out by the idiots any time we share useful information.
Permalink Scott 
April 8th, 2013 8:49pm
That was so well said VD. Poetry.

Lines of code. Actually laughing out loud.
Permalink Shylock, Denman's a twit 
April 8th, 2013 8:50pm
Yes Scott, the waterfall method has worked so well, for so many people over the years.

You're killing me here. What a putz.
Permalink Shylock, Denman's a twit 
April 8th, 2013 8:51pm
Not many people are taking the bait on Scott's trolling but I'll take a stab since I'm actively working on removing lines of code this week -- practically all I'm going to be doing for days.  So how does that work with an LOC measurement?  Is the project getting cheaper or more expensive?
Permalink Send private email Wayne 
April 8th, 2013 9:01pm
Lots of folks poking at LOC, but not offering anything it's place.

It's simple and has limits, but it's something.
Permalink Dr. Horrorwitz 
April 8th, 2013 9:09pm
You're making the typical developer's mistake.

There's a difference between "cost of manufacture", and "price charged for sale".  They are NOT the same thing, even if both are measured in dollars.  The "cost of manufacture" is what it is.  The "price charged for sale" depends heavily on the market.  You can't simply charge, for each copy, the price it cost you to make one of them.

If it "costs" you $100 per line of code, and you make a 10,000 LOC program (typical largish application rule-of-thumb) you've invested a million dollars in it -- not bad for 10 programmers at 100K for one year.

If you then sell ONE copy, you should charge a million dollars just to break even -- but probably a person won't pay that (unless it's space shuttle software, in which case it costs even more, but NASA would pay it).

However, if you can sell 10 million copies, you can afford to do that for $100 per copy, and gross a billion dollars.  And that's just the first year.

The nice thing about software is that every copy, after the first one, is basically free to manufacture.  So, the more you sell, the less you have to charge for each copy.
Permalink SaveTheHubble 
April 8th, 2013 9:28pm
Oh, and if you can create a "re-useable library", and "cut and paste" a solution out of it, you can get HUGE productivity each time you use it, after the first time you create it.

That assume you never, ever, sell the source code.  Since Microsoft has created this model where they don't even sell you the EXECUTABLE (you've just "licensed" it), that doesn't have to be a problem.
Permalink SaveTheHubble 
April 8th, 2013 9:30pm
SaveTheHubble has got it.
Permalink Scott 
April 8th, 2013 9:43pm
Scott, you are an interesting person.

And I don't mean that in a good way.  Does anyone like you?
Permalink Legion 
April 8th, 2013 10:07pm
https://en.wikipedia.org/wiki/Ad_hominem
Permalink Legion 
April 8th, 2013 10:08pm
My customers, my employees, my neighbors, my friends.

Seems that tyrants and the incompetent are the two groups that don't like me.
Permalink Scott 
April 8th, 2013 10:24pm
> Does anyone like you?

That's nothing.  There was an asshole here for a while who would invite people out on his boat for a pleasure trip & then invoice them.
Permalink Asseby 
April 8th, 2013 10:41pm
>> That's because you're an idiot who is unable to accurately measure cost or time needed to deliver projects with a given scope


Try that again without an ad hominem attack. I might respect you a little more.
Permalink Legion 
April 9th, 2013 12:31am
The original OP link was way off base with mainstream productivity numbers but he updated it:

>> Update from 11/10/2011. Software Estimation: Demystifying the Black Art book by Steve McConnell has a chart on p.56 derived from Cocomo II estimation model which plots effort in man-months vs. size of the project in SLOC. Based on the chart one single member of a development team (inculding all - managers, business analysts, quality assurance folks etc) produces around 6K-7K lines of source code per year. This is 3 times less that Cutter Consortium estimate

I usually figure on 20 to 30 lines/man-day total project productivity which is say 4-6 KLOC year, which seems to tally pretty well.

Pretty funny that he thinks Java is a "high level" language though.

LOC is a crappy metric but lke he says, when you have to replace a legacy system it's often all you've got.  It also correlates pretty well with the more sophisticated metrics which is why they don't get very far IRL.

You can't avoid estimating in any commercial situation, the problem is the practical and political difficulty in continuously tracking and reporting where the estimate was just wrong.
Permalink Trog 
April 9th, 2013 5:37am
From Wikipedia:

"As of January 4, 2011, using current LOC (lines of code) and wage numbers with David A. Wheeler's calculations it would cost approximately 3 billion USD (about 2.2 billion EUR) to redevelop the Linux kernel"
Permalink Trog 
April 9th, 2013 5:43am
I often have to use Informatica and other graphical ETL tools. Those tools are basically data flow diagrams that you put code into. A line of code is an arrow from one port to another.

How does one compute the lines of code for a picture?

Seriously, I'd really like to hear an answer for that.
Permalink Shylock, Denman's a twit 
April 9th, 2013 6:13am
>> The nice thing about software is that every copy, after the first one, is basically free to manufacture.  So, the more you sell, the less you have to charge for each copy.

Yeah, but this doesn't apply to in-house software, customized, maintained and developed for a single client on a perpetual basis.
Permalink Io 
April 9th, 2013 6:24am
> Seriously, I'd really like to hear an answer for that.

Is there no textual representation?
In other words, can you only do change management on binary files or something.
If so, pffftt :)
Permalink Trog 
April 9th, 2013 7:11am
I agree with Trog. It's text somewhere even if it is bloated XML.  Right?

Regardless, your question contains its own answer.  " A line of code is an arrow from one port to another. ".  Count arrows.
Permalink Asseby 
April 9th, 2013 7:24am
e.g.

http://www.graphviz.org/Gallery/directed/cluster.html
Permalink Trog 
April 9th, 2013 8:16am
You can export the code to XML. Here's the DTD:

https://rishav.googlecode.com/hg-history/79b8fc2157bbdfac9283679975d84d931691a4aa/powrmart.dtd

Good luck with that.

Counting arrows wouldn't work. A very simple, easy to understand mapping could contain a hundred arrows from source to target, with no transformations, while a very complicated, hard to understand mapping could contain only a few, but with excruciating transformations and lots of business logic hidden away within the bowels of the transformations and stored procedures.

Bad mappings look like wiring diagrams. Metrics used to compute circuit complexity would probably be more applicable.
Permalink Shylock, Denman's a twit 
April 9th, 2013 8:25am
Yes.  The central issue of software development is "Managing Complexity".  And one of our best tools of that is "Applying Hierarchy".

As "Zen and the Art of Motorcycle Maintenance" points out, any "Hierarchy" of data or concepts or code is externally applied.  Meaning reality itself does reflect a little hierarchy, but in general several different Hierarchical views could be applied.  Human systems have to be engineered that way, or you can get Rube Goldberg systems that are very hard to maintain, hard to create, and not reliable to use.

This was the problem with "GoTo" programming -- with completely undisciplined use, you got "spaghetti-code" with NO applied hierarchy, anything could call anywhere.

So that's the point -- you can't understand a system that's been built without hierarchy applied to simplify the system.  Well, you CAN understand it, but it's a much harder process.

That's one problem with "big-ball-of-mud" Object Oriented designs, too.  Everything is callable from everywhere, and the dependencies can be very unclear.  UNLESS someone has created the system with a hierarchical design to limit complexity of each method, and provide good data coupling to each method.
Permalink SaveTheHubble 
April 9th, 2013 9:28am
The central issue of software development is getting management to pay attention to details before there's a crisis.

If you don't solve that problem, it's never going to be easy.
Permalink Shylock, Denman's a twit 
April 9th, 2013 9:38am
Did you guys even read the original article?

>>So the method is clear: find a replacement cost published for a software technologically similar to what you want to develop and use it.

The author isn't talking about cost per line of code.  He's talking about cost to replace existing software with something equivalent in terms of complexity.

In his example, average Java/C++ program costs $12~18/line to replace, whereas the Linux kernel is closer to $103/line because it is more complex.
Permalink Kenny 
April 9th, 2013 9:44am
Whenever I see "line of code" used un-ironically I automatically dismiss the source.
Permalink Shylock, Denman's a twit 
April 9th, 2013 9:51am
Legion is making ad hominem attacks & railing against them.  What gives?
Permalink Asseby 
April 9th, 2013 11:33am
-- Whenever I see "line of code" used un-ironically I automatically dismiss the source.


You haven't offerd any substitute nor a coherent critique of LoC
Permalink Bot Baden-Württemberg 
April 9th, 2013 9:17pm
There is no substitute. See the Law of Nature that I discovered above. There just is no reliable way to estimate how long something will take to build.

The critique is, a) it doesn't work b) it is easily gamed c) it is ridiculous for ETL, either with the graphical tools like Informatica and Datastage, or SQL d) it is ridiculous for GUI development e) it discourages reusable code development f) it rewards bad programming.

And that's just off the top of my head.
Permalink Shylock, Denman's a twit 
April 9th, 2013 9:25pm
>> Legion is making ad hominem attacks & railing against them.  What gives?

Just a little tit-for-tat to make my point.
Permalink Legion 
April 9th, 2013 10:33pm
Nice summary Shylock.

What a mess: "There just is no reliable way to estimate how long something will take to build. "
Permalink Asseby 
April 10th, 2013 7:43am
Indeed, it has been said that LOC is the worst form of software metric except all those other forms that have been tried from time to time.
Permalink less is more 
April 10th, 2013 8:18am
Hey everybody, guess you need to learn about this creature from the black lagoon:

http://en.wikipedia.org/wiki/Function_point

<snort>

Good money in this btw, that is if you can handle bullshit with a straight face.
Permalink trollop 
April 10th, 2013 8:24am
Lines of code are a useful measure because of two things:

- most programmers put every "basic operation" of a language they use on a separate line
- the power of "basic operations" for most programming languages is more or less the same (assign a value, call a function, check a condition)

If we had languages which would allow to express more thought with a single statement than that, their LOC cost would be higher, as you'd have to put more effort into deciding what the each line should do. But there's been astonishingly little progress on that since the creation of C.
Permalink Quant 
April 10th, 2013 1:08pm
When you go into the database with stored procedure languages and SQL, neither of those preconditions is valid.

A CREATE MATERIALIZED VIEW DDL statement in Oracle creates tables, views, triggers, schedule entries and indexes. A single command.
Permalink Shylock, Denman's a twit 
April 10th, 2013 3:03pm
Database administration is something different.
Permalink Quant 
April 10th, 2013 4:10pm
Triggers are PL/SQL. You can also program the scheduler.
Permalink Shylock, Denman's a twit 
April 10th, 2013 5:16pm

This topic is archived. No further replies will be accepted.

Other topics: April, 2013 Other topics: April, 2013 Recent topics Recent topics