Nov 27, 2009

I got PS3 slim on Black Friday.

Today is Black Friday.
I set alarm at 3AM, but I got up at 4:40am.
I though it was already too late, because I have heard that people line up from 1AM.

However, I was lucky enough to get a PlayStation3 Slim. It was 5AM exactly, but there was only one boy and his mother who were waiting from 3AM to buy PS3. There were no one else. It was because the shopping mall was relatively new and the GameStop wasn't known much. One people who came later said the GameStop is almost like hidden one.

We saw two PlayStation3 boxes on display, so I though I need to pick the box as soon as an employee open the door. But the boxes were empty. By the time that we were figuring out why they are empty, there were some people who rushed to the counter; they were right. Two new line appeared from the counter and the order in the lines changed. I became a guy who bought the very first PS3.It was interesting and I'm happy that I didn't have bad experience. Some people who were in the line said people often became aggressive especially when they are hungry and waited long. One guy who came to the GameStop from WalMart and BestBuy said there were a hundred people from 3AM. I remember that CNN once broadcasted that there were people who got injured by rushing crowd at Black Friday. I actually expected to see that kind of crowd but I'm satisfied by my new PS3.

The price was 299 dollars for PS3 and two game titles; little big planet and god of war 1/2. Although PS3 itself is 299 dollars, those games cost more than 100 dollars, so it was a good deal; indeed, I will play those anyway.
I took a picture in front of the game stop with my new PS3.

Nov 20, 2009

Dog like tennis ball

There are several dogs in my company.Today I found that a small dog like a tennis ball very much.

Nov 9, 2009

Zaisu chair

Today I organized my new room. First I set up my X-Box360 and HD-monitor. Then I washed all of my clothes and hanged them almost all into the closet. After then I found one thing is missing to make my room a comfortable place: Chair.

I have a bed, a carpet and a bookshelf. I put the monitor on the shelf, but it is a bit far from bed, so that it is good to see the detail on the monitor by leaning on the bed.
It took a little bit of effort to figure out what a proper keyword in English for the chair that I used in Korea. I found that Japaneses call legless chairs, Zaisu.

I will check more on internet and probably buy one soon.

Oct 28, 2009

The sound of Skype

What is actual sound of "Skype", which is one of the famous internet voice phone service.

Some of Chinese friends around me keep sounding "Sky-py" or "Sky-Pee", but I believe American doesn't sound "pee".

One of example sound is from one of Ted presentations: http://www.ted.com/talks/david_pogue_on_cool_phone_tricks.html

He sounds "Sky-ee-p" or "Sky-ip".

One of rules on English sound is that if "e" follows any consonant, the sound of "e" comes first.

Examples are "Swipe", "Plane" and "Pane".

Oct 14, 2009

House Centipede in my house

From Sep 1st, I am living in a new house, which was owned by a chines. I have lived there about one and half month so far.

One of the serious problems the house has is house centipedes; there are other serious problems as well.Today I found that what kind of centipedes they are from Wikipedia. There are House Centipedes.

It says that it is generally considered as harmless to human, dogs and cats, because their bites cannot penetrate human skin; I hope they don't attempt on my skin at night.

As the Wikipedia says, they seem nocturnal. Interestingly they seem to have well developed eyes, because whenever I try to hit it, it run away fast.

Fortunately they eat many harmful insects such as cockroaches, bedbugs, spiders and termites. In addition, they are harmless to human. I like to give some credit for them in this sense.

Only one problem of them is, however, that they look extremely ugly. One day I saw one centipede in my room, and it was as big as my palm. I even had a bad dream in the night; I was killing several centipedes in the dream.

Sep 18, 2009

virtual methods and polymorphism

Today I had an interview. One of questions was about polymorphism in C++. The questions was whether we need to have "virtual" keyword in order to use polymorphism in C++. The correct answer is that C++ doesn't allow any methods to be used as polymorphism if it is not virtual method.

The confusion came from Java syntax, because every methods in Java are virtual methods. Although it is an understandable mistake for Java programmers, it should be always clear for C++ programmers.

Let's see an example here:
#include windows.h

class BaseClass
{
public:
void printSome() { OutputDebugStr( L"Base\n" ); }
};

class DerivedClass : public BaseClass
{
public:
void printSome() { OutputDebugStr( L"Derived\n" ); }
};

int _tmain(int argc, _TCHAR* argv[])
{
BaseClass * const obj = new DerivedClass();
obj->printSome();
delete obj;

return 0;
}
Which message should we expect to see? A correct answer is "Base" not "Derived", because it doesn't have "virtual" keyword.

The guy who raised this question to me was evaluating my technical skills on my interview. I doubt whether he graded me fairly. I wish he can find this article and correct his misunderstanding.

Sep 10, 2009

Billiard game

I have spent about 5 weeks for this personal project. The purpose of this project is to show my technical fluency. I have chosen to develop a simple billiard game with Collada, PhysX, and Shader programs.

Requirement:
  • DirectX 9 end-user runtime
  • Graphic card that can support Shader Model 2. ( Pixel shader 2.0 will be enough )
  • PhysX must be installed.
  • OpenAL must be installed.
Demo video:


Source code is available on Google Code: http://code.google.com/p/mybilliard01

Used technique:
  • PhysX
  • Collada
  • DirectX 9
  • HLSL
  • OpenAL
  • Microsoft C++/CLI unit testing framework
  • std::tr1
Note
The balls colliding to each other under Physical calculations. Shadow is drawn by shadow map. The graphic model data are from 3DS Max through Collada XML standard. Sound is powered by OpenAL.

Screen shots
The captured video lost some graphical details, so that I like to attach some screen shots here. Click each image to enlarge it.



*PS : Background needs to be added soon.

Jul 25, 2009

My first Torque X game on XBox 360

Today I spent about 2 hours making this simple game. I just followed the chapter 2 on a book, "The complete Guide to Torque X for XNA."I found that TorqueX is a very easy and fast game developing engine. Although I don't think we can use it for commercial game development, it seemed good for personal use.

I'm still reading the book, and I expect to see some interesting functionality for 3D part on latter chapters.

Jul 22, 2009

My distinguished academic achievement award.

I got a distinguished academic achievement award from my department when I graduate. Here is the evidence. :-)
I thank BB for taking the pictures.

Jul 13, 2009

My M.S. certification

I got a certification for my M.S degree.
It went to my house in Korea directly, so that my father took a picture of it.
I haven't seen the real one yet. :-)

May 13, 2009

The result of my term project.

I have finished my term project that I have mentioned earlier.

Although it gave me a lot of pain and fear that I get F grade because I couldn't finished it, I finally finished it and I feel a kind of achievement.

I have made a demonstration video clip, so that you can see what I have done briefly.


You can find the source codes and download it from Google Code:
http://code.google.com/p/mysimplevideotrace

I have also tried to model a human body, but I found it is very difficult to do, because body is very rounded while a car consists of several surfaces and sharp edges. Therefore I had to give up in the middle.
My professor said it was very nice presentation so that I guess I can expect A grade. :-)

Apr 22, 2009

HeteroVector for software testing.

I spend almost 3 days making this simple package, HeteroVector.

HeteroVector is a kind of std::vector. A difference is that HeteroVector can contain different types as 2 dimensional array. Let me give you an simple test case here:
int arg1[ ] = { 1, 2 };
char arg2[ ] = "amz";
float arg3[ ] = { 1.1f, 2.2f };

typedef LOKI_TYPELIST_3(int, char, float) MyInputTypes; // from Loki library

HeteroVector< MyInputTypes > values;
values.set< 0 >( arg1 );
values.set< 1 >( arg2 );
values.set< 2 >( arg3 );

ASSERT_EQ(1, values.get< 0 >( 0 ));
ASSERT_EQ(2, values.get< 0 >( 1 ));
ASSERT_EQ('a', values.get< 1 >( 0 ));
ASSERT_EQ('m', values.get< 1 >( 1 ));
ASSERT_EQ('z', values.get< 1 >( 2 ));
ASSERT_EQ(1.1f, values.get< 2 >( 0 ));
ASSERT_EQ(2.2f, values.get< 2 >( 1 ));
Here the object "values" represent this 2 dimensional array.
Note that it contains three different types. Each row can contain different type but each columns in a same row must be the same type. The type is forced by compiler so that nobody can make mistake; it was possible because I was using template meta programming.

You may noticed that the way to access each value is not usual. For example, the code accessing the value 1 is "values.set < 0 > ( 0 );" The first value, which is for "row", is not method argument, but template argument so that it is "<" and ">". The second value is the method argument. The value for the template argument is technically type indicator, which is "int, char, float" in this case.

Let's go one more step. A testing code for "Factorial" is below:
int factorial(int nThStep) {
if(nThStep == 0) return 1;
return factorial(nThStep -1) * nThStep;
}

TEST(HeteroVector, Factorial) {
// This example shows how input and output values can be paired.
typedef LOKI_TYPELIST_2(int, int) FactorialTypes;
const unsigned int input = 0;
const unsigned int output = 1;

HeteroVector< FactorialTypes > inputs_outputs;
int inputs[] = { 0, 1, 2, 3, 4 };
int outputs[]= { 1, 1, 2, 6, 23 };
inputs_outputs.set< input >( inputs );
inputs_outputs.set< output >( outputs );
inputs_outputs.replace< output >( 4, 24 );

for(unsigned int nTh = 0; nTh < inputs_outputs.size< input >>(); ++nTh)
ASSERT_EQ(inputs_outputs.get< output >(nTh),
factorial( inputs_outputs.get< input >(nTh) ) );
}
The data for testing is all managed by the HeteroVector. The variable "inputs_outputs" represent this 2 dimensional array:
Note that the values for the template arguments can be replaced by meaningful name. In next example, I will show you that we can also use "enum".

Here you may think we don't need to use HeteroVector for this factorial function testing. We can also replace it with two vectors, which will be "vector inputs", and "vector outputs". But it is just an example that I want to show how to use.

Let me give you an example for testing Switch function.
bool switchOnOff( bool switch1, bool switch2, bool switch3 ) {
return switch1 && (switch2 || switch3);
}
The function, switchOnOff, requires three boolean arguments. Therefore we need to test 8 cases ( = 2 * 2 * 2 ). I drawn a table here:My additional implementation for HeteroVector generate those Combination of three "true/false" values. The testing code is here:
TEST(CoverageTest, AllCombinationsCoverage) {
typedef LOKI_TYPELIST_3(bool, bool, bool) Booleans;
enum { switch1, switch2, switch3 };
HeteroVector< Booleans > inputs;

bool true_false[] = { true, false };
bool true_only[] = { true };

inputs.set< switch1 >( true_false );
inputs.set< switch2 >( true_only );
inputs.set< switch3 >( true_false );
const bool expected[] = {
/*TTT*/ true,
/*FTT*/ false,
/*TTF*/ true,
/*FTF*/ false };

HeteroVector< Booleans > ACoC = allCombinationsCoverage(inputs);
ASSERT_EQ(sizeof(expected)/sizeof(bool), ACoC.size< switch1 >());
ASSERT_TRUE( ACoC.size< switch1 >() == ACoC.size< switch2 >() );
ASSERT_TRUE( ACoC.size< switch2 >() == ACoC.size< switch3 >() );

for(unsigned int idx = 0; idx < ACoC.size< switch1 >(); ++idx)
ASSERT_EQ( expected[idx],
switchOnOff(
ACoC.get< switch1 >(idx),
ACoC.get< switch2 >(idx),
ACoC.get< switch3 >(idx)
) ) < < idx; }
This code is a little bit different from the table, because I fixed the second argument in a value, "true," in order to show that we don't always need to generate for every possible cases but we can select some input values for our interest. By the constrain the code generate only 4 cases ( 2 * 1 * 2), but we can, of course, generate 8 cases easily.

Note that the template argument is replaced by ENUM values, which makes easier to read.

I have also implemented Base Choice Coverage, which is introduced in my professors book, "Introduction to Software Testing" (written by Paul Ammann and Jeff Offutt)

The basic idea of Base Choice Coverage is that we choose a default set of input values and change only one value from it rather than using all combination. Therefore the input set of BCC will be like this table:
The testing case will give you how to use my implementation for BCC:
TEST(CoverageTest, BaseChoicesCoverage) {
typedef LOKI_TYPELIST_3(bool, bool, bool) Booleans;
enum { switch1, switch2, switch3 };
HeteroVector< Booleans > inputs;

bool true_false[] = { true, false };
bool false_only[] = { false };

inputs.set< switch1 >( true_false );
inputs.set< switch2 >( true_false );
inputs.set< switch3 >( false_only );
const bool expected[] = {
/*TTF*/ true,
/*FTF*/ false,
/*TFF*/ false };

HeteroVector< Booleans > BCC = baseChoiceCoverage(inputs);
ASSERT_EQ(sizeof(expected)/sizeof(bool), BCC.size< switch1 >());
ASSERT_TRUE( BCC.size< switch1 >() == BCC.size< switch2 >() );
ASSERT_TRUE( BCC.size< switch2 >() == BCC.size< switch3 >() );

for(unsigned int idx = 0; idx < BCC.size< switch1 >(); ++idx)
ASSERT_EQ( expected[idx],
switchOnOff(
BCC.get< switch1 >(idx),
BCC.get< switch2 >(idx),
BCC.get< switch3 >(idx)
) ) < < idx; }
The code is, again, different from the table that I showed above. The testing code fixed 3rd value at "false". Therefore it generates only 3 cases but it is, again, easy to generate 4 cases, which satisfies BCC correctly. I just wanted to show the implementation has flexability for choice.

I spent 3 days implementing this code. It was very hard because I used template meta programming which gives programmers desperate. In other word, my implementation strongly check Type. Compiler will forece users not to make mistake at compile time not at run-time. And it also increases run-time speed, because many parts of calculation will be done at compile time.

I like to share my effort with everybody. Any comments are welcome. You can download the source code here: HeteroVector.

I used Loki library, which is famous meta programming library. It is open source so that anybody can download; in fact my implementation requires Loki library. You can find the most recent version of Loki here.

Apr 20, 2009

Using interface in C++

Yesterday I found that this article has some problem:
http://www.codeguru.com/cpp/cpp/cpp_mfc/oop/article.php/c9989

By its nature interface brings multi-inheritance and it can cause "diamond problem".

In order to solve this problem you have to make sure the "implements" always use "public virtual" rather than just "public". See virtual inheritance.

My implementation is here:
#define IMPLEMENTS( INTERFACE_CLASS_NAME ) public virtual INTERFACE_CLASS_NAME

#define EXTENDS_INTERFACE( INTERFACE_CLASS_NAME ) public virtual INTERFACE_CLASS_NAME
The virtual destructor problem is less important because compiler will notice the programmer when a class has some virtual method without a virtual destructor.

Apr 12, 2009

Jumble and muJava

I'm reading a book, "Test-Driven Development, Kent Beck, 2003". And the book briefly mentioned "defect insertion, page86". Thus I curiously checked the software, "Jester" and I found it was (surprisingly) Mutation testing tool, which my professor, Jeff Offutt is strong at.

However, the software, Jester, seems not to be maintained anymore. I found another interesting software, "Jumble". The usage was very easy and simple. BUT a big shortcoming is that it doesn't support as many mutation operations as muJava does.Unfortunately, muJava, which is developed by Jeff Offutt, doesn't support JUnit while Jumble does. Somebody need to make muJava work with JUnit sooner or later. Or we need to make Jumble support other operations.

I recommend you use Jumble rather than muJava due to the supporting JUnit; it is better than not using. But we still don't have any free mutation testing tool for C++, although there are some commercial.

Apr 9, 2009

Center point as Interest point.

Today I came up with an idea about "interest point". Briefly it is that "we can use not only corner points as interest point but also center points of circle".

I was using the Voodoo Camera Tracker.
Let me explain how it works briefly.

It first finds "corner points" from each image of a movie file.
And it figures out which corner point on the prior image is correspond to the point on the next image.
Finally it reconstructs the 3D coordinate position of the camera.

Here is the example. The first image is with the detected corner points. A green cross line indicates a corner.
The second image shows yellow lines which represent the corner point is traced from the prior image to the next image.
A problem that I found by using the Voodoo is that most of objects we are familiar in our life are round shape. And detecting corner doesn't give the enough information.

Thus I came up with the idea detecting and tracing the center of circle. We can find the center of a circle by this steps:
1. calculate the edges.
2. pick a point on the edges.
3. calculate the tangential line on the point.
4. find a perpendicular line from the tangential line.
5. pick an adjacent point of the point.
6. calculate a perpendicular line of the tangential line for the point.
7. find out the intersection of those perpendicular lines; this intersection will is a center of the circle or a part of circle.
7-a. if the intersecting point is too far from those points, those points doesn't share a same center.
As you can see above, this way doesn't require a complete circle. A part of arc is sufficient.

We can repeatedly calculate this process and we can segment arcs that consist of those points that shares a identical center. Here the segmenting is not the purpose but we can drop some of too short arcs from our further calculations by segmenting arcs.

A problem raises when we consider the fact that a circle shape can become a ellipse shape when the camera moves. See the image below. The position of the camera moved to down and the shape became ellipse from circle. In order to use the center point as interest point the position of the center point must be stable.


Here the question is how to find the center of the ellipse.
The formula of the ellipse is here:
We want to find the center of the ellipse, so that we need to add the variable for the center like this:where (h,k) is the center of the ellipse.

The formula now consists of x, y variables and 4 constants. We want to find out the constants: a, b, h, and k. We pick 4 sample points which are all adjacent from the edge image. And we can calculate the center: h, and k.
x1, x2, x3, x4, y1, y2, y3 and y4 are all actual numbers from the edge images so that we can solve these 4 formula and get the center of the ellipse.

This way gives a stable center point of circles, arcs, and ellipses, regardless the angle from the camera. Finally we can use the stable center points as interest points.

Apr 8, 2009

My project is going on..

Today I spend a whole day figuring out how to use Voodoo Camera Track. It was supposed to be easy to use, but I found that it is very sensitive for the contents of the movie clip. I tried several different objects and different options in Voodoo Camera Track. It turned out that the vehicle movie clips are easiest objects for Voodoo.

Thus I decided to use the movie clip of my car; BB helped me to take it. The movie clip comprise about 400 frames and I took the sequential image files with VirtualDub. VirtualDub had very simple and nice exporting functionality; I also want to mention that I spent several hours to find a software to get the sequential images from a movie file. On the movie clip, the camera moves around the car clock-wise.
Finally VooDoo Camera Tracker gave me the position data of the camera. The visualized figure in 3D coordinate is below:The green lines represent the direction of down side of the camera, the blue lines indicate the direction that the camera is directing at each point. I believe the red lines represent the position of the camera. The white dots are called interest clouds. Each white dot indicates a corner point of images in 3D coordinate.

Apr 1, 2009

How to get optimized code in Agile process.

These days I'm fascinated by the idea of Agile process. I have read the 500 page book, "Agile software development" 2002, in 4 days, and I borrowed several more books about agile and eXtreme Programming.
This morning when I was reading a book, "Clean Code", I was thinking what if clients want my program to be faster. The book mainly focuses on Maintainability and Readability of source code rather than Optimization. Generally optimization harms maintainability and increases complexity.

However the performance is very important for game programming, so that optimization is inevitable.
The book, "Clean Code", said, "Make your program work first and then make it right." I want to add here: "Make it work, make it right and make it fast".

How do we make a program work? It assumes that we uses "Test cases first", and we can make a program working for the test cases. And then we need to clean the code, making right for short.

What I want to suggest here is once we got the right code, we keep the right code as the "base code" and we build "Temporary Fast Codes". Since we have the right code, the behavior of the right code and the fast code must be identical. Thus we can use the right code as an automatic test case generator, for example:
GameComponent rightCode = new RightImpl();
GameComponent fastCode = new FastImpl();
for ( int i = 0; i < 1000; ++i )
assertEquals( rightCode.do(i), fastCode.do(i) );
The point is that we don't expect we can maintain the optimized fast code. It should be treated as "Temporary Code". When the requirements change, the right code will grow up while the temporary code doesn't. We throw the fast code away and we will use the right code until we get the temporary fast code again.

Following this idea, we keep the basic principle of Agile process and we can also get the optimized (temporary) code. In game development process, we may develop the optimized code only at the last phase of the process, so that we can focus solely on right code during most of iterations without worrying about optimization.

Mar 18, 2009

My project for Computer Vision is decided.

Yesterday professor assented my project so that I'm going to implement this impressive paper.

First time, I thought I can try JMF at this chance, but I found it doesn't support Mac yet. Therefore I decided to use OpenCV with Eclipse and GoogleTest.

Anybody can find my use cases and my source code from Google Code.

Goolge Unit Testing Framework for C++

I had hard time to find a good unit testing library for C++ not for Java; Java already have a good one, JUnit.

First name we can came up with for unit testing tool for C++ is CUnit or CppUnit. There are several unit testing libraries for C++. However, most of them are complex to use and doesn't get updated anymore.

I planned to use OpenCV with C++ in Mac, so that I wanted to find a good unit testing tools. I'm kind of get used to JUnit so much. Now I can hardly image I code without unit testing.

First time, I tried CUTE. I found it is pretty complex and I cannot find any good document from internet; people don't use this. And the last update in its Wiki is 2 years ago. I felt like it is abandond.

Second, I tried CppUnit. I found it is also complex and outdated; last update is made 3 years ago.

Today I found a good one, GoogleTest. Last update is Dec 11 2008. And it seems pretty handy. One thing I mind is it doesn't show green/red bar. I guess it is possible to draw some visual bars by parsing XML file that is generated by GoogleTest, but I need to read more detail to figure out how it works.

I strongly believe most of C++ programmers still don't understand how important and strong unit testing techniques are. Otherwise, it cannot explain why they are all outdated.

Mar 17, 2009

Computer Vision Assignment 2

My professor asked us to post our assignment on web site, so that I'm posting it here.

The instruction for the 2nd assignment is here.
  1. (15p) Computing edges for a background image and for an image with a human in it.
  2. (10p) Subtracting edge images to create a difference image and classifying edges in the difference image.
  3. (10p) Connected component analysis to identify the human in the image.
For the 1st instruction, I computed edges of background for each color channel (you can enlarge it by clicking the image):Each blue image consists of arrows that indicate direction of each edge:For the 2nd instruction, I have classified three edges: background, occluding(foreground), and occluded edges.For the 3rd instruction, I have drawn a box for the human.
You can find my MatLab program here.

Feb 16, 2009

Syslog widget for Mac

I made a widget application for Apple dashboard.
It is a widget version of "tail -f /var/log/system.log"
You can check system log often with this widget.
This is incomplete. I planed to add more functionality such as changing target file not only for system.log but also for any file we want to "tail". But it is not done yet.

Download

Feb 7, 2009

Using Custom Shader for XNA in MacBook with Paralles.

I have tried to use Pixel Shader in my MacBook, but it didn't work.
I hope anybody has same problem can get some help from this page.First I tried to use some example from a book. But it didn't work. It turned out GameStudio 3.0 has changed some interfaces.

I tried another example "How to: Use BasicEffect". The example in the page uses pixel shader and it worked well, but it wasn't a custom pixel shader.

Next I tried another example, "How to: Create and Apply Custom Effect." The example in the page uses a custom pixel shader, but it didn't work. It thrown an exception, "InvalidOperationException." It complained that I didn't use valid vertext and pixel shader. Man, it is an example from MS...
Finally I changed the custom Effect file, which is pixel shader code.
I already knew that MacBook support only one type of vertex and pixel shader among severals. Thus I tried to use older version than the one in the example, and finally it worked out.

The original code is here:
technique TransformTechnique
{
pass P0
{
vertexShader = compile vs_2_0 Transform();
pixelShader = compile ps_1_1 PixelShader();
}
}
The version number of "vs_2_0" should be "vs_1_1" for MacBook.

Jan 16, 2009

After watching Hancock.

Today I watched HanCock. Unfortunately it was not as interesting as I expected. They may consider to make its part two, but I don't get the whole story completely, especially what the woman said.
First of all, the actor of Hancock is not appropriate. I think if the actor looked less hansom, it fits better. Will Smite is too hansom for the role.

Second, the actions in the movie is too brutal. It is too simple and not so much fun.

It is just fine if I take it as just a simple action movie, but the story is too messy, and I expected higher.

Jan 15, 2009

How to decide value of goods: customers vs producers

These days how can we know which items are good and which one is bad?
Most of cases we are affected by advertisements via mess medias such as TV or newspapers.

It is reasonable to say that the items that spend expensive advertisement cost are probably valuable. Because if the producers are not so much confident for their items, they would not spend that much costs.

I think cars are good examples for that. Most of people don't have enough knowledge for details of cars. We rely on their reputations which is built up by advertisements, or more simply rely on their price tags.

However, it doesn't always work. A good example is some of advertisements in mess medias in order to cover their shortcomings. In Korea most of big companies purchase big advertisements whenever they attack union activities. They pay their money to mess media themselves in order to control the articles of the media.

Those information from advertisements are all from producers not from customers. Producers value their own items, which seems weird in some sense.

In contrast, there are several ways to spread information for some items from customers not from producers. A good example for this is probably Google.

How could Google prevailed Yahoo. It is certainly because of the quality of searching results. Yahoo showed searching results, with ranking each URL by how much the owners of the URL payed to Yahoo, while Google showed searching results, with ranking each URL by how many other web sites linked the URL. I think the prior way relies on the information from producers, as I mentioned earlier, and the latter way does with the information from customers.

Many of economists believed in the story that "price" indicates where resources should go to; in other word the price embraces information to go. However, it cannot explain the difference between Yahoo and Google. The searching results of Yahoo are, of course, evaluated by "the price" either.

I like to conclude that we need to see where the information for the price came from. I agree that "the price" is a good way to evaluate how much a item is valuable. However when we see the source of the price information, it may vary from certain numbers of producers only to countless customers. Furthermore, the information can appear without any price tag, as we have seen in Google and some of protests.

*PS: This article is influenced by a Ted movie clip: Open source economics.