-
-
Notifications
You must be signed in to change notification settings - Fork 295
Description
Description & steps to reproduce
Hi,
I've been testing scc
on a project of mine (PBD) and the estimated cost just seems to be way higher than expected:
$ scc --version
scc version 3.0.0
$ git clone https://github.com/Theldus/PBD
Cloning into 'PBD'...
remote: Enumerating objects: 845, done.
remote: Counting objects: 100% (493/493), done.
remote: Compressing objects: 100% (304/304), done.
remote: Total 845 (delta 327), reused 318 (delta 164), pack-reused 352
Receiving objects: 100% (845/845), 248.96 KiB | 0 bytes/s, done.
Resolving deltas: 100% (590/590), done.
$ scc PBD/
───────────────────────────────────────────────────────────────────────────────
Language Files Lines Blanks Comments Code Complexity
───────────────────────────────────────────────────────────────────────────────
C 16 7856 927 2645 4284 796
C Header 15 1543 186 622 735 113
Makefile 3 303 42 115 146 2
Assembly 2 502 38 0 464 8
Shell 2 252 31 79 142 12
License 1 19 3 0 16 0
Markdown 1 223 44 0 179 0
R 1 98 11 35 52 0
YAML 1 49 4 4 41 0
gitignore 1 33 1 22 10 0
───────────────────────────────────────────────────────────────────────────────
Total 43 10878 1287 3522 6069 931
───────────────────────────────────────────────────────────────────────────────
Estimated Cost to Develop (organic) $179,418
Estimated Schedule Effort (organic) 7.159522 months
Estimated People Required (organic) 2.226385
───────────────────────────────────────────────────────────────────────────────
Processed 292631 bytes, 0.293 megabytes (SI)
───────────────────────────────────────────────────────────────────────────────
I may be completely equivocated (and I apologize in advance), but 179k$ for a 6096 SLOC project, 2 developers and 7 months, seems far above the average developer salary.
Initial investigation
Although I'm not a Go programmer, below is my attempt to understand better the issue.
The organic COCOMO calculation code (cocomo.go
) can be quickly implemented with the following Python code:
def estimate_cost(effort, wage):
return effort * float(wage/12) * 2.4
def estimate_effort(sloc):
return 2.4 * pow(float(sloc)/1000, 1.05) * 1
def estimate_schedule_months(effort):
return 2.5 * pow(effort, 0.38)
and the project cost showed above could be calculated as (using the same avg wage found on processor.go
):
>>> effort=estimate_effort(6069)
>>> cost=estimate_cost(effort, 56286)
>>> months=estimate_schedule_months(effort)
>>> people=effort/months
>>>
>>> effort
15.939850215524215
>>> cost
179418.95402594056
>>> months
7.159521842460346
>>> people
2.2263847455553734
that matches exactly with the one reported by scc.
However, the EstimateCost
method only takes effort
and wage
into account, and effort does not represent the number of people in the project nor the estimated time in months.
Maybe I got it wrong, but in my head the correct way to generate the cost would be:
- Calculate effort from SLOC (E).
- Calculate the estimated time in months from the effort. (D).
- Calculate the number of people needed from effort and time. (P).
- Calculate the cost, based on average salary, time (D) and people (P), i.e:
cost = (avg_wage/12) * D * P
.
Thus, the PBD's real cost would be:
>>> true_cost=(56286/12) * months * people
>>> true_cost
74757.89751080857
Desktop (please complete the following information):
- OS: Slackware Linux (x86_64)
- Version: 14.2