Sat 02 August, 2008


- 说明
- 这是一个网络与存储功能集成的软件,既可以在Windows上使用,也可以在MacOS上。
- 存储数据是有时间限制的,五年!
- 1 GB空间是免费的。
- 在安装时,选择默认配置,将会自动上传你的本地文件到网络存储服务器。
add to del.icio.us. look up in del.icio.us.
add to furlFri 01 August, 2008

add to del.icio.us. look up in del.icio.us.
add to furl
The list of speakers for Ignite Phoenix is ready.
Be there.
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 furlThu 31 July, 2008

Casiotone for the Painfully Alone – Toby Take a Bow
add to del.icio.us. look up in del.icio.us.
add to furl
“ If you’ve never wept and want to, have a child. ”
Incarnations of Burned Children
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
This is Not a Love Song
Nouvelle Vague (PiL cover)
add to del.icio.us. look up in del.icio.us.
add to furl
无论如何,这个时间出现公司,绝对是一种异常现象,没办法,因为我们项目组要开IPM(Iteration Plan Meeting)。看着同事们惺忪的睡眼,我知道,他们的心情与我是类似的。
这么早来到公司开会,实在是不得已而为之,因为IPM通常要开两到三个小时,用以规划接下来一个迭代要做的事情,更重要的原因是,参加这个会的部分人与我们是隔“洋”相望,所以,我们的早上,对他们而言,是晚上。为了能让他们不致于熬夜到太晚,我们只好在早7点来开会。
在这个跨时区团队中已经工作了几个月,这是第一次真正在这样一个团队中工作。
每天早上Stand Up的时候,我们需要进入到电话会议系统中,在电话的那一段是我们这个团队的另外一部分,包括我们身在美国的同事以及我们的客户。我们相互介绍工作情况,有些需要特别注意的点,就会在这里彼此提醒。之后,他们放心地去睡觉,我们开始一天的工作。
我们普通的工作一天,通常是从Mingle——我们公司开发的一个敏捷项目管理工具——开始的。打开Mingle,我们通常会看到美国团队的工作成果。目前美国那边的同事主要负责一些分析和QA的工作,所以,他们的工作成果往往意味着用户一些需求的调整或是一些bug,这些都被记录在Mingle的卡上,我们会从中选取优先级比较高的卡来做。
之前有一段时间,美国团队有几个人进行开发,那段时间,我们每天早上要做的就是更新代码之后看一下diff,看看我们之前一天做了什么,还有他们在我们睡觉的时候做了什么。另外,我们在Mingle上还专门开辟一个页面,叫做Dev Standup,双方会把工作中遇到的问题记录在这里,以便另外一方知道发生了什么,有时,我们也会记录一些困惑,有相关经验的同事看到了就会给出自己的理解,所以,查看Dev Standup,也成了每天早上的工作之一。
结束一天的开发工作之前,我们要保证自己所有的测试能够通过,包括单元测试和验收测试。持续集成工具上的红色就是最危险的警告,它提示我们,这会给美国团队留下一个噩梦的开始。测试通过之后,我们还会部署一下UAT(User Acceptance Testing)环境进行部署,这样,不仅仅是我们的同事,我们的客户也可以看见我们辛勤一天的劳动成果。
无论如何,早上7点的IPM,是我在这个项目的一个巨大挑战。当然,按照公司通常的做法,早来可以早走,不过,今天不可以,因为晚上会有一个公司老大的Office Update,更重要的是,今天晚上还有公司内部的Wii网球比赛。
add to del.icio.us. look up in del.icio.us.
add to furl
One thing that seems often to come up in discussion of OO development is the size and number of your methods. I’m a fan of having small methods with matter-of-fact names, even if it means my class may seem to have “too many” of them.
Of course, “too many” is a fluffy concept. How many methods are enough? How many are too many? Abe Lincoln was once asked how long a man’s legs should be; “Long enough to reach the ground” was his answer. I’d argue that the right number of methods for your class is that amount needed for the class to get its job done.
That’s still not a satisfactory answer; one can inline code and drop methods, and the class will still work. But that comes at a cost; methods then tend to get larger, harder to read, and less cohesive.
A plausible approach is that if you think your class has too many methods, maybe your class is doing too much, and you need to refactor to more classes. Seems, though, that people resistant to a plethora of methods also abhor “too many” classes, and the reasoning in each case is roughly parallel.
In looking around for some opinions on this, I came across this remarkable ruby-talk thread from 2002: Small Methods – a ramble
(Side note: such threads are now extremely few and far between on ruby-talk. Reasons and consequences of that are a topic for another day.)
What’s interesting is that much of the argument for or against having many small methods is based on tools. Smalltalkers, using their code browser, found it easy to navigate among method implementation; those against the many-methods approach seem to find themselves manually scrolling through text files, and argue this is disruptive and tedious. This is fairly specious, given what any decent code editor can do, (Vim users: go check out rtags if you are not already using it. I imagine TextMate can do the same thing.)
In reading through the thread I found myself nodding along with Mike Thomas (msg #31114 ; “In my opinion, the editor is no ‘excuse’ for not factoring code properly.”) and Albert Wagner (#31115, “it is an attempt to reduce the visual complexity, so as to be able to grasp quickly what is going on in a method; i.e. , condense a snippet that is not duplicated anywhere else into a sort of language shorthand.”) And I like the “Watership Down” syndrome idea.
Naturally, one could argue that having large numbers of methods and classes just gives you more, not less, to track . Except you aren’t going to be storing all those methods in your head; a big win for OO design is that you don’t have to keep everything in your brain, you need to track a limited scope at some particular level of abstraction or detail. One should be able to get a clear, reliable high-level view of an app by looking at the high-level code; when you need detail, you jump to where this or that is implemented.
It isn’t until message #31214 that testing is mentioned. This is from 2002, before TDD and BDD really took hold in Rubyland. Smaller methods seem naturally to come from TDD. Or, conversely, if you have large, busy, methods they are almost certainly hard to test, or test correctly.
Interestingly, Brian Marick, who knows better than most about testing, comes out in favor of (somewhat) larger methods (#31170). His reasons are quite interesting, following earlier observations on communication, expressing intent, and how different tools influence thought. (And now I really want to know more about Stanley Fish’s “affective stylistics”.)
David A. Black follows with this observation:
Clarity is such a vexed thing. I believe people who say that they find Perl code clear. (I used to find it reasonably clear – I’m a little out of the loop right now :-) I also believe people who say they find it opaque, and I believe those people when they say they find code in some other language clear. (Which is to say, if a non-programmer said Perl was opaque, that wouldn’t “count” in the same way.) Clarity is annoyingly relative; it seems that what you find clear is what you’ve learned to find clear, and/or perhaps are cognitively predisposed to find clear.
I’m curious as to what others do, what heuristics Rubyists (or not) have for determining method size, number of methods, size and number of classes, and so on. What are some good resources for this?
What’s the method for clarity?
add to del.icio.us. look up in del.icio.us.
add to furlWed 30 July, 2008

“ Grasp the subject, the words will follow. ”
Cato the Elder
add to del.icio.us. look up in del.icio.us.
add to furl

- 翻译(English » Chinese):
In its simplest form, a presenter is an object that wraps up several other objects to display, and manipulate them on the front end.
在其最简单的形式,主讲人是一个对象,结束其他几个对象要显示,和操纵他们就前端。—Google
用最简单语言可以这样说明,呈送(presenter)是一个对象,它封装了其它几个对象,以达到在前端显示和处理它们。—天天红玉
add to del.icio.us. look up in del.icio.us.
add to furl
From the Bratwurst on Rails team:
Fellow Rubyists from Berlin cordially invite all participants of RailsConf Europe to a barbecue in good old German tradition. The event is an opportunity to socialize and meet the conference participants in a relaxed atmosphere, and to make your name or brand known amongst them. Members of the Berlin Ruby Usergroup will take care of your stomach, and drinks will be available at fair prices.
The venue will be in the heart of Berlin, close to the conference venue. Entry will be free, as will the food. (If you’re interested in sponsoring, have a look at our sponsoring packages and feel free to contact the organisation board via sponsoring@bratwurst-on-rails.com). Your bratwurst awaits you!
It’s happening September 1st.
add to del.icio.us. look up in del.icio.us.
add to furl
“ This moment is yours and you can give it to someone else. ”
Hercules & Love Affair
add to del.icio.us. look up in del.icio.us.
add to furl

- 说明
- 网络世界之大,网络资料之丰富,仅仅Google一家肯定是不够的。通过不同的搜索引擎技术可以发现不同的信息源。
- 从中发现了一个网站:
- 参考资料
add to del.icio.us. look up in del.icio.us.
add to furlTue 29 July, 2008

add to del.icio.us. look up in del.icio.us.
add to furl
zengsun想在archlinux中使用tp-link的tl-wn321g+的usb无线网卡,说是碰到了问题。正好我手头有一个这个,就自己来试试。结果是有些问题,只好到官方论坛上去查一些帖子看看,结果有这方面问题的不少。自己就琢磨着用源码来安装了,正好自己也看看archlinux的包是怎么个弄法。参考了一下aur中的rt73-cvs的包(这是有点老了,而且是用cvs),我就按照直接下载包的方式改了改。有两个文件:
一个是PKGBUILD,另一个是rt73.install
PKGBUILD==>
pkgname=rt73-cvs
pkgver=daily
pkgrel=1
pkgdesc="RaLink RT73 USB Drivers"
arch=('i686' 'x86_64')
url="http://rt2x00.serialmonkey.com/wiki/index.php?title=Downloads"
license=('GPL')
depends=('kernel26', 'rt2x00-rt71w-fw')
provides=('rt73-test')
conflicts=('rt73-test')
install=rt73.install
source=(http://rt2x00.serialmonkey.com/$pkgname-$pkgver.tar.gz)
md5sums=('')
_kernver=2.6.25-ARCH
build() {
cd $startdir/src/$pkgname-2008072820/Module
make || return 1
install -Dm644 rt73.ko $startdir/pkg/lib/modules/$_kernver/kernel/drivers/net/wireless/rt73.ko || return 1
msg "Drivers installed, but not loaded. To enable it: 'rmmod rt73usb && modprobe rt73'"
msg "Or use airdriver-ng, you can install it from AUR: 'aicrack-ng-svn'"
}
rt73.install:==>
post_install() {
depmod -a
cat << EOF
>>>
>>> Documentation is seperated it's called rt73-cvs-doc.
>>> Install it to learn how to use WPA and more.
>>>
>>> Kernel 2.6.25 provides rt2x00 drivers, so if you want to use rt73 must
>>> add 'rt73usb' to your MOD_BLACKLIST=() at /etc/rc.conf
>>>
EOF
}
post_upgrade() {
post_install
}
post_remove() {
/bin/true
}
打包之前要先安装abs和fakeroot,rt2x00-rt71w-fw,然后makepkg -c,打好包之后,pacman -U 安装即可。
包安装好之后,在/etc/rc.conf中,在MOD_BACKLISTS里加入rt73usb和rt2500usb,这样启动之后就不会把这两个模块加载了。
插上usb的无线网卡,modprobe rt73,就可以找到硬件了,用ifconfig -a,可以看到wlan0的界面了,接下去配置就是了。
...
add to del.icio.us. look up in del.icio.us.
add to furl
Dr. Ronald Chevalier – The Art of Relaxating
add to del.icio.us. look up in del.icio.us.
add to furlMon 28 July, 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
I keep getting a flow of positive feedback about the presentation I delivered at Startup School in the Spring. Since it was never linked up here, I thought I'd made sure it made it into the archives: The secret to making money online.
add to del.icio.us. look up in del.icio.us.
add to furlSun 27 July, 2008

add to del.icio.us. look up in del.icio.us.
add to furlSat 26 July, 2008

公司有个不成文的规定,在一个项目上工作一段时间之后,可以申请轮换,也就是说,可以申请去做别的项目。这样做的目的,防止长时间在一个项目上做下去产生厌烦心理。通常这个期限是三个月,当然,根据人员和项目的不同,会有所差别。
最近一段时间,我个人一直在做一些很短期的项目,一两个月的项目,所以,根本没有机会体验从项目中轮换的感觉。眼下的这个项目,如果按期结束,就已经过了三个月的期限,如果项目延长,那是不是要轮换呢?
有人希望轮换,因为期限已过,换到别的项目,或者开始一个新的项目,这样,可以丰富自己的体验,更重要的是,这个项目中最有价值的部分已经做完了,继续做下去,只能与那些价值不大的部分纠缠,这样,会显得比较无聊。
关于价值,我很认同这里的说法,但是,那些价值只是业务本身的价值。我们是除了要为客户带来价值,还要为自己增值。
在东软的时候,我曾经在一个项目上待了两年。两年时间里,我经历了那个项目从无到有,再不断进化的过程,那个项目是我在工作中投入最大的一个项目,我曾经为了能给它再做一个版本,在那个部门多待了一年。当然,它给我回报也是巨大的,它让我从一个毕业生成长为一个真正的程序员,它让我具备可以编写良好代码的能力,它让我对软件开发有了属于自己的认识,为我日后继续前进奠定了基础。
所以,我知道长期项目的价值。
需求变化是考验设计的真正标准,长期项目必然会经历需求变更,这会促使我们更好思考设计的正确性。
度过甜蜜阶段之后,项目才会暴露出各种各样的问题:管理、过程、人员等等,对这些问题的思考,可以帮助我们在日后的工作选择一个更好的路。
项目做长,早晚会遇到资源不足的情况,也就是需要所谓“优化”,而与有限资源做斗争是编程的一大乐趣。
长期项目往往伴随着人员变更,对个人而言,这通常意味着机会的来临。
……
所以,我希望做下去。
现在这个项目对我来说,也有很多特别之处:第一次做真正意义的Rails项目,也是第一次做Web开发;第一次和外国同事协同工作;第一次体验跨时区工作;第一次比较完整的体验敏捷软件开发; 第一次在项目中大量的扮演Coach的角色;第一次在Mac上写程序……
最初的那股新鲜劲已经过去了,我已经开始思考我在这个项目中遇到各种各样有趣的东西。更长时间的实践给为我的思考带来更多的依据,也可以让我更好的探索一些做事方法。
工作有两个维度,广度和深度。短期项目有助增加自己的广度,长期项目则让自己深入,其实,两个方面都是必要的。
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
Welcome to the fourth edition of This Week in Rails, a weekly (and occasionally fortnightly) report with highlights from the Rails community.
David broke the news of the availability of confirmed and scheduled talks at RailsConf Europe which will be taking place this coming September. As you can see there will be a lot of exciting material this year, too.
The e-book Ruby on Rails 2.1 – What’s New is now available in 7 languages: English, Portuguese, Japanese, Simplified and Traditional Chinese, Italian and Korean. A Spanish version is coming as well. Olé!
A couple of weeks ago I took a close look at three Rails 2.1 database related bugs. On the same day, Phusion Passenger 2.0.2 was released. This edition backports a few bug fixes, including one for a small memory leak, and as such it’s highly recommended for anyone using Passenger 2 (aka mod_rails).
Kawaii is a web-based utility like script/console. The output of the inserted expression is visually appealing when compared to the one we’re used to in the shell. Speaking of shiny things, version 2 of the Open Flash Chart plugin was released. This page shows a few wicked cool, professional looking charts (and their code) that can be generated with it.
The article Mulling Over Our Ruby On Rails Full Text Search Options discusses a few possible options for performing full text searches in Rails applications. When it comes to Sphinx, there are then two prominent plugins: UltraSphinx and ThinkingSphinx. Rein Henrichs from Hashrocket, compares the two approaches in his post titled A Thinking Man’s Sphinx.
The team behind Rails-Doc.org added a few more functionalities, including the ability to document the API for multiple versions of Rails.
Other noteworthy articles were the following:
- Mobilize Your Rails Application with Mobile Fu.
- The complete guide to setting up Starling, which includes installing and configuring workers, and how to monitor the services through god.
- Rockstar Memcaching, which is a presentation from the recent RubyFringe conference in Toronto.
- Using Emacs for Rails development – The perfect setup.
- Making SWFUpload and Rails work together.
Ryan Bates was interviewed by FiveRuns and his insightful answers are reported in Rails TakeFive: Five Questions with Ryan Bates. He also published a couple of new railscasts on Liquid safe templates and on Session Based Models.
Rails Envy podcast number 39 was published this week. Check out also their hilarious video about Outdated HTML. And if you haven’t done so already, don’t miss the funniest voicemail and remix the Rails community has heard to date: We ain’t got no RSpec.
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. look up in del.icio.us.
add to furl
“ You have laid here by the water side. You have let the family down. ”
Will Oldham
add to del.icio.us. look up in del.icio.us.
add to furl
From 2007; re-discovered via reddit
Programming: You’re Doing It Completely Wrong
add to del.icio.us. look up in del.icio.us.
add to furl
2. An ornamental branched candleholder, sometimes backed by a mirror.
3. An earring that consists of a central piece with three smaller ornaments or stones hanging from it.
add to del.icio.us. look up in del.icio.us.
add to furl
Kernel#rand_within range
module Kernel def rand_within(range) rand(range.max - range.min) + range.max end end rand_within 12..17 # => 15 rand_within 12..17 # => 13 age_range = students.map(&:age) rand_within age_range
add to del.icio.us. look up in del.icio.us.
add to furl
“ If your pictures aren’t good enough, you’re not close enough. ”
Robert Capa
add to del.icio.us. look up in del.icio.us.
add to furlFri 25 July, 2008

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

