Fri 04 January, 2008

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

- Ruby语言2007年最好的个人博客
- http://feeds.feedburner.com/nubyonrails
- http://feeds.feedburner.com/errtheblog
- http://feeds.feedburner.com/RidingRails
- http://feeds.feedburner.com/buckblog
- http://feeds.feedburner.com/LoudThinking
- http://feeds.feedburner.com/MyConfPlan
- http://www.oreillynet.com/ruby/blog/index.xml
- http://eigenclass.org/hiki.rb?c=rss;format=1;tags=blog
add to del.icio.us. look up in del.icio.us.
add to furlThu 03 January, 2008

如果真的有机会和高手一起工作,有时,你会发现,从具体做的事来说,这些高手做的事并不像想象的那么高深,甚至可以说很简单,简单到换了谁都能做。于是,心中的高手形象逐渐开始动摇,难道令N多人景仰的高手就是这个样子。
不知道你有没有想过这样一个问题,同样的事,如果没有高手的参与,换你来做,结果会怎样呢?
老大给我讲了一个他当年和Ward Cunningham在一起工作的故事。每天做的工作就是日常的测试驱动开发,写测试、写代码,所有的一切都是异常简单,下午从不会耽误喝咖啡的时间,到点也就正常下班。一个月后,要做的事情做完了,没有觉得有什么特别之处。不过,回想了一个月前对于这个项目的看法,老大突然发现,这一个月里原来做了许多事情:一个月前,他还觉得这是一项不可能完成的工作。
我最近的一个项目里,和我一起工作的是有我们中国区的CTO。这个项目的前期是一个类似于可行性论证的工作,项目最初,他为整个项目的结构订下了一个基调,让整个项目的结构显得特别清晰,准确的说,应该是很简单,简单到让人觉得理所当然。单从工作的具体内容来看,他并没有在这个项目里面做太多的事情,但从另外一个层面来说,正是他做的前期所做的工作,让后面的工作变得容易了许多。
这么一说,是不是有一种高手形象顿失的感觉。其实,高手通常不会觉得自己是高手。多年积累下的,只是良好的工作习惯而已。他们知道,自己是普通人,自己不能应付过于复杂的东西,于是,把自己要做的事分解成一些非常简单的小事。只要把这些微不足道的小事做好了,所谓的大事便也做成了。
我很喜欢读的书中,有几本书出自贝尔实验室,比如《程序设计实践》、《Unix编程环境》、《C程序设计语言》等等,每一本都是那么轻薄。这些书里面的内容读起来都是那么轻松,每一步做的事都让人觉得太过简单,但回过头来,可能你才发现,原来一些貌似很复杂的工作已经完成了。
曾有一段时间,我一直觉得自己掌握的东西不够复杂,为此,我总是惴惴不安。后来发现,但凡我学过的东西本质上都很简单,于是我想,到底怎么才能让自己复杂起来。读过那几本书之后,我释然了:做事本就该是做简单的事。如果你觉得复杂,多半是走错了路。
与高手共事,技术之外的东西,也许更值得学习。
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
结果发现有red5可用rtmp server,不过它的资料很少,更主要的是red5是用java写的,虽说客户端不用搭理java,可毕竟要麻烦写。不过自从发现了一个小家伙后,我就没有再碰red5了。
这个非常小的rtmp server就是haxevideo,也许你没有听过haxe,这是什么呢?这是一个用来创建flash swf的漂亮工具,是一个编译器。有了它,你可以用不着flash cs之类的大软件。在linux/win/mac下都能用程序来控制swf。但真的要用好它,必须熟悉flash api,actionscript 3.0又是学习flash的必备品。幸好haxe和as3之间相差不大。haxevideo的rmtp server这一块用haxe编译成neko的是服务端的程序。haxe还能用来编写javascript的,可以说他是一个超强的后端,前端一起抓的能手。不懂没关系,只要先熟悉haxe编写flash程序就行了。
我先把我试的画中画效果的例子,弄一弄,看看效果吧。

代码放在这备查了:import flash.display.Sprite;
import flash.media.Camera;
import flash.display.MovieClip;
import flash.media.Microphone;
import flash.net.NetConnection;
import flash.media.Video;
class Test8 extends MovieClip {
var video : Video;
var video2 : Video;
var cam : Camera;
var mic : Microphone;
var nc : flash.net.NetConnection;
var ns : flash.net.NetStream;
static var ct;
var file : String;
var share : String;
static function main() {
flash.net.NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;
var mc = flash.Lib.current;
var st = mc.stage;
ct = new Test8("rtmp://localhost", "record.flv", "mywebcam");
ct.width = st.stageWidth;
ct.height = st.stageHeight - 20;
ct.y = 20;
mc.addChild(ct);
}
function new(host, file, ?share) {
super();
this.file = file;
this.share = share;
video = new Video(Std.int(width), Std.int(height));
var mc2 = new MovieClip();
mc2.scaleX=5;
mc2.scaleY=5;
video2 = new Video(50, 70);
mc2.addChild(video2);
addChild(mc2);
addChild(video);
cam = Camera.getCamera();
cam.setMode(400, 300, 24);
cam.setQuality(10240, 800);
mic = Microphone.getMicrophone();
if( cam == null )
throw "webcam not found";
nc = new NetConnection();
nc.addEventListener(flash.events.NetStatusEvent.NET_STATUS, onEvent);
nc.connect(host);
}
function onEvent(e) {
trace(e.info);
if( e.info.code == "NetConnection.Connect.Success" ) {
ns = new flash.net.NetStream(nc);
ns.addEventListener(flash.events.NetStatusEvent.NET_STATUS, onEvent);
this.stage.addEventListener(flash.events.KeyboardEvent.KEY_DOWN, onKey);
ns.attachCamera(cam);
ns.attachAudio(mic);
video.attachCamera(cam);
video2.attachCamera(cam);
ns.publish(file, share);
}
}
function onKey( e : flash.events.KeyboardEvent ) {
ns.send("onMetaData",{ keypress : e.keyCode });
}
}
然后把haxe -swf test8.swf -main Test8 -swf-version 9,编译成test8.swf,再用neko把haxevideo的rtmp server启动,
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
width="400"
height="300"
id="haxe"
align="middle">
<param name="movie" value="Test8.swf"/>
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
<param name="bgcolor" value="#ffffff"/>
<embed src="Test8.swf"
bgcolor="#ffffff"
width="400"
height="300"
name="haxe"
quality="high"
align="middle"
allowScriptAccess="always"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
/>
</object>
<p>
If you don't see the SWF, check that you have Flash Player 9 installed.
</p>
<p>
If the flash player can't connect to the server, please allow it to do so by using the
<a href="http://www.macromedia.com/support/
documentation/en/flashplayer/help/settings_manager04.html">
Flash Security Manager</a>.
</p>
注意页面的最后这个,如果脱离web server来访问的话,就要设置访问的路径。如果采用web server来访问就不用了。试试这个小玩意吧,我会继续。。。
注解:haxe是用另外一个语言编写的,你猜猜吧,反正不是python,也不是c/c++,更不是ruby了。...
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furlWed 02 January, 2008

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

- Ruby语言2007年最好的综合博客feed
- Ruby语言2007年混合博客
- http://reddit.com/search?q=ruby
- http://planets.sun.com/Ruby/group/blogs/
- http://www.planetrubyonrails.org
- http://rubycorner.com/
- http://www.swik.net/Ruby
- http://blog.caboo.se/
- http://www.planetrubyonrails.com/
add to del.icio.us. look up in del.icio.us.
add to furl
To: ruby-talk-ctl@ruby-lang.org
Subject: unsubscribe
From: Christian Neukirchen <chneukirchen@gmail.com>
I finally got around unsubscribing ruby-talk, which has a feeling of both pity and relief. I didn’t read it for the last months, and only skimmed the overgrowing thread list. There was no way to keep up.
What I don’t want to miss are the software announces, therefore I set up a quick’n’dirty RSS feed to keep me up to date.
It’s been over three years and more than 800 messages. See you somewhere else.
(Of course, I’ll continue to post my ANN’s there.)
NP: Morcheeba—Fear and Love
add to del.icio.us. look up in del.icio.us.
add to furlTue 01 January, 2008

add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
I've been a member of several groups at Yahoo! Groups since before Yahoo bought eGroups. That's quite a long time. At 06:30 this morning, I realized that I hadn't seen any email from any of those groups for a while. So I got up and checked and discovered what I knew I was going to see: email delivery to my address had been turned off since 12/15 because of a "hard bounce." This happens every month or so, and it's always the same thing:
Remote host said: 554 The message was rejected because it contains prohibited virus or spam content [BODY]What that means is that someone (not me) sent an email containing a virus to one of the lists. The list then tried to deliver it to me, but my mail server rejected it. And Yahoo's list manager then interpreted that bounce as indicating that my email address won't accept email, and turned off all delivery to me. Does this make sense to you? Someone else sends a virus and my email gets turned off.
I actually think that both Yahoo Groups and my mail server share blame in this case. My mail server shouldn't bounce a virus-laden email, it should just quietly throw it away. It's not like anyone who intentionally sends a virus really needs to see the bounce message; they know what they're doing. And Yahoo Groups' server is too stupid to interpret the bounce message and quietly ignore it. Instead, it penalizes me. But what, exactly, is my mail server?
That question is interesting because I can't be sure whose mail server is the culprit. The reason is that there are three mail servers involved in sending me email. GoDaddy is my domain registrar, and therefore they maintain my MX records, and all my mail is first sent to them. I also have a SpamCop account. I have a forwarding address setup with GoDaddy that sends all email for me to SpamCop. SpamCop, once the email has been checked for spam, then forwards the email to my Gmail account. Since the bounce message that I'm allowed to see doesn't include any details, I don't know which server sent actually did the bouncing. Two days ago I stopped using my SpamCop account, so now I'm down to just GoDaddy's and Gmail's servers, and I'm hoping that the troublesome server belonged to SpamCop. If I get turned off again, I guess I'll know it wasn't.
It's very frustrating to get turned off like this, over and over, because of someone else's nefarious acts.
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
“ There are many things that I would love to turn you on to. ”
Dr. Dog in Easy Beat
add to del.icio.us. look up in del.icio.us.
add to furl
Luke 2:6 - 7 from The LOLCat Bible
6 When wuz time for teh baybee,7 it wuz a boy, so he wuz wrapd in blanket like burrito an placd him in fud dish, cuz innkeeper wuz liek, no room here kthxbye!I know it's already old in interweb time, but that LOLCat stuff still cracks me up. Wrapping the baby up "like burrito" really did make me LOL! Read the rest of Luke 2.
add to del.icio.us. look up in del.icio.us.
add to furl

祝福大家新年好!
Einen guten Rutsch ins neue Jahr!
Happy New Year!
add to del.icio.us. look up in del.icio.us.
add to furl
We went out and shot off some fireworks for NYE. I took some photos with my iPhone and I am astounded at how well they came out. Check them out. I took some fireworks photos using a "real" camera at a July 4th celebration a few years ago and you couldn't make out anything. I really can't believe how well these turned out.
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furlMon 31 December, 2007


Let’s check last year’s resolutions.
Write more.
Lines on chris blogs: 3725 (2006) vs 3243 (2007). FAIL.
Lines on Anarchaia: 31421 (2006) vs 24436 (2007). FAIL.
Mails sent: 475 (2006) vs 561 (2007). FAIL.
Furthermore, I’d also like to write some longer pieces, maybe a tutorial or a book chapter. This is being worked on. I also wrote a paper on Rack.
Release more.
Releases: 3 (2006) vs 4 (2006). PASS.
Projects made public: 5 (2006) vs 9 (2007). PASS.
Attend more.
Attended RailsConf. PASS.
Attended Euruko. PASS.
Not attended ICPF. FAIL.
Not attended 24C3. FAIL.
Contribute more.
Lines contributed to Rubinius: 0. FAIL.
Code more.
Language core implemented. PASS.
Nukumi2 replacement started. PASS.
6 PASSed, 6 FAILed: 50% success. Ah well.
A happy new year! And no more resolutions. :P
NP: Barry Andrews—Licking Honey from a Razor
add to del.icio.us. look up in del.icio.us.
add to furl
I have a ton of USB devices and I'm am constantly running out of ports. I hate having to unplug one device to plug in another (much like Norm Abram has multiple routers so he doesn't have to change the bits), but with only four ports on my Mac Pro and five on an external hub, that's what I've been reduced to.
Until now. I just discovered Synchrotech's 13 Port USB 2.0 Hub, which looks like exactly what I've been wanting. I just placed the order, and I should have it in about a week. This will give me a total of twenty-two ports, which should last me for a while. :-)
add to del.icio.us. look up in del.icio.us.
add to furl
I've seriously gotten into Twitter, so much so that I'm using it from my shiny iPhone. Yesterday I noticed an announcement from David Sifry about his new service called Hoosgot. It's the "return of the LazyWeb" whereby you can toss a question over the wall to Hoosgot, it will automatically pick it up and send it out "into the ether" where someone might know the answer might see the question and might answer it. I decided to give it a try.
I use Blosxom as my blog engine. I've used it since January 3, 2003, so I've got quite a time-investment in it. About two weeks ago I was trying to improve my Google-mojo when I noticed that all my story links that Google knew about all had the same title, "Joey Gibson's Blog." That's fine if you are on the front page, but each story has a title that should be indexed with it. I set about figuring out how to get the story title to show up in the browser titlebar (which is essentially how Google titles articles when it indexes them), but after a few hours of trying to remember long-forgotten Perl, I failed. So yesterday when I saw the Hoosgot announcement, I gave it a shot. Within two minutes of posting a tweet directed to @hoosgot, I had a private tweet from Gavin Carr telling me the Blosxom plugin I needed. Within five minutes of that, I had my problem solved. That, my friends, is very cool, indeed. Hoosgot looks like something that could be very cool.
For those interested, the answer was to use the storytitle plugin. What's also interesting about this is that Gavin told me he is a "happy user" of a Blosxom plugin that I wrote a few years ago called reading_room.
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
I've long been impressed and puzzled by the power of big version numbers. To open source projects like Ruby on Rails, it's such a divorced measure of quality or features that I feel we need to take it's importance down a few notches.
First of all, nothing magical happens when a certain revision of the code base is blessed with a release. It's simply the decision that what we have now should have a label. So when edge revision 8441 is given the alias of Rails 2.0.2, it's just that, an alias.
In other realms of software development, it might very well imply a large amount of release preparation. Some projects and products go months in a strict feature-freeze mode where only bugs are sought out. Most open source software doesn't adhere to something this stringent, Rails certainly doesn't.
The only real software-related attribute of versions for Rails is to communicate issues of backwards compatibility. Slapping 2.0 on something is a license to break existing code that has been deprecated in the past. But this really happens so very rarely that it hardly deserves big attention.
All this is not to say that versions are meaningless, just that they're more about culture and information than about the quality of software. Having a big release is a worthy way of celebrating that things have moved forward since last time we did a release. And to give people a chance to catch up on all the new features. That's great.
But the problem is that lots of people, especially clients paying the bills of consultants, are overestimating the value of these release names to the point of avoiding newer versions of the repository that fix particular issues that they're dealing with. That doesn't make any sense at all. If you're encountering a bug or desiring a feature that's been included in the latest edge version, you're not doing yourself any favors by waiting for the whim of a release.
The great thing about open source is that you can control your own release schedule. If you happen to run in to a bug that was fixed 5 revisions past the latest release, you can simply tie your application to exactly that revision and see your problem go away. All the information is available about what changed between the official release and the revision you want to move to. And presumably your test suite will do a reasonable job of catching any adverse changes.
I think the main problem is that people do not differentiate between low-level systems, like their OS, web server, or database server, and high-level frameworks like Rails. The latter are never unstable in the traditional sense of the word like the former. The risk of applications crashing with segfaults because of a "bad version" of Rails is incredibly unlikely. So the fear and uncertainty of things just going awry in unexplained ways doesn't belong in this realm.
So please do take control of your own release schedule. It's perfectly fine to start off with a released version, but don't dream up dragons and demons lurking in a newer version of edge. Most of the time, edge is of considerably higher quality than the last released version because we've been committing loads of bug fixes since then. Take advantage of that when you can.
add to del.icio.us. look up in del.icio.us.
add to furl

- Ruby语言2007年最重要的十二个工具
- 入选说明
- 工具在2007年进行了更新;
- 工具已经是产品版本;
- 工具主要用途是开发软件;
- 工具是软件开发最常用的工具;
add to del.icio.us. look up in del.icio.us.
add to furlSun 30 December, 2007

add to del.icio.us. look up in del.icio.us.
add to furlSat 29 December, 2007

add to del.icio.us. look up in del.icio.us.
add to furl
add to del.icio.us. look up in del.icio.us.
add to furl
“ You cannot manage the mess of the rules if they are contained by another mess! ”
Bob Martin
add to del.icio.us. look up in del.icio.us.
add to furl
Choosing linguistic autarchy
A language is in danger of disappearing because its last two speakers have stopped talking to one another.
add to del.icio.us. look up in del.icio.us.
add to furl

- 摘要
Webistrano is a Web UI for managing Capistrano deployments. It lets you manage projects and their stages like test, production, and staging with different settings. Those stages can then be deployed with Capistrano through Webistrano.
- Capistrano是什么?
- 工具 Capistrano 可以实现执行远程客户端或者服务器命令。
- 安装方法:
cp config\database.yml.sample config/database.yml
vi config/database.yml
mysqladmin -u root -proot create webistrano
rake db:migrate RAILS_ENV=production
cp config\webistrano_config.rb.sample config/webistrano_config.rb
vi config\webistrano_config.rb
vi config\database.yml
add to del.icio.us. look up in del.icio.us.
add to furl
“ One is to be light like a bird, not like a feather. ”
Paul Valéry
add to del.icio.us. look up in del.icio.us.
add to furl
I just saw I Am Legend and I seriously want my money back. The only two things it shared with the novella were the title and the main character's name. My friend Tim suggested they should have included a disclaimer in the credits saying "Any similarity to a story of the same name by Richard Matheson is purely coincidental." I agree.
You can hear my 30-second review of the movie, recorded as I drove home, using the widget below.
add to del.icio.us. look up in del.icio.us.
add to furlFri 28 December, 2007

add to del.icio.us. look up in del.icio.us.
add to furl
ConFreaks has posted the vids for RubyConf 2007.
My biased recommendations
Talks I attended, and really enjoyed:
- Rubinius
- Hurting Code for Fun and Profit
- Behaviour Driven Development with RSpec
- Advanced Ruby Class Design
Talks I missed but heard heard good things about:
(There were two talks I attended, and found really disappointing: What Makes Code Beautiful?, and Why Camping Matters.)
add to del.icio.us. look up in del.icio.us.
add to furl


