h1

Rails Wanted Dead or Alive $2.500.000!

July 10, 2007

Wanted Rails

Rails success is not debatable. But this was not an easy battle (and still isn’t) and some projects are trying to keep the ewes into the JEE garden.

Rails SLOC 2004-2007

This represents the SLOC (Source Lines Of Code) of Rails since it was born 3 years ago.
What to say about this? Basically you can’t say much about SLOC (see the SLOC part of a previous post)… Except that the progress is regular (which can be explained by the fact that it is maintained by a company in contrast to open source projects which might have an important growing community of commiters)
Now sloccount gives us a summary:

Total Physical Source Lines of Code (SLOC) = 74,385 (100% Ruby)
Development Effort Estimate, Person-Years (Person-Months) = 18.45 (221.45)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 1.62 (19.46)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 11.38
Total Estimated Cost to Develop = $ 2,492,879
(average salary = $56,286/year, overhead = 2.40)

So the reward for Rails is $2,492,879!
This is based on 2004 salary…

Now if you want to have some fun and get some stats from your favourite svn repository, go get Ruby, go get Gruff, go get sloccount, go get a Beer, and relax!
Sorry for the format but WordPress really doesn’t help me…
# railssloccount.rb
# July 10, 2007

require 'date'
require 'rubygems'
require 'gruff'

DIR_DOWNLOAD = '/home/username/railssloccount/'
STEP = 15
FIRST_DATE = '2004-11-29'
GRAPH_SIZE = 400
GRAPH_HORIZONTAL_AXIS_SPACE = 16
axis = {}
datas = []
index = 0

puts "svn checkout --revision {#{FIRST_DATE}} \
\"hxxp://dev.rubyonrails.org/svn/rails/trunk\" \
#{DIR_DOWNLOAD}trunk"


`svn checkout --revision {#{FIRST_DATE}} \
\"hxxp://dev.rubyonrails.org/svn/rails/trunk\" \
#{DIR_DOWNLOAD}trunk`


(Date.parse(FIRST_DATE)..Date.today).step(STEP) do |date|
axis[index] = date.to_s \
if
index % GRAPH_HORIZONTAL_AXIS_SPACE == 0
index += 1
puts "svn update --revision {#{date}} \
\"hxxp://dev.rubyonrails.org/svn/rails/trunk\" \
#{DIR_DOWNLOAD}trunk"

`svn update --revision {#{date}} \
\"hxxp://dev.rubyonrails.org/svn/rails/trunk\" \
#{DIR_DOWNLOAD}trunk`

puts "sloccount #{DIR_DOWNLOAD}trunk"
result_cmd = `sloccount #{DIR_DOWNLOAD}trunk`
File.open("#{DIR_DOWNLOAD}sloccount_#{date}.txt", "w") { |f|
f << result_cmd
}
result = result_cmd[/ruby:\s*(\d+)/].gsub(/ruby:\s*/, '').to_i
puts "Date: #{date} - SLOC: #{result}"
datas << result
end

axis[index-1] = last_date.to_s

g = Gruff::Line.new(GRAPH_SIZE)
g.data('Rails SLOC', datas)
g.labels = axis
g.minimum_value = 0
g.title = 'Rails SLOC'
g.write("rails_sloc_#{STEP.to_s}day_#{GRAPH_SIZE.to_s}.png")

Advertisements

One comment

  1. Look at the situation 2 years down the line and the unscalability of Rails and lack of vital features has become apparent.

    plural of goose is gooses is it? Rails is just a toy language for simplistic applications.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: