Friday, June 23, 2006

Friday, June 16, 2006

Monday, June 12, 2006

C++


First, I've put in enough pitfalls to make sure that only the most trivial projects will work first time. Take operator overloading. At the end of the project, almost every module has it, usually, because guys feel they really should do it, as it was in their training course. The same operator then means something totally different in every module. Try pulling that lot together, when you have a hundred or so modules. And as for data hiding. God, I sometimes can't help laughing when I hear about the problems companies have making their modules talk to each other. I think the word 'synergistic' was specially invented to twist the knife in a project manager's ribs.

最初に私は、小さなプロジェクトだけが動くような落とし穴を充分こしらえました。 オペレータオーバロードを例に取りましょう。 プロジェクトの終わりには、殆どのモジュールが使っているでしょう。 人々はたいてい、オペレータオーバロードを使うべきだと感じてるからです。 彼らが受けたトレーニングコースの例のようにね。 そうすると、同じオペレータなのに、違うモジュールでは全く異なる意味になります。 モジュールが100やそこらあるときに、全てを一つにまとめられますか。 データ隠蔽だってそうです。 あちこちの会社で、人々が彼らのモジュールをお互いにコミュニケートさせるときの問題を聞くと、私は笑いをこらえることができません。
「シナジェスティック」という言葉は、プロジェクトマネージャのあばら骨に刺さったナイフをひねるために特別に生まれた言葉です。


Bjarne Stroustrup Interview about C++より

Thursday, June 1, 2006

Quote


We only see what we know



Johann Wolfgang von Goethe

Saturday, April 29, 2006

DSL ( Linux )

Monkey and PHP on Damn Small Linux

GCC is not included in Damn Small Linux. You need it for compiling, "make" etc.

Install GCC

1. right click-Apps-Tools-MyDSL Extension Browser
2. click System button
3. choose gcc1.dsl.info and click download
4. gcc is downloaded and installed automatically

Enable apt-get

1. >sudo dpkg-restore
2. apt is enabled

Install re2c, bison, flex, libxml2

1. >apt-get install re2c
2. >apt-get install bison
3. >apt-get install flex
4. >apt-get install libxml2-dev
5. >apt-get install libxml2-util
-These are essential for installing PHP which I couldn't get.

Install PHP

1. download
2. >tar zxfv php-5.x.x.tar.gz
3. >cd php-5.x.x
4. >./configure --prefix=/home/my_home/php/

Failed.

Python and Apache on Damn Small Linux

Install python

1. >apt-get python
2. python is enabled

Install Apache

1. >wget http://apache.mirror99.com/httpd/httpd-2.2.0.tar.gz
2. >gunzip < httpd-2.2.0.tar.gz | tar xvf -
3. >cd httpd-2.2.0
4. >./configure -prefix=/usr/local/apache2 -enable-rewrite -enable-mods-shared=most
5. >make
6. >make install


http://blog.novembercamel.com/index.php?paged=2
http://www.troubleshooters.com/linux/distros/dsl/
http://www.damnsmalllinux.org/wiki/index.php/Main_Page
http://monkeyd.sourceforge.net/docs/monkey+php.en.html
http://www.linuxquestions.org/questions/showthread.php?t=247329

Wednesday, April 19, 2006

First they came...


Original


Als die Nazis die Kommunisten holten,
habe ich geschwiegen;
ich war ja kein Kommunist.

Als sie die Sozialdemokraten einsperrten,
habe ich geschwiegen;
ich war ja kein Sozialdemokrat.

Als sie die Gewerkschafter holten,
habe ich nicht protestiert;
ich war ja kein Gewerkschafter.

Als sie die Juden holten,
habe ich nicht protestiert;
ich war ja kein Jude.

Als sie mich holten,
gab es keinen mehr, der protestieren konnte.

Translation


When they came for the communists,
I remained silent;
I was not a communist.

When they locked up the social democrats,
I remained silent;
I was not a social democrat.

When they came for the trade unionists,
I did not speak out;
I was not a trade unionist.

When they came for the Jews,
I did not speak out;
I was not a Jew.

When they came for me,
there was no one left to speak out.

Niemöller, M. (1946). WIKIPEDIA. Retrieved April 19, 2006, from: http://en.wikipedia.org/wiki/First_they_came...Martin Niemöller

Monday, April 10, 2006

Web server on Mac OS X

1 Mac OS X - System Preferences -> Sharing -> Service -> Personal web sharing
2 $ htpasswd -c /Users/USER NAME/webpasswords INITIAL USERNAME
  ( ex. $ htpasswd -c /Users/nikki/webpasswords nikki)
3 htpasswd -b /Users/USER NAME/webpasswords INITIAL USERNAME PASSWORD
4 in /etc/httpd/users/username.conf
   <Directory "/Users/jray/Sites/">
AuthType Basic
AuthName "John's Development Site"
AuthUserFile /Users/jray/webpasswords
Require valid-user
Options Indexes MultiViews ExecCGI
AllowOverride None
Order allow,deny
Allow from all
<Directory>
5 $ sudo /usr/sbin/apachectl restart 


Mac OS X Tiger unleashed, SAMS P.1174

Wednesday, April 5, 2006

Isaac Newton


If I have ever made any valuable discoveries, it has been owing more to patient attention, than to any other talent.
( http://www.quotedb.com/quotes/3623 )

Bertrand Russell


When you meet with opposition, even if it should be from your partner or your children, endeavour to overcome it by argument and not by authority, for a victory dependent upon authority is unreal and illusory.
( http://www.lewrockwell.com/wall/wall12.html )

Thursday, March 30, 2006

E.W.Dijkstra


It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.

In the good old days physicists repeated each other's experiments, just to be sure. Today they stick to FORTRAN, so that they can share each other's programs, bugs included.

Edsger W. Dijkstra,
http://www.cs.utexas.edu/~EWD/
http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD498.html
http://de.wikipedia.org/wiki/Edsger_Wybe_Dijkstra

Wednesday, March 29, 2006

Tuesday, March 21, 2006

X on Mac OS X

install Fink

then, start installation with the command below

% /sw/bin/fink install xfree86

xfree86
xfree86-shlibs are installed

NeoOffice

Wednesday, March 1, 2006

PIL ( Python Imaging Library)

Python Imaging Library

The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.(http://www.pythonware.com/products/pil/index.htm)

Saturday, February 25, 2006

commentをゲットせよ

えーpythonで、フォルダ下のファイル名と各作成日を表示させるスクリプトを試しに書いたんですが、
どーしてもコメントを得る方法がわかりません。

import os
import time

def dump(st):
   size, ctime , atime, mode, ino, dev, nlink, uid, gid, mtime = st
    return size, time.ctime(ctime)

#input the directory here
directory = "/XXX/"
for file_1 in os.listdir(directory):
   file = directory + file_1
   st = os.stat(file)

#display the results
  print file_1, str(dump(st))

上のコードで、os.statで得られる情報は、作成日などに限られます。

で今回ほしいコメントは、例えば、windowsでjpgファイルを
右クリック ー property ー summary tab - comment で得られるコメントになります。

つまり、各ファイルにコメントがついた写真満載のフォルダを整理するための、リスト作りのために書いてみたものなんですけど。

python libraryとか調べたけどお手上げですので誰か教えてくださる方、教えて君で申し訳ないですけど教えていただけたら大変うれしいです。  

おそらくダータベース絡みのアプリケーションだとこんなの簡単にできる機能がついてるんだろうけど。

Wednesday, February 1, 2006

ちっさいLinux

50MサイズのLiveCDLinux-Damn Small Linux(http://www.damnsmalllinux.org/)。
起動時にinstallと入れればHDにもインストール可。

Tuesday, January 31, 2006

OpenBSDをQにインストール

OpenBSDのブートCDを作りエミュレータQ上にインストール後、パッケージをFTPを通してインストールする。

1 http://www.openbsd.org/faq/faq4.htmlを参考に好きなファイルをダウンロードする。
ここでは、ブートCDを作るので、cdemu38.iso(cd38.isoでは動作しなかった)をダウンロードする。好きなミラーサイトをhttp://www.openbsd.org/ftp.html#ftp のリストより選ぶ。選んだFTPサイトからファイルを選択。
例:3.8 - i386 - cdemu38.iso

2 ダウンロードしたファイルをcdに焼く。

3 Qを起動し、ウィンドウ上部のcreate new PC をクリック。

4 内容を設定。ブートはCDにしておく。http://www.kberg.ch/q/documentation/index.htmlを参考。

5 cdemu38.isoのはいったCDを入れ、Q上で作ったpropertyを起動させると、CDを読み込みインストールへと移行。

6 インストールはhttp://www.openbsd.org/faq/faq4.html#Install以降の長い手順をそのまま踏む。

やった方法がたまたまこれだっただけで、もっと違う楽な方法もあると思う。