Couldn't agree more ...

Jan 发表于 2008-01-31 01:17:47

今天捧起了<<The Rails Way>>,越看越惊奇,Obie同志的经历和想法和我他妈的太一致了。。。我真怀疑他曾经在某公司干过。。。谈到企业级应用的时候:

There are significant underlying reasons for the difficulties of software development, especially in enterprise environments:

• Hard-to-understand legacy systems.
• Highly complex business domains such as investment banking.
• Stakeholders and business analysts who don’t actually know what they want.
• Managers resistant to productivity because it shrinks their yearly budgets.
• End users who actively sabotage your project.
• Politics! Sticking your head out means worrying that it’ll get chopped off.

As a consultant to Fortune 1000 companies, I lived and breathed those situations on an everyday basis for almost 10 years, eventually stumbling upon a powerful concept.

注意"As a consultant to Fortune 1000 companies ...",和某公司的口号真是太像鸟。再有:

"... ... The tools and technical infrastructure provided by Rails are comprehensive, encouraging us to focus on delivering business value. ... ... The best way to keep motivated and productive is to focus on delivering business value. ... ..."

使得我不得不再次怀疑他和某公司有一腿。。。

好了,估计是我多虑了,某公司应该没有此等和Zed Shaw同居过的牛人的。Obie列出了一些观点,有一些和传统看法明显向左的东西,但是放在Web开发上,的确不假,分享之。

• Developer motivation and productivity trump all other factors for project success.
• The best way to keep motivated and productive is to focus on delivering business value.
• Performance means “executing as fast as possible, on a given set of resources.”
• Scalability means “executing as fast as needed, on as many resources as needed.”
• Performance is irrelevant if you can’t scale.
• If you can scale cheaply, milking every ounce of performance from your processors should never be your first priority.
• Linking scalability to choice of development tools is a pervasive mistake in the industry and most software does not have extreme scalability requirements.
• Performance is related to choice of language and tools because higher-level languages are easier to write and understand. There is wide consensus that the performance problems in most applications are caused by poorly written application code.
• Convention over configuration is a better way to write software. Huge XML configuration files must be eliminated!
• Code portability, the ability to take code and run it on a different hardware platform, is not particularly important.
• It’s better to solve a problem well even if the solution only runs on one platform. Portability is irrelevant if your project fails.
• Database portability, the ability to run the same code on different relational database systems is rarely important and is almost never achieved.
• Presentation is very important, even for small projects. If your application looks bad, everyone will assume it is written badly.
• Allowing technology to dictate the approach to solving a business problem is usually a bad idea; however, that advice shouldn’t be used as an excuse to stick with inferior technology.
• The benefits of generalized application components are dubious. Individual projects usually have very particular business needs and wildly different infrastructure requirements, making parameterized reuse very difficult to achieve in practice.

大概只有受过Java折磨的webdev才能理解rails给人带来的那种救命稻草的感觉,这本书值得一看。
关键词(Tag): ruby rails
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

最近流行:熄灯前的大学男生宿舍

Jan 发表于 2008-01-29 00:01:34

关键词(Tag): 宿舍 大学生
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

zz无奈的16小时-记江西连环相撞事故

Jan 发表于 2008-01-28 02:06:06

太恐怖了,开车回家的兄弟们千万小心。

http://www.xcar.com.cn/bbs/viewthread.php?tid=6945954
关键词(Tag): 冰灾
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

我觉悟了

Jan 发表于 2008-01-27 21:34:15

递归,宇宙的主宰

我,我

lambda,让我投掷的长矛

Alonzo和Stephen,瓦尔基里女神们为我带来的最英勇的战死者

因为我赐予他们矮人酿造的蜜酒
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Plugins - Acts As Enterprisey

Jan 发表于 2008-01-26 21:50:43

太仰慕了...

How does acts_as_enterprisey make webapp development look hard? Well, the only way your client can judge your app is by playing around with it. What better gives the feeling of heavy weights being lifted behind the scenes than slow response times? Exactly. That’s what acts_as_enterprisey does.

http://agilewebdevelopment.com/plugins/acts_as_enterprisey
关键词(Tag): rails enterprise
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

将Rails部署到linux+lighttpd+fastcgi碰到的问题小记

Jan 发表于 2008-01-23 17:04:45

1. 如果开发平台在windows上,部署的时候记得给dispatch.fcgi加执行权限,chmod +x,还要手动修改它的第一行#!c:\ruby\bin\ruby,改成ruby在linux上的路径,通过which ruby可以看到。

2. 记得装rack
关键词(Tag): rails lighttpd fastcgi
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

怒了

Jan 发表于 2008-01-22 20:23:01

相同的算法,为什么我的总是outofmemory? 555

ruby 1.8在使用到1G的时候就暴了,ruby 1.9在把所有内存耗光后暴掉,不是说ruby string对象是cow的吗,靠



update: 终于搞定,问题出在Array#sort上面,string的确是cow的,但是sort会调用dup - 我没有深究,貌似是dup引起了真正的对象复制,导致内存暴涨,可能dup太底层了所以绕过了cow机制?用sort!就可以避免这个问题,内存消耗可以控制得很低。奇怪的是只能在1.8下运行通过,在1.9中还是内存耗光然后暴掉,看来1.9还真是不能用啊。
关键词(Tag): copy ruby on write
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

mysql user表里面有两条user=''的记录

Jan 发表于 2008-01-22 02:29:21

tmd搞死我了,错误信息是access denied for root@localhost PASSWORD=yes

任你怎么reset password都不行

看user表里面两条user名字为空的记录诡异

火大把它给删了。。。

世界清静了。。

谁那么缺德搞进去的啊

mysqld_safe --skip-grant-tables --user=root万岁!!!
关键词(Tag): for mysql access root user denied
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

失望,看来Gentoo Dev把Daniel的offer拒了

Jan 发表于 2008-01-20 00:04:31

Last Rites for the GWN

Gentoo's PR group recently announced that publication of the Gentoo
Weekly
Newsletter will be stopped in favor of a new Gentoo Monthly Newsletter
(GMN). This will be the last edition of the GWN, and will only cover
statistics for activity during the period between 15th October and 21st
December 2007.

不知道他们在干什么,很久没有收到GWN结果最后来了封这个东西,sigh.
关键词(Tag): gentoo
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

三人成虎

Jan 发表于 2008-01-19 00:06:33

这是cnbeta上今天的一条新闻

Secunia:杀毒软件不安全 Redhat和FireFox漏洞多过微软软件

当然,我等linuxer都知道,这又是一篇软文。原文来自这里:

Secunia: More Red Hat flaws than Microsoft in 2007

ZDNet的妓者显然取了一个非常具有误导性的标题,认真看完这篇文章就知道,Secunia的报告根本没有得出Windows比linux安全,ie比ff安全之类的结论,相反的,Secunia的CTO还在力挺linux:

"It's impossible to make a fair comparison--it's like comparing apples to oranges," Thomas Kristensen, Secunia's chief technology officer, told ZDNet.co.uk. "Red Hat has the highest number of applications included, so the number of vulnerabilities that affect it is bound to be higher."

"Web servers, database servers, archiving tools, office productivity suites--there's two of everything when it comes to Red Hat," said Kristensen. "Windows XP can only be used as a workstation. If you want to run XP as, say, a web server, you have to buy either Microsoft or third-party software."

Kristensen said that third-party software was a key factor affecting the number of vulnerabilities attributed to the respective operating systems. With Red Hat, 99 percent, or 629 of the vulnerabilities, were due to third-party components. With Windows, four percent of flaws were due to third-party software.

可悲的是,这个时代的人们往往阅读一个标题就了事了。ZDNet的妓者显然深谙此道,不过他还算有良心,文章写的四平八稳还算公正,cnbeta的翻译稿纯粹就是断章取义了,用心何在?说他一句没有职业道德一点儿也不过分。

可笑的是,cnbeta的新闻一出,下面就有两方在对骂了,有时间对骂没时间自己去求证一下么?显然,谩骂已经成为国内民众最喜爱的娱乐活动之一。最令人哭笑不得的是,总有人要拿着这种不是证据的新闻当证据,跳到我面前来说,linux不好,firefox不好。我懒得理他懒了999次,今天实在受不了了,发文纪念一下。
收藏: QQ书签 del.icio.us 订阅: Google 抓虾