

PHP/Python/Ruby - Immoral? - NerdsCentral
http://nerds-central.blogspot.com/2012/04/coal-stop-burning-it-just-to-make.html

======
3pt14159
I hate environmentalists. Don't get me wrong, I love the environment, I even
call myself a geolibertarian at Mises conferences, but the problem I have with
environmentalists is that they think "the world doesn't boil down to dollars
and cents" (This was actually said to me).

Let's be very, very generous here and assume that it would take twice as long
to code something in C that it would in Python. Let's assume that the code
isn't a static library, but something like a web app or equivalent. Doubling
the number of developers to get the 10x speed up / 90% reduction in server use
_is not worth it from an environmental perspective_. Those developers use
resources to live. They burn fuel to heat their dinner. They drive their car
to work.

These types of arguments are trying to make an emotional plea to a perceived
market failure. The solution is to fix the market, not waste time implementing
stuff in C. Tax pollution at the rate at which it would take to clean it up
and the market will automatically allocate resources efficiently.

~~~
cassandravoiton
You shoot down our own argument. The video suggest C# and Java as alternatives
to interpreted languages. By picking C you are deliberately trying to make
your argument sound stronger than it is. The video also mentions the economic
cost.

From an economics point of view you are just wrong. Because of the vast
numbers of computers used in 'scale out' architectures the impact of code
efficiency is enormously bigger than the cost of developers. If a developer's
code runs on 10 or 100 machines then you are correct. But modern software runs
on hundreds or even hundreds of thousand machines.

~~~
3pt14159
The video wouldn't run in my OS (which isn't standard, granted, but still).

Most software that ships to hundreds of thousands of computers is software
that must run on _other_ people's machines. If it must, then it is
automatically in the markets best interest to optimize to require less
overhead since it will give them access to a larger portion of the market. If
it is for their own internal servers, then again it is in the market's best
interest to roll it in C or similar since they are able to make the
distinction as to where it is worth it to convert it to a lower level
language.

------
tommorris
"PHP/Python/Ruby - Immoral?"

Ooh, ooh, Betteridge's Law of Headlines -
<http://enwp.org/Betteridge%27s_Law_of_Headlines> \- has the answer: no.

------
lukeholder
For scientific computing and data crunching, trying to get the MOST OUT OF THE
HARDWARE, I would agree you are wasting resources using a interpreted
language, and it is inefficient.

But when your goal is first to market, and trying to get the MOST OUT OF THE
PROGRAMMERS - it is a waste of human resources, and programmer enjoyment using
a compiled language with an unfriendly syntax.

Of course, you could find experienced programmers who are super fast
productive, and super happy to work in the compiled languages - but don't
underestimate that most people enjoy interpreted's ease of getting started,
and syntax simplicity - and usually they cost less to hire as there is a
larger pool of people.

~~~
cassandravoiton
But is that not the point of the post - that all the 'easy and cheep' comes at
a huge cost to be planet and eventually to the company. Are C# and Java really
that much harder to learn and use?

~~~
AlexandrB
It's trivial to write monstrously inefficient C/C++ - arguably it's even
easier than writing slow Python code, because high level concepts like events
and callbacks are harder to express programatically and code that should be
event-driven becomes:

    
    
      while (1)
      {
        // check for input
      }
    

And no offense to the TFA, but all the academic code I've seen is buggy, slow,
and inefficient - hardly using "every ounce of efficiency". For example, the
most popular data processing tools I've seen in engineering are matlab and
excel (!). Not exactly coding to bare metal.

~~~
NerdsCentral
Most real scientific computing (quantum mechanics - in which I did my
doctorate, meteorology, astrophysics etc.) is done in C or more normally
FORTRAN. The code will use highly optimised routines like BLAS. It is normal
to perform careful inner loop optimizations for each target platform.

Don't talk about things you don't understand.

~~~
AlexandrB
> Don't talk about things you don't understand.

Fair enough, but you do realize that not everyone will optimize inner loops
after switching to C/Java? Certainly not to the extent of scientific computing
or even the language shootout snippets.

Also to address the power usage of one server. The 6.6 tonnes number seems to
come from having the server drawing 1kw of power continuously for an entire
year. The biggest server I could find on Dell's site (E910) comes with a 1.1KW
power supply. This DOES NOT mean that it draws 1.1KW continuously. Indeed,
outside of peak usage hours it probably draws much less. This is amortized
over many users as well. Even slow, interpreted languages can serve hundreds
of users on such a server.

Compare this to driving 10 miles/day in a medium-sized car. This produces 2
tonnes of CO2 annually, and unless you're diligent at carpooling, probably
serves one person. Even a small car will still use half of that. If some new
software helps even a small number of people telecommute instead of driving,
the result is overall positive. For this to work, such software has to be
cheap (certainly cheaper than driving) and for that to happen programmer time
must be conserved.

~~~
NerdsCentral
Good arguments. I based 1kw on the 800 watt rating of the machine mentioned
plus a/c etc. It is all ball park and I am a bit shocked you are the only
person to call me out. But it does not matter because if you 1 tonne per year
- it is still plenty. The car thing is a good point to make but I think you
are stretching it with the telecommuting. This is especially so as the key to
telecommuting if fast software (ever tried implementing video streaming in an
interpreted language?) The amortized over many people point correct but not
valid to the argument as it is a multiplicative not additive effect it has as
no impact on the over all calculation.

------
gdg92989
I have to disagree here. Although I know that the speaker is just trying to
have fun with the idea the metaphor is flawed. whereas a Mercedes engine gets
more and more powerful and not any more efficient computer processors are
getting more efficient by the day. also the "10 to 100 times slower" comment
seems like an exaggeration to me. In the end the language you use should be
decided by what will give your customers the best software possible and
nothing else. Because its not immoral to waste the computers time but it is
immoral to waste the users time.

~~~
cassandravoiton
There are plenty of bench marks showing 10 to 100 times is in the ball part.
Computers use masses of power because there are so many of them. As they get
more efficient, their numbers increase. The benefit of using faster languages
is constant irrespective of the efficiency of the machine on which it is
running. How can wasting energy be OK? Even if you don't think it has climate
change effects, it has economic and energy security effects - non of them
good.

~~~
gdg92989
I wouldn't say its OK to waste energy but you have to put things in
perspective. Your first concern should be to save the users time. The less
time they have to use the program to achieve their goal means less
instructions. Videos like these aren't looking at the bigger picture.

~~~
cassandravoiton
If code runs faster then the user time is wasted less as well. That seems in
alignment with the ideas behind the video.

~~~
gdg92989
I don't want to hear the "faster programs save the user time too" argument its
total BS. the vast majority of CPU time is spent waiting for the user. So
while you're on a holy quest maximizing 100,000 instructions down to 1,000,
every second that the user wastes dealing with your neglected UI 1,000,000,000
cycles are wasted (and that's on a machine with a single 1ghz processor).

~~~
NerdsCentral
The post is talking about servers. Most scripting is for code running on
servers. Servers do not wait for the user. Your comment has zero merit.

~~~
gdg92989
no.. your comment and your whole shortsighted video have no merit. Servers
spend time waiting for users as well. Whether its waiting for the next HTTP
request or the next batch processing job servers wait for people too.

~~~
NerdsCentral
OK, I'll explain this as you clearly have no idea what you are talking about.
When one commissions a server or server farm it is done against a service non
functional requirement. For example 1 second page serve time at peak load.
This means that a lot of the time the servers might be waiting but not a peak
load. Never the less, modern servers will clock down if waiting. Now, what
sets the peak load is the efficiency of the software and the number of people
using the server and/or the run length of the batch jobs. The more efficient
the software the less servers are required to meet the peak load and so the
less power is used all the time. Further, the more efficient the software the
less often servers will have to clock up during off peak times. Do you finally
get it? If not - I suspect you have zero idea about large scale computing and
are here only to defend your lack of ability to program anything other than
scripts.

------
noarchy
...and then they embed Flash in the page. I wonder how much energy gets wasted
by my CPU fan being driven to 100% on Flash sites :)

~~~
cassandravoiton
Yes - HTML5 would be much much better - it will come soon I expect.

~~~
gdg92989
Although I will concede that flash is an abomination that needs to be removed
from all my computers. haha

~~~
NerdsCentral
Yes - I said that some time ago.. [http://nerds-
central.blogspot.co.uk/2007/06/why-flash-is-per...](http://nerds-
central.blogspot.co.uk/2007/06/why-flash-is-perniciously-evil-and.html) and
[http://nerds-central.blogspot.co.uk/2010/05/steve-jobs-
agree...](http://nerds-central.blogspot.co.uk/2010/05/steve-jobs-agrees-with-
me-yes-flash.html)

------
cultureulterior
Opposing nuclear power is immoral. Writing code is ruby is good sense.

CO2 is only a problem if we let it be.

~~~
NerdsCentral
Not sure of the connection here. BTW - check out the nerds-central post on why
Thorium matters if you are pro-nuclear - it might have some good amo for you
to use.

------
skore
"All things techi and nerdy!" - I cannot wait to have the power to downvote.

