2010年12月5日

年にひとつは新しいプログラミング言語を

diaspora-dev において、Diaspora を PHP で再実装しないの? (Diaspora PHP Fork) というスレッドにおける、とある発言です。前後の文脈もありますのでこれだけで完全な意味を成すものでもありませんが、他の言語やプロジェクトにも当てはまることが多々ありそうです。

日本語訳

以前に抱いた残念な感じを思い出さなくてはなりません。 Diaspora に興味はあるけど PHP のコードしか使えないのなら、既存の PHP プロジェクト (例えば appleseed[1] やその他の Federated Social Web プロジェクト) との互換性を確保するべきです。 今の段階で Disapora を移植することは馬鹿げています。 なんと言うか... まぁいいでしょう。 私としても言い争いは聖戦[2] 以上に好ましくありませんが、ちょっと書いておきます。

ここからは批判的な文体になりますよ。無視してくださっても。

ともあれ、Diaspora が私にとってもっとも魅力的なことは、Ruby と JavaScript で記述されていることです。 私個人としては、いくつかの理由によって PHP が悪いコードになりがちであると信じています。 PHP が悪いコーダーを惹きつけるのか、PHP 自体が悲惨な設計の言語だからなのかもしれません。 しかし、何より言いたいのは、プロジェクトに興味があるならそこで使われている言語を学べ、ということです。

プログラマーだったら毎年ひとつは新しい言語を学ぶべきです。 Ruby はここ20年でもっとも魅力的とも言える動的な言語です。 Ruby を学んでそれでも嫌いだったらそれはそれで構いません。他のプロジェクトで頑張ってください。 けれど、新しい言語を学ぶのが面倒だから、という理由だけでプロジェクトをフォーク (他の言語に置き換えるのは forking ではなく porting ですが、ここではもはや何でも良いとしておきましょう) しても、何も前進しません。 みんなの努力が散り散りになってしまい、コードは重複するばかりです。 DRY (Don't Repeat Yourself) の真逆だとお分かりですか?

それだったら自分で PHP のプロジェクトを始めて、Diaspora のフォークを気取るのではなく"ScatteredSeeds" (意味はギリシャ語を) とでもした方が良いのではないでしょうか。 うまくいけばあなたの頑張りを利用するような PHP FSW (Federated Social Web) プロジェクトがありますし、もしくは Diaspora (現実のものです) があなたの努力を取り込むかもしれません。 しかし、同じことを別々に頑張るなんて大人気ないと思いませんか。 40年に渡るソフトウェア開発で得られた知見とは正反対なのです。

馬鹿げた発言を申し訳ありません。 でも、コードを書くのは私の生活の一部ですし、必要もないのに重複する作業を頑張ることほどイライラすることもありません。全てのひとの生活をいつも台無しにしてしまいます。それがうまくいったことなんかちっともありません。一度もです!

読んでくれてありがとう。

原文

I have to echo the sentiments earlier, the thing to do if you're excited about diaspora but only code PHP, is to work on interoperability with an existing PHP project, like http://opensource.appleseedproject.org/ or one of the many other Federated Social Web projects. Forking Diaspora at this early stage is just absurd. I also have to say... OK, the LAST thing I want is to start anything resembling a flame war, much less a Holy War <http://www.ist.rit.edu/~jxs/jargon/html/H/holy-wars.html>.
<semi-flame mode>
But one of the most exciting things about Diaspora for me is the fact that it's all Ruby and javascript. I really believe PHP tends to lead to bad code for some reason. Maybe PHP attracts bad coders, or maybe it's just because PHP is a horribly designed language, but seriously, if you're excited about a project, LEARN THE LANGUAGE. Every programmer should learn a new language a year. Ruby is possibly the most exciting dynamic language to come along in the past 20 years. If you learn Ruby, and hate it, fine. Work on another project. But 'forking' a project (ok, recoding in another lang is NOT forking, it's porting, but whatev's) just because you're to lazy to learn the language it's coded in is NOT how things progress. It's how effort gets divided, code gets duplicated, it's the opposite of DRY. It would make more sense to start your own PHP project and call it 'ScatteredSeeds' (learn Greek) instead of pretending it's a 'fork' of Diaspora. Srsly, there are existing PHP FSW projects that could use your efforts, or Diaspora (the real one) could use your efforts... but duplicating effort is RETARDED. It's the OPPOSITE of everything we've figured out about the right way to develop software over the last four decades.
</semi-flame mode>
I apologize if I come across as a dick, but I write code for a living, and nothing irritates me more than duplication of effort without necessity. It makes life worse for everyone, everytime. Nothing good ever comes of it. EVER. Thanks,

0 件のコメント: