<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>知易行难</title>
 <link href="http://blog.ashchan.com/feed" rel="self"/>
 <link href="http://blog.ashchan.com/"/>
 <updated>2009-06-18T07:28:06+08:00</updated>
 <id>http://blog.ashchan.com/</id>
 <author>
   <name>James Chan</name>
   <email>ashchan@gmail.com</email>
 </author>
 
 
 <entry>
   <title>Migrate to jekyll</title>
   <link href="http://blog.ashchan.com/archive/2009/06/15/migrate-to-jekyll/"/>
   <updated>2009-06-15T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/06/15/migrate-to-jekyll</id>
   <content type="html">&lt;p&gt;I'm migrating this blog from WordPress (self hosted) to &lt;a href=&quot;http://github.com/mojombo/jekyll/tree/master&quot;&gt;jekyll&lt;/a&gt;, so in the future I don't need to worry about database backup, workpress upgrade and other house keeping anymore. The blog source will be on &lt;a href=&quot;http://github.com/ashchan/blog.ashchan.com/tree/master&quot;&gt;github&lt;/a&gt;, and the generated static pages are hosted on my own vps. (github offers CNANE for paying account, which saves even more time and energy)&lt;/p&gt;

&lt;p&gt;I've been publishing new blog entries with markdown for more than one year. This means most entries are safe to move. There might be some style or data lost, but that won't matter much. I've also imported most comments to &lt;a href=&quot;http://disqus.com/&quot;&gt;DISQUS&lt;/a&gt;, which will be used as the comment system from now on.&lt;/p&gt;

&lt;p&gt;I don't want to bother creating redirecting for old tags and pagination pages. I plan to delete them from google as these pages are filled with duplicated page links. Not so useful for human readers.&lt;/p&gt;

&lt;p&gt;My blog was initially hosted on a provider from China, then on microsoft live space, on a &lt;a href=&quot;http://subtextproject.com&quot;&gt;Subtext&lt;/a&gt; install, and on a self hosted wordpress install for the past two years.&lt;/p&gt;

&lt;p&gt;I feel like publishing web pages in the very old-school way, only simpler and faster.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>计算机教育从娃娃抓起</title>
   <link href="http://blog.ashchan.com/archive/2009/05/29/pc-baby/"/>
   <updated>2009-05-29T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/05/29/pc-baby</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/ashchan/3575105625/&quot; title=&quot;计算机教育从娃娃抓起 by Ashchan, on Flickr&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3355/3575105625_5f3f472e9a.jpg&quot; width=&quot;500&quot; height=&quot;322&quot; alt=&quot;计算机教育从娃娃抓起&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>篮球教育从娃娃抓起</title>
   <link href="http://blog.ashchan.com/archive/2009/05/25/basketball-baby/"/>
   <updated>2009-05-25T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/05/25/basketball-baby</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/ashchan/3561987456/&quot; title=&quot;IMG_0297 by Ashchan, on Flickr&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3624/3561987456_3697a8aa33.jpg&quot; width=&quot;500&quot; height=&quot;375&quot; alt=&quot;IMG_0297&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>An Awful Rails Project</title>
   <link href="http://blog.ashchan.com/archive/2009/05/14/an-awful-rails-project/"/>
   <updated>2009-05-14T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/05/14/an-awful-rails-project</id>
   <content type="html">&lt;p&gt;Recently I was asked to migrate an existing rails app from its hosting to &lt;a href=&quot;www.rackspace.com&quot;&gt;Rackspace&lt;/a&gt;. I was told the code base for the project was not very 'good', and I was supposed to fix issues that stood in the way during the migration.&lt;/p&gt;

&lt;p&gt;I've been involved in quite a few existing rails projects for the past two years. I have to say this project is by far the most tough one with so many bad practices. I'll share a few here.&lt;/p&gt;

&lt;h2&gt;Incomplete database migrations&lt;/h2&gt;

&lt;p&gt;As soon as I got the git access, I cloned the project and did a rake db:migrate. This failed thanks to some gems missing problem. The project didn't use config.gem so I had to install these gems manually. After that db:migrate went well. I started the app in development mode, visited several pages, found that the signup page was not working. The signup form referred to firstname, lastname etc of the User model, it looked like these columns didn't exist in the database.&lt;/p&gt;

&lt;p&gt;I checked other models and found that the migration files only had less than half the schema for the database. Apparently the developer(s) stopped using rails' database migrations at a certain point. I'm afraid they've altered the database schema directly from mysql. (I have to admit I did this one time last year, the project I was working on was hosted on a shared hosting without ssh access, the only way to change the database structure was to do it in PhpMyAdmin.)&lt;/p&gt;

&lt;p&gt;Solution for this problem: got their current database dump, generated a schema from the dump using rake db:schema:dump.&lt;/p&gt;

&lt;h2&gt;None view templates under app/views&lt;/h2&gt;

&lt;p&gt;When I tried to start the app in production mode, I got this error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/erb.rb:469:in `scan': undefined method `empty?' for nil:NilClass (NoMethodError)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This didn't happen under development mode. The error message indicated it had something to do with ERB. A quick check on views folders lead to the source of this problem. There were some jpeg image files under one of the views folder, and there was a file named semantic.cache under every folder (I guess this was generated by the IDE or editor, the developer just checked them into the code base)!&lt;/p&gt;

&lt;p&gt;Solution for this problem: moved image files to public/images, removed all semantic.cache files.&lt;/p&gt;

&lt;h2&gt;Having a model called Spec!&lt;/h2&gt;

&lt;p&gt;This also prevented the app from running in production mode. The app had a model named Spec. The project installed the rspec and rspec-rails plugins. There seemed to be a name conflicts. Luckily (or unfortunately) the project didn't have any rspec tests.&lt;/p&gt;

&lt;p&gt;Solution for this problem: removed rspec and rspec-rails plugins. The Spec model was referred across the whole app I didn't want to rename it.&lt;/p&gt;

&lt;h2&gt;Running the live app in development mode&lt;/h2&gt;

&lt;p&gt;At this point I was so surprised how their app was running on the current hosting. I doubted it wasn't running in production mode at all. Then in the deploy.rb (did the capistrano deploy script really work?) file I saw this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;desc &quot;Stop the sphinx server&quot;
task :stop_sphinx, :roles =&amp;gt; :app do
    run &quot;cd #{current_path} &amp;amp;&amp;amp;  RAILS_ENV=development rake thinking_sphinx:stop&quot;
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Oops, the live app was running in development mode!&lt;/p&gt;

&lt;p&gt;Solution for this problem: had to fix some other issues to make the app run in production mode :-(&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update (May 19, 2009)&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Hard-coded ImagicMagick path&lt;/h2&gt;

&lt;p&gt;What is this!!!???&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def convert
    if ENV[&quot;OS&quot;] =~ /Windows/
        &quot;C:\\Program Files\\ImageMagick-6.3.1-Q16\\convert&quot;
    else
        &quot;/usr/bin/convert&quot;
    end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It simply doesn't respect the fact that I have a Mac port version of ImageMagick which is under /opt/local/bin. The new hosting has it under /usr/local/bin. Wow!&lt;/p&gt;

&lt;p&gt;Solution for this problem: if the app really needs to specify the ImageMagick path, have it in a config file and load it on start.&lt;/p&gt;

&lt;h2&gt;AR model's initialize method not calling super&lt;/h2&gt;

&lt;p&gt;The project has one ActiveRecord model, the model has an initialize method:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class Transformer &amp;lt; ActiveRecord::Base
    def initialize(arg1)
        # do some great job
    end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When creating a new object of this model, it gave a nil.has_key? error:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bumblebee = Transformer.new(sam)
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.has_key?
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is caused by not calling super in the initialize method.
Solution for this problem: add a call to super() in the initialize method.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>红河的一个Bug</title>
   <link href="http://blog.ashchan.com/archive/2009/04/24/red-river-bug/"/>
   <updated>2009-04-24T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/04/24/red-river-bug</id>
   <content type="html">&lt;p&gt;红河是一部很精彩的影片。可真想不到电影摄像会犯这种错误:&lt;/p&gt;

&lt;div class=&quot;thumbnail&quot;&gt;&lt;a href=&quot;http://skitch.com/ashchan/bc71q/red-river-1&quot;&gt;&lt;img src=&quot;http://img.skitch.com/20090424-gpqgkrhsjtpdxx47c5uqkg2gdg.preview.jpg&quot; alt=&quot;red-river-1&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080&quot;&gt;Uploaded with &lt;a href=&quot;http://plasq.com/&quot;&gt;plasq&lt;/a&gt;'s &lt;a href=&quot;http://skitch.com&quot;&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;


&lt;div class=&quot;thumbnail&quot;&gt;&lt;a href=&quot;http://skitch.com/ashchan/bc711/red-river-2&quot;&gt;&lt;img src=&quot;http://img.skitch.com/20090424-jwiay66ebqcy9upsjytdrdnwe2.preview.jpg&quot; alt=&quot;red-river-2&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080&quot;&gt;Uploaded with &lt;a href=&quot;http://plasq.com/&quot;&gt;plasq&lt;/a&gt;'s &lt;a href=&quot;http://skitch.com&quot;&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;

</content>
 </entry>
 
 <entry>
   <title>Passenger for Nginx安装与配置 (OS X)</title>
   <link href="http://blog.ashchan.com/archive/2009/04/17/install-passenger-for-nginx-on-os-x/"/>
   <updated>2009-04-17T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/04/17/install-passenger-for-nginx-on-os-x</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://blog.phusion.nl/2009/04/16/phusions-one-year-anniversary-gift-phusion-passenger-220/comment-page-2/#comment-5786&quot;&gt;Passenger 支持 Ｎginx 了&lt;/a&gt;！４月份最让人激动的消息。&lt;/p&gt;

&lt;p&gt;在 OS X　上安装 passenger 和 nginx 非常简单，上面的链接中有一段 &lt;a href=&quot;http://www.peepcode.com/&quot;&gt;peepcode&lt;/a&gt; 的视频。这里作一下简单的文字描述:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;curl http://phusion-passenger.googlecode.com/files/passenger-2.2.0.gem -o passenger.gem&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;sudo gem install passenger.gem&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;sudo passenger-install-nginx-module&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;照着提示一步步操作便可, passenger-install-nginx-module　会自动下载 nginx 源包并编译安装至 /opt/nginx 。&lt;/p&gt;

&lt;p&gt;安装完成后进行配置:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;修改 /opt/nginx/conf/nginx.conf, 将默认　server 设置中的 server_name 由 localhost 改为 nginx.local，以免与 apache 冲突。&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;在 http 设置的最后，加入:&lt;/p&gt;

&lt;p&gt;include vhosts/*.conf;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;cd /opt/nginx/conf &amp;amp; sudo mkdir vhosts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;sudo mate vhosts/ashchan.conf,　加入以下设置:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
server {&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;listen 80;
server_name ashchan.local;
root /Users/james/Projects/ashchan.com/public;
passenger_enabled on;
rails_env development;
&lt;/code&gt;&lt;/pre&gt;

}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;启动 nginx:&lt;/p&gt;

&lt;p&gt;sudo /opt/nginx/sbin/nginx&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;搞掂！&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>pragmatic支持epub和mobi电子书格式</title>
   <link href="http://blog.ashchan.com/archive/2009/03/26/pragmatic-now-with-epub-and-mobi/"/>
   <updated>2009-03-26T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/03/26/pragmatic-now-with-epub-and-mobi</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.pragprog.com/&quot;&gt;Pragmatic&lt;/a&gt;提供 iPhone epub 和 Kindle mobi 格式了!可以直接在 iPhone 的 Stanza 上下载已经购买的电子书。&lt;/p&gt;

&lt;div class=&quot;thumbnail&quot;&gt;&lt;a href=&quot;http://skitch.com/ashchan/bjpmb/pragmatic-stanza&quot;&gt;&lt;img src=&quot;http://img.skitch.com/20090326-kec932sa2ug7skeqiqu42m5jku.preview.jpg&quot; alt=&quot;pragmatic-stanza&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080&quot;&gt;Uploaded with &lt;a href=&quot;http://plasq.com/&quot;&gt;plasq&lt;/a&gt;'s &lt;a href=&quot;http://skitch.com&quot;&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;


&lt;p&gt;阅读效果比直接传 PDF 要好的多。&lt;/p&gt;

&lt;div class=&quot;thumbnail&quot;&gt;&lt;a href=&quot;http://skitch.com/ashchan/bjpm4/stanza-rspec&quot;&gt;&lt;img src=&quot;http://img.skitch.com/20090326-bakqq8jdm3jsxx8hk52pwj4764.jpg&quot; alt=&quot;stanza-rspec&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080&quot;&gt;Uploaded with &lt;a href=&quot;http://plasq.com/&quot;&gt;plasq&lt;/a&gt;'s &lt;a href=&quot;http://skitch.com&quot;&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;

</content>
 </entry>
 
 <entry>
   <title>无法访问 Google Docs Spreadsheet</title>
   <link href="http://blog.ashchan.com/archive/2009/03/15/access-google-docs-spreadsheet/"/>
   <updated>2009-03-15T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/03/15/access-google-docs-spreadsheet</id>
   <content type="html">&lt;p&gt;这几天无法访问 &lt;a href=&quot;http://spreadsheets.google.com&quot;&gt;Spreadsheet&lt;/a&gt; (Document 和 Presentation 都正常)，不知何故。无奈只好尝试 map hosts 的老办法，在 /etc/hosts (Windows 下应该是 c:\windows\system32\drivers\etc\hosts) 中加入:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;72.14.247.100 spreadsheets.google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;暂时可以正常使用了。你说，都是互联网，差距怎么就这么大呢!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>validates_numericality_of doesn't work on virtual attribute</title>
   <link href="http://blog.ashchan.com/archive/2009/03/06/validates_numericality_of-doesnt-work-on-virtual-attribute/"/>
   <updated>2009-03-06T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/03/06/validates_numericality_of-doesnt-work-on-virtual-attribute</id>
   <content type="html">&lt;p&gt;If a model has a virtual attribute and has a validates_numericality_of validation on it, calling valide? on it will cause an undefined method `attr_name_before_type_cast' error.&lt;/p&gt;

&lt;p&gt;For example, say we have a Product model, and we have a price attribute for whatever reason that doesn't persist in database:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class Product &amp;lt; ActiveRecord::Base
  attr_accessor :price
  validates_numericality_of :price
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we check the validation:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;product = Product.new
product.price = &quot;blah&quot;
product.valid?
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Oops, we get this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;NoMethodError: undefined method `price_before_type_cast' for #&amp;lt;Product id: nil, name: nil, created_at: nil, updated_at: nil&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Well, it asks for a price_before_type_cast method, let's give it one:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def price_before_type_cast
    self.price
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Somehow I don't feel liking this solution. Why validates_numericality_of doesn't work on a virtual attribute?&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>周末怪谈 - 打印机</title>
   <link href="http://blog.ashchan.com/archive/2009/02/28/weired-printing-issue/"/>
   <updated>2009-02-28T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/02/28/weired-printing-issue</id>
   <content type="html">&lt;p&gt;打印机快没墨了，就去买了个杂牌的816墨盒。换上前，决定先把原先还剩下的一点黑墨打完。&lt;/p&gt;

&lt;p&gt;于是打了一些 cheatsheets 出来。轮到打 rspec 的时候，打印机不动了，纸上只打出了一行。嘿嘿，终于用完了。换之。&lt;/p&gt;

&lt;p&gt;换上新墨盒，打印机自动打了一张测试纸出来，貌似可以用了。继续打 rspec 那份 cheatsheet，打了一行又停了。&lt;/p&gt;

&lt;p&gt;oops，连打几次都是如此。换上 ThinkPad 打了一份文档，没问题。这可真是怪了。&lt;/p&gt;

&lt;p&gt;换了一份 cheatsheet，顺利打出来了。&lt;/p&gt;

&lt;p&gt;咦，真是巧啊。原来那份文档本来就打不出来？为什么呢？谁知道。&lt;/p&gt;

&lt;p&gt;这样说来，我把原先那个墨盒再装回去，应该还能打几张吧，哈哈 :-)&lt;/p&gt;

&lt;p&gt;PS，打印机是 HP 的便宜一体机，主要用途是输出项目协议和文档。宝宝生出来后，打了几张照片，把816和817都给打爆了。&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Gmail and Safari 4 Beta</title>
   <link href="http://blog.ashchan.com/archive/2009/02/25/gmail-safari-4-beta/"/>
   <updated>2009-02-25T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/02/25/gmail-safari-4-beta</id>
   <content type="html">&lt;p&gt;Safari 4 Beta is just what Apple advertises, fast, cover flow ... And I love the tabs on title, which saves some screen real-estate.&lt;/p&gt;

&lt;p&gt;Several plugins stop working. For 1Password, installing the latest beta would solve the problem. For others, I don't use them too often anyway.&lt;/p&gt;

&lt;p&gt;Gmail doesn't work! That's almost impossible. I couldn't compose a new message or reply. I asked around and didn't find other people having similar problem. Web Inspector showed that several ajax calls never completed.&lt;/p&gt;

&lt;div class=&quot;thumbnail&quot;&gt;&lt;a href=&quot;http://skitch.com/ashchan/bf9kb/safari-4-gmail&quot;&gt;&lt;img src=&quot;http://img.skitch.com/20090301-nfxbgqeur52k6p6bj88p656n15.jpg&quot; alt=&quot;gmail failed to load under safari 4&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080&quot;&gt;Uploaded with &lt;a href=&quot;http://plasq.com/&quot;&gt;plasq&lt;/a&gt;'s &lt;a href=&quot;http://skitch.com&quot;&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;


&lt;p&gt;I enabled a lot of labs features so I thought some of them might cause the problem. After disabling and enabling them one by one I figured out the Location in Signature feature was the source.&lt;/p&gt;

&lt;p&gt;Happy again.&lt;/p&gt;

&lt;p&gt;BTW, Happy Birthday Steve!&lt;/p&gt;

&lt;p&gt;Update: another issue I found recently is the file upload button doesn't work as before. If I click on a &quot;Choose File&quot; button, nothing happens. Dragging a file and dropping it to the button works.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>benq v2400w</title>
   <link href="http://blog.ashchan.com/archive/2009/02/07/benq-v2400w/"/>
   <updated>2009-02-07T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/02/07/benq-v2400w</id>
   <content type="html">&lt;p&gt;从新蛋购入 Benq V2400W。在家工作这么久，一直没有用外接显示器，现在开始不用频繁地来回切换 space 和 窗口了。&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20090207-gs17qgr4jgxtq2j6x9r8napfed.jpg&quot; alt=&quot;benq v2400w&quot; /&gt;&lt;/p&gt;

&lt;p&gt;用以前买的一根 div2hdmi 接到了 Macbook Pro 上，分辨率是 1920×1200，不愿意去客厅时可以直接在上面看片。&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title> 招行网银与虚拟机</title>
   <link href="http://blog.ashchan.com/archive/2009/01/30/cmbchina-and-virtual-machine/"/>
   <updated>2009-01-30T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/01/30/cmbchina-and-virtual-machine</id>
   <content type="html">&lt;p&gt;很早以前就抱怨过&lt;a href=&quot;http://blog.ashchan.com/archive/2007/05/11/cmbchina-get-people-down-againaspx/&quot;&gt;招商银行专业版无法在虚拟机下使用的问题&lt;/a&gt;。这两年来我尽量不用招行网银（大众版），平时基本上是直接在 Safari 下使用浦发网银（动态密码）。&lt;/p&gt;

&lt;p&gt;一卡通每月为信用卡自动还款，平时有收款也都是用一卡通。招行大众版功能太少（如不能方便地对外转账），还是专业版更方便些,听说如果使用 USB Key 移动证书便可以在虚拟机下使用，抱着试一试的态度去申请（购买）了移动证书和 USB Key。&lt;/p&gt;

&lt;p&gt;USB Key 是免驱动的 33 型号。在 VirtualBox 里启用 USB 接口后，进入 XP，启用了 USB Key，然后下载安装招行专业版。&lt;/p&gt;

&lt;p&gt;遭遇了一次蓝屏。关掉虚拟机重启后再试便 OK 了。在专业版中导入移动证书，等几十分钟后便可以登录了。&lt;/p&gt;

&lt;p&gt;有人评价说招行为了方便自己的开发，减少责任，把很多安全性相关的问题抛给了用户。我深以为然。一来我觉得虚拟机环境比普通 PC 容易设置得更具安全性，二来招行的软件操作真的很不人道，以专业版使用移动证书为例，退出时如果 USB Key 还插着，会提醒你说不拔出来就退出不安全，要求你确认是否真的要退出。至少为这个行为加一个“下次不再提醒”的用户选项吧。&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Amazon Offers AWS Management Console</title>
   <link href="http://blog.ashchan.com/archive/2009/01/09/amazon-offers-aws-management-console/"/>
   <updated>2009-01-09T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/01/09/amazon-offers-aws-management-console</id>
   <content type="html">&lt;p&gt;Amazon announced AWS Management Console today, now users of AWS have a web-based, point-and-click, graphical user interface to manage AWS services (currently only EC2 is included).&lt;/p&gt;

&lt;p&gt;Here's a screenshot:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20090109-q1wc7px9mnr9a15namwd3ffsa5.png&quot; alt=&quot;aws management console&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To access AWS Management Console, just visit &lt;a href=&quot;https://console.aws.amazon.com&quot;&gt;https://console.aws.amazon.com&lt;/a&gt; with a browser.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>央视网首页布局</title>
   <link href="http://blog.ashchan.com/archive/2009/01/03/cctv-layout/"/>
   <updated>2009-01-03T00:00:00+08:00</updated>
   <id>http://blog.ashchan.com/archive/2009/01/03/cctv-layout</id>
   <content type="html">&lt;p&gt;上 CCAV 网站查看今天 NBA 直播时间，央视网飘出一个友情提示:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20090103-r49kj55ib7dqni6hfrgsauw4ak.png&quot; alt=&quot;首页布局有变化&quot; /&gt;&lt;/p&gt;

&lt;p&gt;非常“友好”，就是根本让人闹不明白“恢复初始”和“暂不恢复”是什么意思。符合 CCAV 一贯作风。&lt;/p&gt;
</content>
 </entry>
 
 
</feed>