The three characteristics of OOP

 

One of popular interview questions is: “please describe the four characteristics of object-oriented programming”. In my observation, not many candidates — even the senior ones — can explain well Abstraction, Encapsulation, Polymorphism, and Inheritance. Worse, little did they know the drawback of Inheritance.

Continue reading “The three characteristics of OOP”

The universe is 4D?

This statement:

Little did they know that the universe is four dimensional and even the orbit of planets is an illusion produced when straight motion in a four dimensional space is projected into three dimensions (or something).

immediately reminded me about projective geometry which is one of the most beautiful systems of mathematics.

So the universe is 4D? I don’t know. But if it was true then we could use the concepts of projective geometry to interpret something interesting.

Continue reading “The universe is 4D?”

“Null References: The Billion Dollar Mistake”

Null is clearly evil. We as human tend to forget to check null, and boom … crash!!! Documentation may help, but again we still forget reading documents. Worse, not all documents are correct and up-to-date 100%. Even if we remember to do every null check, our code would be very messy.

So what is the solution?

Continue reading ““Null References: The Billion Dollar Mistake””