123
 123

Tue 18 March, 2008

Click here to bookmark this link.Channel Image13:43 Twitter Updates for 2008-03-17» halostatue
@bbum you’re lucky you had rocks. My Canadian friends just had snowballs. # @CurtMonash I’d wait until June if you’re able, since you’ll have to pay to get access to the AppStore # @bynkii I want a way to tell Google to always exclude experts-exchange from my queries, thanks. # @chadfowler My answer to that question, so far, [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Mon 17 March, 2008

Click here to bookmark this link.Channel Image17:15 新見二日目» Matzにっき
今度は家族と新見へ。 かかった時間は同じくらいでも、 慣れるとそんなに遠く感じなくなるから人間の主観はいいかげんなものだ。 家族(+親族)で食事。 大会ではコーラスに参加。 ほとんど練習に参加できなかったのに厚顔なものだ。 実際、一箇所間違えちゃった。 父親が長年果たしてきた責任に別の人が任命される。 息子はショックを受けていた。 が、後で電話したら、公式に責任を果たすことはなくなるけど 解任ってのはないので、 親族は例外ってことだった。息子大喜び。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image17:15 取材» Matzにっき
鳥取県の地方紙から取材。 なんだか「勝手知ったる」感じ。 適当にまとめてくださるのだろう。 ベテラン記者というのはそういうものか。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image17:15 The ”No Laptop” Meeting Rule (by Jeremy Zawodny)» Matzにっき
ミーティングにノートPCを持ってくるな、というルール。 確かにノートPCがあると会議なんかそっちのけで、 内職に励んでしまい、なんのための会議なんだか、 という経験はしばしばある。 それはそれで反省すべきなんだが、 ノートPCに触る余地もないほど有意義な会議がさほどないというもの また事実である。 会議の数を減らすか、質を高める努力が必要なのだと思う > 会議主催者 まあ、本来は有意義な会議なんだが、 誘惑に堪え切れず内職を始めちゃったりする場合もあって、 それは私が一方的に悪いわけだ。 私が会議中にPCを眺めてぼ..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image17:15 21世紀最大のテーマは公私混同 − @IT» Matzにっき
Rubyなんかも、 仕事が少なくて空いた時間に 会社のコンピュータを使って 開発が始まったんで、ある意味、この「公私混同」の成果物である。 とはいえ、最近はSOX法だか「こんぷらいあんす」だかで ノートPC持ち出し禁止 PCの業務外利用禁止 Webアクセス制限 業務日誌必須 など、公私混同とか技術者の自由とは別の方向に進みつつあるようで、 そこはかとない危機感がある。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image14:13 Twitter Updates for 2008-03-16» halostatue
Back in Toronto. Nice to have my own bed back. Now to deal with the disaster of a kitchen. # Running a LightRoom catalogue backup, a SuperDuper! backup, a .Mac sync, and a Time Machine backup is hurting my poor little MacBook Pro. :| # @fraserspeirs Doesn’t the Macalope do a takedown on AKH every so often [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image13:19 Houdini aerial escape» Projectionist
Click here to bookmark this link.Channel Image13:10 Charlie Chaplin was no Harr...» Projectionist
Charlie Chaplin was no Harry Houdini.

Patrick Ewing, with no little feeling


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

Sun 16 March, 2008

Click here to bookmark this link.Channel Image22:53 ActiveScaffold中文版上线» LetRails
相信参加了Shanghai on Rails第二次活动的朋友一定都对Forrest的《ActiveScaffold简介》印象深刻,现在,经过Forrest及其团队的不懈努力,ActiveScaffold中文网站近日上线。除了中文版教程和文档外、还...
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image12:43 Twitter Updates for 2008-03-15» halostatue
Had a very late lunch at Il Fornaio on the Battery. Fabulous food. # Powered by Twitter Tools.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image09:10 Friends of Mine by of Montreal» Projectionist
Click here to bookmark this link.Channel Image09:09 5 years time – Noah a...» Projectionist

5 years time – Noah and the Whale


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image09:09 The real curse of software ...» Projectionist
The real curse of software is that you can never take anything out.

Gilad Bracha speaking about mistakes made in designing Java


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

Sat 15 March, 2008

Click here to bookmark this link.Channel Image16:54 False Positives for Gmail’s Spam Filters» Lovable Lyle
A word to the wise. There’s some anecdotal evidence that Google has recently modified the Spam filtering algorithm for Gmail. This afternoon, I checked the Spam folder for my primary e-mail account and discovered that over the past two days, six legitimate messages had been flagged as Spam. All but one of those were “bulk mail” [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image15:36 Twitter Updates for 2008-03-14» halostatue
Had a late lunch at Orphan Andy’s in the Castro. # Picked up a lot of chocolate at Trader Joe’s for folks back home. # @chockenberry I don’t see why not. # Powered by Twitter Tools.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image05:53 Your job will never love yo...» Projectionist
Your job will never love you back.

Amy Hoy


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image04:01 Old School Sesame Street on...» Projectionist

Old School Sesame Street on Abstract Thinking


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

Fri 14 March, 2008

Click here to bookmark this link.Channel Image20:59 Apple Tells Me "Thanks, But No Thanks"» Joey Gibson's Blog

Like 10 million other iPhone fanboys, I applied for the Apple iPhone developer program. Today, one week after applying, I received this email

Thank you for expressing interest in the iPhone Developer Program. We have received your enrollment request. As this time, the iPhone Developer Program is available to a limited number of developers and we plan to expand during the beta period. We will contact you again regarding your enrollment status at the appropriate time.

Thank you for applying.

Best regards,

iPhone Developer Program
And I've seen lots of other people on Twitter complaining of getting the same email. One disappointed reject said this
As I understand it, no one got in except for a handful of large partner companies alla Google.

It's bad enough that the "free SDK" isn't actually free since you have to pay $99 to be able to load your apps on your own iPhone, but now they're rejecting hopeful developers in bulk. They ought to let everyone in who wants in. What's the harm?

Gee... I wonder if I'm violating some NDA by blogging this? I'm sure some of the helpful souls on the xcode-users list will let me know if I am.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image18:10 新見» Matzにっき
半年に一度の新見での集会。 遠いぞ。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image18:10 Teflon Ted: Rails Doesn't Scale» Matzにっき
Ruby on Railsはスケールしないといわれているけれど、という話。 実際にはスケーラビリティを達成した事例のリンク集。 もちろん15分で作ったアプリそのままではスケールしないので、 そういう意味では難易度が高いというのは事実なんだけど、 適切な処置をすることでかなり高いスケーラビリティを実現できる。 なんにも考えないでもいい、というのはある種理想だけど、 なかなかそうはいかない。 マーケティング的には、少々ノウハウが必要な位の方が ビジネスになっていい、という判断もあるが、 これは少々さもしいかも。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image18:10 Sapphire, the Programming Language» Matzにっき
Rubyの「欠点」を直すために作られたfork。 ストレートにサファイアと名付けるというのは予想外だ。 直そうとする「欠点」は Improved Unicode support, including Unicode operators Fine grained mixins Structured warnings Method annotations Named parameters AOP support Asynchronous methods Selector namespaces Implicit getters and setters Uses C99, warning free code. Improved standard library. Some have been removed, others updated. New libraries have been added, such as Rake, Gems, sys-admin. Much improved..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image18:10 OOエンジニアの輪! 〜 第 40 回 関 将俊 さんの巻 〜» Matzにっき
咳さん。 OOエンジニアとひとことで言っても さまざまだよなあ、と思う。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image15:07 Twitter Updates for 2008-03-13» halostatue
What’s this "I’m so over you Sarah Marshall"that I’m seeing on the taxis in San Francisco? # Wandering around the Haight. # Powered by Twitter Tools.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image15:07 Twitter Updates for 2008-03-13» halostatue
What’s this "I’m so over you Sarah Marshall"that I’m seeing on the taxis in San Francisco? # Wandering around the Haight. # Powered by Twitter Tools.
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image03:11 Steve Yegge on Interviewing» John Lam on Software
Sorry, Steve for dragging out that lovely photo of yours that I took at Foo Camp. But hey, it's the only one that I have :) I've been interviewing a bunch of folks for our 4 open positions (a nice...
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl

Thu 13 March, 2008

Click here to bookmark this link.Channel Image13:27 Twitter Updates for 2008-03-12» halostatue
at the hotel # it says non-smoking room, but I can still smell the mustiness of it; probably from neighbouring rooms. # @shanselman too bad it’s based on silverlight, which means I won’t see it. (I refuse to install SilverLight or AIR) # @shanselman enh. I tried Snitter briefly. Compared to Twitterrific, it’s a mere wannabe. # @shanselman and [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image09:42 取材» Matzにっき
取材ウィーク。(苦笑 鳥取県の広報誌(なのか?)と、 地方TV局の取材を受ける。なんなんだ今週は。 特に新しい発言はしていない、と思う。
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image09:42 オープンソースサロン» Matzにっき
オープンソースサロンの今回のテーマは 「アメリカ視察報告」と「Rubyをエンタープライズ領域に適用」の二本立て。 参加者それぞれにコメントを求められたのだけど、 なにを言ったらよいのかわからなくなって支離滅裂なことを発言してしまった。 たぶん、個人的にアレを視察だと認識していないからに違いない。 「エンタープライズ領域」の方は前回聞いたのと似たような話。 「業務」、「ウォーターフォール」、「COBOL技術者」、「コーディング規約」など 普段のRuby使いからは聞かれないような話が山盛り。 古いやり方を維持するのが良..
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image06:13 RailsConf seats filling up» Riding Rails - home

The $100 early-bird discount lasts until April 10th, but it seems like the open seats might not. So if you’re looking to meet up with the rest of the Rails community in Portland, you probably better get your registration in and your travel plans in line. It’s going to be a blast.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image06:13 RadRails 1.0 released» Riding Rails - home

Aptana has released RadRails 1.0 with a bunch of cool new features. I really like their debugging and profiling tools that allow you to inspect the call graph and see where the hot spots in your code are. The fact that RadRails is free and open source as well certainly doesn’t hurt.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image06:13 Funny or Die handles big load on Rails» Riding Rails - home

Funny Or Die is pulling high G’s scaling their Rails site to handle 9GBps of video and 20MBps of compressed HTML traffic from the stunts of Will Ferrell and others. Their top video has been seen no less than 50 million times. Rock on, guys.


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image02:27 Patterns are just a techniq...» Projectionist
Patterns are just a technique. It’s what is in your heart as a writer that matters.

Kent Beck


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

Wed 12 March, 2008

Click here to bookmark this link.Channel Image15:11 Twitter Updates for 2008-03-11» halostatue
ghu, I’m tired. Lots of walking today. # San Francisco is screwey. What kind of city has both a 6th street and a 6th avenue? # @philippec Okay, that makes some sense; why not letters and numbers instead? # @jamis yeah; @phillipec said that SF is the same way. # in LA at the client site # @taylorteacher It’s a [...]
add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image14:01 batophobia: An abnormal fea...» Projectionist
bat•o•pho•bia
[bat-o-fo-be-uh]noun
An abnormal fear of being near an object of great height, such as a skyscraper or mountain.

add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image13:55 Supergrass — Pumping On You...» Projectionist

Supergrass — Pumping On Your Stereo


add to del.icio.us add to del.icio.us. look up in del.icio.us.   add to furl.net add to furl
Click here to bookmark this link.Channel Image13:55 This is great but what̵...» Projectionist

Tue 11 March, 2008

Click here to bookmark this link.Channel Image16:55 Hello, Weka» 梦想风暴

Weka,是一个用Java编写的数据挖掘软件。数据挖掘,从字面上来看,它是一个从数据中找寻有用信息的过程,不过,它涉及的内容很多,所以,这里借用“分类”这一面来说事。

分类,从名称上来看,再简单不过了,给你一样东西,给它分个类。你如何知道怎么分类呢?显然,这是基于你已有的经验。对于计算机而言,这种经验从何而来呢?只有让人来告诉它,也就是说,我们要拿一批数据训练计算机,经过训练的计算机,便具备了一定的识别能力,就可以完成一些简单的分类工作。现实中,可以用到分类的机会有很多,比如我之前,曾经参与过的一个项目就是用这种方法来做车辆的识别。

下面便是一段使用Weka完成一段分类程序。

import weka.classifiers.Classifier;
import weka.classifiers.bayes.NaiveBayesMultinomial;
import weka.core.Attribute;
import weka.core.FastVector;
import weka.core.Instance;
import weka.core.Instances;
import weka.filters.Filter;
import weka.filters.unsupervised.attribute.StringToWordVector;

public class Main {
  private static final String GOOD = "G";
  private static final String BAD = "B";
    
  private static final String CATEGORY = "category";
  private static final String TEXT = "text";
    
  private static final int INIT_CAPACITY = 100;
    
  private static final String[][] TRAINING_DATA = {
    {"Good", GOOD},
    {"Wonderful", GOOD},
    {"Cool", GOOD},
    {"Bad", BAD},
    {"Disaster", BAD},
    {"Terrible", BAD}
  };
    
  private static final String TEST_DATA = "Good";
    
  private static Filter filter = new StringToWordVector();
  private static Classifier classifier = new NaiveBayesMultinomial();
    
  public static void main(String[] args) throws Exception {
    FastVector categories = new FastVector();
    categories.addElement(GOOD);
    categories.addElement(BAD);

    FastVector attributes = new FastVector();
    attributes.addElement(new Attribute(TEXT, (FastVector)null));
    attributes.addElement(new Attribute(CATEGORY, categories));

    Instances instances = new Instances("Weka", attributes, INIT_CAPACITY);
    instances.setClassIndex(instances.numAttributes() - 1);
        
    for (String[] pair : TRAINING_DATA) {
      String text = pair[0];
      String category = pair[1];

      Instance instance = createInstanceByText(instances, text);
      instance.setClassValue(category);
      instances.add(instance);
    }
        
    filter.setInputFormat(instances);
    Instances filteredInstances = Filter.useFilter(instances, filter);
    classifier.buildClassifier(filteredInstances);

    // Test
    String testText = TEST_DATA;
    Instance testInstance = createTestInstance(instances.stringFreeStructure(), testText);

    double predicted = classifier.classifyInstance(testInstance);
    String category = instances.classAttribute().value((int)predicted);
    System.out.println(category);
  }
    
  private static Instance createInstanceByText(Instances data, String text) {
    Attribute textAtt = data.attribute(TEXT);
    int index = textAtt.addStringValue(text);

    Instance instance = new Instance(2);
    instance.setValue(textAtt, index);
    instance.setDataset(data);

    return instance;
  }
    
  private static Instance createTestInstance(Instances data, String text) throws Exception {
    Instance testInstance = createInstanceByText(data, text);
    filter.input(testInstance);
    return filter.output();
  }
}

这个程序分成两个大部分,前半部分用以训练分类器,后半部分则是测试这个分类器。

训练分类器,我们要做的包括,选择分类算法和准备训练数据。在Weka中,每一种分类算法都是Classifier的一个子类,这样的话,就可以在不改变其它部分的情况下,很容易的修改分类算法。

其实,稍微了解一下这方面的知识的人,都会知道,分类算法固然重要,但真正决定一个分类器本事大小的,是用以训练的数据。想要得到一个好的分类器,少不了不断调整训练数据和不断的训练。这同人类认识问题是一样的,经得多,见得广,才有更好的分辨能力。

在Weka中,用以训练的数据就是Instances,顾名思义,这是Instance的复数,显而易见,单独的一个训练数据就是Instance,而Instances这个类的存在,可以把Instance的一些公共的属性放到一起。在这里,我们可以看到,为了用文本作为训练数据,我们会把文本转换为Instance。同样,测试分类器的时候,我们也会把文本转换为一个Instance,然后再进行分类。

除此之外,这里还有一个Filter的概念,同常见的filter概念类似,它给了我们一个进行正式处理之前,对数据进行处理的机会。在这里,主要是对Instance做一些相关的变换。

当我们得到一个分类器之后,就可以利用这个分类器进行分类了,其中,最关键的代码是
    classifier.classifyInstance(testInstance);
这段代码返回的是根据分类算法计算结果得到的一个相似度,我们可以利用这个值来估计我们测试用的数据应该属于哪个分类。

从代码上来说,这段代码本身并不复杂。正如前面所说,一个好的分类器是需要让数据帮忙的。所以,换几个测试数据,你就会发现,这段代码中实现的分类器一点都不强大。如果希望它强大起来,扩展训练数据是一个必然的结果。不过,对于这篇blog而言,这不重要,因为我们只是要和Weka问个好,进一步的工作,还需要进一步的努力。


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