123
 123

Fri 25 January, 2008

Click here to bookmark this link.Channel Image20:00 Ruby技巧3则» Ruby on Rails: LetRails
1. 构造正则 我们都知道,可以通过一下两种方式来构造正则: irb> /ruby/ => /ruby/ irb> Regexp.new('ruby') => /ruby/ 但实际上还有一种: irb> %r{ruby} => /ruby/ 如同%w, %q一样,%r将一个字符串转换为一个正...
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:08 Twitter Updates for 2008-01-24» halostatue
@Pistachio found my ring, by the by. it was hidden under some papers that I’d put down on Tuesday. ;) # @MikeG1 that’s why you’re supposed to UK the natural primary key if you’re using a surrogate PK. # @MikeG1 entirely too many developers who don’t have a clue about data modelling. :( # @fraserspeirs hrm. as a [...]
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:41 Building FXRuby on Leopard with MacPorts» Lovable Lyle
A number of people are having interesting problems trying to build FXRuby on Leopard (Mac OS 10.5) and so I’m trying to pin down exactly where the problems are. Last month, I wrote about some of the fundamental problems that you might run into building FXRuby “from scratch”, without the help of MacPorts. One problem [...]
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:10 Ruby语言:Ruby程序运行外部程序(一)» 道喜技术日记

Ruby语言:Ruby程序运行外部程序(一)

(.^.)软件环境
(.^.)函数system
  • Linux系统实例代码
    system "rm /tmp/hello.txt"
  • Windows实例代码
    system "cmd /c del ./hello.txt"
    system "calc"
  • 说明
    在执行该函数system以后,程序会继续执行之后的代码。
(.^.)函数exec
  • Linux系统实例代码
    system "ls -al /tmp/hello.txt"
  • Windows实例代码
    system "ls -al ./hello.txt"
  • 说明
    在执行该函数exec以后,程序就停止执行之后的代码。
(.^.)函数·
  • Windows和Linux系统实例代码
    ·ls -al .·
  • 说明
    函数·(重音符,在Tab键上面的按钮)能够让我们获得输出结果。
(.^.)函数%x
  • Windows和Linux系统实例代码
    %x(ls -al .)
  • 说明
    注意这里的括号不能省略。

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:23 Clutter and overload are no...» Projectionist
Clutter and overload are not an attribute of information, they are failures of design.

Edward Tufte


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:07 bezoar: A hard indigestible...» Projectionist
be•zoar
[bee-zawr]noun
A hard indigestible mass of material, such as hair, vegetable fibers, or fruits, found in the stomachs or intestines of animals, especially ruminants, and humans. It was formerly considered to be an antidote to poisons and to posses magic properties.

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:07 Only use soft bristled toot...» Projectionist

Tip Only use soft bristled tooth brushes

Dentists recommend you only use soft bristled tooth brushes. Medium or hard bristled tooth brushes are apparently marketing ploys and not recommended.


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:04 Dolphins blowing rings» Projectionist

Thu 24 January, 2008

Click here to bookmark this link.Channel Image18:08 网站推荐:一步一步安装完整Rails产品服务器» 天天红玉世界
Click here to bookmark this link.Channel Image16:11 Twitter Updates for 2008-01-23» halostatue
@chadfowler totally # off to interview a QA contractor. fun fun fun. # I don’t trust this integration. :| # @objo I’ll just be a super-productive Canadian vim user, thanks. ;) # sheesh. stop paying attention for a while and you pass your 1000th tweet. happy 1013, I guess ;) # @Pistachio I understand. Can’t find my wedding ring today [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Wed 23 January, 2008

Click here to bookmark this link.Channel Image21:14 Middle Click Close For Safari» Joey Gibson's Blog

I love Safari on my shiny Mac Pro, particularly because it's so much faster than Firefox. But one thing I missed from Firefox was being able to do a middle-click on a tab and have it close. After several failed attempts, I finally got some help from Mark Rowe who pointed me to a proper method-swizzling implementation. After switching my code to use that swizzler, everything fell into place. I've been happily using it ever since, I just never released it. I got an email the other day asking for it, so here it is.

Unlike my Export to Archive plugin for iPhoto, I didn't build an installer for this one. It's easy to install, but you still have to do it yourself. And there's a dependency: SIMBL. Now, before Leopard shipped the word was that Input Managers would no longer be supported. After Leopard shipped we saw that wasn't entirely true. So, once you get SIMBL installed and working, using my plugin is easy. This should work on both Tiger and Leopard. I've only tested it recently on Leopard, but I originally wrote it on a Tiger system.

  1. Get the binary package: MiddleClickClose.zip
  2. Create ~/Library/Application Support/SIMBL/Plugins if it doesn't exist
  3. Unzip the MiddleClickClose.zip into this directory. You should end up with a directory called MiddleClickClose.bundle
  4. Restart Safari

If all goes well, you should now be able to use your middle mouse button to close Safari tabs. It works for me. If it doesn't work for you, run the OSX Console and look for "MiddleClickClose loaded" in the "Console Messages" section.

If you want the source code, download it here.

I should mention that this really is a dirty hack, and may not work with future versions of Leopard. It works for me, but your mileage may vary. I hope it works for you, but it may not.

This code is distributed under the GPL v2.


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:01 令人惊叹的代码» 动态感觉 静观其变
看到一个令人惊叹的代码,就用一个py文件搭建的django站点,真是学习django的好材料呀!真想贴出来,想想还是不妥,还是放连接吧,看看作者的巧妙构思是多么令人惊叹!!!

http://dpaste.com/hold/31935/

http://news.e-scribe.com/395
...
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:29 操作系统:Linux系统融合于Windows操作系统» 天天红玉世界
Linux系统融合于Windows操作系统
  • 说明
    • andLinux 是一个没有虚拟机,但是作为Windows应用程序运行于Windows系统的Linux操作系统。

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:08 Twitter Updates for 2008-01-22» halostatue
still don’t feel good. :( work is going ok, tho. # sometimes it’s hard to tell if it’s our code that sucks or if it’s just C++? I tend to think the latter, most of the time. This time, tho…:| # ugh. not feeling very good again. :P # MacPorts is annoying me in Leopard. I don’t want [...]
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 Image08:34 Ruby语言:内存泄漏检测库bleak_house» 天天红玉世界
内存泄漏检测库bleak_house
  • 说明
    • 这个软件包不仅仅可以被一般的Ruby程序使用,也可以在Rails框架一样软件中很方便地被使用。

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:34 Second Beta Release for FXRuby Book» Lovable Lyle
An updated version of the beta book has been released today. The most visible change for this release is the inclusion of the final three chapters of the book, which were still being edited and revised at the time of the initial release. The new chapters cover layout managers, menus and toolbars, and dialog boxes. [...]
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:01 apterous: 1. Zoology H…» Projectionist
ap•ter•ous
[ap-ter-uhs]adjective
1. Zoology Having no wings or winglike extensions: an apterous insect.
2. Botany Without membranous expansions, as a stem.

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:28 What are you going to write...» Projectionist
What are you going to write worthy of me?

J. J. Abrams’ Powerbook


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:28 Cornelius – Eyes» Projectionist

Tue 22 January, 2008

Click here to bookmark this link.Channel Image22:38 Fred Thompson Quits» Joey Gibson's Blog

Well, damn. Just damn. Fred Thompson has thrown in the towel. He no longer had any chance of winning, but it's still sad to see him go. But, if we're really being honest, I don't believe his heart was ever really in the race. As I saw in an article a week or so ago about us "Fred Heads," we wanted him to be president far more than he wanted to be president. I believe that is true.

Now I have no one to vote for. I can't stand McCain. I don't really like Guiliani. Huckabee is less-than-thrilling. Romney is OK, I guess, but nothing exciting. And Ron Paul is insane. Not too many choices left.


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:09 Twitter Updates for 2008-01-21» halostatue
Finally saw Ratatouille # @codinghorror it’s not as bad as it used to be. I hated travelling to the US when it was ~ .67:1 CAD:US # tired of feeling sick. :( # 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 Image16:09 Twitter Updates for 2008-01-21» halostatue
Finally saw Ratatouille # @codinghorror it’s not as bad as it used to be. I hated travelling to the US when it was ~ .67:1 CAD:US # tired of feeling sick. :( # 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:07 梅田望夫さんとの対談(その2回目)» Matzにっき
まだ休みボケが抜けなくて、 朝、こたつの中で「動きたくないよー」とか言ってたら、 「寝言はいいかげんにしなさい」と妻に追い出された。 飛行機に乗って東京へ。 で、日経BPで梅田さんとの二回目の対談。 前回の対談の後「楽しかったのでもう一度対談したいですね」と 言ったら梅田さんも乗り気になっていただいて実現した。 主に「ネットにつながった人々のパワーの活用」とか 「オープンソース」とかの話が中心だった。 「オープンソースの中の人」である私にとっての「当たり前」も やや外側にいる梅田さんにとっては「驚き」だった..
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:07 X61 with Linux 2.6.18» Matzにっき
2.6.18に戻してからはおおむね快調である。 サスペンドの失敗もなくなったし、 デバッグ中でもどんなプロセスが動いていても確実かつ高速にサスペンドする。 リジュームの方は「HDDのスピンアップを8秒待つ」という表示が出て、 少々もたつくが、それでもハイバネーションからの復帰に比べたら天国のようだ。 当面(2.6.24が出るまで?)は2.6.18で頑張ることにしよう。 なに、X31でもつい最近までカーネルは2.6.18だったのだから、 さほど問題はあるまい。 vesaドライバしか使えないということで、Xの性能も心配だったが、 Berylとか使って..
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:05 Test cannot be started beca...» Projectionist
Test cannot be started because it already doesn’t exist.

AVG error message


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:04 misandry: Hatred of menR...» Projectionist
mi•san•dry
[mis-an-dree]noun
Hatred of men.

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

Mon 21 January, 2008

Click here to bookmark this link.Channel Image16:07 Twitter Updates for 2008-01-20» halostatue
really enjoyed dinner last night at Harry’s. Lots of laughing, interesting conversations. # having broccloflower for supper. # Twiiple… what are the 3 games I *must* buy for my Wii, and why? # @bleything yeah. two is good ;) Tried any shooters on the Wii? # 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 Image06:12 RailsConf Europe '08: Get your proposals in!» Riding Rails - home

The call for participation for RailsConf Europe ‘08 has opened up and we’re now accepting proposals. The conference is returning to Berlin and the conference will happen between the 2nd and 4th of September.

Last year was an absolute blast. There’s such a great diversity of people from all over Europe and beyond. It’s a great addition to the much more US-focused bang of RailsConf in the US.

Also, have in mind that the program for RailsConf Europe is usually pretty much completely different from the US fanfare. So it’s okay to submit your proposal here as well. What might be accepted at RailsConf in the US might not go for RailsConf Europe and vice versa.

Anyway, looking forward to reading about those proposals!


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:06 掃除» Matzにっき
午前中は息子が初等協会の活動。私は教会の掃除。 末娘がいろいろと手伝いをしてくれた。 3才児を掃除に参加させるためには、いろいろと工夫が必要だ。 本人は大満足の様子。 末娘のたっての希望で、息子と末娘と連れてうどん屋へ。
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:06 X61 インストール問題» Matzにっき
今年に入ってからはずっとX61を使っているのだが、まだ気に入らないところがある。 問題 サスペンドからの復帰に失敗する。 現象 s2ramを使っても、/sys/power/stateを直接たたいても、 何回かに一回の割合で復帰しない。復帰しない時には _ inu という表示(左上隅でカーソルが点滅)したまま反応が帰ってこない。 ThinkLightのオン・オフだけはできたりするのだが、 ログにもまったく記録がないので、カーネルはぜんぜん動いてないようだ。 ハイバネーションは失敗したことはないのだが、 こちらは中断・復帰ともに1分以上かかるので、精..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Sun 20 January, 2008

Click here to bookmark this link.Channel Image21:54 实践测试驱动开发» 梦想风暴

作为一个有理想、有追求的程序员,你成天被各种名词包围着,你对其中一个叫做敏捷的东西特别感兴趣,因为它特别强调人的作用,这听着都让做程序员的你感到舒服。为了让自己早日敏捷起来,你从众多的敏捷实践中选择了一个叫做测试驱动开发(Test Driven Development,TDD)的作为你的起始点。因为它对你周遭的环境要求是最低的:它不像结对那样,要求其他人和你一起合作;也不像采用Story那样改变你所在团队的做事方式……你所需要做的,只是在你编写业务代码之前,把测试先写好。这完全是一种润物细无声的做法,根本无需告诉你之外的任何人。就在别人忙碌的找bug时,你便开始享受敏捷带给你的快乐了。顺便带来的好处是,下次在那里和别人争论敏捷的时候,你可以以一个实践者的姿态出现,而不是在那里信口开河。

你不会打无准备之仗,于是,你通读了Kent Beck的那本薄册子。通读之下,你对TDD更是充满了信心。因为“红——绿——重构”的步骤实在是简单得令人发指。好吧!总而言之,你已经信心十足的准备开始TDD,步入敏捷的康庄大道了。

理想很美好,现实很残酷。

当你着手在实际项目中体验TDD的时候,一切变得并不像最初看起来的那样美好。虽然你努力的坚持着TDD的原则,但你经常就会发现某些东西不好测,比如你遇到了数据库,比如你遇到了GUI,比如你遇到了计时器(Timer)。敏捷并非教条,当某些事不可为的时候,你完全可以不那么坚持。于是,你告诉自己,不好测的东西可以不测,这样,至少从心理上来说,你觉得舒服多了。随着工作的继续,你发现,你不能测的东西越来越多,单元测试的覆盖率随着开发的进行正在逐渐降低,一丝恐惧涌上心头。回过头来,再去看Kent Beck的书,你突然觉得,你似乎被骗了,因为Kent Beck的例子貌似全都是逻辑,如果只是逻辑,当然好测了,但现实从来就不是这样。

难道TDD只是看上去很美?

显然,你不愿意就这样放弃,放弃你苦心学来的软件开发秘籍,那些传说中的高手极力推崇的TDD必然有一定道理,TDD确实能够让你感觉很好:能测试的那部分代码确实极大的增强了你对软件质量的信心,而且出错了也确实好找,每次修改代码之后运行测试出现的绿条也确实让你身心愉悦。

那问题到底出在哪呢?你陷入了沉思。

信马由缰,你翻开了自己写过的代码。看着自己写的这些代码,你忽然意识到一个问题,自己遇到的问题并不属于TDD,而是属于单元测试。正如你之前所想到的那样,TDD做法本身的结果是让你感到快乐的。对,一定是单元测试本身出了问题。那单元测试出了什么问题,很显然,一大堆不能测试的部分让单元测试变得很难写,降低了单元测试的覆盖度。那是不是这会是一个无解的问题呢?你显然不愿意就此放弃,所以,顺着这个思路继续向前。

TDD之所以让你安心,主要是每次编写代码之后,运行测试会出现一个绿条,告诉你测试通过。这样,你可以放心大胆的向前继续,因为你的代码并没有破坏任何东西。究竟是什么让你感到不安,显然是那些测试没有覆盖到的代码。你又仔细翻看了一下那些没有测试覆盖的代码,你的思路一下子清晰起来。之所以这部分让你不安,因为里面除了那些确实不好测试的部分之外,里面还有一些逻辑。如果只是那些真正不好测试的部分没有被测试覆盖到,你会觉得心里还有一些安慰。你确定了,真正使你不安的就是与不好测试的代码共存亡的这些逻辑部分。

如果测试可以覆盖到这些逻辑的部分,至少从感情上来说,就可以接受了。那怎么才能让这些部分被测试覆盖到呢?你仔细观察着那些没有测试的代码,如果这样做,这个部分就可以测试了,如果那样做,那个部分也可以测试了,一来二去,这些貌似不可测试的代码可以分解出许多可以测试的部分。

你的心情一下子好了许多,因为这么做终于可以让测试的覆盖度达到让你心理上可以接受的范围。不过,新的问题也随之而来。我在做什么?拆来分去,这不就是设计吗?怎么走到这里来了。我不是在分析单元测试的问题吗?对了,我最初的问题是TDD,怎么一路跑到设计上来了?

TDD?设计?

你突然发觉自己对TDD的理解有一些偏差。TDD,并不代表不需要设计。读过很多书的你突然想起了Robert Martin那本著名的《敏捷软件开发》,上面有一个关于数据库访问的例子。那个例子里面,前后两个版本的差异正好就是考虑设计的结果。通常,在设计中考虑测试,会很容易找到设计中僵硬的部分,让程序更加灵活。再进一步,如果在开始动手之前,稍微进行一些设计,这些问题还是可能注意得到的。你突然觉得,正是因为TDD本身过于强调测试的价值所在,让你忽略软件开发中很重要的部分:设计。

思路一下子清楚起来,TDD其实不只是“红——绿——重构”,它还是与设计相关的:在动手之前,还是要有一定的设计,而且,在设计中要考虑测试的问题。终于解开了心中的困惑,现在的你,对于TDD有了一个新的认识,虽然这个认识不见得是什么终极真理,但至少是通过自己的思考得来的,这让你更加相信实践出真知的道理。

理清思路后,你更加坚信TDD本身的价值所在,也坚定了在日后开发中继续使用TDD的念头,当然,目光远大的你已经盯上了其它的敏捷实践。



收藏到:Del.icio.us

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:08 Twitter Updates for 2008-01-19» halostatue
@lylejohnson I prefer Acorn, to be honest. I have both, though. # @codinghorror flashing green is the same as a green turn arrow. (advance green) # Aah! my NNW isn’t showing ⌘2 mode correctly. can’t see the feed headlines anymore. Help? # fixed the NNW issue by deleting a bunch of preferences. switched to ⌘3 mode for now [...]
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:24 网站推荐:在线DOS系统» 天天红玉世界
在线DOS系统
  • 说明
    • 不错的创意网站;
    • 所有asp文件都是执行命令,其实就是网站菜单;
    • 要是能够使用Tab键和方向键就更好。

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

Sat 19 January, 2008

Click here to bookmark this link.Channel Image23:19 Snow in Georgia» Joey Gibson's Blog

Snow Jabba 2 It's snowing in Georgia right now. Big, fat flakes falling fast. None sticking to the streets, but cars, grass and houses are collecting lots of it. We're only expecting a few more hours of falling flakes, but it sure is pretty to look at now. It will all be either solid ice or gone tomorrow, but we're enjoying it while it's here. View the entire set.










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 Image23:14 视频推荐:Ruby语言和Rails框架视频教程» 天天红玉世界
Click here to bookmark this link.Channel Image14:07 Twitter Updates for 2008-01-18» halostatue
@rich_kilmer do you have a reference to reality maps so I can understand them? # Been too busy to tweet today. :| Bought a black nano, tho. # 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 Image14:07 Twitter Updates for 2008-01-17» halostatue
@codinghorror feels like you’re entering the 21st century, doesn’t it? ;) # @wilshipley You could be looking at honeymoon trips… # @codinghorror enjoy the Good News while you can get it. I hate travelling to the US and never getting any worthwhile news. # @arnaudrobail qui est mort? # chewing away at functionality # why is my Mac running hot [...]
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:07 Twitter Updates for 2008-01-16» halostatue
Reading Helping Dolphins Fly at http://tinyurl.com/26poyp # @robertbrook interesting. My wife knows E L Wisty because of a Pete Townshend blog a couple of years ago. # @MikeG1 rate limit? link? # @MikeG1 yah. found that, replied to it with a suggestion to make the UX better for API users (say how many calls are left & when [...]
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:40 停電» 青木日記
なんか昼間に停電があったらしく、 loveruby.net が落ちてました。 すみません。 (05:43)
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:40 「国内の出版社で Subversion を使ってるのはたぶんうちだけ。」» 青木日記
http://www.geekpage.jp/blog/?id=2008/1/10 んなこたーない。 いままさに俺がふつぱいらの原稿を Subversion で編集者と共有してる。 (04:36)
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:40 出番多し» 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 Image09:40 マルチVMでRubyを並列化、サンと東大が共同研究 − @IT» Matzにっき
東大(創造情報)とSun Microsystemが共同研究するという話。 実際には研究テーマは二つあって、 ひとつはFortress、もうひとつはRubyである。 テーマ的にはFortressの方が重要な気がしないでもないけど、予算は同額。 期間は2年ということで、今日明日にどうこうという話ではないけれど、 将来が楽しみな話ではある。
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:40 マルコフ連鎖(もどき)» 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 Image09:40 Ramaze: a Ruby framework that will amaze | Zen and the Art of Ruby Programming» Matzにっき
こんな感じの特徴のあるWebアプリケーションフレームワーク。 A very welcoming community with the right attitude, down to earth folks, and no prima donnas; Lightweight, meaning that it's not bloated and doesn't fill the skeleton of an application with a bunch of unnecessary files; Very Ruby like, based on the KISS and POLS principles; Follows the MVC architectural pattern, but allows you to run everything off a single script if need be; Already works perfectly with Ruby 1.9 (and runs much faster with..
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:40 REBOL 3.0 Alpha Public Release» Matzにっき
「どっこい生きてる」という印象を与えるREBOL。バージョン3.0 alphaのお知らせ。 個人的には好みではないが(引数情報が構文解析に影響を与えるから、ソースコードだけから意味を解釈できないところが特に)、ドキュメントを見る限り、前のバージョンと比べていろいろと成長しているみたい。 あいかわらず「無料ソフト」らしいが、ソースコードは公開しないのかな。
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:40 ONLamp.com -- How Will History View Richard Stallman?» Matzにっき
歴史はStallmanをどう評価するか。 だいたいエキセントリックなところは歴史の陰に隠れてしまい、 成果だけが記憶されるので、彼は偉大なソフトウェア運動家として歴史に残ると思うなあ。 エジソンやテスラの奇行なんて知ってる人はあんまりいなくても、 電球や蓄音機や殺人光線(!)についてはみな覚えているもんだ。
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:40 New Generation Chronicle:小飼弾−−35歳からのプログラミングこそ無上の至悦 - ITmedia エンタープライズ» Matzにっき
なぜかインタビューでやたら私に言及してくださる小飼弾さん。 そんなに意識してくださらなくても。私なんかLarryに比べたらまだまだコモドですから。 いずれにせよ、ありがとうございます。 で、35歳ねえ。どうなんだろう? 小飼さんは私より3つくらい下のはずだが、 実は「35歳から」ということを意識したことはない。 私の場合、肉体的にはともかく、内面は子供のままで、 二十代の頃から全然成長した気がしない。 うちの奥さんは「旦那の子供っぽさ」が気に入らないようだけど。 ので、35歳からプログラミングが変わった、とい..
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:06 Review: Ruby on Rails Enterprise Application Development» chris blogs

Ruby on Rails Enterprise Application Development
by Elliot Smith and Rob Nichols.
Packt Publishing, Birmington 2007.

[Full disclosure: I have received a copy of the book in exchange for this review.]

The book targets Rails beginners that have a little prior knowledge of Ruby and Ruby on Rails and aims to accompany them on their way to Rails mastership. It focuses on the iterative and stepwise development of a small CRM system for a small company. Since the chapters don’t anticipate, it can be read straight forward, while the reader continuously learns and refines his skills.

It starts with a general introduction on why to use a web-based client-server architecture for business applications, and then recommends Rails to implement them, last but not the least because it is open source and enables easy testing.

Next, the reader is introduced to basic database design, elementary normalization and how Rails’ ORM works. Then, it discusses Rails naming conventions and includes a list of reserved words in Ruby. A list of reserved class names is unfortunately not included, it would have been very helpful since Ruby already claims some very generic class names (Date, Thread, etc.).

Contradictory to the introduction, now nevertheless follows a tutorial on how to setup and install Rails. The book was written before Rails 2 and generally speaks of outdated versions, however, most of the content is not affected by this—still, there may be some traps if one tries to follow it with more recent Rails versions. After setting up Rails, the installation of a database (MySQL throughout the book) and a revision control system (Subversion) is explained.

After these preliminaries, a Rails project is created and the book explains the Rails directory structure. Tables are set up, migrations introduced, and the reader learns about the essential ActiveRecord API with finds and relationships. Validations are addressed as well; the regular expression for email checking is broken. After a quick overview of unit testing and Test::Unit (TDD is discussed but not used), the reader can check in the code for the first time.

Now, they generate controllers, introduce ERB and pagination (using the built-in paginate), how to do links and layout and furthermore how to use partials and flash. The chapter also shows how to write functional tests.

The application is ready for a first deployment. After an overview of the typical Rails hardware requirements, the book explains how to set up Mongrel.

The next chapter focuses on user experience. The authors introduce routes for better bookmarking, show how to add search and input validation and finally give examples of using AJAX for autocompletion. They also point out that AJAX should be used sparingly and only when it makes sense. The chapter also makes an excursion on how to setup Instiki as a help system.

After this, the book deals with improving error handling, authentication (for which they use unsalted password hashing) and file uploads. After displaying a primitive version of file uploads, it is shown how to install plugins and how to use acts_as_attachment.

Then, more serious deployment gets addressed. They introduce Capistrano, explain how to set it up and then use it for upgrading, downgrading and database-related tasks. A list of common problems is provided to help fix likely issues. The authors also explain how to install automatic start-up scripts, session cleaning and log rotation. The rest of the chapter deals with optimizing the Rails application: how to find and identify the bottlenecks with profiling and how to speed up Rails with the different kinds of caching available or by using eager loading. Finally, they also address scaling by using multiple Mongrels and Apache as a reverse proxy and static file server.

The last chapter, “Down the Track” tries to school the reader when it’s okay to break Rails’ conventions. They give situations where the use of custom SQL or using multiple databases is required or advantageous. The chapter also outlines general virtues of a business application developer, such as the importance of understanding the business processes, that successful applications primarily need to yield profit, that automation is good, and reporting important.

The book is concluded by an appendix showing how to setup your own Gem server.

Conclusion: The book does not satisfy the introductory claims: it is often too detailed on the basics and too shallow on the crucial things and sidetracks the reader into unimportant issues. The writing is occasionally clumsy and sometimes overuses the passive voice to incomprehensibility. Some code examples are syntactically invalid and a few Ruby-related commentary plainly wrong. Throughout the text, replace all occurrences of “property” by “attribute” and of “ampersand” by “commercial at”. Various other mistakes sprinkle the book, occasional typos, random font changes and weird spacing suggest the book was produced in a hurry. People with typographic sense will be shocked by the table of contents and complete and the utter lack of typographical quotes. The few illustrations are reproduced in a very low resolution.

Still, the book may be useful for Rails beginners that are interested in the development of an “enterprise application” and would like to know what else there is to keep track of. The complete Rails newbie however will stumble due to the preknowledge of Ruby, whilst the slightly advanced Rails developer will hardly learn anything new and would be better off with specific books on deployment or system administration to extend his knowledge.

Rating: 3 of 5 points.

NP: Minutemen—Love Dance


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:53 Push this button over there» Projectionist
Click here to bookmark this link.Channel Image00:53 Were I to choose an auspici...» Projectionist
Were I to choose an auspicious image for the new millennium, I would choose this one: The sudden agile leap of the poet-philosopher who raises himself above the weight of the world, showing that with all his gravity he has the secret of lightness, and that what many consider to be the vitality of the times-noisy, aggressive, revving and roaring- belongs to the realm of death, like a cemetary for rusty, old cars.

Italo Calvino


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:53 Dr. Steve Brule: Living on ...» Projectionist

Dr. Steve Brule: Living on your Lonesome


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

Fri 18 January, 2008

Click here to bookmark this link.Channel Image19:36 詐欺(未遂)» Matzにっき
会社に来たらアメリカからFAXが来ていた。 Intrernal Revenue Service IRS.gov - DEPARTMENT OF THE TREASURYというところから W-8BENという書類を出せ、というような内容。 確かにアメリカから印税を受け取ったりしているので、 還付金などの話がないわけではない。額が小さい割に、めんどくさいな、と思っていたが なにかがおかしい。 まず、最初におかしいのはFAXにあった「treasury.dpt@gmail.com」というアドレス。 政府機関がメールアドレスにGMailを使うか? で、ひっかかって調べてみるといろいろ出てくる。 FAX番号である「+1-206-..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Sources