June 2009
14 posts
良いUIにするにはどうすればいい?
最近、UI関連の仕事をしてたとき、他の人と意見が食い違って、なんでこんなに噛み合ないんだろうと思って何日か考えたら、その人との視点の違いに気がついた。多分、良いUIの要素には少なくとも
操作したらどういう結果になるか、ユーザにとってわかりやすい
ユーザが、正しい方法で効率的に、目的を達成できる
の2つがあるんじゃないかと思う。2番目で言うユーザの「目的」というのは、webやPC上で完結しないものを含む。この2つが両立できれば言うことないのだが、場合によっては衝突して両立できないこともあるように思える。例えば機能が増えて複雑になり、1つのフローの中でユーザの選択肢が多くなった場合など。
...
Amazon Product Advertising APIの結果をJSONで受け取るスクリプト
(2009/08/11更新)
AmazonがAPIの認証方法を変えたので、このサイトで使ってるスクリプトも変更しなければいけなくなった。
今までは、Yahoo! Pipesを使って、AmazonのAPIの結果を
XMLからJSONに変換していたが、それができなくなるのでGoogle App Engine
で動くスクリプトを書いた。
参考にしたのは以下のサイト(ありがとうございます)。
Amazon Product Advertising APIの署名認証をPythonでやってみる
pyAAWS for Product Advertising API
Amazon アソシエイト Web サービス改め Product Advertising API の電子署名について調べてみました
AmazonのProduct Advertising...
Script to get JSON from Amazon Product Advertising...
(updated: 2009/08/11)
Since Amazon changed authentication for their API, I have to change
my script on this site. I used to use Yahoo! Pipes
to convert Amazon, but it’s gonna be obsoleted in August.
Now I wrote script for the alternative solution for it and hosted it on
Google App Engine.
I referred to some codes in the following sites (Thank you).
Amazon Product Advertising...
夫が今「はんけつが出ました!」と言ってズボンを半分下げた どうしよう
– Twitter / yuco: 夫が今「はんけつが出ました!」と言ってズボンを半分下 …
(translation)
My husband said “Hanketsu ga demashita!” (the judgement has been handed down / Half buttocks appears) and he have his trousers down half.
(誰かもっと上手く訳してくれないかな。英語って難しい。)
幸せになりたい幸せになりたいってずっと思ってると
幸せになりたいってだけで終わっちゃうんです
幸せだなぁって思ってるとずっと幸せのまま過ぎていくんです...
– 【2ch】ニュー速クオリティ:亀井絵里の人生哲学
(translation)
If you are thinking “I wanna be happy,” time passes, but you still wanna be happy. If you are thinking “I’m happy,” time passes, you’re still happy.
(誰かもっと上手く訳してくれないかな。英語って難しい。)
静的ファイルのホスティングをPage CreatorからApp Engineに移行
Google AppsのGoogle Page Creatorを
HTMLやイメージなどの静的ファイルをホスティングするのに使ってたけど、Google Page Creatorが6月で終了する
ことになってしまったので、これらのファイルをGoogle App Engineに
ホスティングすることにした。その時の手順などをメモっておく。
参考
Using Google App Engine as Your Own Content Delivery Network
アカウントの作成
Googleのアカウントで Google App Engine にログイン
携帯のメールアドレスを入力(GAEのコードを受け取るため)
Create Application ボタンを押し、携帯で受信した Google App Engine Code を入力
任意の Application...
Migrating static contents from Page Creator to App...
I used Google Page Creator with Google Apps
to host some static files, but it’s going to be closed soon. So, I migrated these contents to
Google App Engine.
References
Using Google App Engine as Your Own Content Delivery Network
Create Account
Login to Google App Engine with your Google Account
Input your SMS account to receive App Engine Code.
Press Create Application and input...
aBowman » Penguins
Google gadget. Kawaii
May 2009
4 posts
JavaScriptでの配列のコピー
JavaScriptで配列をコピーするのにちょっとハマったので、調べたことを書いておく。以下のコードは
llevalで結果を確認した。
JavaScriptでは、以下のようにすると配列のコピーではなく、元の配列への参照となる。
var a = [1, 2, 3];
var b = a;
print(a); //[1, 2, 3]
print(b); //[1, 2, 3]
b[3] = 4;
print(a); //[1, 2, 3, 4]
print(b); //[1, 2, 3, 4]
シンプルな配列ならば、次のようにしてコピーできる。
for文を使う。
var a = [1, 2, 3];
var b = [];
for (var i=0, l=a.length; i<l; i++) {
b[i] = a[i];
}
print(a); //[1,...
Copying array in JavaScript
I stuck a little bit about copying array in JavaScript, so I write down what
I learned about it. I confirmed the following code on lleval.
In JavaScript, the following formura is not copying array, but reference.
var a = [1, 2, 3];
var b = a;
print(a); //[1, 2, 3]
print(b); //[1, 2, 3]
b[3] = 4;
print(a); //[1, 2, 3, 4]
print(b); //[1, 2, 3, 4]
To copy simple array, you can do it in either...