Author Archive

星期四, 10月 01st, 2009 | Author: Zealot

http://lilacbbs.com/forum/d.php?bid=57&id=152274
生爆盐煎肉

[材料] 猪五花肉250、青蒜2棵
[调料] 蒜末、辣椒粉、料酒、酱油、盐、白糖、植物油、豆豉各适量
做法
1. 将各材料洗净,五花肉切片,青蒜切段并将蒜白和蒜青分开备用。
2. 锅烧热,倒植物油,先放入肉爆香,再加入蒜末同炒,随后倒入豆
豉及蒜白拌炒。
3. 加入蒜青、辣椒粉和料酒、酱油、盐、白糖快速炒匀即可。

教训:青蒜吸收不了太多油,五花肉不宜太肥、太多,否则会很油腻。

Category: 生活, 美食  | Leave a Comment
星期四, 10月 01st, 2009 | Author: Zealot

http://lilacbbs.com/forum/d.php?bid=57&id=152163
烈香寸排骨

[材料] 猪排骨500克,青椒、红椒各1/2个
[调料] 老干妈辣酱、葱段、姜片、蒜瓣、八角、桂皮、料酒、白糖、盐、味精各适量
[做法]
1. 将排骨洗净,斩成3厘米长的段;青椒、红椒洗净后去籽去蒂,切块待用
2. 锅内倒入适量清水,放入排骨段、葱段、姜片、蒜瓣、八角、桂皮、料酒、白糖、盐,将排骨慢慢煮入味,盛出后控干水分。
3. 锅内倒入油烧热,放入老干妈辣酱、排骨炒3分钟后,加入青椒块、红椒块,继续炒匀,加味精调味即可。

Category: 生活, 美食  | Tags: ,  | Leave a Comment
星期三, 06月 24th, 2009 | Author: Zealot

“看似说的是一个软件,其实说的大千软件,看似说一事,其实是说百事”

“两打程序员,三年时间,4732个bugs,和对非凡软件的不懈追求,只为打造卓越软件”

做软件难,尤其是大型软件,难于上青天。

以上就是本书的内容,作者通过3年时间跟进项目,在书中讲述了Chandler开发过程中的各种大大小小的故事,最终结论就只有一个:做软件难。

就像豆瓣上其他人评论的,这本书算是本奇书吧,OSAF团队有时间、有资金、有牛人,最终历经6年打造出1.0版,并行将就木。梦幻的开局,让人唏嘘不已的结局,其中的故事会是怎样呢?Scott Rosenberg在书中就讲述了这样一个长篇故事……

看此书,就如参加了一次次OSAF的内部会议,跟进开发的详细过程,从故事中也能看出软件工程有别于机械、土木等传统工程,进度不可控、项目不可见等等,软件开发注定就是游离于工程与艺术之间。

我也是刚接触软件开发行业,看不透为什么这个项目会延期几年,最终6年时间才出1.0版。不论细节的话,只能说Chandler生不逢时,出生在这个Web快速发展的年代。今天尝试了Google Wave内测版,感觉似乎一觉醒来,世界已经完全变了。常规软件项目我没真正做过,但是基于Web的产品在大量的设计类书里都是有个基本原则:最小化设计。也就是说1.0版能实现最最基本的功能即可,“it works”就是1.0版的全部。2009 csdn软件英雄会上支付宝用户体验师白鸦(过去好久,希望没记错,blog: http://uicom.net )提到了这点,并拿gmail举例子,gmail刚开放时基本上就只有收发邮件功能,连中文都没处理好,但是通过逐步的改进做到今天难以替代。OSAF一开始就想打造超越OUTLOOK的卓越的软件,但是当Chandler缓慢前进中,很多其他产品早已从web那条道路上飞快的超越过去了。

书中有些事情还是很有意思的。

“跟踪进度是为了协调工作,而不是要表扬或者批评谁;‘完成啦’在不同人眼里定义不同;”,这个没什么好说的。

“到OSAF后不久,杜索特就利用午餐时间向同事们做了个关于WebDav的讲座。将它描述为一种“秘密协议”:内建到Microsoft Windows和苹果Mac OS X系统中,也在许多要提供某种远端共享和编辑功能的软件包中存在,但却鲜为人知。”,注意,这里说的是午餐时间,事先的沟通远胜于会议中突兀的提出后好很多,能有效避免大量的争论。

最难忘的是这句:“如果不坚持,我什么都不是”,不可知因素太多了,“坚持”在很多时候就是最好的选择。虽然OSAF失败了,但是个中体会,也只有当事人最清楚了。

最后,这本书应该比较适合刚入软件行业的,或者软件项目管理者、或者产品经理阅读,刻骨铭心的失败的故事兴许能让人对软件工程这个特殊行业有更深入更新的了解。另外,douban上与该书相关的话题就有软件工程管理、产品的设计。不知道资深软件相关人员整天想啥,就不推荐了。

星期日, 05月 17th, 2009 | Author: Zealot

由于房子到期,小ZA小区,搬到B小区,今天晚上完成一期搬迁工程,明天我们继续关注二期也就是最后一期的搬迁。

A小区的那个屋子3+1隔间,其他几个人都非常不好相处,小Z从此多了一个人生目标:打死也不要变成那样的人,坚决不要养成那样的言行举止。

那个屋子的房东还不错,可惜房子到期了,房东也不想继续和这个垃圾中介合作,转而找个不那么垃圾的中介。这个垃圾中介规定房子到期后三个月内房东不能和房客私下签约。

综上所述:小Z又要搬家了。

Z从五一前开始找房子。对了,由于上面提到的某种原因,小ZA小区不能上网。每次都是周一到周五在公司上网找房子(下班后,虽然没有职业道德的完整概念,但小Z正在努力学习),并联系房东,周末出去看房子。

目标:直接联系房东,找到物美价廉人好相处符合我特定需求的房子一间。

连续看房子十多天后我绝望了,符合我要求的房子在网上出现几个小时内就被抢了,等我看房时已经没了。

稍微计算一下就发现,把这些时间折成工资的话已经亏大了,于是决定直接找中介。我爱我家不错,除了要收取1个月的房租作为中介费。

“我爱我家”给我联系了隔壁小区的一个房东,看房子之后非常满意,当晚就取钱签合同了。以后直接和房东联系,到期后可以直接和房东续签,而不用考虑中介的问题。

最后,搬家!

前面说了,A小区和B小区仅隔一条街,准确的说是一个非常开阔的露天停车场,因为街的另一头是死胡同。

搬家距离相当于在学校时2公寓搬到16公寓的距离,采用愤青同志的建议:蚂蚁搬家式。

跑了四五趟之后把大部分都搬过来了。

这个小区的整体环境非常不错,门卫的那个哥们非常不错,大晚上的帮我开了好几次门(房东还没给我门禁卡),给我感觉应该姓耿,因为我认识的几个姓耿的都特别好相处,亲切,初次见面就跟熟人似的。。

把床铺好后突然意识到这个房间竟然有5个门!!!!

一个入口,一个门内是嵌在墙里的挂衣间,一个3平米左右的储物室,一个通往6平米的室内阳台,一个通往室外阳台。。。很好很强大,我喜欢。

明天把剩余东西搬过来,并找中介退押金。

 

最最后再次意识到我的东西好多啊。。。3床被子、3双拖鞋、两个“半打”泡沫地板、书累计起来估计超过我体重了,6条毛巾(其中4条未开封),天呐,没一个能扔掉……

最最最后,那个好心的门卫给我提供了一个小推车(超市里用的的那种),我想明天搬运锅碗瓢盆时能用上。

Category: 杂七杂八  | Tags: ,  | Leave a Comment
星期三, 04月 29th, 2009 | Author: Zealot

今天小试了一把nginx,用apt装上后开始配置,可对着中文wiki上的文档配置时总是超出预期,出现各种问题,突然想起查看一下版本,竟然是0.4,官方已经0.7了,faint

于是用apt卸掉,结果aptfaint了。。。:

$ sudo apt-get –purge remove nginx
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
nginx*
0 upgraded, 0 newly installed, 1 to remove and 116 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 528kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database … 242827 files and directories currently installed.)
Removing nginx …
Stopping nginx: invoke-rc.d: initscript nginx, action “stop” failed.
dpkg: error processing nginx (–purge):
subprocess pre-removal script returned error exit status 1
Starting nginx: invoke-rc.d: initscript nginx, action “start” failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
nginx

E: Sub-process /usr/bin/dpkg returned an error code (1)
上网搜了一把,好多都是说直接把相关文件删了,最后看到这个方法:“How to uninstall nginx with apt(
http://www.peterbe.com/plog/how-to-uninstall-nginx-with-apt)”,也就是在/etc/init.d/nginx 脚本的最前面加上exit 0,这样就强制return 0,解决了这个问题:E: “Sub-process /usr/bin/dpkg returned an error code (1)”

然后再apt-get –purge remove nginx,done

最后手动清了/var/lib/nginx/var/log/nginx

Category: linux, 程序设计  | Tags: , ,  | Leave a Comment
星期三, 04月 29th, 2009 | Author: Zealot

问题是在这http://lilacbbs.com/forum/d.php?bid=66&id=62395,想了半天想不明白

摘要就是 Fred z = Fred(3);时没有执行拷贝构造函数,查了标准手册才发现原来如此:会不会调用拷贝构造函数由具体编译器实现决定:

Standard C++98 12.8

15 Whenever a temporary class object is copied using a copy constructor, and this object and the copy have the

same cvunqualified

type, an implementation is permitted to treat the original and the copy as two different

ways of referring to the same object and not perform a copy at all, even if the class copy constructor or

destructor have side effects. For a function with a class return type, if the expression in the return statement

is the name of a local object, and the cvunqualified

type of the local object is the same as the function

return type, an implementation is permitted to omit creating the temporary object to hold the function return

value, even if the class copy constructor or destructor has side effects. In these cases, the object is

destroyed at the later of times when the original and the copy would have been destroyed without the optimization.

111) [Example:

class Thing {

public:

Thing();

~Thing();

Thing(const Thing&);

Thing operator=(const Thing&);

void fun();

};

Thing f() {

Thing t;

return t;

}

Thing t2 = f();

Here t does not need to be copied when returning from f. The return value of f may be constructed

directly into the object t2. ]

Category: C/C++, 程序设计  | Tags: , ,  | Leave a Comment
星期二, 04月 28th, 2009 | Author: Zealot

今天apt-get install vim-full的时候,出现了错误,详见后面。原因不清楚,估计是sun-java5-jre这个包相关的东西出了问题,彻底清除了试试:sudo apt-get –purge remove sun-java5-jre,然后重新装上。。
再来sudo apt-get install vim-full,OK。

Reading package lists…
Building dependency tree…
You might want to run `apt-get -f install’ to correct these:
The following packages have unmet dependencies:
sun-java5-jre: Depends: sun-java5-bin (= 1.5.0-14-1etch1) but it is not going to be installed or
ia32-sun-java5-bin (= 1.5.0-14-1etch1) but it is not installable
vim-full: Depends: vim-gui-common (= 1:7.0-122+1etch5) but it is not going to be installed
Depends: vim-common (= 1:7.0-122+1etch5) but 1:7.0-122+1etch3 is to be installed
Depends: vim-runtime (= 1:7.0-122+1etch5) but 1:7.0-122+1etch3 is to be installed
Depends: libart-2.0-2 (>= 2.3.16) but it is not going to be installed
Depends: libatk1.0-0 (>= 1.12.2) but it is not going to be installed
Depends: libbonobo2-0 (>= 2.13.0) but it is not going to be installed
Depends: libbonoboui2-0 (>= 2.5.4) but it is not going to be installed
Depends: libcairo2 (>= 1.2.4) but it is not going to be installed
Depends: libgconf2-4 (>= 2.13.5) but it is not going to be installed
Depends: libglib2.0-0 (>= 2.12.0) but it is not going to be installed
Depends: libgnome-keyring0 (>= 0.6.0) but it is not going to be installed
Depends: libgnome2-0 (>= 2.14.1) but it is not going to be installed
Depends: libgnomecanvas2-0 (>= 2.11.1) but it is not going to be installed
Depends: libgnomeui-0 (>= 2.13.0) but it is not going to be installed
Depends: libgnomevfs2-0 (>= 2.13.92) but it is not going to be installed
Depends: libgtk2.0-0 (>= 2.8.0) but it is not going to be installed
Depends: liborbit2 (>= 1:2.14.1) but it is not going to be installed
Depends: libpango1.0-0 (>= 1.14.8) but it is not going to be installed
Depends: libperl5.8 (>= 5.8.8) but it is not going to be installed
Depends: libruby1.8 (>= 1.8.5) but it is not going to be installed
Depends: libxcursor1 (> 1.1.2) but it is not going to be installed
Depends: libxfixes3 (>= 1:4.0.1) but it is not going to be installed
Depends: libxi6 but it is not going to be installed
Depends: libxinerama1 but it is not going to be installed
Depends: libxrandr2 but it is not going to be installed
Depends: libxrender1 but it is not going to be installed
Depends: tcl8.4 (>= 8.4.5) but it is not going to be installed