Codaholic

Does the dog have Turing nature?

Classes and Javascript

If you have been programming in Java and C++ for a while and are used to thinking about problems in terms of classes and inheritance, you may find yourself struggling with Javascript since it has only objects. This post is to – a) provide you with a perspective on why programming with only objects is powerful and b) show you how to translate the class-based concepts you’re used to thinking in into the Javascript world.

The Javascript object system comes from the language Self which pioneered object oriented modeling using prototypes, along with many dynamic compilation techniques that later went into the HotSpot JVM. The motivation for destroying the class-object dichotomy is that working with classes forces you to think about object categories well before you’ve really understood the problem domain. The claim by the Self folks is that your approximate and often downright invalid classes get frozen in over time and the system becomes harder to adapt to changes in understanding about the problem being modelled.

So, what are classes? … really?

Social Hash as Identity

(This is a “brain-dump” post).

Many write-ups and studies on social networks and privacy issues talk about the risk of using one’s personal information disclosed within social networks for identity theft. That made me think about whether it is really possible for an identity thief to steal my entire social environment and history or whether such theft is simply an indication of how broken the current paper-world identity systems are in the digital age?

Enter the “social hash” – a short identification string that can be generated from the data in your social network’s history that is very highly likely to be unique to you and very difficult to duplicate in a “prove your identity” challenge.

Newcomb’s Problem and Quantum Physics

How would Newcomb’s problem look like in the physical world, taking quantum physics into account? Specifically, would Omega need to know quantum physics in order to predict my decision on “to one box or not to one box”?

To simplify the picture, imagine that Omega has a variable with it that can be either in the state A+B or B and which is expected to correlate with my decision and therefore serves to “predict” me. Omega runs some physical process to arrive at the contents of this variable. I’m assuming that “to predict” means “to simulate” - i.e. Omega can predict me by running a simulation of me (say using a universal quantum Turing machine) though that is not necessarily the only way to do so. Given that we’re in a quantum world, would Omega actually need to simulate me in order to ensure a correlation between its variable and my choice, potentially in another galaxy, of whether to pick A+B or B?

iPad2 Wish ..

Now that macworld is near, it is time for an iPad wish list.

I have only one item on it - and it is the addition of a wacom tablet-like stylus interface on top of the capacitive touch screen. Camera? Nope don’t need. I want a pad where I can draw and scribble with precision, flipping the stylus on its head to turn it into an eraser. Ah! That’ll be a heaven of a tablet with both touch and stylus support.

Photon Polarization

Decoherence as projection discusses photon polarization as a phenomenon that can only be explained quantum mechanically even at the macroscopic level –

“All right,” you say, “that just seems weird.” You pause. “So it’s probably something quantum.” Indeed it is.

Not so quick I think. It is true that if you do this experiment at the microscopic level with single photons you’ll have no classical explanation for it – erm classical physics doesn’t know about photons to begin with.

At the macroscopic level though, oscillating E and B fields is adequate to explain it. A polarizer projects the vectors along it’s polarization. So in the “3 filters at 45 degrees” case you get two projections. The fields are oscillating in a specific direction after passing through the first filter, say with amplitude E. When it hits the second filter, the projected component is simply E cos 45. This projected vector is now oscillating along the second polarizer’s direction. When this hits the third filter this gets projected again and becomes E cos 45 cos 45. So the final amplitude has an energy that is pow(cos 45, 4) which is ¼. That is exactly what the quantum explanation gives.

What macroscopic aspect of plane polarization does the above explanation not cover?