柏杨已逝,Reiser 有罪
还有一个叫 Nina 的不知到底在天上还是人间。
陪审团周一宣判,Hans Reiser 有罪,一级谋杀。这是去年翻译的 Wired 背景文章。
这宗尚未发现尸体,犯罪现场,有力证人乃至实物证据的案子到此告一段落。或许击败 Reiser 的是他自己,检察官们艰苦的控诉似乎一直未对他造成大的伤害,直到为期11天的自我陈述开始,他对各件旁证冗长奇异的解释甚至在当时就招致了陪审团男男女女们质疑的摇头和庭审法官的傻笑。
Reiser 得到过他该得到的,爱情(虽然短暂),事业,名声,激情,Reiser 也会得到他该得到的。上帝的归上帝,凯撒的归凯撒,希望不该 Reiser 的不归 Reiser。
After the jury left, judge Goodman summed up his opinion of Reiser.
“You are rude,” he said. “You are arrogant. There are not enough words in the English language to describe the way you are.”
But the jurors found a word on Monday: guilty.
Tags: hans-reiser, linux, reiser, reiserfs
Flickr 照片作 Avatar
Gravatar 的服务(或其他头像比如 MyBlogLog)很多 Blogger 已经使用了—-既作为写者在自己的 blog 上 enable 这个服务而用,也作为评论者在 enable 了这个服务的 blog 上留言而使用。Gravatar 注册用户在留言处会显示他们的头像,让页面活泼了很多,也更有生气,甚至平添美感。
我一直觉得恼火的事情是没注册 Gravatar (或者留言者乱填了一个 email)的留言只能显示一个毫无动力的图像,而且常常一篇文章里全都是这种灰突突很没劲的面孔。
在这个问题上与我心有戚戚焉的人应该不少,所以有了 ravatar,monster-id 和 wavatar 这样的插件,他们会使用随机几何图形或者预先准备好的小怪物图片作为无头像留言者的头像—-不过,我觉得不够漂亮,选择余地也少,都不合我意。
趁着这次升级到 WordPress 2.5,又换了新主题,留出了充足的时间让我可以做早想做的事情—-用(准)随机 Flickr 图片作为无头像留言者的头像。那些无头像留言者的位置就是一个个让自己喜欢的 Flickr 上摄影者的作品来显示的机会,正好让 blog 留言部分蓬荜生辉啊。
准备工作,或者“原理”是这样的,我本来正好在用 FlickrRSS ,展示几个我喜欢的 Flickr 用户的作品(见首页抬头部分),当然,我还用了 JpgRss,显示来自 JPG Magazine 的作品(见每页 footer 部分)。这两个插件都支持 cache,这样只要有人浏览我的 blog,而这些摄影者/网站的作品在更新,那我本地就缓存了不少75×75(根据插件设置会不同)的照片,这些就可以作为头像的source了。
下面的工作就简单了,要随机选择这些图片,然后作为参数传给显示 avatar 的函数—-不论是老的 Gravatar WordPress 插件还是 WordPress 2.5 内置的 get_avatar() 函数,都支持传入 default avatar 的,这样没有制定头像的留言就不再显示缺省头像,而是一张大小合适,漂亮的 Flickr 照片了。
其实我之前的模板已经做了随机选择文件的功能(原始 idea 仍然来自 Matt Mullenweg),那时最后是重定向 http header,现在无非改改路径返回得到随机图片的 full URI 而已。动手:
这是文件source:randomimg.phps
下载,改名为 .php,然后将此文件上传到你喜欢的地方(注意哟,这可不是插件,不需要传到特定目录,更不要所谓“激活”的,我现在也无意将其做成插件),与此文件同级目录建立一个目录 randomshow 作为存放 Flickr 照片的目录,当然,你也可以自己改改 code,放到喜欢的路径。FlickrRss 插件 enable cache,把 cache 路径指定到那个 randomshow 下。
ramdonshow 目录下可以是 jpg jpeg png gif 文件。
这个文件提供函数 my_random_avatar() 供后面使用。
记住把文件 46 行的 THE_URL 改成你的实际路径。
对 comments 模板,我用简单方法:
在 foreach 之外,包含
include(TEMPLATEPATH . '/randomimg.php');
我放在主题目录下,所以是 TEMPLATEPATH,你根据自己实际情况修改。
然后是
$the_default_avatar = my_random_avatar();
echo get_avatar( $comment, 64, $the_default_avatar );
FlickrRss 和 JpgRss 得到的 small 图都有 75 左右大小,完全够用了。那些细节大小想来大家都能搞定,就不废话了。
升级解决了大问题
升级到刚刚发布的 WordPress 2.5.1 了,发现先前在 2.5 的时候会发布新文章碰到 500 错误的事儿消失了,松了一口气,你也有类似问题?试试升级。
Tags: wordpress
Tiny Studio 主题下载
前两天换了新主题 Tiny Studio,当然自己改动了一些,有人说也想用用看,问问了原作者 OWA Studio,说保留链接的情况下没问题。
feed 地址,导航栏等需要自己修改。感谢原作者。
Tags: theme, tinystudio, wordpress
Windows Milestone 1 Release 2 (Part 1)
Can’t believe it? Yes, again, news about Windows 7.
It’s has been 2 months since my last post about Windows 7 Milestone 1. It was interesting and funny to watch how skeptics around the world reacted to my news. Many people denied and tried hard to prove what I posted was not true. Well, skeptics here is very reasonable but the evidences they used were merely those not-yet-updated ‘Vista’ in version windows or dialogues, and, many F words. That’s not reasonable, nether works. How desperately I hope those guys know more about software development and engineering.
You know there is something like the dark side of the force, especially when you have control on something and feel a little bit more powerful than the people you’re watching.
I’m afraid I’ll kick those guys again since today I bring you new bits of Windows 7.
This time it’s the 2nd release of Windows 7 Milestone 1. Version 6.1 (build 6574.1.{SECRET}). The {SECRET} here means I won’t expose detail.
No, even Milestone 1 isn’t a single release. Microsoft releases multiple versions of M1 with different minor version numbers. Well, for me it is the 2nd one I’ve gotten but I’ve no idea about how many releases Microsoft did before. I’ll use Win7 M1 R2, which stands for Windows 7 Milestone 1 Release 2, to describe it in the following. Please be noted, ‘Release 2’ is my naming convention, not Microsoft’s.
BTW, I do think my plain English here is OK for non-English speakers especially for readers from Europe and Asia. Anyway I’m not writing for WIRED or New York Times. I won’t provide translated local versions (What? Somebody asks what if the plain English is a fatal disaster for those native English speakers? … )
I use the same platform as for M1 R1: Intel G35 chipset motherboard, Core 2 Duo 2.66G dual core processor, 1 x 1G memory, integrated graphic card. Moderate, if not decent.
The installer is not greatly changed since M1 R1, only some words are updated from Vista to 7. Last time I use R1, the License Terms and SKU selection referred ‘Windows Vista’, now it’s changed to ‘Windows 7”.
The SKU selection shows these options:
Windows 7 Business, HomeBasic, HomePremium, Ultimate, HomeBasic N, Business N and Starter.
See some new SKUs are included however I don’t think these will definitively be the SKUs Windows 7 will provide. The installer program may inherit from some development tree so the SKU names are inherited also. Anyway, it’s not important to argue how many SKUs Win7 will bring to us. It’s much of business, not technology.
The SKU selection uses something like a grid control, the 1st column is SKU name, and 2nd, Date Modified. For all those SKUs, the date is March 2008.
An important change, also a nice improvement, is that you aren’t asked to input product key during the whole installation phase. For Vista installer, you can input a blank key and proceed but there is still a step and a text box for that purpose. Win7 M1 R2 installer simply skips this.
As in the M1 R1, Win7 installer automatically creates an additional 500.0 MB partition before system partition. A user doesn’t have control on this. No idea on what for. The partition doesn’t appear in My Computer but you can see it in disk management.
Other parts of the installation are same as in M1 R1.
The post-installation setup wizard, may be used for performance benchmarking to determine experience index, differs from that of Vista in that Win7 removes those fancy animation pictures during the process and the time it spends on this step is much less (less than 2 minutes on my platform).
Finally, after the setup here comes the product key… Yes, you can still input a blank key.
M1 R2 recognizes my G35 integrated graphic card and adapts display mode which makes my eyes comfortable at the first sight on Win7. Remember I had to find drivers for M1 R1.
The user name, machine name setup windows isn’t the default Vista style, I mean, neither Basic nor Aero. See below. The font is even Arial not Vista’s default.
Images below are clickable, click to view the large one.
Here comes the screenshots, more eye-candy elements are added into this release. I would say, Redmond’s engineers did do lots of polishing.
My Computer, watch the toolbar, 2 buttons at right. The first one is the View, the second one is used to toggle displaying preview panel. Besides that, look at the left panel, it’s redesigned, only Favorites, My Document, My Computer and Network there, more organized and simpler.
Window behavior is another area being enhanced. Double clicking on the top or bottom border of a window makes the window automatically adapts to the screen heights, but double clicking on left or right border makes nothing happen.
The arrangement of my computer changes greatly. A picture is worth… I’d better shut up now.

And, sorting options for different content.

Health Center, looks like Microsoft really starts caring your computer’s health. Besides, mind the mouse over effect.

let’s expand the Computer System

Windows Health Center Settings

Another great change is the Search in Start Menu. In Vista, after start typing search keywords the left half of Start Menu shows the search result. In Win7 M1 R2, the whole Start Menu area is used to show search result, including the right half which in Vista is used to display those traditional links such as My Documents, My Computer and Control Panel etc.
I personally like this change because it makes a user concentrate on results while not being disturbed by items.


There is no sidebar gadget control in system tray. Remember the vertical line of Vista’s sidebar when you move mouse on it? That’s not for Win7. Sidebar gadgets are much more similar as other objects on desktop like Recycle Bin. In Vista, you can’t click through the Sidebar area, for Win7 you can. The add gadget window looks like that in Vista.

The best enhancement comes from UAC, annoying UAC (User Account Control if you didn’t hear of it. Well… I think even a non-Vista user hear of the infamous UAC). Now we all know it was designed to annoy users but no more annoying in Win7 M1.
When you issue multiple actions which require approval from UAC. At the second request Win7 pops up a dialogue asking would you like to temporarily disable UAC thus you won’t be asked. Choose Yes and you win. This is much more user-friendly. Why didn’t you geniuses do this in Vista?
You know at this dialogue no hotkey works. I couldn’t get screenshot so I took a picture.

Video:
- smart display
- better search
- preview button
- double clicking top border to make the window auto-adept screen
- behavior of clicking separator between address box and search box
- I have other screencasts but I worry about the height can not fit in Yahoo Video’s/Metacafe’s/YouTube’s standard video size. You can’t see much details. Do you know which website can I use to upload big size video?
新主题 Tiny
UPDATED ON 2008-04-22: 这里下载。
好吧,距离上一个黑色主题没几天,觉得黑色阅读确实有点困难,换成这个新的。
源自 OWA Studio 的 Tiny Studio Theme。这是第一次用 one-column 的。为了多表达点信息,加了不少。
Tags: Blog, owa studio, theme, tiny studio, wordpress
WordPress 2.5 发布新文章 500 错误
UPDATED: 2008-05-08:忘了说,我升级到 2.5.1 就好了。
幸福的 WP 各各相似,不幸的 WP 各有各的不同。
上周升到 WordPress 2.5,一切都好,就真的开始只缺烦恼了—-发新 post 的时候,碰到 500 internal server error。我试了看上去几乎是所有可能有关的解决方法了:
。disable 所有 plugin
。删除 .htaccess,让 wordpress 重新自动生成
。用原来备份的 .htacess
。调整 php.ini memory limit 到 192M
。调整 php.ini max executin time 到 600
。off zend php4 兼容模式
。看了 log,没发现有特别的错误
。联系了 MediaTemple 的 support,皮球被礼貌地踢到 WordPress support
神哪。。。。。。全都不行
可是,经过这些天反复摸索,居然找到一个不是解答的解答:标题里不能仅有汉字。这不,我新发的几个 post 的标题都是也有英文的,不知道汉字与数字的组合行不行。好郁闷。。。。。。
大家有什么意见吗?















