Saturday 4 July 2015

The Luxury of Homosexuality

A wave of happiness swept through the world as people celebrated the decision of United States Court to legalize homosexual marriages. People were happy as this marks a significant step forward in the freedom in living their lives.

The biggest relief must be to the people who have always loved someone of the same gender, wanted to spend life with them, but the world (legal system) did not allow them to. They have had to hide their feelings, face awkward questions and situations. Those are the people who will be ecstatic, as if the doors of the cage are now open.

There has been a lot of debate since ages regarding homosexuality. Religions have called it a sin. Men and women have been punished to death for being homosexual. It is unnatural even today to major populations around the world. Why is that? I have tried to analyze it from a scientific perspective.

Earth formed approximately 4 billion year ago, and the first forms of life, appeared approximately 2-2.5 billion years ago. Life initially appeared as single celled organisms, and through a very long and complex evolution process has able to reach to the peak of their perfection - humans. It is fascinating story of what began as a single cell millions of years ago has evolved to a highly intelligent life and dominates the earth now.

As we think about how life originated, the one thing that comes to the mind is - reproduction - continuation of life. Life on our planet has always had a finality to it, organisms didn’t live forever and were bound by a lifespan. But every organism had a innate desire to live forever. But since it could not, nature allowed them to cheat, and pass on whatever they had to another life form before they could die. This cheating is known as reproduction.

As we think about it, reproduction, in the most trivial way, is a way to ensure survival of one’s knowledge/information with the passage of time. Reproduction throughout the ages has evolved from asexual reproduction (no partner required) to sexual reproduction - one that required male and female species to produce an offspring. But the underlying concept hasn’t changed. Reproduction is a method that ensures the survival of species and the information it accumulated with the passage of time.

Information does not mean Math or Science. In its truest forms, information is the cell structure, the DNA. When wolves produces an offspring, it ensures that however nature evolved them to being a wolf, that DNA, that cell structure, continues to produce another wolf. Reproduction allows an organism to replicate evolution. That is how life flourished. Even the flora has the same concept, the fruits that are produced bear the seeds of life. It is a beautiful thing if you think about it, reproduction is a short cut to produce something that took millions of years to evolve, and it is woven into the fabric of life here on Earth.

Now, let us jump back to homosexuality. What is the only thing a homosexual couple cannot do? Reproduce. Sure, they can live a life together, cook together, have sex, enjoy trips, grow old together. But biologically, they cannot reproduce. Do you see now, that is the violation of the principle of evolution right there. Sure, there is a slight amount of homosexuality observed in some species, but that does not mean they do not participate in the process of reproduction.

But we, as humans, are different from the other species on our planet. We are able to create complex thought patterns, emotions, which makes us truly special. In a very short span of time, humans emerged as the dominant species on earth. We were able to tame domestic animals, defend against and restrict wild animals, and were able to rule earth. We learnt, created new things, thought new things, and created the society we knew today. Today it is much more than - eat, sleep, reproduce. We have a complex way of living life woven around these basic parameters of life.

Earth’s population today is 7 billion, and it was always in millions since we have a history. Accounts of homosexuality have been found across the history, it is not a new phenomenon. We have the concept of emotions and freedom. When a man/woman wants to live with another man/woman, what is wrong in that? Sure, they cannot reproduce. But who needs that? “There are so many people in the world anyways.” That single statement, is why, homosexuality can be tolerated now.

There is so much population right now, humanity has surpassed the point of extinction. It is very hard to make humans extinct right now. So, once our basic needs to survival have been fulfilled, the mind can think in other directions. It does not need to constantly think about reproduction, as our priorities do not include the survival of our species.

So, in my view, homosexuality is a luxury that humans can afford. As we have surpassed our needs of evolution, we can afford a few emotional luxuries. It is the moral right of a man and woman in today’s world to live as they want to. That is the freedom, the luxury that humanity can afford right now. I think we have earned it as a right of evolution, by being very intelligent, by making sure that a handful of people who do not reproduce will not make any difference to the survival of humanity as a whole. From an emotional perspective, I feel that right to think and feel is the biggest right that humanity has gained. There is nothing wrong in two people who want to live together, no matter whatever be the gender.

So, rejoice people. Your cage is now open. But let me present you with a situation. Suppose, for some reason, there is a catastrophe on Earth. And all the humans couldn’t survive, expect for one gay male and one lesbian woman. Will they reproduce? I think the answer is yes, because at that time, they cannot afford to be homosexual.

Saturday 4 April 2015

The Hidden Costs That Engineers Ignore

Link: The Hidden Costs That Engineers Ignore

Complexity - be it of any kind- drastically effects your software. Researching on how to cut down complexity is very important for any company.

Sometimes it makes sense to spend more time on design. Building software in blocks always helps, as it has the chance to scale up exponentially. Everything should be thought as loosely coupled modules talking to each other over an interface, sounds easy, but lot difficult while implementing.

If this basic principle is kept in mind while starting to develop software, we can minimize the complexity that hogs down the entire system as things go uphill in the future.

Very nicely summarized in this article.

Monday 23 March 2015

Creating a startup is very similar to Frodo’s journey. You need a good co-founder like Samwise Gamgee, and good faith from the investors like The Fellowship.

It is a long and tiring journey, and the pressure is enormous. Too many people, the elves, dwarves, hobbits and men look up to you to do the right thing. You may want to give up several times. Infact, when you are so close to the finish line, you may feel like backing out. But in the end, the ones who persist, like Frodo did, end up being successful.

So next time you think you can have your own startup, ask yourself this, can you be Frodo?

Monday 12 May 2014

Increase the Battery Life of your Android Phone

We all love a fancy android phone right? But the problem with all the phones is that since they do too much, they have a very short battery life. The problem has worsened with the arrival of apps like Google Now and Google Services which constantly ask your device for a location and keep it active all the time, even if your phone is locked away.

I am telling 4 ways in which you can increase the battery life, based on the level of hacking you have to do to get it done, please read the gotchas before proceeding. If you apply any particular step and find it useful, please share it in the comments. Would be happy to know the tricks are working.

Turning off useless syncs

Information

Google syncs your account information in the background and this increases data usage as well as eats your battery. Not all of the information is required to be synced in the background, you can turn off the non-essential syncs to gain battery life.

Steps

  1. Go to Settings > Accounts > Google
  2. Here you can see everything Google is keeping in sync burning your precious battery, turn off anything you are not using or do not require to be up to date

Gotchas

For example, for an average user, I think only Gmail, Calendar and Chrome matters the most, rest of the things like Google+, Google Photos, Google Playstand, Contacts, Music etc. can be turned off safely. Dont worry, they will get updated when you open those apps, its just that they won’t be running syncs in background.

Turning off Location services

Information

Google keeps a track of everywhere you go by something known as Location Services. It uses your WiFi and your mobile data connection to give you location based services, and it tracks your locations even if the mobile is asleep, giving google a step by step history of where have you been, how much you have travelled etc. To know how much Google knows about you, login to Google Location History and surprise yourselves. Apart from the privacy concerns, Location Services uses a lot of battery.

Steps

To turn off Location syncs, do the following steps:
  1. Go to Settings > Location
  2. Turn off Location access

Gotchas

The downside of disabling Location Services is that apps using Location access would not work now, Google Now would be crippled, apps like Facebook, Quizup etc. would not be able to get Location access. Please do not do this if you want to continue getting Location services in your apps at the expense of battery.

Installing Xposed Framework and revoking wake up permissions (requires root)

Information

Ok so this is a little complicated than the previous methods, and for this you will require a basic knowledge of how things work in Android.
 
When you lock the phone screen, Android goes into a sleep state, where it shuts off the processor to a very basic configuration required to just keep the phone on. Battery consumption in sleep state is almost minimal, but the problem is that, apps do not allow the phone to remain in the sleep state, and have a permission to wake up the phone - something known as a wakelock.

These wakelocks consume a lot of battery life, since they continue to eat mobile battery even when your mobile is asleep. So the solution is to disable all those wakelocks. Unfortunately, android does not simply allow you to do that, and for that you will have to root your phone to gain special permissions in order to do it.

Steps

Just google ‘how to root xxx’ where xxx = name of your device and you will get a step by step guide of how to root your phone.

Once it is rooted, follow the steps below:
  1. Download Xposed Installer
  2. Go to Installer > Install/Update and reboot your phone
  3. After the reboot, go to Xposed Installer > Downloads and search for Per App Hacking and install its latest version
  4. Once installed, go to Xposed Installer > Modules and enable the module
  5. Open the Per App Hacking module and search for Google Play Services and Google Search, tick the prevent wake lock option
What we are basically doing is that we are removing the ability of the apps to wake up your device. You can do this for all apps that you think are not required when your phone is in locked state. In normal usage, I think all apps except Instant Messaging, Email and Calendar apps can be turned off. This will save you a lot of battery.

Gotchas

Note that this method can void the warranty of your device and you have been warned. But you can safely restore the warranty by unrooting it, steps available by googling it.

Installing Cyanogenmod (requires a little hacking)

Information

Ok so this is the extreme step - installing another Operating System all together on your phone. This is for all those people who have been denied Kitkat update by their manufacturers and want to experience the fun of some android hacking.

When you buy a phone, your phone comes with some modified version of android. Depending upon the manufacturer (e.g. Samsung, HTC, Sony etc.) you may have a number of apps that are not required for the pure android experience the kind of given by Nexus devices. Even people with Nexus devices can install this for the level of customization offered by this OS.

Cyanogemod is an extension of Android Open Source Project (AOSP) and they are one the largest group of developers trying to bring the pure and latest android experience to the android community. There are many other operating systems available as per your device, but this is the most famous one and most widely used one with developer support.

Steps

You can follow the steps given on the official Cyanogenmod website on how to install cyanogenmod on your device.

Once installed, follow the below steps:
  1. Go to Settings > Privacy > Privacy Guard
  2. Click on Advanced at top right corner of the screen
  3. Select any app you want and disable the permissions: Keep Awake and Wake Up
  4. You can also remove other permissions like Location etc. based on your privacy concers
This method gives more flexibility than the Xposed framework as you can disable the individual permissions of the app that you think are not required for the normal functioning of the app. This also solves your privacy concerns.

Gotchas

Installing custom OS can void your warranty and can even brick your phone if not done carefully. That said, please proceed at your own risk. I will not be held responsible for anything that happens to your phone.

Also, installing a custom OS may stop some of the functions of the phone, please read very very carefully about the known issues before installing. Usually you can find the known issues on the developer pages.

Conclusion

Whoa!!!! That were a lot of steps. If you follow any steps and find the results interesting, or even have some better solutions, please share it in the comments.

The inspiration behind all this hacking was the announcement of Samsung that Kitkat won’t be coming to Samsung Galaxy S3. So I installed Cyanogenmod and kept discovering all this. Here is the screenshot of my battery life:


Previously I used to get to 50% in 13 hours with 2-3 hours of screen time. Now I can remain at 70% using the screen time since at the rest of the times, my device remains in the sleep mode and there is minimal battery consumption. Note that my wifi was on majority of the time and the phone was awake only when sceen was on. Proven results.

If you have any doubts, please feel free to comment. Happy Hacking !!!! Thanks a lot to Cyanogenmod community, XDA Developers Forum and Reddit.

Saturday 16 November 2013





How Amazon enables businesses that cross multiple layers.
New startup economics: Why Amazon (web services) and Dropbox need each other
Om Malik, gigaom.com

Earlier this week, I stopped by at the offices of Dropbox, the San Francisco-based online storage and syncing service. It was quite amazing to walk through the company’s sprawling offices — the company now employs about 470 people. Five years ago,…