2008-12-28

[Apache Derby] limit command




なんでかapache derbyでlimit文が使えないなぁ、と思ってたらサポートされてませんでした。 でも、ちゃんと代替の方法も用意されているみたいで、以下のように書いたらちゃんと動きました。
Statement stmt = con.createStatement();
stmt.setMaxRows(5);
ResultSet rs = stmt.executeQuery
    ("SELECT * FROM myLargeTable");

この"stmt.setMaxRows(5)"の部分が、"limit 5"になる模様。

参考サイト:
http://db.apache.org/derby/faq.html#limit

2008-12-17

[tango!]New Member and New Ideas


先週の情報検索の発表を見学したら、tango!に組み込むとなかなか面白い事が出来るんじゃないかと思える作品がいたので、そのメンバーの人たちを即勧誘しました。教授から受けたアドバイスの一つに、「有限のtangoを無限のtangoにする」というものがあったのですが、彼らの作品をうまく組み込むことができればアドバイスされたことが実現できそうです。実力あるメンバーも増えたし、プロジェクトの開発環境も整えたし、作業領域も明確化したし、面白くなりそうな予感。


2008-12-15

[tango!]Embedded Database in Eclipse


片手間にやっていたから、幾分か時間がかかってしまいましたが、ようやくApache Derbyを使った、はりぼてではないデータベースできました!

上図はコンソール上でのデバック用の出力です。ちゃんと出てる(気がします)。次のステップは、用意した20数万語のデータをデータベースに入力することかな。
さて、ではこの勢いで、大分後れを取っているTOFLE iBTの課題もちゃちゃっと終わらせます。
それでは。

2008-12-11

Lesson Review Tasks 1-10




These below are my answers for Lesson Review Tasks in Unit 1 through 10. If you will take the course "Tutorial English" at Waseda University, this might be useful to understand how much qualities get score high, because even these answers, which are not so good for answer, were graded the highest score. By the way, after looking over all the answers, I noticed that the quality of each answer deteriorates gradually, as time goes. Actually, it must be boring anyway because this task gives me no feedback from graders. Students would be glad, if graders would have given them comments, even very short comments, to each answer, I hope.



-Lesson Review Task 1 through 10-
[Unit 1]
1. Do you think this course will be helpful for you? Tell me your study plan for this month.
Yes, I think this course will be helpful for me for the following reason.Most importantly, this course will be helpful for me to practice the speaking section of TOEFL iBT. In Japan, where I live, we can easily self-study at other sections, which are Reading, Listening and Writing; however, I cannot easily self-study at the Speaking section because the section evaluates test-takers’ delivery, language use and topic development. Especially, delivery cannot self-study efficiently because it is an interaction, not self-action, so we should improve the skills through general communication, for example. Therefore, I strongly believe that this course, Tutorial English pre-advanced, will be so helpful for improving the required skills of the speaking section.2. What was your favorite subject in high school? (Use the AAA technique to answer this question.)
My favorite subject in high school is the Introduction Programming course because I was able to learn a lot of skills required for my current department, computer science. Specifically, the course helped me understand the object-oriented programming which is an important way of thinking when we make a computer program. Thanks to this previous knowledge, I was able to easily follow the courses in university. Do you have any subjects which helped you after graduating high school?



[Unit 2]
1. Are you confident about interrupting or changing the subject in English? Why or why not?
Yes, I am confident about interrupting or changing the subject in English because I learned a lot of useful phrases to do that from this Unit 2. For instance, when I would like to change a topic in English conversation, I only put in the phrases before the next topic I would like to talk, such as “By the way”, “It’s funny you should say that” and “Sorry to interrupt, but” Therefore, I have strongly confident about interrupting or changing the subject in English.2. Using the Language from Unit 2, write a mini conversation between you and a friend. Don't forget to change the subject once.
Friend: Hey, Yohei! Nice day, isn't it?Yohei: Yes, it’s pretty fine. What's new?Friend: Yes, I got surprising news, today.Friend: Did you hear that Chika is possibly on the dean's list at Waseda University?Yohei: Really! That’s great! I feel she currently studies so hard that she is able to score higher.Friend: By the way, did you also hear that Chika has a new boyfriend?Yohei: Wow! I did not know that, but perhaps, it might promote her intention to study.Friend: I think so too, because she seems really happy in both academic and private life.Yohei: Her boyfriend would be a very positive impact on her life. I have come up to want my girlfriend.Friend: Interesting, but you cannot choose Chika as a girlfriend, anyway.Yohei: That’s right.Yohei: Well, I have got to go because I have a class.Friend: Okay. See you later.



[Unit 3]
1. Why do you think there is an "English only" rule in the Tutorial English booths? Do you stay in the booth during the break? Why or why not?
Yes, I often stay in the booth and talk with classmates during the break, because it is a good opportunity for me to improve my speaking skills. Additionally, I think the rule “English only” is set up to help student’s future activities global. In Waseda University, although other departments might have many international students whom local students have to talk in English, the science and engineering department’s students are almost Japanese. Thereby, plenty of students in the science and engineering department only use Japanese. However, all the students have to require English skills if they will present their result of research, so they should make full use of opportunities that they are able to use English. To help such activities in the future, there is a rule “English only”, and I often stay in the booth during the break for preparing my own future activities.2. Using the Language from Unit 3, tell me about a memorable day you had in junior high school.
I vividly remember that a memorable day, when I had in junior high school, is the day to check the result whether I passed an entrance examination of high school or not. To score high at the exam, I was always preparing for the exam, when I was a third year student. Additionally, because I was on a basketball club, I was always so busy for three activities which are studying at school, the club activity after school, and preparing the exam to attend cram school in the evening. Needless to say, then daily life was not quiet, but I am pretty sure that continuing these three activities gave me a progress. However, because I was given only one chance to take the exam, I was very anxious, so I remember the day to check whether I passed or not, like it was yesterday. As a result, as I am here now, I was able to pass the exam of Waseda University High school, one of the most difficult private high schools to pass.



[Unit 4]1. Explain in detail what you should do to thoroughly prepare for each lesson. How much time should you spend to prepare?

In my opinion, we should do at least two preparations for each lesson. One is to skim the units which we will study in next class, and find out whether there are words we do not know, or not. Also, if we discover the word, we should check the word using dictionaries. Another one is to do something that the “preparation” section shows. These I showed above are the preparations, at least.

However, if we have enough time to prepare thoroughly, we should do two more extra preparations. One is to remember all phrases indicated by bold style in each can-do function, because it cuts the time to remember them in class. Thereby, we can use extra time to deeply understand each section. Another one is to understand what we will work with classmates. For example, if there is a role play section in units, the section or its similar section would be taken up. Preparing working with classmates, we would be able to make full use of discussion in class, because of needless to understand the role play section.

In conclusion, preparing four things I mentioned above, I strongly believe that we could maximize this class; also, even if we do not have enough time to prepare them, at least we should prepare two things I stated at the beginning, for each lesson.
2. Using the Language from Unit 4, agree or disagree with the following statement and state why: People should be able to smoke on the subway.

If you ask me, I disagree with the statement that people should be able to smoke on the subway for the following reason.

Most importantly, smoke made by the smoker makes additional tasks to employees of subway. To take an example, in 2000, I was a student at local junior high school, where there is a smoking room for teachers. Needless to say, there is a vent for smoke in the room, so we did not care about smoke. However, on January, we had an event to do the school cleaning, and then I was given the assignment to clean up the smoking room. In the room, there were almost no dusts or garbage which we should clear up, but a lot of tars were on the wall. The tars were difficult to wipe up, so I took plenty of times to finish my assignment. The way I see it, that difficult experience would cause in this case of subway; thereby, the employees’ work would increase because of the additional tasks.

In addition, remaining smoke on the subway has negative impact on other users who are sharing space with smokers. For example, when I was a sophomore in university, I went to the Shinsai-bashi in Osaka, Japan, where there was a long shopping mall under the ground. Although the shopping mall had good restaurants, souvenir shops and general stores, the shopping malls did not have a smoking room, but smoking area on the mall. As a result, I had to inhale smoke when I walked through around the smoking area, because the situation in underground kept smoke remaining from escaping to the ground. Thereby, it made me a little unpleasant, and in fact, there were no people without smokers around the smoking area. According to this example, this case occurs on the subway as well because the subway is also under the ground.

In conclusion, I argue that the statement that people should be able to smoke on the subway should not be allowed.
[Unit 5] 1. You have two Lesson Review Task questions to answer after each class. Why is it important to use the language from the lesson in the second question and answer both questions in detail?

The reason why answering two Lesson Review Tasks using the can-do function is important is that we are able to remind the can-do function we learned in class. Additionally, we can lay be remembered. For example, when students take class, instructors teach us new knowledge in each class, and they learn new things from class. However, most students run over the new things when final tests or reports are coming, because reminding new knowledge is very useful ways to remember longer and more deeply understand them. Therefore, they can score high in the tests or reports.

This example happens in this case, the class of Tutorial English. If we make useful of what we learned out of the class, we should remember longer and understand deeply them. Specifically, we should remind what we learned. As the functional way of reminding them, we have the task called Lesson Review Task. Therefore, answering questions asked by Lesson Review Task by using the can-do function is important.
2. I think I'm coming down with the flu. Using the Language from Unit 5, give me some medical advice.
In my opinion, if you would like to be feeling 100 percents, you should do three things. First, gargle with warm, salty water or mouth wash to protect your throat from bacteria. Second, put ice on your forehead and side to prevent from getting your condition worse. Third, stay home and rest with your body warming to help your body itself fight off the flu. I hope you will soon be up and about. Take care!


[Unit 6]1. Are you able to express your opinions in English more clearly now? Why or why not?
I am able to express what I think in English more clearly now because I learned how to express opinions from Unit 4, such as “The way I see it” and “As far as I am concerned”. Before I took the class of Unit 4, I state my opinion by saying a few common phrases, such as “I agree with” and “I disagree with” which”. Those phrases are certainly useful, but it cannot show how many percentages I agree or disagree. However, since I had learned other several useful phrases such as “I could not agree more”, I am able to how much I agree or disagree with matters. Therefore, I strongly believe that I am able to express my opinions in English more clearly now.
2. Using the Language from Unit 6, recommend something to do near Waseda University on a Saturday afternoon.

It depends on what you are a student or teacher now, but if so, I suggest you go to a gym in Gakusei Kaikan, which is near from Waseda University and opens even on weekends. Nearby Waseda University, there are other several gyms, but we have to pay about 5,000 yen per one month for registration, or pay about 500 yen per one time as a guest. In contrast, the gym I suggested cost just 2,000 yen per one year for registration, which is incredible reasonable. Therefore, why don’t you try to go to the gym?
[Unit 7] 1. What topics do you need to review from Units 1-6?
I think I need to review from Unit 4, Express Opinions and Agree and Disagree, because this unit has a lot of useful phrases to discuss with people. In my department, computer science, there are several opportunities which require discussion skills for senior students, such as classes whose teacher explains some technologies in English and video conferences which we must speak English to communicate other country’s students. Although I am not a senior but junior, it is clear that I will meet those opportunities many times in the future. In addition, I would express my opinions flexibly if I review this unit. For example, it reduces misunderstandings where I stand in discussion. Also, I would be able to disagree with other’s statement without giving too much negative impact. For these reasons, the phrases written in Unit 4 would be useful for my future activities. Therefore, if you ask me, I need to review from Unit 4.
2. Look over Units 1-6 and list some phrases or words that you feel will be useful and explain why.

As the same reason that I answered to a previous question, I feel these phrases listed up below will be useful for my future activities.

[Express opinions]
“The way I see it”, “As far as I’m concerned”, “If you ask me”, “My point is”, “I’d like to point out”, “Don’t you agree”, “Wouldn’t you say”

[Agreeing]
“I agree”, “Exactly”, “I couldn’t agree more”, “That’s just what I was thinking”, “I agree with the point you made about”, “You made a good point about”

[Disagreeing]
“Yes, that’s true, but”, “Maybe, but”, “I disagree”, “I don’t agree”
[Unit 8]
1. Do you think you will be using English in 20 years? Why or why not?
Yes, I believe that I will be using English in 20 years while I am in my field, computer science. There are 2 main reasons why I believe so. First, most of programming languages are composed of English, such as C and JAVA. Also, manuals of them are written in English. Even though there are some manuals written in Japanese, the amount of information they have is clearly lower than the manuals in English. Thus, while making a program, I will be using English even in 20 years. Second, most of famous conferences, contests and textbooks are used in English, so English skills are important tools to study at computer efficiently. In addition, in the field of science and engineering, having a board outlook is an essential element to conduct a research. If I do not have a broad outlook, I would research something which is already found by other researchers. Therefore, broadening my outlook, studying and using English to gather information is necessary. As I show the reasons above, I strongly believe that I will be using English in 20 years.
2. What job do you think your best friend would be suited for? Why? (Use the Language from Unit 8)

I believe that my best friend, Waseda Taro, would suit the researcher in the field of computer science, because he is quick study and efficient. In computer science, researchers are required not resourceful or eager beaver, but quick study and efficient. As is widely alleged, new computer technologies develop more quickly any other fields; consequently, researchers should always catch up with the new technologies in order to enhance or produce newer technologies. However, if researchers have to spend much time to learn them, they would lose their time to conduct their research. Therefore, researchers in computer science should be quick study and efficient. Getting back to the character of Waseda Taro, actually he is not so eager beaver and resourceful, but he is quick study and efficient, so I believe that he would find the job of a research in computer science.


[Unit 9]1. How do you remember new English words and phrases?
Many of my friends remember new English words and phrases using word list which English meanings are in left side, and Japanese meanings are in right side. They remember English words and phrases hiding each side of the list, and try to translate them in another side, such as translating a Japanese word into an English word. In my opinion, a lot of Japanese people remember English words and phrases in this way. For me, I do remember English not in the usual way, but in the new way that translates an image into English.

The new way is proposed by the some linguists, such as Onishi Taito and P.C.McVay who have master’s degree of linguistics in Oxford University. This new method is clearly simple that we do not remember new languages using translation from our own mother tongue, but remember them from images. According to what the linguists mention, the benefit of this way is that we remember something faster, and hardly forget it than we remember it using word list at least. To take a personal example, I was able to remember new English words and phrases certainly, and I hardly forget them, which is clearly more efficient for me to remember something.

Therefore, I remember new English words and phrases using image, not characters.
2.Using the Language from Unit 9, tell me what you think is the biggest problem facing university graduates today? What are some solutions?

If you ask me, the biggest problem facing university graduates is that makes the situation of finding a job more difficult, because of Economic Crisis, which approximately started from bankruptcy of Lehman Brothers Holding Inc. Fortunately, Japan did not have a credit obligation of subprime loan in USA so much; consequently, Japan are lightly affected from the crises, by comparing other countries such as Iceland. However, even in Japan, the crises certainly have a negative impact on Japanese companies, and students who will do job hunting in the future. For example, a student who will graduate at Meiji University, which is one of the famous universities in Japan, received a job offer letter from a banking company, and he did not have any problem to graduate the university. However, the company suddenly withdrew an employment offer and sent him 500,000 yen as a charge of firing. Subsequently, he had to find a new job, but it was difficult because he was not a fresh graduate. In Japan, not fresh graduates have difficulty in finding a job because they are usually considered that they have some problem to be fired. As this example above illustrates, the biggest problem facing university graduates today is that they are possibly hired in sudden, and it makes their situation to find a new job worse.



[Unit 10]1. What can you do to improve your non-verbal communication skills?

If you ask me, non-verbal communication skills would be improved significantly when people are in place where all languages they learned are not in effect. In the situation, people have to deeply consider at how to communicate other people with non-verbal communication skills, because they have no other tools to communicate. Subsequently, their non-verbal communication skills would be improved. However, for me, placing me in the situation is very difficult because Okubo-campus has no such a place. Instead, I suggest to improving the skills, making the situation by design, such as talking with my friend with no language but gesture and drawing something. In doing so, we would get the same effect as placing me in the situation.2. Your parent accused you of spending too much money on your hobby. Justify your reason(s) using the Language from Unit 10.

There is a good reason for it. You know, my hobby is building up a computer, so I thought I would surprise you with giving you my original computer which I am building up, which is more user-friendly, reasonably and sophisticatedly than other computers you can buy in shops. For this reason, I had to spend money.

2008-12-10

GWT+Eclipse with Cypal Studio+Apache Derby

合計7, 8時間ほど、無駄に悩みに悩み続けて、ようやくGoogle Web ToolkitにApache Derbyを実装させることに成功しました。だいぶ手こずりました。







分かったこと:
・Client -> Apache Derbyはできない。
・Server -> Apache Derbyはできる。



現状の問題点:
・エラー時の例外処理
・日本語の入出力方法
・Remote Moduleを使うと、Web上にアップロードできない



超お世話になったサイト:
http://www.ibm.com/developerworks/opensource/library/os-ad-gwt1/
http://www.fukudat.com/wiki/ja/Apache_Derby
http://allabout.co.jp/internet/java/closeup/CU20080911A/
http://allabout.co.jp/internet/java/closeup/CU20070119A/




まだ時間あるし、はりぼての実装だけ済ませてしまおうかな。

2008-12-09

GWTプロジェクトをDeployする方法

先日示したGoogle Group上でディスカッションした内容なんですが、もしかしたら他の誰かの役に立つかもしれないと思ったので、Blog上でも公表しておきます。


----- 以下、引用 -----
以下に、GWTで制作したプロジェクトをDeploy(ウェブ上で閲覧できる状態にすること)する手順を記します。

前提条件:
・Cypal Studioプラグインを導入したEclipseで、プロジェクトを制作している。
・TomCat ver 5.5 が、\Program Files以下にインストールされている。
※Tomcatのインストール方法は下記HPを参照してください。
http://www.site-cooler.com/java/tomcat/

1. 完成したプロジェクトをEclipse上で実行(run)する。

2. 上部ツールバーの右端にあるComple/Browseを押す。

3. ウェブブラウザが立ち上がり、ページが無事に表示できているかどうかを確認する。(更新すると直るバグも時々あります。)

4. Eclipseのウィンドウに戻り、プロジェクトのフォルダ階層の、一番上にあるプロジェクト名を右クリックする。

実行例:


5. "Export" -> WAR Fileを押し、適当な場所に出力する。

6. 出力したWARファイルを、"C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps"にコピーする。

7. 数秒後に、webappsフォルダ内に、"プロジェクト名"フォルダが生成される。

8. 生成されたフォルダをデスクトップにコピーする。

9. FTPアプリケーション(例えば、FFFTP)を使い、デスクトップにコピーされたファイルをアップロードする。

10. 無事にアップロード出来ていれば、アップロードされた先のURLにアクセスすることでGWTプロジェクトが表示できている。

以上です。

2008-12-06

tango! project open


今まで情報検索の実験として進めていたtango! projectですが、オープン化しました。というのは、今後の活動は、ただYahoo!で発表するためだけに開発を進めていくので、学業の成績とはもう関係がなくなり、ほぼ趣味の領域に入ると考えたからです。このため、少なくとも形だけでも、オープンに参加者を募ることにしました。

以下が、tango! projectの情報共有スペースです。
http://groups.google.co.jp/group/tango_project

興味のある方は連絡をば。現時点では、元々いたメンバーに加え、イギリスに留学してる友達と、デザインコンテストで賞をとったことがある後輩が、ウェブデザイナーとして参画してもらえることになっています。

個人的には、もう成績とは関係なくなるし、プログラミング言語の制約もなくなる(今まではJavaのみで記述)ので、大分気が楽になります。実際に、同じくYahoo!で発表するであろう友達は、これからは全てpythonで書くとか言ってました。

うん。OS制作のプロジェクトもあるので、tango!だけに傾注するわけにはいきませんが、なんか面白くなってきました。こういった気持ちを維持できるよう、出来ることから少しずつコツコツやっていきたいです。

2008-12-05

tango! feedback


睡眠時間って、結構なくても生きていけるもんなのか。いや、でもやっぱ6時間は寝ていたい。

ども、今日、先日投稿したウェブアプリケーションの発表が終わりました。もう片方の班の発表がまだだから、まだYahoo!で発表できるかどうかはわからないけど、少なくとも観客とTAと教授の関心度を見る限りでは、現時点で1位 or 2位なはず。というのも、親しい友達の班の発想が結構面白くて、プログラムの難易度ではこっちが勝ってると思うけど、アイデア面では負けてる気がする。いや、でも本当にアイデアは面白かった。流石だ。

来週にもう一方の班の発表あるけど、色々と面白そうだから見学しようかな。

補足:
tango!の今後を妄想してみる。
-ガジェット化して、Google Desktopのサイドバーでtango!が動いているとか。
→思想の飛躍は常日頃から。

-新しい単語とその情報を何らかの方法で取得し、有限のデータを無限のデータに。
→検索ワードを取得するAPIを使ったりとか。

-tango!の状態遷移図の中に、ゲーム状態を追加する。
→単語当てゲーム?意味当てゲーム?

-Apatch Derbyを使って、堅牢かつ軽快に動くデータベースを構築。
→これは必須かな。

2008-12-04

Tango!




明日発表のウェブアプリケーション「Tango!」のβバージョンをリリースしました。

βバージョンでは、"あ"~"え"の単語しか拾えません。また、Apache Derbyを使わずに生のデータから直接データ読み込みを行っているので、動作がとても不安定です。マシンパワーがないと止まるかも。ページエラーが起きたら、更新ボタン押せば直ると思います。

http://www.moegi.waseda.jp/yasu-you/InfoSearch/Tango.html

2008-12-03

WAK DataBase

思わず連続投稿してしまいました。

というのも、約10ヶ月前に制作したWAK DBが、友達のデザインによってとてもかっこよくなって帰ってきたからです。あ~、なんともうれしい限りです。

リリースはまだですが、一応制作者だしちょっとぐらいフライングして公開しても大丈夫だろう、多分。 ※ 名前の表示箇所は加工してあります。




メニュー画面


サンプルデータ表示画面



検索画面(鳳凰三山で検索)


検索結果表示画面(鳳凰三山がちゃんと出てます)



最新の山行記録を一覧表示

EyeBot




前回に引き続き、画像処理のお話。


今日、ようやくEyeBotがパイロンを回ってくれました。 最初は、取得した画像に雑音がかなり入っていて、うまく画像処理できなかったのですが、縮小処理を施したら、誤作動を起こす確率が大幅に下がりました。


当初は精度よりも処理速度を重視したプログラムを書いていたけど、精度高い方がやっぱいいね。画像処理の速度が遅くなるから、進むスピードは多少遅くなるけど、まずなにより、誤作動を起こよりずっとストレスが少なくて済む。


画像処理プログラムを書いていく方針としては、まずは精度を求める。次に、速度を求める。っていう方針が良かったのかも。

2008-11-27

Robot Vision

お久です。今日は、ちょっとした近況報告などなど。

現在は、画像解析を実装したロボット制御プログラムを作ってみます。
具体的には、赤色と黄色のポールがあって、こんな感じで進む制御プログラムを作ってます。





本当はこんな感じで動いてほしいんだけど、

現在の手持ちのアルゴリズムではちょっと動きそうにない。
加えて、試走日は明日な上にロボットが今手元に無いからテストできないorz。
もっと前々からちゃんとプログラミングしとくんだった。 orz orz orz
最後に、現在のプログラムはこんな感じです。
念のため、もうちょっとアルゴリズム増やそうかなぁ。



#include "eyebot.h"
#include "wabotcam.h"
#include <malloc.h>

/* 設定変数 */
#define RED    0
#define YELLOW 1

#define NUM_MATCH 500 // 色相一致の判断基準(範囲:0<X<4800)

#define L_STOP 128  // 左車輪停止
#define L_WALK 131  // 左車輪徐行スピード
#define L_RUN  138  // 左車輪走行スピード
#define L_BACKWARD 125 // 左車輪後退スピード

#define R_STOP 128  // 右車輪停止
#define R_WALK 125  // 右車輪徐行スピード
#define R_RUN 118  // 右車輪走行スピード
#define R_BACKWARD 131 // 右車輪後退スピード

#define C_CENTER 128 // カメラ正面
#define C_LEFT 230  // カメラ左向き
#define C_RIGHT 25  // カメラ右向き
#define C_LEFT_MAX 255 // カメラ左向き最大値
#define C_RIGHT_MAX 0 // カメラ右向き最大値

#define C_TURN 30   // カメラ自動修整時の回転角度 (使用ステージ例:第5)
#define C_LEFT_CENTER 35 // 目標物の左右位置の識別基準値 (使用ステージ例:第5)
#define C_CENTER_RIGHT 45 // 目標物の左右位置の識別基準値 (使用ステージ例:第5)

#define WAIT_TIME 500 // 旋回する時間(使用ステージ例:第2)

#define FIRST_STAGE 1  // 最初のステージ (第0ステージに遷移すると終了)
#define STAGE1_NEXTSTAGE 2 // 第1ステージの次ステージ
#define STAGE2_NEXTSTAGE 3 // 第2ステージの次ステージ
#define STAGE3_NEXTSTAGE 0 // 第3ステージの次ステージ
#define STAGE4_NEXTSTAGE 5 // 第4ステージの次ステージ
#define STAGE5_NEXTSTAGE 0 // 第5ステージの次ステージ

/* 基本課題に対するルート案
* [1]: 0 -> 1 -> 2 -> 3 -> 0
* [2]: 0 -> 1 -> 4 -> 5 -> 0
*
* 応用課題に対するルート案
* [1]: なし。
*/
/* ここまで */

void run(bitset **color);
void showStageRoot();

int main(){

bitset **color;
int num;
int key;
int endFlag = FALSE;
CAMInit(NORMAL);  // カメラの初期化
CAMMode(AUTOBRIGHTNESS); //

while(endFlag != TRUE){
LCDClear();
LCDPrintf("\n");
LCDPrintf("[Menu Display]\n");
LCDPrintf("GET: set color.\n");
LCDPrintf("RUN: run EyeBot.\n");
LCDPrintf("END: end program.\n");

LCDMenu( "GET", "", "RUN", "End" );
key = KEYGet();

/* メインメニュー画面 */
switch(key){
case KEY1: // 色相取得メニューに遷移
LCDClear();
color = COLORSetup(&num); // 画面一杯の単一色を撮影し、colorに格納する。複数個取得することも可能。
COLORInfo(color, num);  // bs に格納されているすべての色についての情報を LCD に表示します。
break;

case KEY2: //
break;

case KEY3: // EyeBotを走行状態に遷移
run(color);
break;

case KEY4: // プログラムの終了状態に遷移
endFlag = TRUE;
break;

default:
LCDPrintf("\nError:default\n");
}
}

// 解放処理
CAMRelease();
COLORRelease(color, num); // bsを開放し、収集した色相情報をすべて破棄します。
return 0;
}

/* run(): 設定変数に基づいて、EyeBotを走らせる関数 */
void run(bitset **color){
int stageNumber = 0;
int match, missMatch;
int key = KEY1;
int i, j;
int osWaitTime;
int leftEdge;
int rightEdge;
int centerPosition;
int headAngle;
colimage pic;
BYTE hue;

/* 各サーボのインスタンス生成 */
ServoHandle cameraHandle, rightHandle, leftHandle;
cameraHandle = SERVOInit( SERVO10 ); // カメラ
rightHandle = SERVOInit( SERVO11 ); // 右車輪
leftHandle = SERVOInit( SERVO12 ); // 左車輪

while ( key != KEY4 && KEYRead() != KEY4 ) {

switch(stageNumber){

/* 第0ステージ:サブメニュー画面 & 各サーボの初期化*/
case 0:
SERVOSet(cameraHandle, C_CENTER);
headAngle = C_CENTER;
SERVOSet(rightHandle, R_STOP);
SERVOSet(leftHandle, L_STOP);
LCDClear();
LCDPrintf("I'm ready!\n\n");
LCDPrintf("1: Start\n");
LCDPrintf("2: Show Stage Root\n");
LCDPrintf("3: \n");
LCDMenu( "1", "2", "3", "Back" );
key = KEYGet();
AUBeep();
if(key == KEY1) stageNumber = FIRST_STAGE;
else if(key == KEY2) showStageRoot();
break;

/* 第1ステージ:カメラ右向き & 1番目に取得した色相を発見するまで直進 */
case 1:
SERVOSet(cameraHandle, C_RIGHT);
SERVOSet(rightHandle, R_RUN);
SERVOSet(leftHandle, L_RUN);

match=missMatch=0;
CAMGetColFrame(&pic, 0);

/* 撮影した画像の各画素を色相値に変換 */
for (j = 1; j < imagecolumns - 1; j++) {
for (i = 1; i < imagerows - 1; i++) {
// RGB値から色相値を算出します。算出できない場合、 definehue というグローバル変数を 0 にセットします。
hue = rgb2hue(pic[i][j][0], pic[i][j][1], pic[i][j][2]); /***** ここでエラーが起きるかも! *****/

if (definehue && isHueArea(color[RED], hue)) { //v色相値 hue が色相情報 bs において認識できているかを返します。
match++; // 認識できた色相数をインクリメント

// 認識できなかった場合は黒色に変え、認識できなかった色相数をインクリメント
}else{
pic[i][j][0]=255;
pic[i][j][1]=255;
pic[i][j][2]=255;
missMatch++;
}
}
}

LCDClear();
LCDMenu( " ", " ", " ", "Back" );
LCDPrintf("[Stage 1]\n");
LCDPrintf("RED = %d\n", match);
LCDPrintf("Other = %d\n", missMatch);
if(match > NUM_MATCH){
AUBeep();
stageNumber = STAGE1_NEXTSTAGE;
}
break;

/* 第2ステージ:一定時間(WAIT_TIME)の間、右旋回 */
case 2:
SERVOSet(rightHandle, R_WALK);
SERVOSet(leftHandle, L_RUN);

LCDClear();
LCDMenu( " ", " ", " ", "Back" );
LCDPrintf("[Stage 2]\n");
LCDPrintf("Now turning...\n");
osWaitTime = OSWait(WAIT_TIME);   /***** サーボも止まるかも! *****/
AUBeep();
stageNumber = STAGE2_NEXTSTAGE;
break;

/* 第3ステージ:カメラ右向き & 2番目に取得した色相を発見するまで直進 */
case 3:
SERVOSet(cameraHandle, C_RIGHT);
SERVOSet(rightHandle, R_RUN);
SERVOSet(leftHandle, L_RUN);

match = missMatch = 0;
CAMGetColFrame(&pic, 0);  
for (j = 1; j < imagecolumns - 1; j++) {
for (i = 1; i < imagerows - 1; i++) {
hue = rgb2hue(pic[i][j][0], pic[i][j][1], pic[i][j][2]); /***** ここでエラーが起きるかも! *****/
if (definehue && isHueArea(color[YELLOW], hue)) {
match++;
}else{
pic[i][j][0]=255;
pic[i][j][1]=255;
pic[i][j][2]=255;
missMatch++;
}
}
}
LCDClear();
LCDMenu( " ", " ", " ", "Back" );
LCDPrintf("[Stage 3]\n");
LCDPrintf("YELLOW = %d\n", match);
LCDPrintf("Other = %d\n", missMatch);
// LCDPutColorGraphic( &pic );   // LCDに取得した画像を表示
if(match > NUM_MATCH){
AUBeep();
stageNumber = STAGE3_NEXTSTAGE;
}


/* 第4ステージ:カメラ正面 & 2番目に取得した色相を発見するまで右旋回 */
case 4:
SERVOSet(rightHandle, R_WALK);
SERVOSet(leftHandle, L_RUN);

match=missMatch=0;
CAMGetColFrame(&pic, 0);  
for (j = 1; j < imagecolumns - 1; j++) {
for (i = 1; i < imagerows - 1; i++) {
hue = rgb2hue(pic[i][j][0], pic[i][j][1], pic[i][j][2]); /***** ここでエラーが起きるかも! *****/
if (definehue && isHueArea(color[YELLOW], hue)) {
match++;
}else{
pic[i][j][0]=255;
pic[i][j][1]=255;
pic[i][j][2]=255;
missMatch++;
}
}
}

LCDClear();
LCDMenu( " ", " ", " ", "Back" );
LCDPrintf("[Stage 4]\n");
LCDPrintf("Now turning...\n");
LCDPrintf("YELLOW = %d\n", match);
LCDPrintf("Other = %d\n", missMatch);
if(match > NUM_MATCH){
AUBeep();
stageNumber = STAGE4_NEXTSTAGE;
}

stageNumber = STAGE2_NEXTSTAGE;
break;

/* 第5ステージ:カメラ自動微調整 & 自動方向転換 & 2番目に取得した色相を見失うまで直進 */
case 5:
SERVOSet(rightHandle, R_RUN);
SERVOSet(leftHandle, L_RUN);

match = missMatch = 0;
rightEdge = leftEdge = -1;
CAMGetColFrame(&pic, 0);  
for (j = 1; j < imagecolumns - 1; j++) {
for (i = 1; i < imagerows - 1; i++) {
hue = rgb2hue(pic[i][j][0], pic[i][j][1], pic[i][j][2]); /***** ここでエラーが起きるかも! *****/
if (definehue && isHueArea(color[YELLOW], hue)) {
match++;
if(rightEdge == -1){
rightEdge = j;
}else{
leftEdge = j;
}
}else{
pic[i][j][0]=255;
pic[i][j][1]=255;
pic[i][j][2]=255;
missMatch++;
}
}
}

LCDClear();
LCDMenu( " ", " ", " ", "Back" );
LCDPrintf("[Stage 5]\n");
LCDPrintf("YELLOW = %d\n", match);
LCDPrintf("Other = %d\n", missMatch);

/* 目標物補足 */
if(match > NUM_MATCH){
AUBeep();
centerPosition = (rightEdge + leftEdge)/2;

/* 目標物の位置:中央 */
if(C_LEFT_CENTER <= centerPosition && centerPosition < C_CENTER_RIGHT){
LCDPrintf("Target Center.\n");
SERVOSet(rightHandle, R_RUN);
SERVOSet(leftHandle, L_RUN);

/* 目標物の位置:右 */
}else if(C_CENTER_RIGHT <= centerPosition){
LCDPrintf("Target Right.\n");
if(headAngle > C_RIGHT_MAX + C_TURN) headAngle -= C_TURN;
SERVOSet(cameraHandle, headAngle);
SERVOSet(rightHandle, R_WALK);
SERVOSet(leftHandle, L_RUN);

/* 目標物の位置:左 */
}else if(centerPosition < C_LEFT_CENTER){
LCDPrintf("Target Left.\n");
if(headAngle < C_LEFT_MAX - C_TURN) headAngle += C_TURN;
SERVOSet(cameraHandle, headAngle);
SERVOSet(rightHandle, R_RUN);
SERVOSet(leftHandle, L_WALK);
}

LCDMenu( "Yellow", " ", " ", "Back" );
LCDPrintf("Yellow = %d\n", match);  // 取得したredの色素数
LCDPrintf("Other = %d\n\n", missMatch); // 取得したred以外の色素数

/* Debug Code: show some variables
LCDPrintf("centerPosition=%d\n", centerPosition);
LCDPrintf("rightEdge=%d\n", rightEdge);
LCDPrintf("leftEdge=%d\n", leftEdge);
//*/

/* 目標物を見失う */
}else{
LCDPrintf("Target Lost...\n");
stageNumber = STAGE5_NEXTSTAGE;
}

break;

/* 例外ステージ:ステージナンバーの出力 */
default:
LCDPrintf("Error: Stage ???\n");
LCDPrintf("stageNumber = %d\n", stageNumber);
}
}

// 解放処理
SERVORelease( cameraHandle ); // カメラ解放
SERVORelease( rightHandle ); // 右車輪解放
SERVORelease( leftHandle );  // 左車輪解放
}

/* 現在のステージ遷移順序を表示する */
void showStageRoot(){
int currentStageNumber = FIRST_STAGE;
int key;
LCDClear();
LCDPrintf("Current Stage Root\n");
LCDPrintf("0 ");
while(currentStageNumber != 0){
switch(currentStageNumber){
case 1:
LCDPrintf("-> 1 ");
currentStageNumber = STAGE1_NEXTSTAGE;
break;

case 2:
LCDPrintf("-> 2 ");
currentStageNumber = STAGE2_NEXTSTAGE;
break;

case 3:
LCDPrintf("-> 3 ");
currentStageNumber = STAGE3_NEXTSTAGE;
break;

case 4:
LCDPrintf("-> 4 ");
currentStageNumber = STAGE4_NEXTSTAGE;
break;

case 5:
LCDPrintf("-> 5 ");
currentStageNumber = STAGE5_NEXTSTAGE;
break;

default:
LCDPrintf("\nError: currentStageNumber=%d\n", currentStageNumber);
}
}

LCDPrintf("-> 0\n");
LCDPrintf("\nPress any key.");
key = KEYGet();
}


/*
* ***********************************************
*   ここから引用したライブラリ関数
* ***********************************************
*/
BYTE rgb2hue(BYTE r, BYTE g, BYTE b){
int max, min, delta;
int tr;

max = MAX(r, MAX(g, b));
min = MIN(r, MIN(g, b));
delta = (max - min);

if (delta != 0) {
definehue = 1;
}
else {
definehue = 0;
return 0;
}

if (max == r){
//return (int)(255.0 * (1.0 * (g - b) / delta) / 6.0);  // for PC
// fix for negative value (thanks to mizuno)
tr = (425 * ((1000 * (g - b)) / delta)) / 10000;   // for Eyebot
return tr &= 0xff;
}
else if (max == g){
// return (int)(255.0 * (2.0 + 1.0 * (b - r) / delta) / 6.0); // for PC
return (425 * (2000 + (1000 * (b - r)) / delta)) / 10000; // for Eyebot
}
else {
//return (int)(255.0 * (4.0 + 1.0 * (r - g) / delta) / 6.0);  // for PC
return (425 * (4000 + (1000 * (r - g)) / delta)) / 10000; // for Eyebot
}
}

/* RGB値からSAT値を算出する (0 ~ 255) */
BYTE rgb2sat(BYTE r, BYTE g, BYTE b){
int max, min;

max = MAX(r, MAX(g, b));
min = MIN(r, MIN(g, b));

if (max == 0) {
return 0;
}
else{
return ((2550000 * (max - min)) / max) / 10000;
}
}

/* RGB値からINT値を算出する (0 ~ 255) */
__inline__ BYTE rgb2int(BYTE r, BYTE g, BYTE b){
return MAX(r, MAX(g, b));
}

/* 色相値 hue が色相情報 color において有効かどうか */
__inline__ int isHueArea(bitset *color, int hue){
return bitset_get(color, hue);
}


/* C による簡易 bitset の実装 (thanks to mizuno)
* このライブラリでは色相情報の保持に使用する
* 256bit の bitset を用意し、0 ~ 255 の色相値を各ビットに関連付ける
*
* 000001111111111000000000.......0000
* この場合、赤色であることを判別するための色相情報になっている
*/

/* bitset の初期化 */
bitset *bitset_init(int length){
bitset *bs;
bs = (bitset *)malloc(((length + (BS_NBIT-1)) / BS_NBIT) * sizeof(long));
return bs;
}
/* bitset の pos ビット目の値を取得 (pos >= 0) */
__inline__ int bitset_get(bitset *bs, int pos){
return (bs[pos >> BS_SHIFT] & 1LL << (pos & BS_MASK)) != 0;
}
/* bitset の pos ビット目に値を設定 (pos >= 0) */
__inline__ void bitset_put(bitset *bs, int pos, int val){
if (val) {
bs[pos >> BS_SHIFT] = 1LL << (pos & BS_MASK);
}
else {
bs[pos >> BS_SHIFT] &= ~(1LL << (pos & BS_MASK));
}
}


/* 色相テーブルの実装
* bitset を使うことで一つの色について 256 bit で色相情報を保持できる
* この bitset を配列で持つことで複数の色の色相情報を保持できる */

/* 色相テーブルの初期化
* num には現在の色数が入る。これは初期化命令なので 1 になる。
* num は他でも使うので便宜的に呼び出すようにしている。
*/
bitset **colordata_init(int *num){
bitset **color;
color = (bitset **)malloc(sizeof(bitset *) * 1);
color[0] = bitset_init(256);
*num = 1;
return color;
}

/* 色相テーブルに新しい色相情報用のデータ領域を確保する */
bitset **colordata_add(bitset **color, int *num){
int p = *num;

p++;
color = (bitset **)realloc(color, sizeof(bitset *) * p);
color[p - 1] = bitset_init(256);

*num = p;
return color;
}

/* 色相テーブルを解放 */
void colordata_free(bitset **color, int num){
int c;
for (c = 0; c < num; c++){
free(color[c]);
}
free(color);
}


/* 色相テーブルのセットアッププログラム
* カメラから色相値を取得し、色相テーブルに順次格納していく
* number には取得した色数
* bitset ** が色相テーブルとなる
*/
bitset **COLORSetup(int *number){
int x, y, c, key;
int max, hue, huegraph[256];
colimage buf;

bitset **bs;  // 色相テーブルへのポインタ
int num;   // 色数

/* 色相テーブルの初期化 */
bs = colordata_init(&num);

do{
/* ヒストグラム用のバッファ */
for (c = 0; c < 256; c++){
huegraph[c] = 0;
}

do{
LCDMenu(" ", " ", " ", "CAM");
LCDSetPos(0, 10); LCDPrintf("# %2d", num);

/* 撮影待ち */
CAMGetColFrame(&buf, 0);
while (KEYRead() != KEY4){
LCDPutColorGraphic(&buf);
CAMGetColFrame(&buf, 0);
}
AUBeep();

/* 撮影した画像を色相値に変換 */
for (y = 1; y < 61; y++){
for (x = 1; x < 81; x++){
hue = rgb2hue(buf[y][x][0], buf[y][x][1], buf[y][x][2]);

/* 色相値が得られていれば、ヒストグラムに追加 */
if (definehue){
huegraph[hue]++;
}
}
}

/* もう一枚、同じ色について撮るかどうか
* MORE: もう一枚撮る
*   OK: ヒストグラムの処理へ
*/
LCDMenu(" ", " ", "MORE", " OK");
key = 0;
while ((key = KEYRead()) != KEY3 && key != KEY4)
;

}while(key == KEY3);

/* ヒストグラムの処理
* ヒストグラム中の最大値を基準に閾値に満たないものを 0 に
* 満たすものを 1 として、bitset に設定していく
*
* 現在の閾値は最大値の 5 %
*/

/* 最大の色相値を取得 */
max = -1;
for (c = 0; c < 256; c++){
if (max < huegraph[c]){
max = huegraph[c];
LCDSetPos(6, 0); LCDPrintf("MAX %3d:%4d", c, max);
}
}
/* 閾値 (要素が最も多い色相値の要素数の 5% 以下) */
max = max / 20;
for (c = 0; c < 256; c++){
bitset_put(bs[num - 1], c, max <= huegraph[c]);
}

/* ヒストグラムの処理結果の確認 - LCD 上に表示 */
LCDClear();
for (c = 0; c < 256; c++){
LCDLine(c % 128, 10 + (c / 128) * 30,
c % 128, 10 + (c / 128) * 30 - bitset_get(bs[num - 1], c) * 5, 1);
}

/* これで OK かどうか、また他の色についても収集するかどうか
*   RE: 現在の色を取り直す
*  NXT: 次の色の収集に移る
* DONE: 色の収集を終了
*/
LCDMenu(" ", "RE", "NXT", "DONE");
key = 0;
while ((key = KEYRead()) != KEY2 && key != KEY3 && key != KEY4)
;

if (key == KEY3){
bs = colordata_add(bs, &num);
}
LCDSetPos(6, 0); LCDPrintf("            ");

}while(key != KEY4);

LCDClear();

*number = num;
return bs;
}

/* 色相テーブルに格納されているすべての色の情報を LCD に表示する
* num には表示する色数を指定する
*/
void COLORInfo(bitset **bs, int num){
int i, c;
for (i = 0; i < num; i++){
for (c = 0; c < 256; c++){
LCDLine(c % 128, 5 + (i * 6) + (c / 128) * 2,
c % 128, 5 + (i * 6) + (c / 128) * 2 - bitset_get(bs[i], c), 1);
}
}
}

/* 色相テーブルを開放する */
void COLORRelease(bitset **bs, int num){
colordata_free(bs, num);
}


2008-11-19

Bouncing output off each other




今日は中々にcreativeな一日でした。
良いweb applicationが作れそうな悪寒!
このぐらいの速度で毎日アウトプットできたら幸せだろうなー。

Thanks, Tommy!

2008-11-17

web application_000



Eclipse + Google Web Toolkit + Cypal Studio + Tomcatを使って誠意web application制作中
が、サーバーが動かない…

2008-11-14

1st Technical Presentation




今日、初めて理系絡みの正式なpresentationを5分間だけやらせていただきました。使用言語は英語で、形式はspeaking from the points, not reading a script。時間が5分間しかないから、あまり深い内容は伝えられない。必然的に研究内容のabstractになってしまうんだが、うー、難しかった。特に、Timingの調整あたりが。

とりあえず、教授に言われたことは「無駄な説明を省いて、他の大事な情報を伝える時間を作れ」とのこと。発表前は、5分間しかないから大事なところを重点的に伝えようと考えていたけど、確かに自分のスライドを見直してみると説明し過ぎてるように思えた。友人からは「伝えたいことは分かったけど、(他の聞きたい部分の説明がないから)深い理解はできなかった」とのこと。戦略的失敗乙orz。

失敗した原因には色々あるだろうけど、たぶん以下の点がメインの原因かと推測。
・ 説明するべき項目は、例え内容が薄くても必ず入れる。(スライドもしくは口頭)
・ Q&Aは相手の質問事項を自分で言い直すor言い換えて、それに答える。
・ 冒頭で、~~~in order to~~~を忘れない。
・ MS PPT2007 <-> 2003の互換機能は糞。

明日はTOEFL iBT speakingのpreテストか。45秒だから、一度突っかかったら死亡フラグが立つわけだ。まずは、brainstorming能力を磨かないとな。圧倒的に足りない気がする。

2008-11-06

Check Your Word Choice




Google AJAX Search APIを使ってヘボサイト作りました。 word choice云々を言う以前に、説明文のword choiceがなってない可能性が高いです。 よかったら使ってやってください。

制作時間:約6時間 orz
http://www.arukou.sakura.ne.jp/yasulab/wordchoice.html
※突然アクセスできなくなる可能性があります。

2008-11-01

Virtual Box with 4 GB memory

最近、私的な凡ミスによりnew laptopを買うはめになりました。そこはかとなく気持ちは落ち込んでいるのですが、研究やら実験やらレポートやらがあるおかげで、そんなことをしているわけにもいかず。

ま、そんなことはともかく。新しいlaptopはなかなかに高性能です。以前のlaptopでは、低性能のためwinとlinuxでデュアルブートをしてました。おかげで処理速度は全く気にならないレベルだったのですが、、主に以下の2点で不都合でした。

・linux側からwinのファイルにアクセスできても、win→linux方向ではファイルが見れない。
・OS切り替えのために、毎回reboot。

しかし、今回はもうデュアルブートしなくても十二分にスペックがあるので、仮想マシンでも全く気にならない快適さで動きます。加えて、HDDも200GBあるから、容量的にも結構割くことができる。故に、こんなことをしても全く無問題でした。




ファイル共有も簡単だし、ネット環境も良好です(見づらいけど、guest OS画面の右下でfirefox開いてます)。また、HostとGuestとのマウス統合環境が既にUbuntu 8.04に搭載されているから、画面切り替えも簡単。加えて、今のところ全く不具合なし。
もう仮想OSでも、ここまで動く時代なのか…知らなかったorz。今まで律儀にデュアルブートしてた自分涙目orz
ただまぁ、いくら優れた環境が揃っていても、ユーザである自分自身の作業効率が高めれらなければ無意味。Linuxとwindowsでうまく役割分担して、効率よいアウトプットを続けられるよう頑張っていきたいです。

2008-10-18

TOEFL iBT self-evaluation




今日は、TOEFL iBTの振り替えテストを受けてきました。結果から言えば、あまり芳しい結果ではない。手ごたえがない。というわけで、以下、自己反省会です。

Reading
・Vocabulary養成→TOEFLの単語集の購入。
・Strategyが少し定着してない→Reading strategyの復習。

Listening
・メモ取りすぎない→因果関係や話しの流れを重点的に捕らえ、そこをメモする。
・テスト一週間前になったら、連続的に問題を解く練習する。集中力の持続UP→模擬テスト

Speaking
・independent taskにおいて、45秒でしっかり回答する練習。→来月からのSpeaking strategyで学習。
・Integrated taskは、回答の体系にはWritingの応用がそのまま効く。
しかし、パッセージが一度しか読めない。読み逃したらアウト。
あと周りのスピーキングがうるさい→うるさいところで、パッセージ読む練習(?)。

Writing
・RBTテンプレートは反則並に使える。忘れないようにする。
・independentは、わりと汎用的な内容が出る。→Model Essayを全て暗記して応用する。


どうでもいいこと:
多分どっかの予備校のinstructorの実験テストかなんかだと思うけど、speaking testで「あ~あ~あ~あ~」としか回答しない受験生がいて、マジで勘弁してほしかった。集中力削がれた。結果的には、あまりにうるさかったから監督人から強制退去(?)されたみたいだけど・・・。む~やっぱしうるさいところでも集中できるスキルが必要なのか。しかし、なんというかあまり役に立たないスキルな気がしてならないが。あと、何か知らんが「’」の出し方がわからんかった。shift+7で「&」が出たorz。インストールされているキーボードのデバイスドライバが、日本のキーボード用じゃないのかも。


Off-topic:
僕の所属している山岳サークルとNPO法人自立生活企画との、共同企画がようやくスタートしました。

車いすで山登りに挑戦 しっかり計画編
http://members.jcom.home.ne.jp/ilplan/kikaku/event/outdoor/mountain%20all/junbi01/tozan-junbi01.html

鷹ノ巣山・車いすテスト走行
http://members.jcom.home.ne.jp/ilplan/mountain%20report/mountain00.html


最近はレポートと実験とプロジェクト研究がメインの生活なので、本企画に対してはあまり貢献できていないのですが、僕個人としてはこのような新しい試みをとても好意的な印象を持っています。創意工夫を重ね、なんらかの良い結果を出してもらいたい。理由は、良い意味でも悪い意味でも、新しい企画は刺激を生み出すからです。刺激に対して過敏に反応してしまう人が少なからずいるという事実は否めませんが、その刺激は中長期的に何らかの形で参画者に対して役に立ってくれるんじゃないかな、と思っています。加えて、凝り固まった考えに風穴を開けてくれる要因にもなってくれるのではないか、とも期待しています。私見ではありますが、当該の山岳サークルは割と保守的なサークルなので、新しい動きをあまり好意的に受け入れられない傾向があります。これを機に、サークル内に新しい風潮が生まれると良いなぁ、とかなんとか思っていたり。

Anyway, まぁ人の心配も大事だが、まずは自分の身の回りにあるタスクやら何やらをしっかりとこなさないとな。心配や同情や激励みたいな感情は勝者の特権、って誰かが言ってた気がする。

2008-10-14

Peter Ferdinand Drucker




先日色々と面倒なことがあってか、今日は英語も研究もそこまでやる気が起こらず、気の赴くままにネットサーフィンしてました。今日はそれに伴って知ったことを備忘録的にまとめようかと思います。

今、個人的な関心事の一つに、日本の予想シナリオがあります。この中にドラッカー教授という節があって、これが中々面白い。例えば、

>「契約を履行しない人間に二度目のチャンスは無い。」

とか

> 「それでも深い関係を持とうとする人達は、ソフトウェアを軽視している傾向があると思います。つまり、何もかもソフトウェアを重視する人達に犠牲や負担を強いて、甘えて生き伸びようとしている。」 (※ 本文章では、"ソフトウェア = 契約を守る姿勢" という意味)


とか。

自分の中では納得のいく表現です。また、自分自身に対しての戒めとなる表現でもあります。で、こんなことをずっと前から提言していたドラッカー教授テラスゴスwwwと思って、今現在彼の軌跡を追っている次第です。

彼のことを調べてみた結果、まぁネットではこのぐらいしか情報収集できずに糸冬。

ピーター・ドラッカー - Wikipedia

P・F. ドラッカー 著書リスト@amazon

ピーター・F・ドラッカー教授追悼特集

第1回 担当者ではなく、マネジャーが成果をあげるとはどういうことか (nikkei BPnet, 2005/12/14)


第2回 チームとして成果が出ることに時間を使え (nikkei BPnet, 2005/12/21)


第3回 ワーカーとマネージャーの職能の違いを明確にせよ! (nikkei BPnet, 2006/01/06)


第4回 「チームの成果」に貢献して、初めて働く意味がある (nikkei BPnet, 2006/01/13)


第5回 社員の強みを生かすことで、会社は伸びる (nikkei BPnet, 2006/01/19)

最終回 「成果」をあげる意思決定には方法がある (nikkei BPnet, 2006/01/27)

一応、本家サイト(英語版)はwikipediaの外部リンクから全て辿れるはず。nikkei BPnetは、無料で見れるということもあってか、個人的には非常に読みづらい構成になっている。やっぱし、手っ取り早く彼の考えを知るには、本買った方がいいかも。

もう夜遅いし、明日からまた研究進めなきゃだし、TOEFLも恐らく近日中に再試験だから勉強しなきゃだし、今日はこんなもんで寝ます。

それでは。

2008-10-12

Cancellation




3+1行日記:

07:00 起床, TOEFL iBTを受けに、千葉へ。
10:00 start(予定), しかし一向に始まらず。
11:30 テスト監督「システム不良によりiBT中止ッスwwwサーセンwww」

\(^o^)/

2008-10-08

1st LRT




haha, I feel I can do this homework more speedily than I did last year. However, it took 20 min in fact. Well, I should focus on these writing short-essay more sppedily because it may help me score writing section of TOEFL iBT.


----- 1st LRT -----
1. Do you think this course will be helpful for you? Tell me your study plan for this month.
Yes, I think this course will be helpful for me for the following reason.

Most importantly, this course will be helpful for me to practice the speaking section of TOEFL iBT. In Japan, where I live, we can easily self-study at other sections, which are Reading, Listening and Writing; however, I cannot easily self-study at the Speaking section because the section evaluates test-takers’ delivery, language use and topic development. Especially, delivery cannot self-study efficiently because it is an interaction, not self-action, so we should improve the skills through general communication, for example.

Therefore, I strongly believe that this course, Tutorial English pre-advanced, will be so helpful for improving the required skills of the speaking section.

2. What was your favorite subject in high school? (Use the AAA technique to answer this question.)
My favorite subject in high school is the Introduction Programming course because I was able to learn a lot of skills required for my current department, computer science. Specifically, the course helped me understand the object-oriented programming which is an important way of thinking when we make a computer program. Thanks to this previous knowledge, I was able to easily follow the courses in university. Do you have any subjects which helped you after graduating high school?

2008-10-07

Database Design: Intro, ER model




データベース設計の授業の予習をしまくってXMLをマスターすれば、情報検索のアプリケーションに100%役に立つことを発見。しかも課題も資料も回答ももろもろ全部先に提示してくれるとか、さすがIBMの研究員ともなるとレベルが違うわw。個人的には、このスタイルの授業が割にあってるなぁ。



----- note -----

・成績評価について
中間レポート 40%
→11月ごろ、課題をだす。
期末テスト 60%
→資料持ち込み負荷

目標:データベースの設計が出きるようになる。

教科書は使わない。
→http://www.fukudat.com/

参考書:
Ullman, Widom, "A First Cource in Database Systems," Prentice Hall.
北川, "データベースシステム" 昭晃堂
福田, 森本, 徳山, "データマイニング”

・今日の授業内容
1. データベース入門
2. ERモデル

-------------------------
「1st PPT:データベースの概要」
・What's Database?
→データを蓄えておくところ
→めもりは?

→データを永続的に蓄えておくところ
→HD, CD, Tapeは?

・Definition
データベースとは、
「複数の応用目的絵の共有を意図して、組織的活永続的に格納された大量のデータ群」
keyword:多目的、共有
→入れ物

ーDataBase Management System
「データベースを作成、管理するための機能を提供する仕組み」
→器

ーこれらは混同されて、単に「データベース」とよばれることが多い。


・データベースの役割
例:amazon
データ=本、顧客、仕掛け注文、注文履歴、売れ筋、顧客の嗜好などの情報

大量:中規模の書店でも、少なくとも数偽がギガバイトの情報を管理しなければならない
→メモリには大きすぎる。Cppでやろうとすると、メモリ管理が大変。

永続性:
→途中でなくなっては困る。サーバーシステムでも時々は電源をきらなくてはいけないことがある。ライフタイムが長いから。
複数のアクセスが競合する可能性がある。

マルチユーザ:
→ex:売上集計、注文など

・マルチユーザの例
二人が同時で買い物する時を考える。

重要なこと:どうやって排他制御をプログラムで実現するのか?

・何故データベースを使うのか?
scheme = definition of data
→変更の伝搬・影響が起こらないようにできる 
各層の間のマッピングが再構成できれば、他のアプリケーションは安定的に動かすことが出来る。

下からくる場合もある。physical dataから
→マッピングが再構成が出来れば

現在の主流:relational database

conceptual scheme:概念スキーマ

・Logical data independence
・physical data independence
これらを実現するのが、データベースの役割。



・DBMSはsoftware system
→ハードウェアで実現しようとするのは駆逐された。

しばしば、application server, middlewareと一緒に用いられる。


・DBMSのoutline(実装の例)
ユーザが2種類:一般ユーザ、データベース管理者

M:データの定義
U:問い合わせ、更新


strage = hard disc


これをどうやって作れば良いのか、が本当はやりたいこと。
しかし、授業では時間が足りないので、ある程度のテンプレートを使うことにする。
よって、データベース管理システム設計ではなく、データベース設計。


・Required things
-ACID property
Atomic Consistent(一貫性がある) Isolation Durable←データベースに求められる特性
-database schema
-relational database
-query processing
-physical data structure

3-tier schema(3層スキーマ)
-external schema
-conceputal schema
-

・教養としてしっておくこと
-Relational Data Model
E.F. Codd(1923-2003)
San Jose, Almaden laboratory
概念:すべてのデータをrelationで表現する->すべてのデータは表で表現できる。→relation=表, テーブル(visible)
プログラムとデータの独立
データ構造を知らなくても問い合わせがかける
relationというのは、Tableのこと
モデル図のオブジェクト間にある線のこと(だけ)ではない。
詳しくは「relational data model」の回で説明する。

-Relational Completeness 関係完備性 (完全>完備)
関係論理という宣言的な体系を使って表現できる異と、関係台数という手続的な体系を使って表現で切ることが同じであることを証明した。
→relational databaseで表現出来ないことはない。出来なければスキルが足りないか、スペックが足らないかなどが原因。
Ex.IMS 階層型DB
関係論理には十分な表現力が(なんとなく)しんじることができるので、関係台数にも十分な表現があることが分かる。
→SQLでは書けないことがある。
関係データベースの問い合わせ言語、SQLも関係完備。

-Normal Forms 正規化の理論
究極の正規形である第5正規形を発見した。
projection-join normal formともいう
他の正規形(1NF, 2NF, 3NF, BCNF, 4NF)の一般化になっている
→relational databaseで出きること、出来ないことを明確化した。
逆に言えば、正規形でないリレーションは、異常(anomaly)を起こす。
更新異常
削除異常
挿入異常




・データベース業界について
シェアウェア:
oracle
IBM DB2, Informix
Microsoft SQL Server, Access
Sybase
Hitachi HiRDB

フリーウェア:
MySQL - Private companyが作った
サービスを有償で売っている。
PostgreSQL
Apache Derby
SQLite  Ipod関係がよく使っている


・データベース業界、学会
国際学会
ACM SIGMOD(実践的なデータベース/PODS(データベースの原理)
SIGMODは日本からはほとんど通らない。
SIG=special interest group

ジャーナル国内(ある程度の結論でも載る:研究者の業績)
ACM TODS
IEEE TKDE
VLDB Journal

国内
情報処理学会 DBS研究会
電子情報通信学会 DEkennkyuukai
ACM SIGMOD 日本支部
日本データベース学会

文献検索
DBLP



「2nd PPT:データモデリング」
データモデルの3要素
1. データ構造を記述するための規約
2. データ構造に対する操作
3. データが満たす制約を記述するための規約

・データモデルの種類
関係データモデル
タプルの集合
現在の主流

ネットワークモデル


・実世界のデータモデリング
→作るための道具
real world -> conceptual design -> conceptual model(entity-relational model) -> logical design -> logical model

・ERモデルとは
実世界の事象をモデル化する。
データベース設計の概念的な概略を描くことが出来る。
設計図はER図と呼ばれる絵(一種の文法のようなもの)

・Entitiyとは
実体:もの。こと。
実体集合:似通った実体の集まり
→学生は同じ?違う?
→何を重要だと思うかによる
↑これがモデリング。この概念はOOPの前身となった。


属性:実体の特性

・ER図
ER図では、各実体集合は短形で表わせる

書き方;
○:名前、製造元
□:酒←注目しているもの


・関連
実体集合を関連図蹴る

◇:関連付ける塩っ太守烏合を表す短径と線で結ばれる
Ex.売る、行き着け、好き

2008-10-06

Regret




計算知能理論Bの授業取っておけば良かったorz

理由は2つあって、1つは、これから情報検索を使ったアプリケーションを制作する際に、ネット上からかき集めた情報を自動で蓄積・構成を行うプログラムを作りたいから。その過程で、計算知能に対する理学的アプローチを知っていれば、わりと堅牢なシステムが作れそう(な気がする)。ただまぁ、シラバスを見た感じでは役に立つのかどうかまったく分からんし、教えてもらう理論がそのアプリケーションに確実に活用できるかというと、そういうわけでもなさそうだが。2つ目は、講師がstanford univの博士号所持者で、英語で講義してくれているらしい、聞いたところによると。曰く、英語は下手らしいが、英語のための英語勉強よりはCSのための英語勉強の方がmotivation上がるわ。あー、明後日の授業は聴講してみよう。それで本当に使えそうだったら、単位取れないけど聞くことにする。

2008-09-29

Late Semester




久々の日記です。ちょっと現状報告でも。

今期の時間割がようやくほぼ決定しました。3年後期にしてようやく、念願の平日1限縛りが実現しました(実際は、まだ暫定ではあるけど)。自分の今までの経験則によると、登校時間がずれると体調が優れないし、何より勉強効率が悪くなる。そういった意味で、専門選択の授業とTutorial Englishで平日1限縛りが出来る今期はかなり恵まれていると思う。残っている懸念は、Tutorial Englishの火曜1限がちゃんと登録できるかどうか、ってところぐらいかな。プロジェクト研究が取れるかどうかも不安だったけど、今朝教授からOKサインが出たので、問題ない。ちなみに卒業に関して言えば、なぜか回路理論が未だHold状態なのが唯一の不安材料だけど、それを除けばもう卒論書くだけです。

故に、今期は自分の受けたい授業と実験と研究だけで過ごせるので、現状のモチベーションはかなり高いです。しかも研究に関して言えば、先天的なGeekと後天的なGeekが集まっているところで研究していけるので、この環境をうまく活かすことができれば、もっと面白いことが出来る自分になれる気がします。

さっそく、まずは今週の実験内容である"情報検索"から取り掛かってみます!実験内容は、Google AJAX Search API(※1)を実習用のサーバ借りて遊びまくるみたいだけど、すでにテラオモシロスwww。個人で行う課題と、2,3人グループで行う2ヶ月規模のソフトウェア制作があるみたいだが、残念ながらいずれもスクリプト言語は使用禁止。せっかくRuby勉強したのに・・・(´・ω・`) でも、pythonは使えるのかな。もし使えるなら、pythonに触れる絶好のチャンス!さらにもし同じグループにニシキヘビ使いがいるようなら、グループ組んでくれるように猛烈ラブコールするしかねぇw。

そんなwktkな毎日です。では。

(※1)Google AJAX Search API
http://code.google.com/apis/ajaxsearch/

2008-09-19

How excellent Mixi's lexical analyser is!


なんとこのブログに、Mixiからでもアクセス出来るようになりました。もちろん、PCではなく携帯で。

今までは、外部ブログはアクセス出来ません的なメッセージが表示されるだけだったのに、なかなかやりますな。ここからは妄想だけど、携帯で表示される文字を見る限り、恐らく字句解析プログラムにhtmlのソースファイルを食べさせて、恐らく表示されるであろう領域(例えば、<p>○○○</p>)に目星をつけてそれをbufferに貯めておく。その後、bufferに溜まった文字列を加工を施し(例えば、領域と領域の間に改行を2つ入れる)、あとはMixiの日記更新プログラムのテキストフィールドにコピペするような形で食べさせる。で、携帯用htmlが完成(?)なのかな。

恐らく、これだけでは有害サイト等ももれなく携帯用htmlに変換してしまうので、もっと頑強なfunctionが所々についているはず。む〜、ソース見てみたいなぁ。

ただ一つ残念なことを挙げさせてもらうと、<img>タグ内にある画像ファイルを示す文字列を、恐らく特殊なbufferに貯めておいて、後で表示してくれてるというおまけ機能。具体的に、僕のブログの場合だと下記のコード部分にあたります。

img class="profile-img" height="80" width="39" src="http://2.bp.blogspot.com/__AyO-thBrS0/SDQ2rMe7OlI/AAAAAAAAAHg/6Ja1EYlini8/S220/self-portrait2.JPG" alt="自分の写真"/>

この機能のおかげで、僕の日記を携帯で見てくれる方々には、毎回、もれなく僕の顔写真が付いてきます。うん・・・まぁ・・・なんか、ごめんなさいorz。自分で見ててもこれはウザいわ(泣)




[追記]
これはすごいなぁ、日本の企業は撤退するんだろうか。

「IT製品、ソースコード開示せよ」・・・中国が外国企業に要求へ
http://www.yomiuri.co.jp/atmoney/news/20080919-OYT1T00011.htm?from=main2

3行でまとめるとこんな感じ↓。

>2009年5月から導入する方針
>新制度の対象としては、ソニーが開発した非接触ICカード技術「フェリカ」や、デジタル複写機、コンピューターサーバーなど、暗号機能が含まれる製品が有力。
>開示内容が中国政府を通じて中国企業に漏れる恐れはぬぐえない。

2008-09-18

Grade: 3.5 of 5.0




わざわざ訪れにきてくれた方々には申し訳ありませんが、今日は備忘録的な日記です。

[In order to score higher next time]
1. 抽象→具体にするために書き出すsetting用の文章でも、support my argumentになるような文章を極力扱うようにする。
2. provide more specific details
3. 反対意見に関するsentenceを1つ、2つ付け加えることでmore well-rounded analysis of questionにする。
4. 時制ミスとword choiceが痛々しい。

[総括]
Needs improvement for "Examples/Explanation" and "Word Choice/Spelling"

[対策]
modelをたくさん読む。

2008-09-17

SoC design practice




インターンシップが無事(?)終わり、今週はSoC設計のRTOS(Real Time Operating System)を使って遊び倒すという、組み込み実習が始まりました。

インターンシップでは一人で全ての作業をこなすことが大半だったのですが、今回の実習では久方ぶりのチーム作業です。といっても、今回の実習で1位の成果発表をしたところで、大して自分にとってのメリットは無いので、極力インプットに傾注するつもりです。…って最初は思ってたんだけど、血が騒いで(?)チームリーダーになってしまいました。設計とは離れた作業が多いのが結構ショックですが、まぁ成ってしまったものは致し方ない。幸運にもチームメンバーは2人のSoC実習経験者と1人の気の知れた友人なので、学習方針を変更して、マネジメント作業を行いつつ彼らの設計のノウハウを盗んで行くことにします。チームメンバーの設計能力や専門知識の量は少なくとも僕よりも高いので、学べることは恐らくたくさんあるはずです。良いインプットを心がけませう。

では、良い変態を。
↑スマン、アッシー。このフレーズがツボだったんで勝手ながら借りさせてもらってしまったんだんだZe。w

2008-09-13

different ways of thinking between developer's and personnel's side

昨日は、先日恐らくあまりタメにならないだろうと思っていたshare intern's experienceなイベントに参加しました。結果から言えば、とてもいい経験が出来たと思っています。内容は秘密保持契約があるので言えませんが、その用意されたイベント自体は僕にとって価値あるモノとはなりませんでした。

そこで僕は何をやったのか?
色々な要因があって、僕はイベント中のプレゼン時に与えられたテーマやらなんやらを全部無視して、自分が良いと思った・伝えたいと思ったことを発表をしてしまいました。当然、テーマに沿ってないのでいい評価はもらえず(講評時には絶賛だったんだが、無念)。不運にも僕と同じメンバーになってしまった方々には心からお詫び申し上げる所存であります。しかしながら、色々と目につく行動をしたおかげで、お偉いさんと1 to 1でお話できる機会を与えてもらったり(というか無理矢理作った)、懇親会ではinterns内でちょっとした有名人になれたり(自意識過剰乙)したので、personalなイベントでは、とてもいい経験が出来たなぁと思います。うん、自分はこのケースで言えば、developer's sideの考え方をしていたんだろうな。(そもそも、評価基準が異なってる時点で・・・?という感じもするが)

well, まぁよし。

さて、予備校の課題やら報告書やらをさっさと終わらせてしまおうかな。

2008-09-11

Reference

どもです。

昨日の投稿が何か回文というか怪文というか、そんな感じの意味不明な文章になってますな笑。勝手ながら言い訳させてもらうと、朝3時からプレゼンの3分前ぐらいまでガリガリppt作ってて、プレゼン後も次のプレゼンのためにガリガリppt作ってて、そして退社後は予備校の勉強していたらだんだん頭がランランルーになっていき、気付いたら昨日の怪文が誕生してました笑。

今日は、昨日用意したプレゼンで発表です。発表は、今回も15分以内に終わらず、17分半w。縮めるどころか、延びてるあたりがヘタレっプリ満載ですorz。

その後は、退社の時間まで置き土産的に追加のテスト仕様書・結果をまとめて、1ヶ月間お世話になった研究員の皆様とお別れしました。いやぁ、しかし本当働いてて面白かったなぁ。恐らく、社内の部門の中でも優秀な人達がそろってる部門だったんじゃないかと思うし、少なくとも僕よりは頭の回転が早い人が揃っていたので、大変満足!Thanks!

and Finally, I got a promise that a supervisor who has Ph.D. gives me a reference, that is one of main reasons I worked there, when I apply for undergrad or global company!

I'm very satisfied!

Well, but I actually have to work one more day for sharing experience among interns, but, uh, it smells something boring :( well, but I will go there, anyway.

well, see ya!

2008-09-10

16 57 38

I did a presentation today, and it took 1t 16 min 57.38 seconds, which is the same number as the this title, but I had to finish the presentation within 15 min. hm, what a terrible presentation it was orz. Well, but actually and fortunately, it's a kind of pre-presentation. The formal stage I will present about my outcome is tomorrow, and it's my first time to present my outcome, not a team's outcome. So, all the thing, like upgrading or degrading it, is that depends on myself. Well, with a little nervous, I will do it for myself. Anyway, I was wondering this post is useful for whom? lol. I strongly hope not to halt my head, at least by tomorrow.

2008-09-02

Hokka Hokka bento




[どうでもいい世間話]

今日は、研究室でインターンシップを単位として評価してもらうため、退社後に指導教官となる教授のもとへ行きました。途中、30分弱の時間が余ったので、駅〜大学間にあるホッカホッカ弁当なる食べ物を買って、63号館で一服。Actually, I bought a bento, salad and its dressing. After I went there, 63 bldg, I took them out of a plastic bag, and then I began to have my dinner! First, I put the dressing into the salad, but... hmm, it tasted something strange. I did not know why it tasted so, but I then thought that this dressing is the latest version I don't know, because it was fresh a little and not so bad tasting. As soon as finishing eating salad, I started doing the main dish, the bento! So, it's time to open the cover of the bento! Then, I realized then that the bento seemed to require another dressing for a meet in it, namely sauce or soy sauce, or something like that. Well, I found another dressing in the plastic bag, for salad. So,,,, then, according to Mottainai Spirit, I decided that I used the dressing, putting it into the bento. ......because I was sure that it makes good tasting, or something good, like the case of salad!

Failed

2008-08-28

I can spark England very well.

Goodafternoooooooooooon!
Today, I dropped by this web page below.

http://news4vip.livedoor.biz/archives/51202593.html


,where there are so unique sentences, thou? i was not able to look at the sentences, such as the title of this post, without laughing. this is, we can probably say, 2channelic english. even now, u know, i can't write english politely, and can't produce english with uniqueness. so i hope i could handle english as funny as the sentences on the webpage, not only to straight express stuff.



P.S.
i wonder if i finish weekly homework...but, i believe it's ok because i got the proverb(?)...
...IT'S NOT TIME FOR PANIC YET, though i'm going to participate in camp tommorow. right?


e.g.
ヾヽ'::::::::::::::::::::::::::'',    / 時 .あ ま ヽ
ヾゝ:::::::::::::::::::::::::::::{     |  間 .わ だ  |
ヽ::r----―‐;:::::|    | じ て    |
ィ:f_、 、_,..,ヽrリ    .|  ゃ る     |
L|` "'  ' " ´bノ     |  な よ     |
',  、,..   ,イ    ヽ い う    /
_ト, ‐;:-  / トr-、_   \  な   /
,  __. ィイ´ |:|: ヽ-- '.: 〃   `i,r-- 、_  ̄ ̄
〃/ '" !:!  |:| :、 . .: 〃  i // `   ヽヾ
/ /     |:|  ヾ,、`  ´// ヽ !:!     '、`
!      |:| // ヾ==' '  i  i' |:|        ',
|   ...://   l      / __ ,   |:|::..       |
とニとヾ_-‐'  ∨ i l  '     l |< 天  ヾ,-、_: : : .ヽ
と二ヽ`  ヽ、_::{:! l l         ! |' 夂__ -'_,ド ヽ、_}-、_:ヽ


sorry for rough sentence!

see ya later, alligator!

2008-08-27

International Intern

今日は、職場の先輩インターン生の実習最終日だそうで、約半年間の実習結果をまとめたプレゼンが行われました。一応、自分も一応同じインターン生ということで同席させていただきました。その先輩インターン生はフランスの方で、その人が通っている大学では半年以上のインターンシップを経験し、それを同大学で報告して初めて卒業なんだそうです。年齢については聞いていませんが、フランスに帰国後すぐに卒業ということなので多分一個上(?)かな。もしそうなら、日本・・・はもとより俺も結構危ないな。プレゼンで開発したソフトのデモを見る限り、革新的なソフトウェア…とはいかないまでも、少なくとも今の自分の技術力ではできないようなソフトウェアだったからなぁ。む〜、つまり、自分も一年後には、あのレベルの開発が出来なくてはいけないわけか.。しかも、少なくとも一つの外国語がペラペラの状態でw。

あ〜、頑張るのみ。


おまけ:気づいたら例の黒い液体が増殖してたの図



















-----------------------------------------------
完 全 燃 焼 orz


[尊敬する人物について]

--- sample 1 ---
This is my professor, Professor Tanaka. He received a Ph.D. in economics from Tokyo University and is the professor of Introduction Class I took. He also teaches several other classses in the economics department of Waseda University. He is maried and has two daughters.


--- sample 2 ---
This is myinstructor, Professor Kinoshita. He got his doctorate at osaka University. He teaches my favorite English literature class. His speciality iws actually American literature, but he seems to enjoy teaching the class. He is still rather young and not married yet.


--- exercise essay ---
こちらは私の政治学担当の小川先生です。私のだいがくで 博士号を取得された後すぐ動向で教鞭を取られました。講師をされる傍ら政治学の学生のアドバイザーもなさっています。ご結婚されており3人のお子さんがいらっしゃいます。

This is my teacher, Mr.Ogawa in Politics Science. He has a class at the university I attended, as soon as he received a Ph.D. from the university. In addition, he advises students who are majoring in Politics Science. He is married and has three sons.



[思い出について]
--- sample 1 ---
I will never forget when I first met my best friend. I was new to school, and lost my way at a corridor, looking for my classroom. She asked me if I needed help. We started talking and found that we were in the same math class. After that, we have been best friends.


--- sample 2 ---
One of my unforgettable experiences was when I studied abroad in Spain for a year. I was stunned to find a world and a way of life that I had never seen before. Also, there are so many regions and cultures within Spain itself. I began to realize that there are ofdten more differences within a culture thatn between cultures. This seems like what I probably cound not learn, if I had not gone out.

--- exercise essay ---
一番忘れられない経験は映画のエキストラになってほしいと依頼を受けたときのことでした。撮影所が1週間うちのキャンパスで英が取りをしていて、図書館の前を行き来する人とカフェテリアで食事をする人を必要としていました。仕事その物は単純だったし、ちょっぴり退屈でさえあったのですが、監督や主人公の2里ともあうチャンスがあり、その点では本当に感激しました。

One of my undorgettable experiences was what I was asked to be an extra of the movie. The movie was producing at our campus for a week, so the persons who come or go out at the front of the library were needed. The work itself was easy and even bored for me, but I was really excited because I had an oppotunity to see the director of the filem and two main characters.


[Section two class 2]
I prefer to study with a group of students for the following reasons.

First, I can learn more by studying with a froup of students. For example, in 1995 when I was en eleventh grader in Kaisei High School, a provate high school in Tokyo, Japan, I often studied English with some of my claswsmates after school. One of them, Tanaka, was the best student in calss. Another one, Suzuki, lived in America for six years when he was in elementary school. They both knew a lot about English then, and they helped me a lot when we studied together. I knew a lot of kanji, Chinese-Japanese characters, and they learned them from me in turn. We learned a lot from each other as a group. If I had not studied with others, I would not have learned more about English. As the above example shows, I strongly believe that I can learn more by studying with a group of students.


[Writing Sample Question]
Q: Why do people remember special gifts or presents that they have received?
A: People remember special gifts or presents that they have received for the following reasons.

1. Those gifts are meminders of important events in one's life.
2. Those gifts can often make unforgettable memories.
3. Those gifts are often given during holidays and birthdays.
4. Those gifts are sometimes expensive and rare.

Hint: 5W1H

When I turned sixteen, I received a new car from my parents.
When I was in college, I received a hand-made card from my friend.
When I graduated from high school, my grandfather gave me his heirloom watch.

When I was in elementary school, I received a book for my birthday. The book was a children's story, written in English, about a boy and his favorite tree. It was called "The Giving Tree" and had a beautiful green cover.

When I turned twenty-one ( the legal drinking age in the U.S.), my friends took me out to a bar for the first time. We ate and drank and enjoyed ourselves late into the night. At the end of the evening, they presented me with a nice wine rack.

On my seventh birthday, my parents and I went to my grandaparents'house to have dinner. after dinner, while I was sitting on the couch watching televeision, my dad handesd me a gift-wrapped package.

When I was in high school, I often baby sat for my neighbors' children. There was a girl whom I often used to look after. Her favorite book was "The Giving Tree." She would always refuse to go to bed unless I read the book to her at bedtime.

When I got married, my mother gabe me the dress she wore to her own wedding. Also, my fiance did not have to buy a ring because my father gave mje his dead mother's wedding band. These gifts wereo unique and priceless to me.

This book was my first English book. It became my favorite, and it also helped me to become motivated about learning English.

It is easy to remember special gifts because they often mark the passage of time or the seasons. Also, since some of these gifts are rare and cannot be bought easily, people treasure them.


--- Ex. essay ---
i believe people remember special gifts or presents that they have reverived for the following reasons.
First, special gists or presents can often make unforggettab le memories. For example, when I got married, my mother gave me the dress she wore to her own wedding. Also, my fiance did not have to buy a ring because my father gave me his dead mother7s weddin band. Their gifts werte unique and priceless to me. I have reasured trhem and rememberd them very clearly.
Second, special gifts or presents can ........


[Basec pettern exercise]
Theme: express your emotion
Structure: I am/was/feel/felt-- at/with/for~, because~.

--- pattern 1 ---
When I talked to my boss, I felt --- because he ---.

When I talked to my boss, I felt intimidated because he was very unkind.
When I talked to my boss, I felt encouraged because he supported my proposal.
When I talked to my boss, I felt sad because he told me I was fired.


--- patter 2 ---
My --- gave me a C on my final paper, which made me --- because ---.
My teacher gave me a C on my final paper, which made me angry because I thought I deserved an A.
My professor gave me a C on my finla paper, which made me happy because I thought I might fail the assignment.
My history professort gave me a C on my final paper, which made me disappointerd because had put so much effort into writing it.


--- pattern 3 ---
i often complain to my colleagues about ---m since ---.
I often complain to my colleagues about my job, since I am uninterested in my duties.
I often complain to my colleagues about my husband, since he does not seem to care about my work.
I often complain to my colleagues about the heat in the office since everyone else likes the temperature to be very high.


--- pattern 4 ---
Going to Disnerland made me feel ---, because ---.
Going to Disneyland madew me feel excited, because I had never been there before.
Going to Disneyland made me feel like a child, because everything was very new and strange.
Going to Disneyland made me feel disappointed, because it was not what I expected.


--- pattern 5 ---
When I purchased my first car, I felt so --- that I wanted to 0-0--.
When I purchased my first car, I felt so excited that I wasnted to drive all night.
When I purchased my first car, I felt so nervous taht I wasnted to drive very carefully.


^^^ pattern 6 ---
I am --- with my current --- mainly because ---. Additionally, ---.

i am dissatisfied with my current status mainly because I want more recognition. Additionally, I want greater wealth.
I am content with my current girlfriend mainly because we get along well. Additionaly, she is very humorous.
I am unhappy with my current job mainly because I want more responsibility. Additionally, I would like a more prestigious title.


--- pattern 7 ---
I was pleased to hear that ^^^^.

I was pleased to hear that you were getting married.
I was pleased to hear that our competitor had gone bankrupt.
I was pleased to hear that John had won his bowling tournament.


[All sentences below should be remembered.]
1. 私は彼女が何を好きなのか分かりません。 I do not know what she likes.
2. 私は彼女がいつここへ来たのかわかりません。 i do not know when she came here.
3. 私の朝ご飯は毎日パンです。 I have bread for breakfast every day.
4. 昨夜近所で家事がありました。 There was a fire in my neighborhood last night.
5. 彼はクラスメートに追いつくでしょう。 He will catch up with his classmates.
6. 私たちはその犬をルーシーとよんでいます。 We call the dog Lucy.
7. 私たちは彼を生徒会長に選びました。 We elected him president of the student body.
8. あなたはいつだって彼を信頼できますよ。 You can always trust him.
9. 私は誰がそれを下野か知っています。 I know who did it.
10. 彼は学校を出てから何もしていません。 He has done nothing since he left school.
11. 天気の良いときは散歩をします。 When it is fine, I go for a walk.
12. 昨夜はとても疲れていたので早く寝ました。 Since I was very tired, I went to bed early last night.
13. これが友達の住んでいる家出す。 This is the hous in which my friend lives/
14. 私は弟が壊した窓を直さなければなりません。 I have to fix the windown broken by my brother.
15. 芝生に座っている女性は私の姉です。 The woman sitting on the grass is my sister.
16. もし私に1000ドルあれば車が変えるのに。 If I had a thousand dollars, I could buy a car.
17. もし私が大統領なら違う方法でやるのに。 If I were the president, I would do things differently.
18. もし私があなたの上司なら昇級させてあげるのに。 if I werte your boss, I would give you a raise.
19. 私がそこにいれれば良いのに。 If I wish I were there.
20. 私が彼の電話番号を書き取っていたらなぁ。 I wish I had written down his phone number.
21. 私がそこにいたら助けてあげられたのに。 If I had been there, I could have helped you.
22. 大学時代にもっと英語を勉強しておけば良かったと思います。I wish I had studied En lish harder in college.
23. 私なら彼のためにそれをしますよ。 I would do it for him.
24. 日本人は勤勉な国民です。 The Japanese are a hard working people.
25. そのパーティは大成功でした。 The party was a big success.
26. 彼女は何も言わずにでていきました 。 She went out without saying a word.
27. 父は私より早く起きます。 My father gets up earlier than I do.
28. この服はあれより高くはない。 This dress is less expensive than that one.
29. 私の家は彼の家と同じ大きさです。 My house is as big as his.




[All sentences below should be remembered.]
1. 私は彼女が何を好きなのか分かりません。 .
2. 私は彼女がいつここへ来たのかわかりません。
3. 私の朝ご飯は毎日パンです。
4. 昨夜近所で家事がありました。
5. 彼はクラスメートに追いつくでしょう。
6. 私たちはその犬をルーシーとよんでいます。
7. 私たちは彼を生徒会長に選びました。
8. あなたはいつだって彼を信頼できますよ。
9. 私は誰がそれを下野か知っています。
10. 彼は学校を出てから何もしていません。
11. 天気の良いときは散歩をします。
12. 昨夜はとても疲れていたので早く寝ました。
13. これが友達の住んでいる家出す。
14. 私は弟が壊した窓を直さなければなりません。
15. 芝生に座っている女性は私の姉です。
16. もし私に1000ドルあれば車が変えるのに。
17. もし私が大統領なら違う方法でやるのに。
18. もし私があなたの上司なら昇級させてあげるのに。
19. 私がそこにいれれば良いのに。
20. 私が彼の電話番号を書き取っていたらなぁ。
21. 私がそこにいたら助けてあげられたのに。
22. 大学時代にもっと英語を勉強しておけば良かったと思います。
23. 私なら彼のためにそれをしますよ。
24. 日本人は勤勉な国民です。
25. そのパーティは大成功でした。
26. 彼女は何も言わずにでていきました 。
27. 父は私より早く起きます。
28. この服はあれより高くはない。
29. 私の家は彼の家と同じ大きさです。


[All sentences below should be remembered.]
1. 私は彼女が何を好きなのか分かりません。
I do not know what she likes.

2. 私は彼女がいつここへ来たのかわかりません。
I do not know when she came here.

3. 私の朝ご飯は毎日パンです。
I have bread for breakfast every day.

4. 昨夜近所で家事がありました。
There was a fire at my neighbor last night.
> There was a fire in my neighborhood.

5. 彼はクラスメートに追いつくでしょう。
He will catch up with my classmates.

6. 私たちはその犬をルーシーとよんでいます。
We call the dog Lucy.

7. 私たちは彼を生徒会長に選びました。
We elected him the president of student body.
> We elected him president of the student body.

8. あなたはいつだって彼を信頼できますよ。
You can always trust him.

9. 私は誰がそれをしたのか知っています。
I know who did it.

10. 彼は学校を出てから何もしていません。
He did nothing since he left school
> He has done nothing since he left school.

11. 天気の良いときは散歩をします。
If it is fine, I go for a walk.
> When it is fine, I go for a walk.

12. 昨夜はとても疲れていたので早く寝ました。
Since I was so tired, I went to bed early.
> Since I was very tired, I went to bed early last night.


13. これが友達の住んでいる家です。
This is the house in which my friend lives.

14. 私は弟が壊した窓を直さなければなりません。
I have to fix the window broken by my brother.

15. 芝生に座っている女性は私の姉です。
The woman sitting on the grass is my sister.

16. もし私に1000ドルあれば車が変えるのに。
If I had thousand dallor, I could buy a car.
> If I had a thousand dollarm I could buy a car.

17. もし私が大統領なら違う方法でやるのに。
If I were the president, I would do things differently.

18. もし私があなたの上司なら昇級させてあげるのに。
If I were your boss, I would give you a raise.

19. 私がそこにいれれば良いのに。
I wish I would be there.
> I wish I were there.

20. 私が彼の電話番号を書き取っていたらなぁ。
I wish I would write down his phone number.
I wish I had written down his phone number.

21. 私がそこにいたら助けてあげられたのに。
If I were there, I could help you.
> If I had been there, I could have helped you.

22. 大学時代にもっと英語を勉強しておけば良かったと思います。
I thought if I had studied harder in college.
> I wish I had studied English harder in college.

23. 私なら彼のためにそれをしますよ。
I would do it for him.

24. 日本人は勤勉な国民です。
The japanese are serious working people.
> Tge japanese are a hard working people.


25. そのパーティは大成功でした。
The party was a big succeeful.
> The party was a big success.

26. 彼女は何も言わずにでていきました 。
She went our without saying a word.

27. 父は私より早く起きます。
My father gets up earlier than I do.

28. この服はあれより高くはない。
This dress is less expensive than that one.

29. 私の家は彼の家と同じ大きさです。
My house is as large as his.
> My house is as big as his.





[All sentences below should be remembered.]
1. 私は彼女が何を好きなのか分かりません。 .
I do not know what she likes.

2. 私は彼女がいつここへ来たのかわかりません。
I do not know when she came here.

3. 私の朝ご飯は毎日パンです。
I have bread for breakfast every day.

4. 昨夜近所で家事がありました。
There was a fire in my neighborhood last night.

5. 彼はクラスメートに追いつくでしょう。
He will catch up with my classmates.

6. 私たちはその犬をルーシーとよんでいます。
We call the dog Lucy.

7. 私たちは彼を生徒会長に選びました。
We elected him president of the student body.

8. あなたはいつだって彼を信頼できますよ。
You can always trust him.

9. 私は誰がそれを下野か知っています。
I know who did it.

10. 彼は学校を出てから何もしていません。
He had done nothing since he left school.

11. 天気の良いときは散歩をします。
When it is fine, I go for a walk.

12. 昨夜はとても疲れていたので早く寝ました。
Since I was very tired, I went to bed early.

13. これが友達の住んでいる家出す。
This is the house in which my friend lives.

14. 私は弟が壊した窓を直さなければなりません。
I have to fix the window broken by my brother.

15. 芝生に座っている女性は私の姉です。
The woman sitting on the grass is my sister.

16. もし私に1000ドルあれば車が変えるのに。
If I had a thousand dollar, I could buy a car,

17. もし私が大統領なら違う方法でやるのに。
If I were the president, I would do things differently,

18. もし私があなたの上司なら昇級させてあげるのに。
If I were your boss, I would give you a raise.

19. 私がそこにいれれば良いのに。
I wish I were there.

20. 私が彼の電話番号を書き取っていたらなぁ。
I wish I had written his phone number.

21. 私がそこにいたら助けてあげられたのに。
If I had been there, I could have helped you.

22. 大学時代にもっと英語を勉強しておけば良かったと思います。
I wish I had studied English harder in college.


23. 私なら彼のためにそれをしますよ。
I would do it for him.


24. 日本人は勤勉な国民です。
The Japanese are a hard working people.


25. そのパーティは大成功でした。
The party was a big success.


26. 彼女は何も言わずにでていきました 。
She went out withour saying a word.


27. 父は私より早く起きます。
My father gets up earlier than I do.


28. この服はあれより高くはない。
This dress is less expensive than that one.


29. 私の家は彼の家と同じ大きさです。
My house is as big as his.


[All sentences below should be remembered.]
1. 私は彼女が何を好きなのか分かりません。 .
2. 私は彼女がいつここへ来たのかわかりません。
3. 私の朝ご飯は毎日パンです。
4. 昨夜近所で家事がありました。
5. 彼はクラスメートに追いつくでしょう。
6. 私たちはその犬をルーシーとよんでいます。
7. 私たちは彼を生徒会長に選びました。
8. あなたはいつだって彼を信頼できますよ。
9. 私は誰がそれを下野か知っています。
10. 彼は学校を出てから何もしていません。
11. 天気の良いときは散歩をします。
12. 昨夜はとても疲れていたので早く寝ました。
13. これが友達の住んでいる家出す。
14. 私は弟が壊した窓を直さなければなりません。
15. 芝生に座っている女性は私の姉です。
16. もし私に1000ドルあれば車が変えるのに。
17. もし私が大統領なら違う方法でやるのに。
18. もし私があなたの上司なら昇級させてあげるのに。
19. 私がそこにいれれば良いのに。
20. 私が彼の電話番号を書き取っていたらなぁ。
21. 私がそこにいたら助けてあげられたのに。
22. 大学時代にもっと英語を勉強しておけば良かったと思います。
23. 私なら彼のためにそれをしますよ。
24. 日本人は勤勉な国民です。
25. そのパーティは大成功でした。
26. 彼女は何も言わずにでていきました 。
27. 父は私より早く起きます。
28. この服はあれより高くはない。
29. 私の家は彼の家と同じ大きさです。


[All I have to remember for quiz]
One of my unforgettblae experiences was when I studied abroad in Spain for a year.
I was stunned to find a world and a way of life which I had never seen before.
Also, There are so many regions and cultures within Spain itselt.
I began to realize that there are often more differences within a culture than between cultures.
This seems like what I probably could not learn, if I had not gone there.


QUESTION: Why odo people remember special gifts or presents that they have received?
ANSWER: People remember special gifts or presents that they have received for the following reasons.

1. Those gifts are reminders of important events in one's life.
2. Those gifts can often make unforgettanble memories.
3. Those gifts are often ficen during holidaus and birthdays.
4. Those gifts are sometimes expensice and rare.


--- sample answer ---
I bwelieve people remember special gifts or presents trhat ethey have received for the following reasons.
First, special gifts or presents can often make unforgettable memoris.
For example, when Igot married, my mother ggave me the dress she wore to her own weddin.
Also, my fiance did not have to buy a ring because my father gave me his dead mother's wedding band.
Their gifts were uni uw and pricweless toe em .
I have treasured them nd remembered them very clearly.


I believe people remembre special gifts or presents that they have received for the following reeasons.
First, special gifts or presents can often make unforgettable memories.
For example, when I got married, my mother gave me the drtess she wore to her own wedding.
Also, my fiance did not have to buy a ring because my father fgave me his dead and remembered them very clearly



I believe people remember special; gifts or presents that they have received fot the following reasons.
First, special gifts or presents can often make unforgettable memories.
For exampl, when Igot married, my mother gace me the dress she wore to her own wedding.
Also, my fiance did not have to buy a ring because my father gave me his dead mother's wedding bamd.
Their gifts were unique and price ;esss to me. I have treasured them and remembered them very clearly.


I believe prople remember special gifts or presents that they have received for the following reasons.
First, special gifts or presents can often make unforgettabl memories. For example, when I got married, my mother gave me the dress she wore to her own wedding. Also, my fiance did not have to buy a ring because my father gave me his dead mother's wedding band. Their gifts were unique and priceless to me. I have treasured them and remembered them very clearly.






I believe people remember special gifts or presents that they have received for the following reasons.
First, special gifts or presents can often make unforggetable memories. For exmple, when I got married, my mother gave me the dress she wore to her own wedding. Also, my fiance did not have to buy a ring because my father gave me his dead mother's wedding band. Their gifts werte unique and priceless to me. I have treasured them and remembered them very clearly.



I believe people remember special gifts or presents that they have received for the following reasons.
First, special gifts or presents can often make unforgettable memories. For example, when I gor married, my mother gave me the dress she wore to her own wedding. Also, my fiance did not have to buy a ring because my father gave me his dead mother's wedding band. Their gifts were unique and priceless to me. I have treasured them and remembered them very clearly.




I believe people remember gifts or presents that they have received for the following reasons.
First, special gifts or presents often make unforgettable memories. For example, when I got married, my mother gave me the dress she wore to her own wedding. Also, my fiance did not have to buy a ring because my father gave me his dead mother's wedding band. Their gifts were unique and priceless to me. I have treasured them and remembered them very clearly.




I believe people remember gifts or presents that they have received for the following reasons.
First, special gifts or presents often can make unforgettable memories. For example, when I got married, my mother gave me the dress she wore to her own wedding. Also, my fiance did not have to buy a ring because my father gave me his dead mother's wedding band. Their gifts were unique and priceless to me. I have treasured them and remembered them very clearly.








I believe people remember gifts or presents that they have recieved for the following reasons.
First, special gifts or presents often can make unforgettable memories. For example, when I got married, my mother gave the dress she wore to her own wedding. Also, my fiance did not have to buy a ring because my father gave me his dead mother's wedding band. Their gists were unique and priceless to me. I have treasured them and remembered them very clearly.