From: Jacob Fugal Date: 2006-09-12T09:56:58+09:00 Subject: The economics of a slow but productive Ruby [NOTE: I'm trying to present the facts and be objective in this post. I love Ruby, and would choose it any day when economics didn't matter. But in the sense of the "Real World", this is what I discovered. And of course, if I made any serious mistakes, be sure to let me know!] Company QUUX is deciding on technologies for a new project. They estimate a development budget of A and a hardware budget of B under technology BAR: development budget under BAR = A hardware budget under BAR = B total budget under BAR = A + B They are also considering using technology FOO as well. FOO is widely reputed to grant productivity gains of a factor Y, but is slower than BAR, requiring X times the servers. FOO developers make about Z times as much as BAR developers, on average: X = servers required under FOO / servers required under BAR Y = productivity FOO / productivity BAR Z = annual FOO salary / annual BAR salary The development budget under FOO would be reduced by the productivity increase, but that increase will be mitigated by the difference in salary: development budget under FOO = AZ/Y The hardware budget under FOO would be increased by the factor X: hardware budget under FOO = BX The total budget under FOO, in terms of the budget under BAR, would then be: total budget under FOO = AZ/Y + BX Given these estimates, it would be a profitable decision to choose FOO over BAR if and only if the total budget under FOO is less than the total budget under BAR. choose FOO iff AZ/Y + BX < A + B -- or, rearranging... choose FOO iff (X - 1)B < (1 - Z/Y)A choose FOO iff [(X - 1) + (1 - Z/Y)]B < (1 - Z/Y)(A + B) choose FOO iff B < [(1 - Z/Y) / (X - Z/Y)](A + B) Let's apply this estimate to the current standing between .NET and Ruby/Rails, using the figures from Joel (X = 5, Y = 5). In this case, Z = 1 (actually, in my comparisons, Z was slight *less* than one). (1 - Z/Y) / (X - Z/Y) = (1 - 1/5) / (5 - 1/5) = (4/5) / (24/5) = 4 / 24 = 1 / 6 So, choosing Ruby of .NET (assuming Joel's numbers are correct) is economically sound iff your hardware budget makes up 1/6th or less of the total estimated .NET budget. Now, let's assume 20 servers and a 5 year application lifespan, with a $5K one-time cost per server, $500 annually for repairs and one Sysadmin with a salary comparable to the developers ($60K). This brings our hardware budget to $450K over the 5 years[1]. If this is only 1/6 the total budget, we need to be spending at least 5 times as much on developers, or exactly that amount per year. Using the same $60K figure for developer salaries, this comes to 7.5 developers. So, if you're developer to server ratio is at least 3 developers for each production server, Ruby is probably economical. If you start getting a lot more servers than developers however, the hardware cost of a slow Ruby builds up on you. Jacob Fugal [1] It's interesting to note however that 67% of that figure is still in paid salaries, rather than the cost of the hardware itself. If you've got a super sysadmin who can manage 100 boxes (and you better be paying them at least 80K if they are that super), the hardware budget will scale a lot better. There's a lot to be said for getting your hands on a good sysadmin...