123
 123

Mon 29 September, 2008

Fri 28 December, 2007

Click here to bookmark this link.Channel Image21:48 动态Ruby/Erlang语言技术新闻» 道喜技术日记

动态Ruby/Erlang语言技术新闻

 

进入
天天红玉世界

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Sat 29 September, 2007

Click here to bookmark this link.Channel Image19:09 PHPの性能を大幅に改善するFastCGI» Matzにっき
先週のMySQL Users Conferenceでもらった資料を眺めているのだが、 PHPの性能を大幅に改善する技術としてFastCGIが紹介されている。 いや、そりゃ、FastCGIは有効な技術であるのは分かるし、 Rubyでもproduction codeではずいぶん利用されている。 が、そんなに新しい技術というわけでもないし、 2007年にマーケット色たっぷりにパンフレットを作って紹介する ようなものではないような。 PHPの(あるいはZend+Microsoftの)マーケティングは 日々耳にするWeb技術のトレンドからずいぶん「遅れた」ところを ターゲットにしているように思え..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image18:10 Projectionist Playlist» Projectionist

Projectionist Playlist


A continuously up to date m3u playlist of audio posts on Projectionist.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image16:31 Graffiti in Berlin» Projectionist
Click here to bookmark this link.Channel Image16:20 macerate: 1. To make soft b...» Projectionist
mac•er•ate
[mas-uh-reyt]verb
1. To make soft by soaking or steeping in a liquid.
2. To separate into constituents by soaking.
3. To cause to become lean, usually by starvation; emaciate.

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image15:14 Children! Be quiet until t...» Projectionist
Children! Be quiet until the chickens pee.

Basque Saying


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image14:45 9am, Malostranské Námě...» Projectionist
Bruce_prague_coffee

9am, Malostranské Náměstí, Prague


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image05:11 空の軌跡 FC & SC (PSP 版)» 青木日記
PSP を持ってないのに空の軌跡 FCSC PSP 版を注文してしまった。 しょうがないのでそのうち PSP を買うことにする。 (01:54)
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image05:11 あー» 青木日記
リファレンスのこと忘れてた。やっべー……。 (01:55)
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image00:09 UC Berkeley teaches Ruby on Rails» Riding Rails - home

UC Berkeley is teaching Ruby on Rails in its CS198 Rad Labs class. The class is being taught by Dave Patterson, the creator of RISC, SPARC, RAID, and more. Quite an endorsement.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image00:09 絵本の文章、無断で掲載…作家の寮美千子さんが提訴» Matzにっき
私は著作権は大事だと思っている。ので、 通常のケースなら、自分の文章が無断で利用されることに対して裁判を起こす人の気持ちは分からないでもない。ただ、このケースには賛同できない。 絵本の文章をホームページや本に無断で掲載されたとして、奈良市在住の作家、寮美千子さんが18日、岩井国臣・元参議院議員に、侵害行為の差し止めと75万円の損害賠償などを求める訴えを東京地裁に起こした。 しかし、この「絵本の文章」は彼女のオリジナルではない。 訴状によると、絵本は1995年に出版した「父は空 母は大地」で、先祖伝来..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image00:09 メニイコア、ヘテロジニアスコアのプログラミング言語» Matzにっき
この記事で解説されているようなものを「言語」とは呼ばないと思う、普通。 なんか、CPUインストラクションセットを言語と呼んでるような感覚。 でも、アプローチとしては面白い。 「言語」はこの技術を如何に抽象化し、隠蔽したまま、活用するか、 というところが腕の見せ所になる。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image00:09 [Think IT] 楽をする為ならどんな苦労も厭わない!» Matzにっき
MySQL Users Conference会場でThinkITのインタビューを受けた時のもの。 っていうか、ビデオメッセージとかめちゃ恥ずかしいんですけど。 自分がしゃべってるのを聞くと落ち込む。こんな甲高い変な口調でしゃべってるんだねえ。 ああ、やだやだ。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image00:09 Devlog - FasterCSVよりもLightCsvよりも速いCSVパーサ CSVScan» Matzにっき
Moonwolfさんのところ。 定番の郵便番号データをパースして行数をカウントするプログラムだと、FasterCSV比で19倍。LightCSV比で12倍の速さ。 というからたいしたもんだ。しかし、それでも「Pythonのcsvモジュールに比べると60%の速度」なのだそうで、「Pythonのcsvモジュールは化物か」という気分だ。 いや、専用にC extensionを書き下ろしてるからなんだけど。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image00:09 Asianux Road Show 東京» Matzにっき
というイベントで講演することになった。10月16日。 よしおかさんの頼みを断れなかったからだ。 人脈というのはこのように活用するのね。 しかし、せっかくの機会なのでもうビジネスの話は忘れて 技術っぽい話をすることにした。 ベースはModelingForumの時の話なんだけど、 より技術っぽい話(って言っても、私のことだから知れてるけど)にフォーカスしようと思う。 参加は無料。けど120人が定員だな。あまり多くはない。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Fri 28 September, 2007

Click here to bookmark this link.Channel Image19:49 プログラミング言語「Ruby」の資格認定試験を開始» Matzにっき
というわけで、世間で噂(?)の認定試験の詳細がとうとう発表になった。 問題はまだ完成してないけど。 Ruby認定制度とは Rubyベースのシステムを設計、開発、運用するエンジニア、Rubyでシステム提案を行うコンサルタント、Rubyを教える講師などを対象とした認定試験制度です。 認定者は、Ruby技術者としての技術力を公正に評価され、高い水準のRubyによるシステム開発能力を持つことを認定されます。 この認定によりRubyベースでシステム開発を行ううえで必要な基礎的な知識と応用力をもつことをアピールすることができます。 試験の合格..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:49 REMIX'07» Matzにっき
マイクロソフトのイベント。 なぜか招待されている。 ITProでレポートされている。このレポートには「研究テーマとして研究」というよくわからないフレーズがあるが、 私が発言したものではない、念のため。 しかし、日本で一番マイクロソフト製品を使っていないエンジニアであろう 私に講演を依頼するとは、マイクロソフトもなにを考えているのだろうか、 と思ったのだが、これはこれで面白い企画だろうと思って参加した。 内容的には「Rubyとエンタープライズ」とかいうような ここの所よくしゃべっている内容だけに新規性は無かったと..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:12 Kelly and Marcel Dancing On...» Projectionist

Kelly and Marcel Dancing On Prague


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image17:07 We should always look back ...» Projectionist
We should always look back on our own past with a sort of tender contempt.

Dennis Potter


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image17:00 boustrophedonic: (From the ...» Projectionist
bou•stro•phe•don•ic
[bou-stro-phe-don-ic]adjective
(From the Greek “boustrophe-don”: turning like oxen in plowing) An ancient method of writing using alternate left-to-right and right-to-left lines. It’s used for an optimization performed by some computer typesetting software and moving-head printers to reduce physical movement of the print head.

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image16:51 RJS??????Select??????» LetRails
????????????????????????Ajax Select??????????????????????????????????????????????????????option???????????????select??????????????????????????????Ajax??????????????????JS???????????????????????????????????????????????????????????? 1. ??????person resourc...
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:59 Tweets on 2007-09-27» halostatue
@objo there’s a meaningful difference? ;-) # @objo forced to choose between Cleveland and Cincinnati, Cleveland wins for the R&RHoF, but that’s it. ;) # going home for the day. interrupting the clone for tonight. # @vruz He doesn’t even know that. But it’s El Reg, so what do you expect? Quality? As if. # need a better [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:24 まつもとゆきひろ氏やソフトイーサに経済産業大臣表彰,情報化月間で» Matzにっき
なんだかまた表彰していただけるそうです。 しかも、今度は経済産業大臣に。..って今誰だっけ? 誉めていただけるのはありがたいことだし、 「なにやってるか分からない人」という周囲からの評価を改善するのに役立つから 今回もありがたくお受けしようと思うのだけど、 なんだか世間での評価と私の実態が乖離しているような気がするなあ。 他にもたくさんの人や企業が受賞する。登くんのところとか。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:24 「猫の司書さんはかわいい働き者」---U-20プログラミング・コンテスト,最終審査結果発表» Matzにっき
で、この表彰を受ける同じ日、同じ会場でU-20の表彰も行われる。 で、私も(若者に向けて)話すことになっている。 テーマは「プログラマの内なる衝動」。 ところで、表記の記事では「私が年齢を詐称して応募しても入賞できないかもしれない」と の私の発言が引用されている。確かにそう言ったのだが、 正直、「できないかもしれない」ではなくて「間違いなくできない」だろう。 自信がある。ネガティブに自信を持ってどうする、という気もするが。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:24 C REPL» Matzにっき
REPLとはRead-Eval-Print Loopの略。 Lispでは一般的だが、Rubyでもirb(interactive Ruby)が実現しているもののこと。 C REPLはC言語のためのREPL。高林くんのアイディアを具現化したもの。 要するに入力された各行をDLLにコンパイルし、 成功したらサブプロセスにロードさせて実行するというもの。 バイナリハックかくあるべし、という感じ。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image05:19 Are you anybody’s fav...» Projectionist

Are you anybody’s favorite person?


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image05:11 Erlang语言简明讲义:从创建、编辑一直到运行Erlang语言程序» 道喜技术日记

第一篇《从创建、编辑一直到运行Erlang语言程序》

=========
vim hello.erl【回车键】
=====
i
]]]]]
#!/usr/bin/env escript
『回车键』
『回车键』
main(_) ->『回车键』
io:format("世界,您好!").
[[[[[
Esc
:wq『
回车键
=====
chmod +x hello
【回车键】
./hello.erl
【回车键】
escript hello.erl【回车键】
=========
(一)符号说明:
  • ]]]]]:                   开始输入代码,这个符号本身不是输入内容;
  • [[[[[:                   结束输入代码,这个符号本身不是输入内容;
  • =====:              切换到新的界面或者程序,这个符号本身不是输入内容;
  • =========:     说明本篇内容开始或者结束;
  • 包含【回车键】的行都是系统终端命令。
  • 包含『回车键』的行是非系统终端命令。
(二) 内容注释
  1. 建议在Ubuntu操作系统上学习Erlang语言;
  2. 安装Erlang语言的运行环境命令:
    apt-get install erlang
  3. escript是执行Erlang语言主程序命令;
(三)讨论和帮助

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image02:31 obdurate: 1. Unmoved by per...» Projectionist
ob•du•rate
[ob-doo-rit, -dyoo-]adjective
1. Unmoved by persuasion, pity, or tender feelings; stubborn; unyielding.
2. Stubbornly resistant to moral influence; persistently impenitent.

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image02:30 Wild Banana Child» Projectionist

Thu 27 September, 2007

Click here to bookmark this link.Channel Image16:38 Rails框架开发工具讲座:在NetBeans上安装jMaki框架插件» 道喜技术日记

Rails框架开发工具讲座:在NetBeans 6.0 Beta 1上安装jMaki框架插件

  • 设置环境变量:
    SET NETBEANS_HOME = d:\opt\NetBeans6.0Beta1
    SET PATH = %PATH%;%NETBEANS_HOME%
  • 下载jMaki框架插件:
    mkdir %NETBEANS_HOME%\plugins
    wget https://ajax.dev.java.net/files/documents/3115/45044/org-netbeans-modules-sun-ajax-updatecenter.nbm %NETBEANS_HOME%\plugins\.
  • 启动NetBeans:
    netbeans
  • 安装jMaki框架插件
    菜单 -- Tools -- Plugins
    Downloaded -- Add Plugins... -- %NETBEANS_HOME%\plugins\. -- 打开
    Settings -- Ajax Update Center -- Available Plugins -- Reload Catalog -- jMake Ajax support -- Install
    Next -- I accept... -- Install -- Finish
    Close

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:59 Tweets on 2007-09-26» halostatue
when it rains, it pours # playing with fogbugz, finishing some C#/XML development work # Chapters just lost a sale because they didn’t have Rands’book in stock. # Powered by Twitter Tools.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Wed 26 September, 2007

Click here to bookmark this link.Channel Image21:46 REST on Rails??????????????????» LetRails
???????????????REST???????????????????????????map.resource???:collection???:member??????:new?????????????????? map.resources :projects, :collection => {:rss => 'get'} map.resources :projects, :member => {:close => 'post'} map.resources :p...
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:59 Tweets on 2007-09-25» halostatue
back online at work. PARTIAL power outage at home last night. Kitchen works, but not much else. # Powered by Twitter Tools.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:26 日経地域情報化大賞2007にRuby City MATSUEプロジェクト» Matzにっき
松江市のRuby City MATSUEプロジェクトが日経地域情報化大賞を受賞した、という話。 今回受賞したのは松江市で私は間接的な役割しか果たしていない。 とはいうものの、松江市にそのようなアクションをとらせるきっかけくらいには なっているわけで、そのことについては素直に喜びたい。 Ruby City MATSUEプロジェクトの成果がこれまでどのくらい上がっていて、 今後どうなるかということを正確に述べるのは難しいけれど、 「松江市の広報」という観点からは大成功ではないかと思う。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:26 Ruby on Rails講師養成講座» Matzにっき
「Rubyの講師になりたい人への講座」。 なんだかメタな話だが、ユーザを増やすためには教えることができる人が 増えなければだめだろう、ということでの試み。 三鷹ICT事業者協会が主催した上で、 RA認定資格まで取れる、と。 もっとも当面手に入る認定資格は、「講師」にはちょっと物足りないレベルだろうけど。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:26 BSD Licensed PCC Compiler Imported» Matzにっき
GPLライセンスで、かつコードが複雑になってしまったGCCに代わって 懐かしのPCC (Portable C Compiler) がOpenBSDに取り込まれた、という話。 もちろん、PCCと言っても古いままじゃなくて、 ANSI styleにも対応しているし、 C99対応も進んでいる。 理論上はPDP11でもコンパイルできるはず。 やるな。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:26 3rdRail» Matzにっき
「CodeGearのIDE」は3rdRailという名前になった。 「第三軌条」という意味らしいんだが、 鉄道に詳しくないんで、それがどういう意味なのかよく分からない。 と、書いとくと、鉄分の高い人が解説してくれるかもしれない。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image05:21 Designing scalable architectures» Riding Rails - home

Jason Hoffman from Joyent had a great tutorial at RailsConf Europe on Scaling a Rails Application from the Bottom Up. It defines the key terms and measurements of scaling and explains why scaling in essence have nothing to do with Rails. It’s a great story to have in hand when the inevitable fudzy “But does it scale?” nonsense is thrown at you.

Now you can get all of Jason’s slides from the tutorial.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image00:12 Ruby and Rails Resources» Lovable Lyle
I’ve just added a new page of links to Ruby and Rails resources. It’s primarily intended for software developers who are new to Ruby and want to get up to speed as quickly as possible. Please leave any suggested additions in the comments.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Tue 25 September, 2007

Click here to bookmark this link.Channel Image19:29 A Slwo Transition to a New Server» Pablotron: News

We're finally upgrading to a new web server. I've spent the last week moving a couple of domains a night from our current colo to the new machine. We're getting a massive hardware upgrade; the old machine is a 1.7GHz Celeron with 512 megs of RAM, and the new machine is a Dual 2.8GHz Xeon with 2 gigs of RAM.

In addition to the beefier hardware, I'm also migrating us from Exim to Postfix, upgrading to MySQL 5, Apache 2, and PHP 5, and, most importantly, segregating web, database, email, and nameserver bits into their own VServers.

The net result of all of this will be a system that's more secure, much easier to administer, and significantly faster.

I'm particularly exited about the move to VServers. We've had a few "trouble" users in the past who used more than their fair share of CPU, memory, or disk space. With the old system my only real options were

  • ask the person nicely to behave
  • disable the offending content and/or lock out their account, or
  • fix the offending PHP/SQL/whatever by hand

I was never particularly happy with any of those options. With the new setup, I can just isolate the offending user's content on a separate VServer, and throttle whatever resource they're abusing to an acceptable level.

There are other advantages, too. A couple of past upgrades have had "issues". Specifically, a new package I need to install wants to upgrade a bunch of core libraries, which, in turn, force upgrades to daemons I'd rather not mess with (I'm looking at you, Dovecot). The VServers allow us to quickly create throw-away machines to test upgrades and to isolate installations and upgrades to the services they apply to.

Stay tuned...


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image18:24 eidetic: Of, pertaining to,...» Projectionist
ei•det•ic
[ahy-det-ik]adjective
Of, pertaining to, or constituting visual imagery vividly experienced and readily reproducible with great accuracy and in great detail.

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:59 Tweets on 2007-09-24» halostatue
For the moment, at least, C# is beating me # Powered by Twitter Tools.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image03:10 The language of bias» Loud Thinking by David Heinemeier Hansson

If you don't like something new that's getting a lot of attention, you call it out as being all hype propelled by fanboys enamoured by an immature solution.

If you like that something new, you say it has momentum that's being accelerated by passionate advocates of a fresh approach.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Mon 24 September, 2007

Click here to bookmark this link.Channel Image21:15 Look at the sea. What does ...» Projectionist
Look at the sea. What does it care about offenses?”

Buck Mulligan


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image21:11 idiolect: The language or s...» Projectionist
id•i•o•lect
[id-ee-uh-lekt]noun
The language or speech pattern of one individual at a particular period of life.

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image19:38 XRuby 0.3.1和Ruby Hacking Guide中文版» 梦想风暴

今天是一个发布的日子,XRuby发布了0.3.1,Ruby Hacking Guide中文版发布了第一部分。

XRuby 0.3.1

相比于前一个版本,XRuby 0.3.1最大的进步在于完成标准库的预编译。预编译意味着什么?标准库代码无需在每次运行时编译,这意味着今后使用XRuby的标准库性能会得到一定的提升。

有一个与编译相关的话题。之前,Jon Tirsen曾经谈到JRuby的一个问题,运行在AppServer中会有占用太多内存。经过分析得知,为了提高程序的并发性,程序运行会启动多个JRuby。每个JRuby解析Ruby脚本都会建立一棵完整的语法树,这就意味着,由于这种解析模式本身的限制,对于同样的内容,内存中需要保存多份相同的语法树,这种做法意味着无谓的耗用了大量的内存。采用编译的做法,则可以很好的避免这个问题。因为在运行时,相同的是字节码,而JVM很好的帮我们解决字节码共享问题,无需耗用大量的内存。

Ruby Hacking Guide中文版第一部分

RHG终于完成了第一次发布。已经发布的第一部分介绍的是Ruby的对象模型。我正是从这个部分开始了解Ruby实现的,进而完成了XRuby的Runtime的重写。所以,我一直觉得这部分是了解Ruby实现非常好的一个起点。

从翻译Ruby Hacking Guide到现在已经超过了一年,从第一次发布消息算起也超过了9个月。相比XRuby,这个项目的进展可以用异常缓慢形容。这是一本日文书,也是一本技术书,而且是一本讲语言实现的书。任何一个点都会增加翻译的难度。几个懂日语的朋友先进行一遍初译,然后,我对再对译稿进行一遍校验,并根据自己的理解修改译稿,这样的过程无疑延长了处理的时间。这是一个业余时间的项目,而我更多的业余时间在XRuby上,没有太多精力投入上面。种种的因素造成了这个项目的一托再托。

目前,我手头已经有了第二部分全部和第三部分几章的初译稿,不过,按照之前的进度来看,这几章的发布可能要等到许久之后了。如果你有兴趣,可以加入到这个项目中来,这样,有助于加快这个项目的进度。


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image11:59 Tweets on 2007-09-23» halostatue
@lylejohnson I don’t find that a yikes. There are a few points that he makes that don’t surprise me. # Powered by Twitter Tools.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image09:23 On Derek Siver’s Return to PHP…» halostatue
Derek Siver's rewrite of CD Baby with Rails failed, but it's not Ruby's fault.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image09:08 Thinking about The Big Rewrite?» Loud Thinking by David Heinemeier Hansson

Rewriting existing applications from scratch in a Big Bang-style is rarely a good idea and often ends in failure. Chad Fowler wrote a good post summarizing some of the reasons why a year ago: The Big Rewrite.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Sun 23 September, 2007

Click here to bookmark this link.Channel Image23:45 摘录NPO纵横中的一段» Suave's Blog
看NPO纵横05年9月创刊号中的《扶贫日记:崇敬和回报穷人的美德》,中间有这样两段话。 人 们也许会习惯地认为贫困的人自身应该负有主要责任。也许是。但我接触多了贫困的人们后,觉得不...
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image06:12 Rails框架技术讲座:网络应用软件页面技术jMaki on Rails» 道喜技术日记
Rails框架技术讲座:网络应用软件页面技术jMaki on Rails

目录
 (一)系统环境:

  1. Ruby 语言 1.8.4版本, 点击这里Ruby1.8.4。要想安装多个Ruby语言运行环境请看这里
  2. Rails 框架 1.2.1版本,安装方法请看这里,最简单方法是第一种方法即可。
  3. Windows XP 或者 Windows 2000操作系统 或者 Linux操作系统
  4. 需要一个浏览器,如FireFox1.5.0.1以上版本。
  5. 开发编辑工具 Notepad2 ,安装方法请单击这里,复制一个notepad2.exe,并且更名为vi.exe。
  6. 在Windows XP上安装Linux核心命令,点击这里
  7. 如何在Windows Console下使用命令svn(下载软件),点击这里
  8. 安装数据库系统SQLite3,点击这里

 (二)前提条件:

  1. 在本机Winodw操作系统上,我们的工作目录为d:\works_rails。
  2. 你的电脑必须在线。

 (三)目的:

  1. 本文将说明网络页面技术jMaki上如何和Rails框架技术相互有机地结合在一起的。
  2. 本讲座的完整代码请您在Google Code Hosting上查看:
    http://cnruby.googlecode.com/svn/trunk/rails-projects/use-jmaki
    或者下载
    svn co http://cnruby.googlecode.com/svn/trunk/rails-projects/use-jmaki

 (四)解决方案:

  1. 我们创建Rails框架应用软件的根目录:
    mkdir use_jmaki
    cd use_jmaki
  2. 安装基于Rails框架的jMaki插件:
    ruby script/plugin source http://jmaki-goodies.googlecode.com/svn/trunk/rails_plugins
    ruby script/plugin install jmaki_core
    ruby script/plugin install jmaki_yahoo
    我们的实例仅仅使用到jMaki框架软件的一个插件jmaki_yahoo,其它的插件也可以使用,安装方法如下:
    ruby script/plugin install jmaki_dojo
    ruby script/plugin install jmaki_ext
    ruby script/plugin install jmaki_flickr
    ruby script/plugin install jmaki_google
    ruby script/plugin install jmaki_native
    ruby script/plugin install jmaki_scriptaculous
    ruby script/plugin install jmaki_spry
  3. 编辑数据库配置文件 database.yml
    vi config\database.yml
  4. 利用Rails框架自动代码生成技术,我们创建一个模型Admin及其相关代码:
    ruby script/generate scaffold_resource admin
  5. 针对我们的模板页面文件,增加jMaki技术的相关代码 admins.rhtml,以便使用JavaScript和CSS代码。这是本文的精华部分之一。
    vi app/views/layouts/admins.rhtml
      <%= stylesheet_link_tag "jmaki-standard", :media => "all" -%>
      <%= javascript_include_tag "jmaki" -%>
      <%= jmaki_setup -%>
  6. 编辑数据库移植技术文件 001_create_admins.rb ,并且创建数据库及其相关表:
    vi db/migrate/001_create_admins.rb
          t.column :username, :string
          t.column :password, :string
          execute "INSERT INTO admins VALUES(1, 'munich', '24680')"
          execute "INSERT INTO admins VALUES(2, 'beijing', '13579')"
    rake db:migrate
  7. 利用Rails框架技术和jMaki框架技术,修改页面 index.rhtml 文件。注意这是本文的精华部分之二。下面的代码有二部分代码,前面的是利用Rails框架技术把实际存储到一个Array中;后面的是jMaki框架的代码技术。
    vi app\views\admins\index.rhtml
      <h1>Listing admins</h1>

      <% @table_data = [] %>
      <% for admin in @admins %>
        <% @table_data << [ admin.username, admin.password,
                             link_to('Show', admin_path(admin)),
                             link_to('Edit', edit_admin_path(admin)),
                             link_to('Destroy', admin_path(admin), :confirm => 'Are you sure?', :method => :delete)
                           ] %>
      <% end %>

      <%= jmaki_widget 'yahoo.dataTable',
          :args => {
              :columns => [
                  { :title => 'Usename', :width => 200, :locked => false },
                  { :title => 'Password', :width => 75, :renderer => 'italic' },
                  { :title => 'Show', :width => 60, :renderer => 'italic' },
                  { :title => 'Edit', :width => 60, :renderer => 'italic' },
                  { :title => 'Destroy', :width => 60, :renderer => 'italic' },
              ]
          },
          :value => @table_data
      -%>

      <br />
      <%= link_to 'New admin', new_admin_path %>
  8. 启动网络服务器:
    ruby script\server
  9. 浏览我们的网络应用软件:
    start http://localhost:3000/admins

 (五)视听教学:



 (六)必须注意的问题:

  1. 利用NetBeans工具,可以更好地使用jMaki框架技术。

 (七)参考资料:

  1. https://ajax.dev.java.net/files/documents/3115/45044/org-netbeans-modules-sun-ajax-updatecenter.nbm
  2. https://ajax.dev.java.net/servlets/ProjectDocumentList?folderID=0
  3. http://blogs.sun.com/arungupta/entry/jmaki_on_rails_for_dummies
  4. http://jmaki.com/

 (八)命令清单:

mkdir use_jmaki
cd use_jmaki

ruby script/plugin source http://jmaki-goodies.googlecode.com/svn/trunk/rails_plugins
ruby script/plugin install jmaki_core
ruby script/plugin install jmaki_dojo
ruby script/plugin install jmaki_ext
ruby script/plugin install jmaki_flickr
ruby script/plugin install jmaki_google
ruby script/plugin install jmaki_native
ruby script/plugin install jmaki_scriptaculous
ruby script/plugin install jmaki_spry
ruby script/plugin install jmaki_yahoo

mysqladmin -u root -proot create jmaki
vi config\database.yml

ruby script/generate scaffold_resource admin

vi app/views/layouts/admins.rhtml
<%= stylesheet_link_tag "jmaki-standard", :media => "all" -%>
<%= javascript_include_tag "jmaki" -%>
<%= jmaki_setup -%>

vi db/migrate/001_create_admins.rb
t.column :username, :string
t.column :password, :string
execute "INSERT INTO admins VALUES(1, 'munich', '24680')"
execute "INSERT INTO admins VALUES(2, 'beijing', '13579')"
rake db:migrate

vi app\views\admins\index.rhtml
<h1>Listing admins</h1>

<% @table_data = [] %>
<% for admin in @admins %>
<% @table_data << [ admin.username, admin.password,
link_to('Show', admin_path(admin)),
link_to('Edit', edit_admin_path(admin)),
link_to('Destroy', admin_path(admin), :confirm => 'Are you sure?', :method => :delete)
] %>
<% end %>

<%= jmaki_widget 'yahoo.dataTable',
:args => {
:columns => [
{ :title => 'Usename', :width => 200, :locked => false },
{ :title => 'Password', :width => 75, :renderer => 'italic' },
{ :title => 'Show', :width => 60, :renderer => 'italic' },
{ :title => 'Edit', :width => 60, :renderer => 'italic' },
{ :title => 'Destroy', :width => 60, :renderer => 'italic' },
]
},
:value => @table_data
-%>

<br />
<%= link_to 'New admin', new_admin_path %>

ruby script\server


 (九)下载文件pdf:


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image01:36 Summary of security articles and plugins» Riding Rails - home

The QuarkRuby blog has created a great Ruby on Rails Security Guide that gives you a wealth of links to articles and plugins dealing with security in Rails applications. Everything fromn XSS to CSRF stuff is covered.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image01:30 peregrination: A traveling ...» Projectionist
per•e•gri•na•tion
[per-i-gruh-ney-shuhn]noun
A traveling from one country to another; a wandering; sojourn in foreign countries.

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Sat 22 September, 2007

Click here to bookmark this link.Channel Image18:31 A RailsConf Europe '07 Diary» chris blogs

Flight STR–TXL, Sunday

Flying with air berlin is very pleasant: You get to choose from five newspapers, get free coffee and cake, and they show you the stupid (albeit rendered) security video on a TV screen.

Sunday evening

Time for some Bratwurst (pics)! After arriving at our apartment and figuring out how the WLAN is supposed to work, we take the tube to Kalkscheune where lots of people are already. The rug-b people made name tags for us. (Hey Vico!) After we all had enough Bratwurst, some go play Werewolf while we decide to go to the Tacheles (a.k.a. “shitty building”) and have some beer.

Monday

Since I didn’t book any tutorial sessions, it’s time to sleep out. We try to fix the WLAN but completely fuck it up. (You should have seen us trying to even find the router!) Later, we go to the great St. Oberholz (blog) cafe which has good coffee, good food, free wifi and Bionade. Not to forget nice waiters (Hey Ines!) and lots of Mac users. I had a heavy walnut tarte.

Monday evening

We missed Dave Thomas’s keynote because had a big Thai dinner. It was awesome and very tasty. And hot. Some go play Werewolf. Later we tried to find the Havanna Club Club, where there was a guy which a friend of a friend one of us knows. We searched for an hour, and ended up at the Madonna Bar, where we had some beer.

Tuesday

Being a bit late, I rushed into the DHH keynote. He showed evolutionary advancements on the way to Rails 2.0, for example automatic database setup, easier-to-read ActiveRecord inspects (yay) and partials by object type (which is pretty nice). He also demonstrated how to add new content-types to create special output for the iPhone. Finally, he announced a Rails 2.0 preview release to appear shortly after the conference.

Then, I attend the first sessions: Deployment and Continuous Integration from the Trenches by Fernand Galiana, who talked about new features in Capistrano 2 such as namespaces, different deployment strategies and events, which allow for seperation of aspects. After a whirlwind tour of cap2 we learned about certain traps and how to avoid them, for example by using lazy variable expansion. He also showed best practices such as factoring common code with load, multistage deployment and caches, which also can use rsync now. Fernand concluded his talk by showing a quick example of how to write your own tasks and announcing his Rails-driven Capistrano frontend dubbed Capote. His talk was amusing and full of hilarious engineering pictures.

Next up was Dr. Nic Williams with his excellent talk Meta-Magic in Rails: Become a Master Magician which started with a list of features he liked in Ruby and which help doing meta-stuff like the flexible syntax and the highly dynamic behavior. He explained he likes “a big number of complexity” and went on to compare Perl with a puppy unconscious of itself, Java with Keith Richards, and Ruby with Matrix’s Neo, who knows everything about himself and his environment. He introduced his Magic Models which use const_missing to generate ActiveRecord models on the fly and outlined a few important meta-programming techniques. It was a really funny and instructive talk (at least if you are not already a Ruby pro).

In the lunch break, I got to know some found the Havanna Club Club later, and it was just where we searched. Sigh.

In the afternoon, I attended Really scaling Rails by Britt Selvitelle, who works for flickrtwitter (thanks, nec). After explaining to the audience that most of them probably won’t need his hints yet, he explained their mongrel setup (they only proxy one request at a time from Apache to each mongrel, so requests won’t queue up) and gave tips on benchmarking actions. He insisted on not over-architecting. Furthermore, he explained how to create daemons for long-running tasks (such as informing 10000 followers of twitter’s popular users) and how to cache DB queries. He also introduced starling, which is an in-house queue server they wrote. If you can, cheat, he recommended to us, meaning that users won’t notice if things don’t update in real time or are totally synchronous. He also told about essential things for deployment, such as monitoring and easy deploy/rollback. Scaling is only needed where it matters. Lastly, he explained the importance of an API for twitter and how it was relevant for the big community they now have.

The next talk was Improving the Rails ecosystem by Evan Phoenix, the leader of the Rubinius project. He talked about how a better Ruby results in a better Rails and how Rubinius is focused on improving some Ruby deficiencies, like full operator overloading (you can overload != by itself), better memory usage (better sharing among forked processes), .rba archives for easier code deployment and more readable and informative backtraces. He announced they would release a 1.0 at the end of the year and concluded the talk with an extensive Q&A session. This was a very funny talk as well, last but not the least because of his sole usage of made-up statistics. (Rubinius is faster than three-legged dogs and turtles, but slower than the Space Shuttle, you knew?)

The day ended with Roy Fielding’s keynote The Rest on REST2, who once looked at the entire web—back when it was fifty sites. After a short history of the web until 1995, we got to know he was the main HTTP RFC editor and he went on outlining the web’s architecture. He explained how REST implies hypertext in some sense and how it made the web bigger. He also told he had a look at Rails and tried to show how to make it more RESTful (he lauded the CRUD); most things already can be done easily. It was a good talk (have a look at the slides, they are self-explaining mostly) and I really liked the small quotes on top of each slide.

Tuesday evening

We had some Schnitzel at a restaurant Unter den Linden which name I forgot. Then, we headed to RejectConf which took place at the Pirate Cove (noone noticed that tomorrow would be Talk Like A Pirate Day, though. Arrr!!) Some went to play Werewolf.

Dr. Nic praised me for even being able to talk about Ruby meta-programming after some rounds of Jägermeister shots. No big deal. ;-)

The caboosers also got a new set of t-shirts. (Thanks, chrissturm.)

Wednesday

The second day of the conference sessions started with Best Practices by Marcel Molina Jr. and Michael Koziarski of the Rails core team. (We learned Jamis Buck wasn’t there because his wife got a child.) They noticed most Rails projects stuff too much stuff into the controller and not enough into models. They explained that the controller merely should contain action code and most of the business logic belongs to the models. Marcel recommened the Smalltalk Best Practices book again, which is really worth a read. Michael talked about how association proxies make you code easier to understand and how to factor code into many descriptive methods.

Then, I attended JRuby at Thoughtworks by Ola Bini, who complained about MRI having threading issues, bad unicode support, and speed and GC problems. JRuby, which was started in 2001(!), tries to address all these problems. He also told that Java 6 made JRuby twice as fast without changing anything. JRuby will be compiled to bytecode to allow obfuscation, which is important for certain businesses. It also allows for easier deployment. At the end of his talk, he introduced his new Apress book “JRuby on Rails”.

After this, I went to Ruby on Rails Security by Heiko Webers, which was a lemon. He tried to shock the audience by telling he saw lots of session ids on the wifi, but proceded to give a totally boring talk about essential security concepts which would have been demonstrated a lot better by, well, demonstrating them. More action please!

In the lunch break, I met David Chelimsky of the RSpec team. We talked a bit about BDD and the future of RSpec and test/spec. He also explained the new StoryRunner to me. Then, I met Geoffrey Grosenbach and we recorded a Ruby on Rails podcast out of the blue!

The first afternoon session I attended was Browser-based Testing of Massive Ajax-using Rails Applications with Selenium, by Till Vollmer of MindMeister, a pretty neat AJAX mindmapping tool. He explained what Selenium is, and how usual tests don’t test browser behavior, which is essential for them. After a quick overview of Selenium’s features, he demonstrated their test suite for a live example.

Next was Functional JavaScript Development with Prototype by Ben Nolan. He told about JavaScript lambdas and what binding them means and went on talking about Prototypes enumberable extensions which have lots of useful methods like invoke, pluck or inGroupsOf. He mentioned taking some Haskell courses at university and stated JavaScript code is much easier to develop and debug when it consists of small, idempotent functions. Also, he recommended to store data in the DOM and not in private properties of JavaScript objects.

After the afternoon break, I went to Jay Fields’ talk on Extending Rails to Use the Presenter Pattern which was very fuzzy and mellow. He couldn’t really get his point across and most of the audience left the session without knowing what a presenter even is, which is kind of sad since it surely could have been useful in some situations. Or not.

The last session, PhD on Rails by Sam Aaron however saved the day. It was such a refreshing, intelligent and humorous talk that I completely forgot to take notes. Let me try to remember: He created a database backed system to keep track of objects which are rendered in a three dimensional spaces and then implemented a query language to operate on them. Really cool. And the first person I met that uses VRML.

Wednesday evening

We tried to find a restaurant for roughly 25 persons which was not that easy. We ended up in a pretty expensive French brasserie, but I liked my dinner. Some went to play Werewolf. The rest went to Ambulance Bar where we had half a dozen cocktails each. They were very good. We got back to the appartment at 3am, just before the Werewolf players finished.

Thursday

I decided to stay one more day after the conference, and we spent all day at St. Oberholz again. I had a great tiramisu and a beagel. Yum.

Thursday evening

We decided to go to the Fernsehturm for dinner, had a Weizenbier up there waiting until we could enter the spinning restaurant, which was pretty cool. The food was far better than I expected and not even that expensive.

After dinner, we went back to the appartment because we all would need to wake up pretty early.

Flight TXL–FMM, Friday

I had to wake up 6am to get to the airport in time. I met Geoffrey there again and we had another little chat. I flew back with tuifly, which let me chose whether I wanted to be seated to the window or not but had no free coffee or other features. They play the stupid security video for you. It was a bit cheaper, though.

General points

  • git is gaining popularity among Ruby hackers, I saw lots of them installing it and toying around.

  • Berlin: I had forgotten how great the city is. The complete and utter lack of aesthetics actually is appealing, but the icky typography in the subway hurts my soul.

NP: Bob Dylan—This Wheels On Fire


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Sources