2011-05-20

Modern Browsers Will Display Gziped File Directly

Modern Browsers Will Display Gziped File Directly

Discovered that in latest version of all major browsers, they will display a gzip compressed page directly (instead of asking you to download). For example, check: perl_Ilya_Regularly_Expresses_2000.html.gz.

The browsers with this feature includes: IE9, Firefox 4, Google Chrome 11, Opera 11.1. The only browser that doesn't is Safari (v5.0.5 on Windows.)

Btw, the that gziped article is mentioned in these articles: Text Processing: Emacs Lisp vs PerlPerl Books Survey 2002.

Unicode Font Comparison: Arial Unicode MS vs DejaVu Sans

Perm url with updates: http://xahlee.org/js/unicode_font_comparison.html

Unicode Font Comparison: Arial Unicode MS vs DejaVu Sans

Xah Lee, 2011-05-19

This page is a comparison of 2 unicode fonts: Arial Unicode MS vs DejaVu Sans.

Arial Unicode is from Microsoft and is bundled with Microsoft Office. It is also bundled with Mac OS X (since 10.5).

DejaVu Sans is a open source font and is bundled in many Linuxes (e.g. Ubuntu, OpenSUSE, Mandriva).

Both support wide number of characters in Unicode. (For info about them, see: Best Fonts for Unicode.)

My website uses unicode extensively. (See: Xah's Unicode Tutorial.) Almost all latest versions of major browsers today will show all most unicode chars, except Firefox 4, released recently, took a step backward in this department. (See: Web Browsers Unicode Support; Firefox 4 Sucks.) Firefox is a very popular browser, with close to 50% market share.

So, this means, you are forced to use CSS to specify a unicode font. Not a good solution, because there's not a unicode font that's common to all Windows, Mac, Linux, by default. But also, specifying a font is not a good solution because you may not wish your text to change appearance (you only wish the unicode chars don't get displayed as blank squares). Also, linux users and Windows/Mac users will get slightly different experience of your site's UI due to which font they have installed.

(font size spec is font specific, adding the pain. e.g. 16 point of font A is very different size than 16 point of font B. If you use absolute css unit such as cm (center meter), that's also a problem because due to display density (so-called DPI) variation and the fact that this DPI info is NOT guaranteed to be available to browsers. Specifying sizes by absolute values such as cm, is itself not desirable because display sizes varies from cinema-sized screens to palm-sized smart phones. In a similar way, size by pixel also isn't a ideal solution. So, that means, you'll have a hard time to control widths if your site design is based on fixed-layout. (See: Web Design: Fixed-Layout vs Flowed-Layout.))

Among the font choices, it comes down to Arial Unicode and DejaVu. So, this page shows common text displayed in them, for comparison of how they look, feel, when reading long texts.

CSS to Specify Font

Here's how to use CSS to specify font, if you don't know already.

body {font-family:"DejaVu Sans","Arial Unicode MS",sans-serif}

The above code means, if the user has “DejaVu Sans” installed, the browser will use that, else use “Arial Unicode MS”, otherwise use default sans-serif font.

The following are the texts using the 2 fonts. (you'll need to have both of these fonts installed, otherwise what you see may not be the font.)

Arial Unicode MS

We have n things, represented by numbers 1 to n. Some of these are identical. We want to partition the range of numbers 1 to n so that identical ones are grouped together.

To begin comparison, we generate a list of pairings that's all possible parings of numbers 1 to n. (of course order does not matter, and the pairing does not contain repetitions) This is the first argument to reduce.

Now suppose we know that 2 and 4 are identical, then we want to reduce the pairings so that we don't have to do extra comparison. For example, if the pairing list contains (2,3) and (4,3), one of them can be deleted because now 2 and 4 have been determined identical.

(We do this because we expect the comparison will be expensive.)

reduce( $pairings, $a_pair) returns a reduced $pairings knowing that $a_pair are identical.

The first argument $pairings must be in the form of a hash like this:

{'1,5' => [1,5],'3,5' => [3,5],'2,4' => [2,4],'4,5' => [4,5],'1,3' => [1,3],'2,5' => [2,5],'1,2' => [1,2],'3,4' => [3,4],'2,3' => [2,3],'1,4' => [1,4]}

(Note that keys are strings of the pairs separated by a comma.)

$a_pair is a reference to a list of the form [$a,$b].

The return value is a reference to a hash.

DejaVu Sans

We have n things, represented by numbers 1 to n. Some of these are identical. We want to partition the range of numbers 1 to n so that identical ones are grouped together.

To begin comparison, we generate a list of pairings that's all possible parings of numbers 1 to n. (of course order does not matter, and the pairing does not contain repetitions) This is the first argument to reduce.

Now suppose we know that 2 and 4 are identical, then we want to reduce the pairings so that we don't have to do extra comparison. For example, if the pairing list contains (2,3) and (4,3), one of them can be deleted because now 2 and 4 have been determined identical.

(We do this because we expect the comparison will be expensive.)

reduce( $pairings, $a_pair) returns a reduced $pairings knowing that $a_pair are identical.

The first argument $pairings must be in the form of a hash like this:

{'1,5' => [1,5],'3,5' => [3,5],'2,4' => [2,4],'4,5' => [4,5],'1,3' => [1,3],'2,5' => [2,5],'1,2' => [1,2],'3,4' => [3,4],'2,3' => [2,3],'1,4' => [1,4]}

(Note that keys are strings of the pairs separated by a comma.)

$a_pair is a reference to a list of the form [$a,$b].

The return value is a reference to a hash.

2011-05-19

HTML, CSS, javascript, Web Tech and Browser Timeline

Perm url with updates: http://xahlee.org/js/web_hist.html

HTML, CSS, javascript, Web Tech and Browser Timeline

Xah Lee, 2005-12, 2011-05-19

This page is a brief overview of timeline of web tech.

1993-06 │HTML 1        │
1993-11 │              │Mosaic 1
1994-12 │              │Netscape 1
1995-08 │              │IE1
1995-09 │javascript    │
1995-11 │              │IE2 (SSL, cookies, VRML)
1995-11 │              │Mosaic 2
1995-11 │Cookie        │
1995-11 │HTML 2.0      │
1996    │HTTPS         │
1996-03 │              │Netscape 2
1996-08 │              │IE3 (tables, frames, JScript, CSS, Java)
1996-08 │              │Netscape 3
1996-12 │CSS 1         │
1997-01 │              │Mosaic 3
1997-01 │HTML 3.2      │
1997-06 │              │Netscape 4
1997-09 │              │IE4 (HTML, CSS)
1997-11 │              │Opera 3 (js)
1997-12 │HTML 4.0      │
1999-03 │              │IE5 (CSS2, XML)
1999-12 │HTML 4.01     │
2000-01 │XHTML 1.0     │
2000-11 │              │Netscape 6
2001-08 │              │IE6
2003-01 │              │Safari 1
2004-11 │              │Firefox 1
2006    │CSS 2         │
2006    │XMLHttpRequest│
2006-06 │              │Opera 9
2006-10 │              │Firefox 2
2006-10 │              │IE7
2008-06 │              │Firefox 3
2008-11 │              │Chrome
2009-03 │              │IE8
2011    │CSS 3         │
2011    │HTML 5        │
2011-03 │              │Firefox 4
2011-03 │              │IE9

Note: some of the dates are approximate. For example, it's hard to give a date for Cookies, CSS3, HTML5. (e.g. draft spec, recommended status, public awareness, wide acceptance.) I tend to choose a year the spec or tech is widely accepted.

References

2011-05-18

A/B Testing, Google, Visual Design

A/B Testing, Google, Visual Design

Learned the term A/B Testing. It can be applied to lots of areas. For example, a web page design. Suppose you are not sure larger font or smaller font is best in attracting readers. You alternate the 2 designs on different days, and check your readership. (something like that) This can be applied to lots of other things. Basically, you have 2 choices, you test them both out, and check the data to see which performed better. Here's a Wikipedia quote:

A/B testing, split testing or bucket testing is a method of marketing testing by which a baseline control sample is compared to a variety of single-variable test samples in order to improve response rates. A classic direct mail tactic, this method has been recently adopted within the interactive space to test tactics such as banner ads, emails and landing pages.

Significant improvements can be seen through testing elements like copy text, layouts, images and colors. However, not all elements produce the same improvements, and by looking at the results from different tests, it is possible to identify those elements that consistently tend to produce the greatest improvements.

But here's the interesting part:

Companies well-known for using A/B testing

Many companies use the designed experiment approach to making marketing decisions. It is an increasingly common practice as the tools and expertise grows in this area. There are many A/B testing case studies which show that the practice of testing is increasingly becoming popular with small and medium businesses as well. [1]

While it is widely used behind the scenes to maximize profits, the practice occasionally makes it into the spotlight.

  • Amazon.com pioneered its use within the web ecommerce space. Also stirred controversy by testing into optimal price-points. [2]
  • BBC.[3]
  • Google. One of their top designers, Douglas Bowman, left and spoke out against excessive use of the practice.[4]
  • Microsoft [5]
  • Playdom (Disney Interactive) [6]
  • Zynga [7]
  • eBay [8]

And the most juicy part is the mention of Google, which traced to this very interesting article:

Goodbye, Google (2009-03-20) By Douglas Bowman @ Source stopdesign.com

In general, i'm spiteful of so-called “designers” in the arts area. They are like semi-beings between craftmen and technician. If soft-porn is crippled brother of porn, then visual designers are soft-artists.

computer science: Program Transformation

Perm url with updates: http://xahlee.org/cmaci/notation/pattern_matching_vs_pattern_spec.html

Discovered several languages. TXL, Colm, and the concept of program transformation.

There's the concept of Program transformation. Basically, it takes a input source code and transforms by some spec into another form. Similar to the concept of compiler, but more at textual level, i think. e.g. Source-to-source compiler.

There seems to be quite a few such languages. Here's a big list: http://www.program-transformation.org/Transform/TransformationSystems.

TXL (programming language) (home at http://www.txl.ca/) seems to be a popular transformation language. And a new supposedly improved one is Colm, at: http://www.complang.org/colm/. On the colm site, it has a Ph D thesis in PDF that gives a nice overview of such systems.

the Barbarism of Specialization

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/Barbarism_of_Specialization.html

the Barbarism of Specialization

Jose Ortega Y Gasset

It would be of great interest, and of greater utility than at first sight appears, to draw up the history of physical and biological sciences, indicating the process of increasing specialization in the work of the investigators. It would then be seen how, generation after generation, the scientist has been gradually restricted and confined into narrower fields of mental occupation... how in each generation the scientist, through having to reduce the sphere of his labour, was progressively losing contact with other branches of science, with [the] integral interpretation of the universe....

Specialization commences precisely at a period [the beginning of the 19th century] that gives to civilized man the title “encyclopedic” ... In the following generation, the balance is upset, and specialization begins to dislodge integral culture from the individual scientist. When by 1890 a third generation assumes intellectual command in Europe, we meet with a type of scientist unparalleled in history. He is ... only acquainted with one science, and even of that one only knows the small corner in which he is an active investigator. He even proclaims that it is a virtue that he takes no cognizance of what lies outside the narrow territory specially cultivated by himself, and gives the name of “dilettantism” to any curiosity for the general scheme of knowledge.

What happens is that, enclosed within the narrow limits of his visual field, he does actually succeed in discovering new facts and advancing the progress of the science that he hardly knows, and incidentally the encyclopedia of thought of which he is conscientiously ignorant. ... For the purpose of innumerable investigations it is possible to divide science into small sections, to enclose oneself in one of these, and to leave out of consideration all of the rest. The solidity and exactitude of the methods allow for this temporary but quite real disarticulation of knowledge. ...

But this creates an extraordinarily strange type of man. The investigator who has discovered a new fact of nature must necessarily experience a feeling of power and self-assurance. With a certain apparent justice he will look upon himself as “a man who knows.” ... The specialist “knows” very well his own tiny corner of the universe; he is radically ignorant of all the rest.

... He is not learned, for he is formally ignorant of all that does not enter into his specialty; but neither is he ignorant, because he is a “scientist,” and “knows” very well his own tiny portion of the universe. We shall have to say that he is a learned ignoramus, which is a very serious matter, as it implies that he is a person who is ignorant, not in the fashion of the ignorant man [i.e., not ignorant in the way that the ordinary man can be seen as ignorant of this or that], but with all the petulance of one who is learned in his own special line.

And such in fact is the behavior of the specialist. In politics, in art, in social usages, in the other sciences, he will adopt the attitude of primitive, ignorant man; but he will adopt them forcefully and with self-sufficiency, and will not admit of—and this is the paradox—specialists in those matters.... [T]his very inner feeling of dominance and worth will induce him to wish to predominate outside his specialty.

Notes from XahLee.org

This essay is written by Jose Ortega Y Gasset (1883‒1955).

José Ortega y Gasset (1883–1955) was a Spanish liberal philosopher and essayist working during the first half of the 20th century while Spain oscillated between monarchy, republicanism and dictatorship. He was, along with Kant, Schopenhauer, and Nietzsche, a proponent of the idea of perspectivism.

It is a excerpt from his book The Revolt of the Masses (1930) (aka: La rebelión de las masas)

The text is prepared here by me (Xah Lee) on 2011-05, and is originally from this site: Source 209.16.96.155 (according to the site, it's a personal website of John Bruce Cantrell.)

The Revolt of the Masses

Here's a quote about the book from Wikipedia:

In this work, Ortega traces the genesis of the "mass-man" and analyzes his constitution en route to describing the rise to power and action of the masses in society. Ortega is throughout quite critical of both the masses and the mass-men of which they are made up, contrasting "noble life and common life" and excoriating the barbarism and primitivism he sees in the mass-man. He does not, however, refer to specific social classes, as has been so commonly misunderstood in the English-speaking world. Ortega states that the mass-man could be from any social background, but his specific target is the bourgeois educated man, the señorito satisfecho (satisfied young man or Mr. Satisfied), the specialist who believes he has it all and extends the command he has of his subject to others, contemptuous of his ignorance in all of them. His summary of what he attempted in the book exemplifies this quite well, while simultaneously providing the author's own views on his work: "In this essay an attempt has been made to sketch a certain type of European, mainly by analyzing his behaviour as regards the very civilization into which he was born". This had to be done because that individual "does not represent a new civilisation struggling with a previous one, but a mere negation ..."

I share similar views. See: Futuristic Calamity.

Moral nihilism, Perspectivism

Discovered a essay: the Barbarism of Specialization. See also: Futuristic Calamity.

Also, discovered a term for what i believe. Moral nihilism. Quote:

Moral nihilism (also known as ethical nihilism or amoralism), is the meta-ethical view that nothing is moral or immoral. For example, a moral nihilist would say that killing someone, for whatever reason, is neither inherently right nor inherently wrong. Morality may simply be a kind of make-believe, a complex set of rules and recommendations that represents nothing real and is seen as a human creation.[1]

See also: Why Do I Not Support the “Human Right” Concept?.

Also, discovered the term Perspectivism. Quote:

Perspectivism is the philosophical view developed by Friedrich Nietzsche that all ideations take place from particular perspectives. This means that there are many possible conceptual schemes, or perspectives in which judgment of truth or value can be made. This implies that no way of seeing the world can be taken as definitively "true", but does not necessarily entail that all perspectives are equally valid.

2011-05-17

Babolog — Digital Goods Marketplace for the Masses

Recently, 2 guys came up to me on skype. One is Michael K and the other is sabalaba. It turns out, they have something mysterious to sell, and that's their startup company babolog.com.

It's a digital goods marketplace website, where you can sell any of your digital files easily. So, they convinced me to use their service, and here it is, my emacs tutorial sold there, at: http://www.babolog.com/shop/p/471. Go buy it now! Help me out and check them out.

If you have some digital goods, you can sign up with them. Takes about 20 seconds. No upfront fee required. When your item got sold, they charge $0.3 plus 3% of the price. (always check their site for the exact terms.) Their site is quite simple. Check it out at: babolog.com.

English Idiom in Unix: Directory Recursively

Perm url with updates: http://xahlee.org/comp/idiom_directory_recursively.html

English Idiom in Unix: Directory Recursively

Xah Lee, 2011-05-17

Today, let's discuss something in the category of lingustics.

You know how in unix tools, when you want to delete the whole directory and all sub-directories and files in it, it's referred as “recursive”?

For example, when you want to delete the whole dir in emacs, it prompts this message: “Recursive delete of xx? (y or n) ”. (Note: to be able to delete whole dir in emacs in dired, you'll first need to turn it on. See: emacs dired tutorial.)

Here's another example. A quote from “cp”' man page:

 -R, -r, --recursive
  copy directories recursively

A quote from “rsync” man page:

 … 
 This would recursively transfer all files from the directory …
 -r, --recursive             recurse into directories
 This tells rsync to copy directories recursively.  See also --dirs (-d).
 …

and lots of other tools have a “-r” option, and they all refer to it as “recursive”.

Though, if you think about it, it's not exactly a correct description. “Recursive”, or “recursion”, refers to a particular type of algorithm, or a implementation using that algorithm. Obviously, to process all directory's content does not necessarily mean it must be done by a recursive algorithm. A iteration can do it as well and it's easy to have the full behavior and properties in the result as a recursive approach, such as specifying depth order, level to dive into, etc. (because, dir is a tree, and recursive algorithm is useful for walking the tree data structure but is not necessary, because a tree can be laid out flat. Any path order taken by a recursive approach can be done by just enumerating the nodes in sequence. In fact, iteration approach can be faster and simpler in many aspects. (i wrote a article about this some 10 years ago, see: Trees and Indexes.) Note: this thought about tree and its nodes as a set of node addresses can be applied to any tree data structure, such as lisp's nested syntax, XML. See: Programing Language: Fundamental Problems of Lisp.)

If you look at Windows or Mac OS X world, i don't think they ever refer to dealing with whole dir as “recursive” in user interface. For example, in Windows Vista, while changing properties of a folder, it has this message:

  • Apply changes to this folder only.
  • Apply changes to this folder, subfolders and files.

Note the second choice. In unix, it would say “Apply changes to this folder recursively.”

So, the word “recursive” used in unixes may be technically incorrect, but more so, it's just not the right phrase. Because, we want to communicate whether the whole content of a directory are processed, not about certain algorithm or how it is implemented. A simple “all the dir's branches/contents” or similar would be more apt.

Recently i was chatting in Second Life with someone (Sleeves). She's typing, while i'm on voice. In part of our conversation, i said “you sounded fine”. Note that it's technically incorrect, because she's typing, not on voice. So she didn't actually make any “sound”. But to say “you typed fine”, or “you chatted fine”, won't get the message across.

That's idiom. When you interpret a idiom logically, it doesn't make much sense, but people understand the particular phrase better anyway. I suspect the “directory recursively” is also a idiom. It seems so natural and really gets the point across, without any ill effects. Even if the implementation actually used a iteration, it doesn't seem to matter.

So the interesting question is, why this idiom works? Or, how it developed?

I think, among programers (which all unix users are in the 1970s), every one knows the concept of recursion, and many unix tools on dir probably are implemented with a recursive algorithm. When you say “… recursively”, the point gets across, because we all understand it, even when we are not actually talking about implementation. The phrase “… directory recursively” is short and memorable, while “… directory and all its contents” or “… directory and all its branches” or “… directory and all its sub-directories and files” are wordy and unwieldy.

2011-05-16

Emacs as Word Processor: Bold and Highlight Text

Perm url with updates: http://xahlee.org/emacs/emacs_as_word_processor.html

Emacs as Word Processor: Bold, Underline, Color Texts

Xah Lee, 2011-05-16

Jan from Oslo wrote and ask wouldn't it be great if emacs can be used as a word processor, i.e. letting users bold text, slant text, etc.

Yeah, i find that to be great. Imagine, i can just use it to write notes, with bold text, highlighted text, etc.

Note that emacs has a “facemenu-*” command. See the menu 〖Edit▸Text Properties▸Face〗. Here are the hotkeys.

  • Alt+o d】 default
  • Alt+o b】 bold
  • Alt+o i】 italic
  • Alt+o l】 bold-italic
  • Alt+o u】 underline
  • Alt+o o】 other

(See also: Emacs's Keybinding Layout.)

You can also use emacs's highlight commands to highlight text. e.g.:

  • highlight-phrase
  • highlight-regexp
  • highlight-lines-matching-regexp

Though, the problem is that when you save the file, the font decorations are not saved with it. So, in order to use make emacs to have word processor capabilities, you'll need a file format to go with it. Perhaps some soul has done it using one of the open source format such as html or rtf.

enriched-mode!

Anonymous wrote to say that the answer is “enriched-mode” minor mode. Thanks! Ask a emacs question and someone will have the answer!

So, i opened a new file, type 【Alt+x enriched-mode】, type “thou shall”, select the word “thou”, then use the menu 〖Edit▸Text Properties▸Face▸Bold〗 to make it bold, then save it, close it. Then reopen it, then indeed, the text is still bold.

“Enriched text” file format

Though, i wondered how it worked. So i opened the file in Notepad, and it shows this content:

Content-Type: text/enriched
Text-Width: 80

<bold>thou </bold>shall

Ah, so it's a Enriched text format. This is a pretty old format, dating to early 1990s.

The features of the format is pretty minimal. You can bold, slant, underline, color, texts, but that's about it. Also, emacs's enriched-mode written originally in 1994.

Show File Raw Content

You can use emacs to show the file's raw content.

Here's a sample saved file: emacs_enriched_text_sample_file.txt.

Call “find-file-literally” then give the file path.

Also, if you create a file with the first line being Content-Type: text/enriched, opening it in emacs automatically turns on the “enriched-mode” and interpret the file by that format for display.

Windows Blue Screen of Death — a Account of My PC's Memory Failure

Perm url with updates: http://xahlee.org/mswin/blue_screen_of_death.html

Windows Blue Screen of Death — a Account of My PC's Memory Failure

Xah Lee, 2011-05-14, 2011-05-16

This page documents a episode of personal computer failure.

I started to get Blue Screen of Death in the past week. It got worse, and started to happen every hour or so. Spend the whole past 2 days diagonalizing the problem. It's extremely painful. It seems to be a faulty memory module.

It's gonna take me perhaps 10 hours to write my story coherently, starting with my system spec, expected problems, symptoms of past year, recent new problems, with all the tech detail and specs. And also document my experience, my actions, and all sort of software incompetence. Instead of doing that, here's i'll haphazardly comment some random points that comes to my mind.

Note: after i wrote this article, i noticed that i'm still getting blue screen of death. The problem may not be my memory after all. So, don't pay much attention to places where i said how i fixed my memory or PC Doctor. In particular, PC Doctor's report of faulty memory might be due to malfunction in OS software somewhere.

Windows's “Prefetch”, “SuperFetch”, “ReadyBoost”

I learned about Windows's “prefetch” and “superfetch”. Basically, it's a tech that fills your memory in anticipation of use for the purpose of making your computer faster. Here's some links:

Microsoft's Memory Diagnostics Tool Problems

In Windows, there's a “Memory Diagnostics Tool” under 〔Control Panel\Administrative Tools〕. The file path is 〔%SystemRoot%\system32\MdSched.exe〕. When you launch it, it asks you to restart, basically setting up a scheduled task. When you reboot, it checks your memory. There are 2 problems i found with this tool:

  • ① This tool failed to find my memory problem.
  • ② When the tool is running at boot time, it says the result will be displayed after restart. However, i don't see it. (actually, a few times it shows up in system notification area (aka system tray).) I don't know where. It doesn't seems to be in Event Viewer

(actually, as of now, i found the memory diagnostics result in Event Viewer in 〔Control Panel\Administrative Tools〕 (full path at 〔%SystemRoot%\system32\eventvwr.msc /s〕)). Once you are in Event Viewer, it's under the tree 〔Microsoft, Windows, MemoryDiagnostics-Results, Debug〕.

Note: when the tool is running, any error it found is displayed right away. But i only see the message something like “so far no error found” for the full length of the time it's running. I also have tried the extended test. Same result.

Microsoft has a web page about the “Windows Memory Diagnostic” at http://oca.microsoft.com/en/windiag.asp. It's not clear to me this software is exactly the same as the one bundled with Windows Vista, but i think it's the same or variant. The page has full documentation of the software and info about memory, quite well written. For the record, here's a text version capture: Windows_Memory_Diagnostic.txt.

PC-Doctor

What actually helped me finding the problem was the tool PC-Doctor. On HP machines, it's in the menu 〖Start▸All Programs▸PC Help & Tools▸Hardware Diagnostic Tools〗. The full path is 〔C:\Program Files\PC-Doctor for Windows〕. I didn't trust any such program that was bundled with HP shit. Never launched it since i got the machine 2 years ago. Only after a day of frustration, i ran it. What a miracle, this tool actually told me i have a memory problem.

PC Doctor start menu location screenshot

“PC Doctor start menu location screenshot”

pc doctor screenshot

Screenshot of PC Doctor's memory test page.

PC-Doctor has several memory tests. The one that failed is the first one: “Advanced Pattern Test”. Here's it's online description about this tool:

Verifies memory cell corruption does not occur from read/write activity on adjacent cells.

This test checks for memory cell corruption from read/write activity on adjacent cells (cells are individual bits). It is run from memory address 0 through each memory cell sequentially to the top of extended memory, then from the top down to memory address 0.

Note: This test will only run on Extended Memory. Each version of the Windows operating system has an absolute minimum amount of physical memory that must be available to it at all times. The Advanced Pattern Test can cause a lot of paging, which can lead to a test time in excess of several hours.

Warning!: This test will stop and record a result of Cannot Run in the test log if the minimum available memory falls below 20 MB. This is only a factor when running the System Stress Test, which includes the Advanced Pattern Test.

pc doctor memory help screenshot

Screenshot of PC-Doctor's “Advanced Pattern Test” help screen.

Note: apparently, you cannot copy text from PC-Doctor help screen. Either as a sloppiness in software or intentional. What a pain in the pass with these mass-market software. However, the help file is at 〔c:/Program Files/PC-Doctor for Windows/pcdrmemory.p5p〕. Here's text version of the help file for the record: 〔pcdrmemory.p5p.txt

My Memory Spec

There are 4 slots (called “banks”), each slot is a module “2048 MB DDR2-SDRAM (PC2-6400 / 800 MHz)”. They are all made by Samsung, manufactured in 2009 Jan. (detail here: memory_spec.txt.) (See: Wikipedia DDR2 SDRAM)

The 4 banks (slots) are divided into 2 channels, A and B. (See: Dual-channel architecture) Memory module replacement must be per bank (i.e. 2 slots at a time. e.g. you cannot just remove a module from 1 slot.) PC-Doctor didn't report which memory module is faulty, but the problem seems to be the first 2 slots. Because, i first removed the memory modules at 3rd and 4th slots and tried to reboot but it won't reboot.

Symptoms Over the Year

I always had a problem with this machine since i got it in 2009-05. (My PC spec and story can be seen at: Switching from Mac/Unix To PC/Windows.)

The problem is that whenever the PC just woke up, or it just started, and when i run Second Life, it would often lockup. (no blue screen, just that screen froze, and mouse and keys are not operative. At that point, i have to hold the power button for few secs to force the machine to shut down.) This happened ever since i got the machine in 2009-05. I run Second Life about every day, so this happens about every other day.

I've ran Microsoft's memory test and it didn't report any problem, and i always thought the problem is related to my graphics card, because the crash almost always (~98% of time) happens when i run Second Life.

On 2010-08-12, i posted my question to a online help forum at Source superuser.com, and got a helpful answer, realizing that the problem may be due to a under-powered power supply. My power supply is rated at 300W, but my graphics card spec demands ~400W. Here's my post

i have this random freezing problem for a year now. I'm pretty sure it's related to graphics card. Though, hard to pinpoint a description or search for solution.

about ~2 times a week, my Windows Vista would froze. Meaning, the screen freeze and mouse and keyboard have no effect. The only way to get out i know of is holding down the Power key on the PC to force a shutdown. (Ctrl+Alt+Delete does not help)

When this happens, there's a random goggling sound for about 1 second.

The freezing happens usually when i'm in Second Life (which is a 3D game), but not always.

There's a very high chance of freezing when Windows just woke up from sleep, or the PC just powered on from power off. (so, every time i restart my computer due to freezing, there's a high chance that it'll freeze again immediately, sometimes before the Windows login screen shows up. More rarely (perhaps every few months), the LCD won't even show when i reboot (as if not getting any signal; stays in sleep state). When this happens, i force power-off, unplug the power and wait for 30 seconds, then power on the pc again.)

This freezing happens ever since i bought my PC last year.

I'm pretty sure it's not a gpu temperature problem, because i've install nvidia's system monitor. Also, i don't think it is a cpu ram problem, because i used Windows Memory Diagnostic to check and it didn't report problem. I'm a unix sys admin and web app programer. I don't know much about hardware.

my graphics card is: “BFG Tech NVIDIA GeForce 9800 GT 512 MB”

my graphics card driver has always up-to-date from nvidia. Right now it is version 257.21 (8.17.12.5721).

Microsoft Windows Vista Home Premium Edition, 64-bit Service Pack 2, Build 6002 DirectX 10.0 (6.0.6000.16386) AMD Phenom(tm) 9650 Quad-Core Processor my PC is: HP_Pavilion_A6750F_spec.txt

I don't have money to get a new power supply (i live on a $3 per day for food in the past 3+ years and in fact this blue-screen incidence triggered me to contemplate suicide for real.) So, in the past year, a habit i developed is to never set my machine to sleep. With that approach, the crash is reduced to perhaps once a week or every 2 weeks.

About 2 or 3 months ago, something else is wrong. That is, in Second Life, sometimes the screen will froze or black out for like 10 seconds, and the app will crash often. (since then i've read that this is symptom of video driver crash. The video driver crashes, and the OS restart it and re-connect to it. According to some gaming forum online, this can happen if you overclock your graphics card.)

And in the past 3 days, blue-screen started to happen about every hour, and arbitrary software would crash randomly.

Overall, in summary, i think there are 2 problems with my machine:

  • ① Obviously, the under-powered power-supply is a problem.
  • ② The memory module might be faulty in the beginning, or it might became faulty only recently, either due to the under-powered power-supply or frequent force shutdown.
2011-05-17

Addendum: I still don't know what's going on. Right now, my comp is running on 2 memory modules (took out the other 2; one of them might be defective.)

I think one thing that caused the frequent blue screen of death is due to a faulty software. It'll take a lot writing to explain but here's a quick try. First, a quick chronology:

  • 2009-05-26. Bought this PC. Specs: HP_Pavilion_A6750F_spec.txtmotherboard_Aspen-GL8E.txtBFG_NVIDIA_GeForce_9800_GT.txt.
  • 2009-05: When the comp just woke from sleep or just booted, and when running in 3D graphics intensive apps, the screen would freeze up. Only way to exit is force shutdown by holding the power button. This happens about every other day.
  • 2010: Set the computer never to sleep, and don't shut it down daily, as a way to avoid crash.
  • 2010-08-12: realized that my power supply is under-powered for my graphics card. Nothing is done about it.
  • ~2010-04: Noticed a new symptom. Second Life would sometimes black out for like 10 or 20 seconds, and usually soon afterwards Second Life app would crash. (btw, Second Life app crashed often anyway even on good computer.)
  • ~2011-05: Installed latest NVIDIA driver for my graphics card.
  • ~2011-05-12: Started to get blue screen of death (BSoD). My machine never got a BSoD before. But now it happens about every hour or so. This happened almost over night. This is a strong indication that either some new software or hardware are added/changed on the machine, and i am the type who always know exactly what's changed on my machine, but i couldn't figure out what. Possibly something i don't remember or aware, but that's odd. Possibly it's the NVIDIA driver i installed recently. (however, i always install any required updates from Microsoft, automatically. Also any updates such as from Apple's iTunes, Safari, Firefox, Google Chrome, Adobe Flash. Recently installed IE9. I don't think these are related to my BSoF in any way.)
  • 2011-05-12. As the blue screen started to happen every hour, i started more frantically trying to fix it. By fiddling with NVIDIA driver to tone down GPU frequency, in hope that it would reduce power consumption (assuming that my BSoF came from it, but then after all been using this machine with under-powered supply for over a year anyway without getting BSoD). I'm not the type to do any overclock type of thing. So the diddling with GPU settings is a lot trial and error and observe and learn experience.
  • ~2011-05-13. As the BSoF seems to got worse, i started to take out the graphics card, and tries to use the onboard graphics chip. The chip is “ATI Radeon™ HD 3200”. Tried to update its driver.
  • 2011-05-14. Wrote this article, first version.
  • 2011-05-14. The BSoF seems to have gone away, or once in ~4 hours, as long as i don't start Second Life, Google Earth, or start to run any 3D graphics intensive apps. (playing youtube movies sometimes crash the machine too).

One part i haven't mentioned in this story is about installing a driver for the onboard video chip the “ATI Radeon™ HD 3200”. That's a whole ordeal. Here's that story. So, in 2011-05-13, due to the BSoD, i thought perhaps i'll just use the onboard graphics chip. If my problem is caused by the graphics card with under-powered power supply, then switching to the onboard gpu would solve the problem. Though, i've almost never used the onboard gpu except the 1st day i got the machine. So, the driver must be very outdated.

At first, i just unplugged the NVIDIA graphics card, re-plugged my DVI connected to my display, and started machine, press F10 to get into bios, switch to onboard graphics (instead of PCIe). I don't remember exactly what happened except there are problems. Then, i recall that the driver must be very outdated. So i tried to update the driver. Now, that is a pain in the ass, took me about some 4 hours to do, admits many soft reboots or forced reboots and waiting for the computer, many times are in “Safe Mode with Networking”. The gist is that, when i went to the site 〔http://support.amd.com/〕 to get the driver, it took many tries. Took many tries to find the driver, because often it's not listed. Then, at one time finally able to download after the nth time of entering all the hardware model number and OS etc, then the site says something like permission denied because i didn't arrive at the site naturally, or some such. (yes i have full cookies and js on.) Extremely incompetent. Eventually, i found another page on the domain that lets me download the driver. I think it's this one: 〔http://support.amd.com/us/gpudownload/Pages/index.aspx〕.

After i downloaded it (it's called Catalyst Software Suite), then it crashes Windows or just isn't successful in some way. (it's funny, that the installation software has the luxury to display game ads while it is running. Fuck you.) After several tries (translation: several hours), i learned that (if i'm correct) you can't install this software while in Safe Mode. So, eventually, i got it installed while in normal Windows mode. (which is a miracle, because: your machine crashes while normal mode because you don't have the right driver, but the driver can only be installed in normal mode. LOL.)

In the end, after a day, of several soft/forced reboot and crashes and screen freezes and BSoD or screen scrambling, i was able to run windows with the latest driver software for my onboard “ATI Radeon™ HD 3200” gpu. Guess what, it doesn't work! In fact, in retrospect, the BSoD is more frequent, and another new symptom started to show. The system would froze with the screen scrambled.

Now, sometimes the next day or so, between many switches among the onboard gpu chip or the nvidia gpu, i realized one thing. That is, i think the Catalyst driver software installed a outdated Windows component that has caused me more crashes. I realized this because i happened to run Windows update manually by a whim (how thoughtful of me!), and it updated some “MS11-025: Description of the security update for Visual C++ 2010 Redistributable Package: April 12, 2011”, which is i think that Catalyst installed a older version while a newer version already exists on my machine.

… the above account is all slightly muddied up and written almost as fast as i can type. Suffice to say it's 3 days of frustration, reboot, wait for 10 to 30 min, crash, reboot … check event viewer, errors this or that, check task scheduler, try PC Doctor, try memory diagnostic, chkdsk, try search web randomly, think, try, reboot, suddenly Windows says “The task image is corrupt or has been tampered with.User_Feed_Synchronization-{42646F39-1993-43C3-9079-3A0DF3E11259}” … whatnot shit. Among the action i've taken is to think about suicide and sleep and go back to sleep again. Y'know? When i wake up, everything will be better.

Back to present. I think after the Windows update, things become more normal. I don't get BSoD for 3 or 4 hours if i just don't start to run and 3D app.

Right now, i'm using the NVIDIA graphics card. 2 memory modules. On the whole, i still don't know what exactly is wrong. Running the NVIDIA graphics card seems much more stable than using the onboard gpu. I think something must be faulty in the graphics department, because often the crash is related to running 3D apps, but i think there are also other things that went wrong in the past week. I still am not sure if my other 2 memory modules are defective. Certainly some software in my machine got problems. I don't know why Windows report that my task scheduler image is corrupt. I suppose forced reboot or memory error could corrupt OS files, but i think that's rare.

Note: in the whole experience, i actually learned quite a lot about PC and Windows admin tools. Event Viewer, BIOS, etc shit. Also, when you search for Windows/PC problems on the web, most of it is fucking garbage. Ignorant teen gamer's chats, money-making sites with tons of ads but garbage info (fuck Google), partial and circumstantial info (in you can discern it at all). Though, almost always you'll find your question out there, but no answer.

Syntax Semantcs Design: Use of Unicode Ellipsis Character vs Dot Dot Dot

Perm url with updates: http://xahlee.org/comp/unicode_ellipsis_use.html

Syntax Semantics Design: Use of Unicode Ellipsis Character vs Dot Dot Dot

Xah Lee, 2011-05-16

I decided, to use the unicode char HORIZONTAL ELLIPSIS “…” (U+2026) instead of the common 3 dots “...” for all my online writings. So, spent the past couple hours replacing all 3 dots to the ellipsis glyph, starting with my Emacs Tutorial directory (~300 files; 421 replacements.) (I have yet to do it site-wide, about ~5k files.)

Note: the replacement are done on a case-by-case basis with human eye-balling, and cannot be done blind programatically, because some occurrences of consecutive 3 dots are parts of computer code, error messages, or other uses, and must remain as 3 dots, e.g. in regex, 3 dots is a pattern for 3 chars. This task is done using emacs's command “dired-do-query-replace-regexp”. (See: Emacs: Interactively Find & Replace String Patterns on Multiple Files and Find & Replace with Emacs.)

Why Use Ellipsis Instead of Dot Dot Dot?

Why have i decided to use the ellipsis glyph instead of the much convenient 3 dots? Traditionally, it is done usually for esthetic reasons in printing. However, for me, the reason is mostly syntax & semantics design considerations in the context of computer science. I favored the ellipsis character because ellipsis carries with it a distinct meaning. That is, the char's sole purpose is to indicate omission (or other similar purposes). However, using 3 dots for the same purpose is in some sense a hack and creates certain complexity and ambiguity.

Here's one way to see it. Let's say a program is to parse the text. (such as web search engine bots) When the program comes to the ellipsis char, it knows right there that char's meaning. (assuming the char is not being abused, such as used in ASCII art) But when it comes to a period, it is not sure, it has to parse more, until you reach 3 consecutive dots. But even when you got 3 dots, the meaning is still not as precises when compared to the dedicated ellipsis char, because 3 consecutive dots could mean lots of things. (e.g. such as in regex, or some other lang uses 2 dots as a sequence generating operator, e.g. in perl: print 1..9;. In Mathematica, 2 or 3 dots is the syntax that represents a repeating pattern in its pattern matching functions.)

From another perspective, the period character “.” (unicode name FULL STOP, old name PERIOD) is used for multiple purposes. For example: decimal separator “3.1415”, section number separator 1.2.3, numbered items (1. this 2. that), domain name separator 〔www.example.com〕, as multiplication sign, as vector dot product operator in math. The meaning of the ellipsis symbol in comparison is far less context dependent.

Here's Wikipedia articles on them: Ellipsis, Full stop.

Is All This Important?

No, not really, but it's the sort of thing designers think about, especially those into computer language syntaxes and mathematical notations, me.

I, for my website, am rather particular and idiosyncratic about just every aspect. The content, the style of writing, diction, design, layout, down to, the glyph choices in punctuation (but in general i'm antithetic to being choosy on fonts and other typographical matters. See: The Moronicities of TypographyThe TeX Pestilence.).

The Naming of Ellipsis

It might be interesting to note that the etymology of the word ellipsis shares with the math curve ellipse, both are from the Ancient Greek: ἔλλειψις, “omission” or “falling short”. See this page: Conic Sections, quote:

Appollonius was the first to base the theory of all three conics on sections of one circular cone, right or oblique. He is also the one to give the name ellipse, parabola, and hyperbola. A brief explanation of the naming can be found in Howard Eves, An Introduction to the History of Math. 6th ed. page 172. (also see J H Conway's newsgroup message at conicsEtynomogy.txt.)