Assign Default File Sort Order in Windows!

標題: 為視窗設定檔案預設排序

This is a very good example of bad design!!
One day I find my default file sorting is messed up, and I want to restore it.
The way to do it is so complicated and hidden almost like Game Cheat Code…
這是一個很好的差勁設計例子
某日我的檔案排序亂掉了,我想回復到預設的排序
那個方法就像玩遊戲的秘技一樣難…

Right click My Computer, choose Explore.
Click on the C: Drive in the left pane.
Click on the View Menu, then choose List.
Right click in the empty whitespace area in the right pane where thefiles get listed.
Choose Arrange Icons By. Pick “Name”.
Verify files are sorted alphabetically. If not, repeat.
Press and hold the control key, then click on the “X” to close
Explorer.

在’我的電腦’按右鍵,選檔案總管
在左邊的選單欄選C:槽
按上面選單的檢視,選清單
在右邊檔案區塊空白的地方按右鍵
選排序方式->名稱
檢查一下排序是否按照名稱了,如果不是請重覆上面
按著Ctrl鍵,點”X”關掉檔案總管

The key here, is that the file open dialog box, and all other similar
controls, use the sort method saved when in “List” view.
If you do it using “Details” view, it won’t fix the dialog box sort order.

重點就是,在檔案總管裡,或者其他控制介面,要在”清單”檢視裡選擇排序方式
如果你用其他檢視方式,你所選的排序下一次又會跑掉.

How to Rip DVD in for idiot like me

I have evaluate a few popular dvd ripping / transcoding softwares.
Most of them are free.

First thing first, there are some imformation you better know.
The resolution and the frame per second.
Optionally, the audio codec.
You can get these information by using a free software MediaInfo

Then you can pick one of these software to do the ripping.
Next Video Converter
This one is the easiest to use amount all there. Just choose file, choose codec, start.
But this one is not free software. It claim you can use its full features in evaluation version.
The catch is, you can only convert 1hr in 1 day. That is no DVD can be rip in one file.
Any DVD Converter
This one is very popular software recommended by many people from forums.
A little bit more difficult than Next Video Converter but still point and click easy.
With no limitation and free.
MediaCoder
This one is free and the most power amount these three softwares.
The trade off is, this one is not easy to use. I am going to walkthrough MediaCoder.

Run MediaCoder, press the add file icon on the upper left. Choose the dvd.
There are many files in a dvd. Usually there will be a VTS_01_0.IFO
with not much file size and many .VOB with bigger file size. Choose the .IFO.
Then there are many tab windows on the lower left.
We are going through them one by one.
Generic tab – output folder and etc, nothing special.
Video tab – this one is very important. We choose our video codec here.
I usually use H.264 since it is High quality video implementation of Mpeg-4.
And it is very popular choice. Then choose Bitrate-based mode. This variable is responsible for the file size and which will affect the video quality. Storage space is cheap so I use 1024, you may use any rate you like. Then on the right, there is a x264 tab. Profile select high, predictor frames 6, Motion Est. Mode Hexagonal, Range 16, B-Frames 5, subpel refinement 7.
Audio tab – select Nero Encoder, on the right Nero Encoder tab, select HE-ACC V2, CBR, 192 kbps.
Container tab – container use AVI
Picture tab – frame rate 30, click ‘effect’, will pop up a dialog, this one is important, De-interlacce choose YADIF, then you can preview the outcome. Click ok when finished.
Subtitle tab – set an ID.

This is it. Click start and lay back.

BSOD on Vista, Good Job M$

顯示器驅動程式停止回應,並已回復。顯示器驅動程式atikmdag停止回應,並已順利恢復.
display driver atikmdag stopped responding and has successfully recovered.

Come on M$, admit it! face it! solve it!
No matter you are using ATi or NVidia, the problem occurs, Vista only, XP with the same spec works just fine.
And my problem occur just after some auto update/patch to Vista.
This do not need an expert to *firgure out* that it is a Vista problem!
And did I mention some expert did some sophisticated trial to make sure it is your OS problem?

Please don’t answer with over heat, hardware failure, over clock and blahblahblah shit.
JUST SOLVE IT, WILL YOU?

Intelligence program is good program! 有智慧的程式就是好程式!

I have read and refactor quite a few projects/programs that coded by my colleagues or former colleagues. And of course refactoring my own projects source code too. Here is something that I feel deeply in my heart.
Just like how to define beauty, how to define what is a good program or coding practice is not something that has an exact correct answer. But there is some traces or characteristics which make you feel like, Ah~ this is good. On the contrary, some of them give you, Oh~ da#n it, you son of the bXtch!
There is one very remarkable thing that justify a program or source code between these two is, is the program smart or not?
我己經看過和重構過不少同事或以前同事的專案和程式.當然包括重構我自己的專案程式碼.這讓我深刻體會到一件事.
就正如怎樣去定義美一樣,要定義一個好的程式或者好的寫程式習慣並沒有一個標準答案.但會有一些蛛絲馬跡或特徵會讓你覺得,啊~這樣很好.相反地,有一些會讓你想罵,噢~他X的,你這X人!
這當中有一樣可以用作鑑定一個程式或程式碼是好是壞的東西,就是這程式聰明嗎?
If a program doesn’t do any checking or validation to the input, or do nothing about controlling the input, it is stupid.
If a programmer do not think about “what if something like that happen”, do nothing about it, for example, what if the connection is broken during some process, he is stupid.
If a program that doesn’t contain any setup or setting for the user when it should, definitely stupid.
If a programmer *assume* something or anything when writing the program, for example, assuming you have the administrator right. The outcome program will be very stupid.
If a programmer compile a program, success, and go through a perfect procedure using the program, telling you that he/she has done testing it. The program and the programmer is both stupid.
如果一個程式對輸入不做任何檢查或確認,又或者不去對輸入做控制,那就是蠢程式.
如果一個程式人員在寫程式時沒有去想”如果這樣的事發生呢”,也沒有對這件事做任何處理的話,例如,如果在某個函式運作途中斷線呢,這是個蠢人.
如果一個程式應該有些使用者設定而沒有提供任何介面或方法來做設定,明顯很蠢.
如果一個程式人員在寫程式時*假設*一些理想狀況或者其他條件,例如,假設你有管理員權限,那寫出來的程式一定很蠢.
如果一個程式人員認為程式編譯沒錯誤,然後經過一個完美的使用流程,跟你說這程式我測過沒問題.那這個程式和這個人都很蠢.
These sorts of look like stupid mistakes which you and I may think you will never make are the most command mistakes I encounter during my refactoring process. So what is going on?
You know what, stupid programs comes from stupid programmers.
這些看似很愚蠢的失誤,可能你和我覺得絕不可能發生在我身上,正正是最常我重構時出現在我眼前.到底怎麼了?
事情是這樣的,蠢程式的來源就是蠢人.

Using SVN (Tortoise) on local binary files

Well, I used to use svn on software development.

But I never setup the svn server, that’s not my resposibility.

When I play some games recently, I start to think,

maybe I can do a version control on autosave game.

Then I use tortoise, a svn client and Diablo 2 to test it.

Tortoise is claimed to be a svn client, but the thing is, it works

just like a server on local files. hmm, makes me wonder what ‘client’ means.

anyway, here is the flow of how to use it on game save.

1. create a folder for your repository.

and then right-click on it, select ‘create repository …’

then just use default setting.

2. go to the game save folder, right-click, select ‘import…’

search the repository folder in your file system, import into it.

3. delete you files in the game save folder.

then right-click on the folder, select ‘check out…’

3. check out those files, then you are ready, those files are now monitored by svn.

if they are modified, a red cross will be shown, you can then commit new version to the repository.

if you want to revert to previous game save, just delete all files, right-click, choose ‘revert…’

Have fun with version control.

Ubuntu 用kopete上msn+scim打中文

為甚麼用kopete,因為好像只有它跟aMSN有支援視訊
好像因為kopete是KDE的東西,ubuntu我用的應該是GNOME
所以在kopete裡面啟動不了scim中文輸入法

解決方法:
安裝scim-qtimm
在terminal輸入
sudo apt-get install scim-qtimm
再加一條指令,我想是在做設定的吧
im-switch -s scim_xim
他可能會說
update-alternatives: Cannot find alternative ‘/etc/X11/xinit/xinput.d/scim_xim’
但不用理他,現在Restart X window就可以了(ctrl+alt+backspace)