123
 123

Sat 28 June, 2008

Click here to bookmark this link.Channel Image04:42 Big Thanks to Ray and Brian for a Powerhouse Refactor» James Britt - Code, Content, Caffiene

Wednesday’s Refactor was great. I want to thank Ray Neimeir and Brian Shandler for their terrific presentations.

Ray’s talk was filled with special insights; I was really struck by his observations on bubbles, and looking for The Fizz.

Brian did a great job explaining how to work with CS3 and AIR, and there was a ton of useful info on getting rolling, and especially with using a local database. Check out the code for the talk here.

At the end of the meeting we did another round of Lean Introductions, and this time the tag was to offer up a current trend and a topic for future Refactor.

Here’s what came up (trends and topics mixed together):

  • JavaScript applications (e.g., in browsers or browser derivatives)
  • Mobile computing
  • Virtualization
  • Spore creatures and the ideas underlying their creation and behavior
  • Cloud computing
  • Game programming
  • Rhino
  • Social computing & networking
  • Scalability
  • The realm of add-ons and “social media” sites
  • Open Social

Mike Wolfson has offered to give a talk on mobile computing; that’s slated for August. Thanks, Mike!

If you have something you can give a talk or demo on, please step up. It needn’t be long; 10-15 minutes works fine. It needn’t be formal; a walk through of a project or some code would be great.

And be sure to keep the last Wednesday of each month free to catch the Valley’s tech talent sharing their insights and know-how.


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

Fri 27 June, 2008

Click here to bookmark this link.Channel Image13:47 Twitter Updates for 2008-06-26» halostatue
The state of Linux twitter applications is very sad. gTwitter is crashy and annoying; Twitux is lame. # The fact that Twitux (a) doesn’t have a “read” status for tweets and (b) doesn’t have tweet entry available by default is mondo-bad. Goodbye # 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

Thu 26 June, 2008

Click here to bookmark this link.Channel Image17:19 Php的错误捕捉» Ruby 语言 思想驱动生活
当php程序出错了,默认的是显示一些错误到页面上的。我们当然希望捕捉到这些错误并处理了。Php提供了set_error_handler这个接口,但是她不是万能的。先看这个文件吧。 <? error_reporting(E_ALL); ini_set('display_errors','0'); ini_set('log_errors','1'); ini_set('error_log','/home/liubin/aaaa.log'); ini_set('html_errors','0');   set_error_handler('myHandler'); function myHandler($code, $msg, $file, $line) { echo $code; }   echo $asdf; method_aaa(); ?> 执行之后,页面显示8,即一个notice级别的错误,这是echo $asdf;的错误。myHandler得到了她,aaaa.log没有记录她。而调用不存在的方法的错误,myHandler则得不到。被记到了aaaa.log了。 看了一下手册,好像myHandler不能记录error等错误,详见 http://php.chinaunix.net/manual/zh/function.set-error-handler.php 这可如何是好呢。我要把error捕捉再转向到错误页面难道就没办法了?
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:11 This Week in Rails (June 26, 2008)» Riding Rails - home

Welcome to the second edition of This Week in Rails, a weekly report with highlights from the Rails community.

Ruby Vulnerabilities

As previously reported by Jeremy Kemper, serious vulnerabilities have been discovered for the main Ruby implementations. The official advisory suggests an upgrade path, but there have been several reports of segmentation faults when using Rails with the patched Ruby 1.8.5 and 1.8.6 versions. The Phusion team has published a patch for Ruby 1.8.6-p111, but as things stand now, it hasn’t been included by the Ruby core team (yet).

If you are using Rails 2.1, Ruby 1.8.7-p22 seems the way to go. Unfortunately, Ruby 1.8.7 is not compatible with previous versions of Rails. If you decide that it’s time to upgrade your applications to Rails 2.1, this article features some handy tips, while this other one warns you about a few gotchas.

Those of you who’re running a version of Ruby that shipped with Mac OS X should wait for the next Apple’s Software Update.

Ajax

Rails is opinionated software, but its support for plugins clearly demonstrates a certain openness to diverging opinions on non-core issues. So while most of us mainly use Protoype, it is fairly common to see folks adopting other JavaScript frameworks as well, particularly jQuery.

Last week Jim Neath published a nice overview which compares jQuery with Prototype, and provides information about using jQuery with Rails through the jRails plugin.

Whatever your Ajax framework of choice is, you may be interested in the new Google Ajax Library API to improve the performance of your applications. Thanks to the tutorial Using Google Ajax Libraries API with Ruby on Rails (soon to be incorporated into a plugin) you can start adopting the API with Rails right now.

MVC

Rails 2.1 adds named scopes, which greatly simplify writing “find logic” within your Active Record models. It’s an extremely useful feature which is well explained in this write-up aptly titled, Named Scopes Are Awesome (we agree). Checkout also Ryan Bates’ railscasts on the subject: named_scope and Anonymous Scopes. You may also be interested in this week’s railscast about Caching in Rails 2.1.

Three other compelling Active Record related posts were, Smart Model, Dumb Controller, Bulk insertion of data with ActiveRecord and Timestamped Migrations on how to make “classic migrations” an available option (see ticket).

Michael Bleigh published a tutorial about dealing with subdomains in Rails applications through the SubdomainFu plugin (which appears to be flexible and very straightforward to use).

XP programming practices such as Test-Driven Development are very popular within the Rails community, but there are still many developers who see testing as a chore. Josh Nichols wrote an overview called A walk through of test-driven development with shoulda that shows you how easy it is to apply TDD to your Rails projects. In this specific case, he adopted the Shoulda plugin which seamlessly adds some assertions, helpers and macros on top of the Test::Unit framework.

Documentation

Aside from api.rubyonrails.org there are many alternatives for quickly visualizing the documentation of the Rails’ API. Last week a new one was launched: rails-doc.org. The current version features rapid searches and user annotations. This last feature in particular has the potential to become truly useful.

Deployment

If you are using Apache and mod_rails, you may want to read this article which provides information about a newly released module called apache-upload-progress.

Finally, Jason Crystal wrote a tutorial for packaging Rails applications for offline use on Mac OS X 10.5.


We’re done for this week. If you’d like to read more updates from the Ruby side of things, please head over to This Week in 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 Image12:07 Twitter Updates for 2008-06-25» halostatue
playing with gtwitter on linux. I think it just crashed on 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 Image04:43 Living on the Edge (or what's new in Edge Rails) #2 - Performance improvements» Riding Rails - home

The first Living on the Edge covered some of the API changes since Rails 2.1, and this time round, I’m going to cover the performance improvements as promised.

Jumping right in…

Faster Erb templates

Jeremy Kemper has made the Erb processing more efficient, especially the concat and capture helper methods.

The “special” Erb _erbout has been replaced with an instance variable, which allows for:
  • better (memory) performance because bindings are no longer being passed around,
  • fewer evals which are usually expensive,
  • there’s no need to slice the _erbout variable when you can swap in a new (string) buffer, and
  • the buffer is actually available via a output_buffer reader and writer methods (so you can override it if you want).

Relevant changesets: 933697a - 0bdb7d3 - 4d4c8e2

Faster partials and JavaScript helpers

Partial template initialization and JavaScript helpers have been refactored and optimized for speed and efficiency by Jeremy Kemper. These are but a few of the optimizations Jeremy has been committing recently. Be sure to check out some of the commits to Rails (or for that matter, any quality Open Source project) – you could learn something!

Relevant changesets: partialsJavaScript helpers

RecordIdentifier methods speedup

The RecordIdentifier has been sped up by some simple use of memo-ization, thus reducing the number of inflections performed, among other things. The RecordIdentifier is used widely in cache keys, partial template paths, and in most places where you identify an ActiveRecord model without caring about its actual id.

Relevant changesets by Jeremy Kemper: c1a9820566d717

Lazy load cache and session stores

Update: Oops my bad, this change was later reverted in 6573f6a.

The various cache stores in the ActiveSupport::Cache module are now lazy loaded – this means that they are only required when you actually start using them.

Changeset by Pratik Naik


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 Image04:42 復活» Matzにっき
えー、もうみんな忘れてると思うけど、 昔ここには「Matzにっき」というタイトルのブログのような日記のようなものが あって、1週間くらいズレながらもなんとかかんとか続いていたんだよ。 それが、エイプリルフールのデンマークで路頭に迷うという エントリを最後に更新が止まってしまったもんだから、 デンマークで行方不明になったんじゃないか いや、帰国はしたらしいから、その後体調が悪くなって入院したんじゃないか いやいや、その割には雑誌の記事とか書いてるし、講演もしてると聞いたぞ などと(ごく一部で)いろいろと憶測を読..
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 Image04:42 これまでのあらすじ» Matzにっき
ヨーロッパからなんとか帰国したまつもとを待ち構えていたのは 原稿の催促攻撃であった。それもなんとかかわした直後、 まつもとは病魔に襲われてしまう。 しかし、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 Image04:42 これまでの(本当の)あらすじ» Matzにっき
4月 取材月。 通常の原稿のほかに、 雑誌などの取材が4件もあった。 4月22日からは各種Ruby実装者が一堂に会する デザインミーティングを 定期的に開催することにした。 5月 まだ取材多し(3件)。 後半は講演もそれなりに(4件)。 「CodeGear,OSJ,ネットワーク応用通信研究所がRubyの普及に向け提携:ITpro」というプレス発表もした。 6月 講演は3件のみ(RubyKaigi, SS2008, 島大) 全体になんだか忙しいけど、体をこわすほどではない。
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 Image04:42 【日本Ruby会議2008】「Rubyは10年前のJava」---まつもと氏とイーシー・ワン最首氏が対談:ITpro» Matzにっき
で、Ruby会議2008、0日目。 最首さんとの対談。ビジネスにおけるRubyの使われ方、について。 Rubyは10年前のJavaに似ていると言われる。10年前,皆ワクワクしながらJavaを使っていたと思う。でも今,Javaをワクワクしながら使っている人が減っているように感じる。Javaの悪いところはその轍を踏まないように,いいところは受け継いでいきたい で、この中で私が使った「ワクワク」という表現に違和感を感じる人もいるようだ。 どうも、 ワクワクするのは未知との出会いによるもの 仕事というものはいつも未知との出会いでは困る 仕事で使わ..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Wed 25 June, 2008

Click here to bookmark this link.Channel Image12:46 Refactor Phoenix this Wednesday. Superbad Topic: Shaler on AIR. Everyone Should Damn Well Be Excited.» James Britt - Code, Content, Caffiene

Brian Shaler has stepped to and offered to give a talk/demo on an Adobe AIR desktop application at Wednesday’s Refactor Phoenix.

Brian knows his stuff; AIR looks quite cool (though this Kubunu dev is saddened by this set of sys requirements ); Boulders has beer and pool. So you have no reason not to attend.

In unrelated news, James feels partial shame at occasional outbursts of frustration concerning perceived geek lethargy.


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 Image12:45 Twitter Updates for 2008-06-24» halostatue
I thought that DL2 supported iTunes libraries. How do I get it to work with one that *isn’t* on my main hard disk? # @twitterrific Feature request: the ability to (a) turn of tweet acquisition at particular times and/or (b) the ability to do so via script. # @ccgus I manage that by forgetting to start NNW [...]
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:14 Because we’ve won, we...» Projectionist
Because we’ve won, we have no choice.

Barack Obama


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:46 网络新闻:互联网顶级域名的重大变革» 天天红玉世界
互联网顶级域名的革命
  • 说明
    • 互联网域名市场进入了又一次巨大的商业机遇。谁都可以获得更为简单的顶级域名(top-level domains,TLD)。顶级域名将可以是任何语言的文字内容。“.com”或者“.cn”的时代将会过去了,一个以“.商业”或者“.中国”的新顶级域名时代即将开始了。下面的链接是ICANN的一个可用的测试链接,请将下面的域名输入到Firefox 3.0的地址栏,在该栏中将会看到该地址的全中文显示。
      http://例子.测试/首页

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

Tue 24 June, 2008

Click here to bookmark this link.Channel Image08:42 Refactor Phoenix this Wednesday. No Topic or Presentation. I Know Everyone Is Excited.» James Britt - Code, Content, Caffiene

The next Refactor meeting is this Wednesday, June 25. No one has offered to give a talk or demo or anything, and I don’t particularly want to have to whip up yet another talk, so there will be nothing formal that night.

The last time there was no particular presentation it ended up being me and five other people. Two of those others never (that I could tell) came back for another Refactor. Hooray for casual conversation.

It is, of course, disappointing to think that the only way to get deveopers together after work is to offer up some pre-planned “edutainment.” It’s even more disappointing to think that maintaining a reliable stream of worthwhile presentations will be tedious monthly chore of either goading people into giving a talk or assembling one myself.

I can assure you that the latter just ain’t gonna to happen, and I’m not fond of pestering people, either.

An interesting related phenomenon is the turn out for the Tempe Nerds lunches. Clearly folks are up for socializing, just not so much when it’s after work. (Side note: As best I can tell, Refresh Phoenix still gets a good crowd. I’ve stopped going since it become overly focused on Break Out Of Your Cube! and How To Be Entrepreneur 2.0! I have a completely unproven conjecture about the different social needs of Web designers and marketeers vs. developers and hackers.)

A primary goal of Refactor was the social element. I was really hoping to get together people who would otherwise not meet. A second goal was to get people introduced to technical topics that might be a bit outside their day-to-day endeavors. I think I’ve failed on that one, while Tempe Nerds appears to fulfill the first goal (though the mix seems more Refresh-y than hacker; however, there were actual developers at the lunches). So, all in all, the cost/benefit ratio for Refactor is questionable.


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:17 書籍執筆支援システムReVIEW» 青木日記
ReVIEW の反応が意外とあったので tar.gz にかためてみた。 http://i.loveruby.net/archive/review-20080624.tar.gz 自分が使うことしか考えてなかったのでドキュメントはない。 ReVIEW フォーマットの説明だけは以前必要にかられたので書いてある。 doc/format.txt を参照。 使いかたをチョー簡単に書く。 ◆インストール Ruby 1.8 があればオケ。 ちょっと古い 1.9 (M17N 導入のしばらくあと) でも動いてた。今は知らん。 setup.rb でインストールしてもよいけど、 tar.gz を展開してそのまま bin にパスを通せば使えるのでそっちがおす..
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:17 「ふつう」3点セット» 青木日記
Ruby会議のゴルフで「ふつう賞」なる賞があったらしい。 その賞品が「ふつう」3点セット。 内訳は、 『ふつうのLinuxプログラミング』 『ふつうのHaskellプログラミング』 『ふつうのコンパイラ』(出版されしだい送付) ちょ……待っ (02:45)
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:17 iPhone» 青木日記
そういえば iPhone は買うね。これは買うよ。 たとえ月額 8000 円近くても買うよ。 永らく au だったけどついに SBM に乗り換えか……。 (03:40)
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:17 Ruby会議2008» 青木日記
週末はRuby会議2008。 スタッフの人が「まさかLTの途中に来るやつなんていねえよな〜」 と油断している隙を狙って到着してやりました。KY。 んで、わたしの発表は凝りずに 「日本Rubyのリファレンスマニュアル2008・初夏」です。 リファレンスマニュアルも 1 年でずいぶん進みました。 資料とか↓ http://i.loveruby.net/rubykaigi2008/ 今年もよいRuby会議でした。 みなさま本当にお疲れさまでした。 あーRubyのコードが書きてぇ〜 (02:02)
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Mon 23 June, 2008

Click here to bookmark this link.Channel Image15:09 Twitter Updates for 2008-06-22» halostatue
I need a “Moses Scores” sticker to put on top of those idiotic “Jesus Saves” bumper stickers. # 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

Sun 22 June, 2008

Click here to bookmark this link.Channel Image05:19 Ignte Phoenix now accepting talk proposals» James Britt - Code, Content, Caffiene

Ignite Phoenix is open for submissions

Drop by the submissions page and think about what you would do with your five minutes.

Please be sure to check out the presentation guidelines as well.


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

Sat 21 June, 2008

Click here to bookmark this link.Channel Image15:10 Twitter Updates for 2008-06-20» halostatue
thinking of turning something into a blog post # Using Vista for the first time “for real”. It stupidly still requires a reboot on machine rename. EPIC FAILURE. # 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 Image12:09 Multiple Ruby security vulnerabilities» Riding Rails - home

Drew Yao at Apple uncovered a handful of nasty security vulnerabilities affecting all current versions of Ruby. The details are still under wraps because an attacker can DoS you or possibly execute arbitrary code—holy crap! Better upgrade sooner than later.

According to the official Ruby security advisory, the vulnerable Rubies are:
  • 1.8.4 and earlier
  • 1.8.5-p230 and earlier
  • 1.8.6-p229 and earlier
  • 1.8.7-p21 and earlier

Those of us running Ruby 1.8.4 or earlier must upgrade to 1.8.5 or later for a fix. Those on 1.8.5-7 can grab the latest patchlevel release for a fix.

(Please note: Ruby 1.8.7 breaks backward compatibility and is only compatible with Rails 2.1 and later, so don’t go overboard!)


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