Skip to main content

Nuclear Gandhi in Civilization V

It seems like the developers of Civilization V once decided to store aggresiveness index of leaders in a unsigned int. And Gandhi, as the most pacifist leader that he was, was assigned lowest number 1. Also, in the game play if a society adopted democracy, the aggresiveness score was reduced by 2.

So, when Gandhi adopted democracy, his aggresiveness score became 1 - 2 = -1, and as it was unsigned int, and it gained a very high value.

#include<stdio.h>

int main(void) {
    unsigned int i;
    i = -1;
    printf("%x\n", i);
}
$ clang unsigned.c
$ ./a.out
4294967295

And thus Gandhi was ready to nuke whenever there is a conflict.

https://i.kinja-img.com/gawker-media/image/upload/s--4uHRnRfT--/c_fit,fl_progressive,q_80,w_636/dnqxrzdmsdkud7fmsqyp.jpg

S. Chandrasekhar's 107th Birthday

Looks like Google celebrated Subramanya Chandrasekhar's 107'th birthday with a doodle. I had missed it, so I got excited to go check it out again.

https://www.google.com/logos/doodles/2017/s-chandrasekhars-107th-birthday-5671696282419200-2xa.gif

The doodle is amazing! It illustrates the concept of a star when it gains 1.4 times the mass of sun will turn into white-dwarf and eventually into a black-hole!

Chandrasekhar discovered this, and it is known as Chandrasekhar's limit.

self.overEstimate

This seems like a typical my-thing. I've fallen into this trap many times. It looks people in my profession fall prey to this too.

That’s one reason I don’t miss IT, because programmers are very unlikable people… In aviation, for example, people who greatly overestimate their level of skill are all dead.

  • Philip Greenspun, co-founder of ArsDigita, excerpted from Founders at Work.

Blockchain Demo

https://anders.com/blockchain/ is the simplest, and the intuitive explaination of blockchain that I come across until now. In the very short youtube video, author leads us starting from a hashing function, a block, the concept of signature in the block, then a blockchain, a distributed blockchain, the concept of immutablity in the blockchain and the distributed blockchain, recording transactions in the blockchain, and verifying transactions in the blockchain.

Book Review: The Collapsing Universe

The Collapsing Universe: The Story of Black HolesThe Collapsing Universe: The Story of Black Holes by Isaac Asimov
My rating: 5 of 5 stars

The Good Doctor once again explains Cosmology in lucid terms. He starts off with simple premises, known facts, composes and slowly leads up to higher concepts, ultimately leading to the concept of "Black Hole". The book had a "trill" factor to it, as we discover the nature of black holes and what constitutes a black hole and how the universe might have formed.

I was "wow"ed by this book.

Some exciting learning here with this book. I learnt about the following:

I'll be a hummingbird

This is an inspiring short video. This is very relevant to me because in many projects, especially the big ones, I feel like the things are not designed well. The situation is chaotic, it's burning all the time. Most of us are like those big resourceful animals in this story. Instead, if we be the hummingbird, the experience is well worth it.

Science of Abstractions

Fundamentally, computer science is a science of abstraction — creating the right model for thinking about a problem and devising the appropriate mechanizable techniques to solve it. - From a Ullman book.

Abstraction is not a complex concept. And abstraction in the sense we use it implies simplification, the replacement of a complex and detailed real-world situation by an understandable model within which we can solve a problem. That is, we “abstract away” the details whose effect on the solution to a problem is minimal or nonexistent, thereby creating a model that lets us deal with the essence of the problem.

Computer Bugs - Roundoff Error and the Patriot Missile

0.10

  • During the Gulf War in 1991, a U.S. Patriot missile failed to intercept an

  • Iraqi Scud missile, and 28 Americans were killed.

  • A later study determined that the problem was caused by the inaccuracy of the binary representation of 0.10.

  • The Patriot incremented a counter once every 0.10 seconds.

  • It multiplied the counter value by 0.10 to compute the actual time. However, the (24-bit) binary representation of 0.10 actually corresponds to 0.099999904632568359375, which is off by 0.000000095367431640625.

  • This doesn’t seem like much, but after 100 hours the time ends up being off by 0.34 seconds—enough time for a Scud to travel 500 meters!

  • Professor Skeel wrote a short article about this.