Friends

nQueens Problem

How many possible ways of placing N queens on the N x N chessboard without allowing them to attack each other? It is the Queens Problem and it is famous for its exceedingly high computational complexity :( . The following is the test for 16 Queens to place on 16 x 16 chess board. It took almost 12 hours to exhaust all the possible solutions on Centrino2 processors with 1GB RAM.




(One guy tested for 26 x 26 chess board!!!) http://www.durangobill.com/N_Queens.html

Awesome Job Advertisement :P

I bumped into this Job Advertisement on JobsDB, and I can't stop laughing ha ha ha... This is my first time to come across such an awesome Job Advertisement. The company must have so creative, original and fun-loving programmers.

Happy Belated 20th Birthday of Visual Basic

It was Visual Basic 6 which impressed me a lot when I first learned it due to its features of rapid application development. Although it did not provide fully functional object orientation, with OLE (Object Linking and Embedding) and ActiveX, it did an awesome job.

Later, with the advent of .NET framework, Visual Basic has grown up into the full-fledged OO Language. Yes, it is still growing up and becoming better and better.

Happy Birthday, VB!

source: http://blogs.msdn.com/b/vbteam/archive/2011/05/20/happy-20th-birthday-visual-basic.aspx

PLSims

PLSims is the project on which I have put a lot of effort and have done a lot of research. Still, I am working on improving and fixing problems I have encountered during the project. In fact, developing an interpreter/compiler will make me understand more about programming and opens my mind to understand from the computer system perspective, because space (memory) and time (execution time) do matter for an interpreter to perform well. Anyway, I think I should write a documentation on PLSims while I have some time, so I wrote.


PLSims



Top 10 Attributes of a Great Programmer

I bumped into a programmer's blog and I am fascinated by his post on the attributes of a "Great" programmer. So I posted it as he has written. Please read more on his website. Enjoy!
  1. Being a great problem solver.
  2. Being driven and lazy at the same time.
  3. Ability to understand other people’s code
  4. Having a passion for programming
  5. Loving learning for the sake of learning
  6. Being good at math
  7. Having good communications skills
  8. Strong debating skills
  9. Extreme optimism
  10. Extreme pessimism
To read more: http://programmingmatters.com/the-top-10-attributes-of-a-great-programmer/

Doodle

Space and Time

Space and Time. I think these are the terms we use the most in our everyday life, but we understand the least what it actually means. We, generally, think that space indicates the location or place of the events or incidents, and that time represents the changes in events. Our perception of space and time is absolute, independent and linear. In reality, both space and time are relative, interdependent and non-linear. In order to understand this, let us go back in history.

In Aristotelian physics, there is a notion of Euclidean 3-Space E^3 to represent physical space. In fact, this three dimensional physical space provides the absolute universal space within which events and incidents take place. Here we mean by the absolute universal space is that the space is static. For example, point (1,0,1) at one moment will represent the same point at another moment. Therefore, the space is independent of the time. In Aristotelian scheme, the absolute time is also represented by 1 dimensional Space E, which is independent of the space. With this framework, it is appropriate to think of space-time as the product of A = E (time) x E^3 (space). In fact, Aristotelian notion agrees with our common sense, although it does not reflect the reality.

However, Galileo did not accept the notion of absolute space. He argued that although the Earth seems relatively static to us, it is, in fact, in motion. Therefore, one point on the surface of the Earth at one moment is totally different from the same point at another moment. In addition, he argued that we cannot define the absolute point in space since everything is in motion. For example, the location of the Earth in the Solar System is relative to the Sun, the location of which is in fact relative to our Milky Way Galaxy. Although Galileo did not accept the notion of absolute space, he still agreed with the notion of absolute time. Therefore, in Galilean physics, the space is changing according to the absolute time. In order words, the space is the function of time:

G = E^3 (E)

It was Newton who extended the ideas of Galileo. He once stated, "If I have seen further it is by standing on the shoulders of giants," whom he meant by Galileo and Kepler. In fact, Newton's notion of space and time is very much similar to that of Galileo. By his first law, Newton introduced the notion of inertial frame of reference. Before elaborating on the Newton's first law, let us think about how we perceive motions of objects in the space in motion. In fact, Newton solved this problem by introducing the notion of uniform motion. Regardless of the space in motion, when an object is in uniform motion, it has an inertial frame of reference (the absolute space) on its own.

For example, let us imagine ourselves inside a big box, which is in uniform motion. We cannot see or know what is going on outside the box. As long as the box is in uniform motion, it will provide us the absolute space on its own.

Newton's second law explains what happen when the object are not in uniform motion. When an object is not uniform motion, its inertial frame of reference (the absolute space) will be distorted in accordance with its acceleration.

In fact, Newton's notion of space and time is the same as Galileo's notion of space and time. The only difference is Newton used the bottom-up notion of space and time. He defined the space locally, instead of defining the global picture of everything in motion. In Newtonian physics, the space is absolute when it is in uniform motion, but it is relative when it is not. However, like Galileo, Newton still accepted the notion of absolute time.

In addition to his famous Universal Law of Gravitation, Newton's another major contribution is the Calculus. In fact, calculus provides the systematic study of the rate of change, which later affects the meaning of time (the absolute time). The only reason why the rate of change is so important is because everything is changing.

In reality, we cannot perceive the time. What we can perceive is the change. We can only discerns how fast or how slow the things change. So, if there were no change at all, we would not perceive the time at all.

Rate of change is essential because it relates the space and time by a very simple equation:

Rate of Change = Change in Space / Change in Time.

Although very simple, rate of change is , in fact, very difficult to understand. (I think whoever took the Calculus course will agree with me :P ).

With absolute time notion, rate of change is very simple to understand. Faster rate means, bigger changes in space and slower rate means smaller changes in space as change in time is always equal. But what if the change in time is not equal?

Actually, we held the notion of absolute time, until we encountered the speed of light. The speed of light in fact gave a lot of headache to the physicists. Before discussing about the speed of light, let us think about two frames of references which are relative in motion.

Let us imagine we are inside a big glass box in uniform motion. Since it is the glass box, we can see what is going on outside the box. There is another glass box which is also in uniform motion with different velocity. Inside that box, a tennis ball is moving up and down and a person is standing and watching the ball. For that person, the trajectory of the tennis ball is straight as the ball is moving vertically up and down. Regardless of the velocity of the glass box, the person will say that the ball is moving in a straight line.

However, for us, who are in different inertial frame of reference with different velocity, we will not see that the tennis ball is moving in a straight line. The trajectory of the tennis ball, in fact, is a curve (more precisely a parabola) to us. It is because there is a relative motion between two frame of references. When we look at the events, which are in different inertial frame of reference, the space is distorted in accordance with the relative velocity between inertial frames. In fact, it is very obvious. When someone drops a stone from the moving car, we will see the stone does not fall in a straight line.

However, the speed of light is different. Observers from different inertial frame of references will measure the same speed of light even though there is a relative motion between different frame of references. The relative velocity does not affect the speed of light.

It was Einstein who first stated that the speed of light and the laws of physics will be the same in different inertial frames of reference. From this postulate, he developed the special theory of relativity. In fact, the special theory relativity reshape our perceptions of space and time.

Also, the speed of light defines the universal maximum constant rate of change. There are different rates of change in the universe, but none can exceed the rate of change of light.

c = rate of change of light = change in space / change in time = universal constant

When we look at the equation, we will see that for different change is space, the change in time has to be different in order to keep ratio constant. From this, we realize that there is no such thing as absolute time.

Functional Programming

On the other day, I bumped into Microsoft F#, a functional programming environment. It is pretty interesting. After reading some features, I find it quite unusual to think in functional programming.

Anyway, it is worth testing since it can provides parallel IO and CPU programming, and nowadays, every computer have at least 2 CPUs.

There is more information about functional programming. http://academicearth.org/courses/the-structure-and-interpretation-of-computer-programs. For that class, the professor uses Scheme, something like Lisp.

Emotions of a Programmer during software development














Source:http://www.smashingapps.com/2010/07/28/how-programmer-reacts-cartoon-strip.html

Overview of 3D Graphics

Personally, I think I am a visual person. Generally I pay more attention to visual objects than to others. My response to other senses, such as sounds, tastes and touches are slower than my visual sense. Quite naturally, I am interested in Visual Objects and how to process them, which includes imaging, computer graphics, computer games, image processing. The following is the introduction to 3D graphics, which I wrote as a tutorial. Well, in fact, I am just trying to explain myself while I am still learning with 3D Graphics and Game Programming.


Introduction to 3D Graphic

Physics of the Mind

Although we don't know much about how mind actually works, it has never ceased to fascinate the scientists and philosophers. Recently, it has started to attract computer scientists as well. In fact, the emergence of Artificial Intelligence, Artificial Emotion, Cognitive Science and Neural Networks rooted in the analysis of mind and the so-called consciousness.

Physics of Mind

Twitter Delicious Facebook Digg Stumbleupon Favorites More