Friday, May 11, 2012

Stack Exchange

Alright. I haven't been posting in a while, but I decided to take some time out today and post something.

Let's talk about a new discovery of mine. Stack Exchange .

StackExchange is a growing network of question-and-answer sites. Well, there are lots of those, aren't there? But SE is quite different from the rest. For one, it has a much better user base. Civility is maintained, and you can expect quality answers to quality questions. Also, it has a more "community" feel, like Wikipedia.


I started off on Physics.Stackexchange with a few questions of mine, and gradually began to like the site. One thing that's great about the site is that you can learn a lot while posting answers. Many times, you think you understand something, but you don't, not really. Thoughts are a jumbled mess and it's always hard to analyse them. On the other hand, the moment you try to put your thoughts into writing--well--then you learn about your own confusions. Teaching others is a great way to learn stuff yourself; the fact that you are trying to make others understand something mandates that you yourself understand it first. Also, others have different ways of thinking, and can lead you to exploring new avenues of thought. I haven't asked many questions  on P.SE (17 to be exact), but I've given tons of answers. And I do feel that my physics has improved a lot after joining. And I've had fun as well, for example while writing this answer and this answer .


Recently, a new site opened. Chemistry.SE. I'm pretty excited about this one as well, and I'm hoping the site flourishes. If you have any Chemistry questions, please ask them there! Though try to make them good questions. "Why does Coke and Mentos explode?" is not a good question.

Saturday, February 4, 2012

Inheritance and wave-particle duality

I read Inheritance a few months ago. While reading it, I noticed a sentence which appeared to be a reference to wave particle duality and the atomic theory of matter. Anyways, I asked Paolini (the author) about it, and he confirmed it. (I learned this today, I hadn't checked my Twitter account for weeks).
Isn't it great that Paolini, an amazing author, is interested in physics, too?

Here's my full explanation of the situation (Copied from my post)

.....
I'm rather surprised by this passage from it:
(This is on the flight back to Urû'baen, when Valdr tells Eragon and Saphira about the starlings' dreams)
"From him, they received a vision of beams of light turning into waves of sand, as well as a disconcerting sense that everything that seemed solid was mostly empty space."

At first, I interpreted the second part as "Not everything is as hard as it looks".
But I couldn't make any sense of the first one.

Then, I remembered something from Rutherford's experiment. "Atoms are mostly empty space". I didn't like this connection (Why would Paolini mention that ?), but then, the allusion to subatomic physics made the first sentence crystal clear. It refers to wave-particle duality, i.e. the fact/theory that light is both a continuous wave and a bunch of particles

I know, it's unlikely that CP would mention such things, but he has mentioned lots of scientific stuff before (coral, etc.. can't remember it off the top of my head, need to reread the first three books).
Also, <spoiler alert (If you haven't read Inheritance yet)>
the explosion at Vroengard (By Thuviel), and at Urû'baen (By Galbatorix), are both probably nuclear (as the sickness that Glaedr mentions is very similar to leukemia). So maybe, after all, CP did refer to waveparticle duality/atomic theory.

Thoughts?
....


Sunday, January 8, 2012

Problems with SETI

Note: This is an essay I wrote a long time ago, just for fun. This was when I had read Contact, and was pretty enthusiastic about the whole SETI thing.


All of us have wondered, at some time or the other, whether alien lifeforms exist. Indeed, our scientists have been so fascinated with this subject that we have a massive collection of programs, known as SETI (Search for Extra-Terrestrial Intelligence) which all have the sole intention of finding life outside Earth. This effort has been applauded by the world, but, if you think about it, we are really shooting in the dark here.

Most of our assumptions are that the aliens we are trying to contact have the same brain system as ours and communicate the same way we do.
Now, if you look at it, every method of communication we know is pretty much a product of our senses:

  • EM Waves: EM waves are those waves which are part of the Electromagnetic spectrum.  Radio waves are a part of electromagnetic (EM) spectrum, which includes light (visible) waves, infrared rays, X-rays, micro waves, and Gamma rays. Now, we know about these waves, because of light, which we can see. If we couldn't see light, then we probably wouldn't know about the EM spectrum. How are we sure that the aliens aren't blind? Lets assume that they see EM waves. Now, a reasonable argument would be to use light waves to communicate, as the stars emit light, and intelligent aliens must be aware of that. But not all stars emit visible light. There are entire galaxies which emit very little light, but a lot of X-rays or radio waves, like Cyg X-1 (X-rays), and Cas A (Radio waves). So, we could use other waves (like radio waves, which we are currently using). But, other waves are obstructed by different things, like our atmosphere. Similarly, we can't be sure if radio waves penetrate the alien's atmosphere. And, anyways, we can't be sure that they are even listening on the same frequency that we do. For example, they might have discovered a better range of frequencies to communicate with which aren't so problematic, and would think it childish to use radio waves, which would be inefficient in their eyes, just like we won't use sound to communicate with aliens, as sound is too inefficient (In fact, it dies out almost immediately after leaving the atmosphere.
  • Sound Waves: We know of these because of our hearing. These work well on earth, but, they need a medium, so are useless in space.
  • Objects: We assume that the aliens have the same senses of perception when we send objects with engravings into space. Even if they did have the same senses, these things take hundreds of years to get anywhere useful, and they are obstructed easily.
  • Gravitational waves: We perceive gravity through our senses, but this is only because of some tiny organs located in our ears. Even if we didn't have these organs, we could perceive the effects of gravity, like apples falling. Through Einsteinian mechanics, we know of the existence of 'gravitational waves'. Just like moving an electrically charged body produces EM waves, moving a massive (By 'massive' I mean 'has mass', but the other meaning 'has a lot of mass' is also fine in this case) generates gravitational waves. These are ripples in the fabric of space and time, which cause stretching and squeezing of objects. These are observed in significant quantities around spinning black holes. Unfortunately, we can't produce these, let alone form a message out of them. We even used to have problems detecting these, as we couldn't build detectors with enough accuracy. Now our interferometers do  good job of detecting them, but they're still not perfect and can only detect large changes. To catch a gravitational signal would require either a very strong signal, or a much much more sophisticated detector.

These are the ways of communicating which we know of because of our perception. Now, if extraterrestrial lifeforms existed, how do we know that they have the same perception as us and 'see' the same things, and thus know about the same methods of communication?
Now, this logic does not apply to all the methods of communication we know. There are some which we could use, but they all have large flaws:

  • Particles: Particles like neutrinos are ideal for communication, as the pass through matter easily (Millions of neutrinos pass through your body every second, but they are harmless.) . These could be used, but the signals would die out if they had to pass through any large body in space, of which there are a lot.
  • Quantum teleportation: As exotic as this name sounds, it, unfortunately, isn't anything like the teleportation in movies. It just refers to the transfer of information faster than light. This would be very useful when communicating with aliens, but for this to work, the two parties wanting to communicate must exchange a pair of 'entangled' particles (These are particles which are like the sender and receiver in quantum teleportation). So, we need to know about each other and exchange some stuff in order to use this.
  • Wormholes: These are spacetime structures where space curves in on itself and connects two points in space, creating a 'tunnel' through space, with which one can reach their destination almost immediately. Now, we do not know if wormholes actually exist, but, if they do, we are sure that they form and immediately are destroyed. We know how to keep one alive if we ever find one, which is by 'threading' it with something called 'exotic matter'. (Exotic matter has negative energy, which sounds paradoxical, but, it exists, in the form of 'vacuum fluctuations') Even then, we do not know how to do the 'threading', and, if wormholes exist, finding one is very hard, let alone finding one which has the exit end near an alien habitat. There are ways of making wormholes, though, but one of them requires 'tearing'the fabric of spacetime, and the other, though easier, is still impossible for us.
  • Tachyons: These are hypothetical faster than light particles, which would be ideal to send out as a message. The problem with these is that they allow you to send a message backwards through time, which means that they (most probably) do not exist...


As you can see, none of these are too feasible as of now.


Another one of our assumptions is that these aliens think the same way we do. This is a necessary assumption, otherwise, we would not be able to figure out what messages to send.
We assume that they use the same logic/ mathematics as we do. Many messages make sense only in binary or base ten, when the aliens might be using ternary or some other base to communicate (they might have 17 'fingers', or they might have figured out an efficient way to send messages with three or more states--'on1','on2', and 'off'--this could be achieved through quantum computing). We also assume that they would do stuff like:

  • Order the periodic table the same way we do.
  • Have the same fundamental units as us (We think that length mass, and time are fundamental units. They could equivalently use density, pressure, and force; or speed, energy, and power). This changes the significance of universal constants like the speed of light, Planck's constant, etc.
  • Have the same physics as we do. It is very, very likely that they are atleast a few millions of years more or less advanced than us. Their physics could make our physics obsolete. They might scoff at the idea of quantum mechanics, just as we scoff at the 'indivisible atom', and the 'ether'.
  • Have the same logic/intuition as us. (Our logic is based on certain rules which cannot be derived from each other. Their set of rules might be the same.)

This makes it hard to create a message that will be recognized as a 'message' and not as cosmic garble.


(Before you read the following, keep in mind that this is my viewpoint...)
SETI scientists are also constantly searching for planets which would harbor life like ours. In their definition of 'life', they are looking for cellular organisms which would survive in the same conditions that we do. What they've forgotten is this: Life on our planet must have evolved atleast three times.
Yep. Before we go any further, think about bats, birds, and pterodactyls for a moment. Bats are winged creatures, but they are almost like rats. Even their wings are basically webbed hands. Similarly, pterodactyls and birds aren't too similar except in the wing structure. By the theory of evolution, one could say that somehow, pterodactyls (and other winged dinosaurs) evolved into birds, and went extinct. Some of the birds later evolved into bats. But, bats are so much like rats that they must have evolved from them, too. Then where do we fit the rats in the evolutionary tree? The answer lies here: How about if wings evolved thrice in the progress of evolution. Some dinosaurs got wings, then eons later, some other creatures got wings, and also the ancestors of rats got wings. After all, wings are very useful appendages. It wouldn't hurt for them to be created through evolution thrice.

Just like that, life is a very 'useful' thing. And, if you think about it, the first cellular life evolved quite quickly, before the earth even got a chance to cool down. This makes one think. If life evolved once, couldn't it evolve again? Now, there are currently (this is my view, please restrain those firebrands) three types of life resident on earth. One is normal, cellular life. Now the other two are.....viruses and prions. (Prions are kinda like viruses, but there's no RNA in them--they're entirely protein. Mad cow disease is a prion disease). But, many people argue, that viruses require cellular life to reproduce. I could argue back, "Cellular life requires food, sunlight, etc. to reproduce". The definition of life is (pretty much) something which grows, reproduces, etc., etc. But these things are all done with the help of an environment, anyways. Viruses evolved after cells (most probably), so one could say that cellular life is the environment for viruses. Same argument for prions.
Also, there is a widespread theory that there might have been other forms of life formed before of after cellular life. They could still be here, hidden away in something known as the 'shadow biosphere'. After all, many of our cellular organisms are hidden away (for example, the botulism organism--where you get botox from-- cannot survive in oxygen. It hides in places like deep soil)

All in all, alien life might (Actually most probably) isn't like our normal cellular life. So really there's no reason to search out a planet and label it as "could harbor life". The only use of doing this is if we want to find a new habitat for ourselves.


In conclusion, I just want to say one thing. However much I shot down SETI's methods up above, they are still the best things one could do. After all, we know nothing about these 'aliens' of ours, so the best way to find them is to hope that they are like us (which makes stuff plausible and infinitely easier). Three cheers for SETI!!!
For those alien hackers who are reading this, I will be happy to oblige with a translation into mathematics.
-Manish Goregaokar
(Somewhere on) Earth, Solar system, In Orion Belt of Milky way Galaxy, Opp. Andromeda Galaxy, Local Group, Virgo cluster, This universe,11-brane,Multiverse,Creation.


Summary of this essay in one comic:http://xkcd.com/638/

Monday, January 2, 2012

Undefined=5

One day, I shall write a JavaScript library and include this line in it:
var undefined = 5
For those of you JavaScript buffs, you must have realized that this will break almost every sufficiently large JavaScript code in eternity without causing any compiler errors.

For those of you who don't know JS, take the time to learn it! It’s actually quite fun to learn.

And the reason why the code will break it is simple, if not a bit weird:
JS has two types of null values: null and undefined. Null is an actual object, kinda like NaN. You can call it and have no problems. Undefined, on the other hand, is nothing (not even a keyword). I can even type undefined=2 and have no errors. Now, JS, with the == operator, can't distinguish between the two. As in, window.blahblah==null returns true even if window.blahblah is not defined . But, JS has a wonderfully quirky operator known as the identity operator. This guy can tell the difference between null and undefined. Eg:
var poopy //gets a psuedo-default value "undefined"
return poopy===null //Will return false. Poopy is not null, it is undefined
It will only return true if you type poopy=null at the top. The reason for this is that == compares objects, typecasting them if necessary (so undefined is typecasted to null), while === preserves type and compares.

Now, as I showed, using window.blahblah==null won't tell you if the property is deliberately set to null or just not defined. Unfortunately, when developing frameworks which fit into larger applications, you don't have control over the rest of the code, but you still have to interact with it. Which means checking for undefined values becomes crucial. In that case, most people do this:
var undefined; //declare a variable which is not initialized
return poopy===undefined // check if poopy is in the same state as the undefined variable, i.e. uninitialized
This would work even if I didn't call the variable undefined:
var bloopy
return poopy===bloopy
But, JS programmers are obstinate fellows who always use the first method.
Now, if I type var undefined=5 in a JavaScript framework, all other code which uses the above trick won't work. Why? Now, the variable "undefined" is no longer undefined (i.e. uninitialized), and the program returns the exact opposite value that it should. Since checking for undefined values is quite essential in asynchronous scripting, this can make the scripts do unexpected things.

Kablooey.

PS: If anyone here is working on a large framework, please, please type var undefined=5 somewhere in the code. And make sure your code doesn't use undefined for checking for initialization. There you have it. Your code will be the only one that works when combined with other (sufficiently large) code.
Neat, huh?