stop Mac OS X Finder from creating .DS_Store

Perm URL with updates: http://xahlee.org/comp/mac_os_xs_DS_Store_unix_init_svn.html

Here's a nice article. The author modified Mac Finder to not generate 〔.DS_Store〕.

(Cached site with images: Source cache.historious.net)

Note that besides 〔.DS_Store〕, the Mac OS X also creates other junk, e.g.:

Desktop DB
Desktop DF

and Windows used to create 〔Thumbs.db〕 among others.

Who started all this fuck? Its your beloved unix, folks. e.g.



These are headaches in many ways. When you “rsync” or “unison” between machines, or zip files from OS X, or take data from USB, or grep. In essence, the problem is that these programs create side-effects for their own convenience, not user's convenience. It stem from certain unix philosophy.

and unixes (linux) still do it to this day happily, as if god said so.

“I liken starting one's computing career with Unix, say as a undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act.” — Ken Pier, Xerox PARC (~1980s?)

Proper solution is for the programs to set a designated folder to store their shit. Either as a OS convention of one single designated folder per user (e.g. Modern Windows's 〔%HOMEPATH%\AppData\〕 or Mac's 〔~/Library/〕). If the OS doesn't provide such a dir, then the app should set a designated folder for it, not litter random files in every folder it touches.

Unix do this fuck up of course because it is convenient at the moment. That's the life story of unix. It's super convenient for the lazy programer, because he doesn't have to deal with one extra directory, dir mapping, data syncing issues, etc. (e.g. 〔.cvs〕.) And you just brain wash your users to feel that's natural way of life.

Here's some useful scripts and tutorials:

Here's some unix hatred articles:

Emacs Lisp: Convert Lisp Form to XML Form

Jon Snader (jcs) wrote a series of nice tutorial about how to transform text in the form of lisp expression into XML form, with a focus on making each head of lisp expression a executable function itself (as opposed to just parsing it and spit out XML form). In the last article, he proposed a little challenge for readers to solve. See:

If you got stuck, check out his previous articles (linked in his article), which shows you how.

sexual mores: illustrated guide to ESRB

Due to Google AdSense policies, please see this article at: http://xahlee.org/sex/illustrated_guide_to_ESRB.html


Final Fantasy VIII, Ballroom Dance Scene

Final Fantasy VIII, Ballroom Dance Scene

For those with a acute eye for the ethology of human animals, notable in this video is the mannerism of male vs female in courtship.

Observe, the way the girl signals the guy for a dance, and the way the guy responds for a affirmative.

For the song related to this video, see: Faye Wong - Eyes on Me (Final Fantasy VIII).

raunchy women play football video game

“Alex Gaudino - Watch Out” amazon

perm url http://xahlee.org/music/watch_out_Alex_Gaudino.html


Final Fantasy song: Eyes on Me

“Faye Wong - Eyes on Me” with Final Fantasy VIII scenes. amazon

for detail, see: http://xahlee.org/music/eyes_on_me.html

English History: the Norman Conquest

〈The History of English in 10 Minutes, Chapter 2: The Norman Conquest〉, annotated, at The History of English in 10 Minutes


〈The History of English in 10 Minutes〉 Annotated

In the following days, each day i'll annotate a chapter of a education video called The History of English in 10 Minutes. Each video is about 1 minute, but are packed with info.

Do you know exactly where Anglo or Saxo were? Do you know what are the gods referred to in the names of weekday? How about the connection of martyr and scope? See the first installment: The History of English in 10 Minutes.

Emacs Lisp: find-file vs with-temp-buffer redux

This is a completely detailed report, with code that you can run.

See: http://xahlee.org/emacs/elisp_find-file_vs_with-temp-buffer.html

music: 王菲 - 容易受傷的女人 (Faye Wong - Fragile Woman)

this is a most tender, feminine, song. Extremely popular in Asia.

Faye Wong - Fragile Woman. (Cantonese) amazon

For info, several more versions, lyrics translations, see: 王菲 - 容易受傷的女人 (Faye Wong - Fragile Woman)

took me 10 hours over 2 days to write this one. Research and translation.


Learn Words from the Dancing Queen

Do you know all the following words?

deference soliciting disinterest meekness colloquial rub supplication fret diffidently stratagem proffering beseechment vexation coitus deciphered asserted pitch wreck perennial immemorial fixation infatuation explicable edict exigent show stopper

If not, you failed the courtship test. Read: ABBA - Take a Chance on Me; Human Courtship Analized by Alien.

AIDS World Map

HIV distribution world map
Map of HIV 2008. img src (data based on Source )
HIV world map game

Perm URL with updates: http://xahlee.org/Periodic_dosage_dir/hiv_map.html

Emacs Lisp Processing 5 Thousand Files: “find-file” vs “with-temp-buffer”

Using find-file to open 5565 files, with font-lock-mode off, backup off etc, takes 10 min plus 8 min garbage collection. Total wall clock time is 18 minutes.

Using with-temp-buffer, 22 seconds.

Moral: when doing batch text processing of thousands of files, don't use find-file, use with-temp-buffer or with-temp-file instead. (use the latter when you need to make changes to the file.)

2011-12-21 Addendum: now fully detailed at http://xahlee.org/emacs/elisp_find-file_vs_with-temp-buffer.html

hot song: Anya Marina - Whatever You Like

“Gossip Girl - Lesbian Kissing Scene with Hilary Duff & Jessica Szohr & Penn Badgley”. Season 3 Episode 9. amazon
“Anya Marina - Whatever You Like” amazon

read more at http://xahlee.org/music/whatever_you_like.html