Immortality – A mission worth pursuing

I recently had a chat with my colleague Ben over the coffee. He discussed his mission for life and why having one is important ( by the way for him it raising children with great characters ). Frankly, although I did always had short-term goals till then but never gave any serious thought to the so-called mission of life. However, the question did keep me restless for a few nights and forced me to give serious thought about what I actually really wanted in my life. Everytime, the thought train stopped at Immortality junction in one form or another. Still, I just ignored it as frivolous thinking. Then this morning, I came across this article by Alex Pearlman and reading it somehow made the pursuit for Immortality more important for me. The first part of this article my brief critique of Alex’s post and the second is my own thought on immortality.

Please do note that these are my personal opinions and not intended to insult/hurt anyone’s sentiment. Also, as I am a neither a native English speaker nor a journalist, please forgive any errors in grammar or language constructs.

I do strongly agree with a lot of Alex’s concerns, especially regarding pro-choice and better healthcare. But I felt a lot of inconsistencies and hidden conflicts in her opinions around Immortality and its artificial connection with the rest of her concerns. If her thoughts were limited only to the political climate in the US, I wouldn’t have bothered. But some of the opinions in her article treaded into the territory of pure science and technology, which I am concerned about.

To begin with, you can’t be choosy which path science and technology would take. Since ages, humans have ventured in different unknown areas and did many questionable (both ethically and morally) experiments to satisfy their curiosity or greed. Humanity owes a lot of its progress to many such inquisitive transgressions, be it the first attempts to dissect human bodies illegally or creating the nuclear bomb. None of such developments were done with socialist ideals of sharing benefits with all or bringing equality. To heck with it, some of these were downright intended for destruction but later tamed for prosperity. Most others were to satisfy personal curiosities (Galileo, Newton, Einstein) sans any altruism or fuelled by selfish individuals/organizations with big bank accounts (think of AI boom fuelled by giants of silicon valley). Though none of them had socialistic agendas, the did bring humanity to the next level.

I believe, development is required on all the fronts, from curing polio globally to finding the cure for death (and anti-vaxxers if possible 😉 ). But enforcing a populist opinion on the rich won’t do any good. Most of them would rather spend these extra billions on some more private jets and islands rather than these humane causes which they aren’t personally affected from. Pragmatically, it would be better if they at least dump on these selfish motive, such as Immortality, which will at least brings humans as a species more nearer to its final victory over nature.

I think it’s the right time now to explain why I personally think the goal of Immortality is vitally important or why I would rather be the misguided idiot as per Alex ( although as I am neither a billionaire nor a transhuman cultist, so perhaps I have an immunity from her all criticism).

As said earlier, this is the last bastion to win over nature. I don’t know about religious people, but for me, death is a dark unknown end. Like a mother who has no surety of future or desire for the unborn inside her, I have no desire of facing such unknown end. As a pro-choice believer, I am also strongly convinced, that every human has the right over their life ( and death) similar to the way a mother has over the life in her. All effort done to achieve it either for altruistic or personal desire is legitimate. Immortality might definitely not cure the personal madness but inhibiting the active research on cancer just because the whimsical President has it wouldn’t make sense too. We might have the choice of abortion, but we are still far away from having a choice over the timespan of our own life. I don’t mean immortality to live compulsorily forever, but still, death should be my own choice, not an unwanted gift. Even from viewpoint of humanity overall, just imagine what would we achieved till now if we had people like Einstein or Marie Curie living till now? Perhaps humanity would have crossed the boundary of Universe and cured all possible diseases. All the knowledge, training, intuition, learning and ideas they had, ended.

In fact, research in Immortality needs more active research and interest. To prove this, I would like to draw parlance from my own profession (Software development). Anyone who is professionally or academically involved in this industry will have a lot of understanding about the multiple areas under this field: Web development, System programming, AI/ML etc. But to a very certain degree, we also know which areas are currently the hotbed for innovation and which are nearly dormant ( I won’t say stagnant as there is always possibilities of improvements, but I would measure the innovation on the scale of the number of unknowns.)
Just to compare, web development is nearly discovered. A newcomer can become expert following certain curriculum and best practices, experience and create awesome products (which benefit humanity). Thus this disease is nearly cured, however, its application is still under active propagation. Then there are fields like AI/ML, which have undergone multiple iterations of active research but still have lots of unknowns. Despite all hype in media, we are still far beyond in achieving real human-like intelligence.
Focusing more on it:

  • Is this field consuming a lot of research time/attention – Check
  • Are a lot of billionaires investing handsomely on it for selfish reasons- Check
  • Will it benefit humanity in the long run – Definitely Check

AI/ML might have gobbled up the resources from the other areas of research in Computer Science, but this hasn’t dampened their progress. Contrarily, they too benefit more from the active research in AI/ML. Equality is not always effective, but synergy is.

Now, compare this with active research in Immortality. It’s a goal which very far from completion. Humanity has found the cure for lot’s of diseases but nature still defeats us in the game of life. Human rights/Equality might be delivered to everyone in due course of time, but it gives us no reasons to abort the progress to find solution for something as known but as certain as death. In fact, I believe it’s the humongous goal which need to be tackled on multiple levels and layers. And what less we have achieved till now has been very hilariously detailed by Alex herself in her article.

According to me, Immortality is a combination following Trinity, in order of importance:

  • Death of death
  • Agelessness
  • Indestructibility

Death of death is definitely the primal goal. Somehow our consciousness, the identity we associate with, should survive. However, that won’t be very useful if what we survive with is a fragile, old body bedridden. So avoiding ageing in nearly as important. Indestructibility is perhaps of the toughest and most elusive of them. Avoiding any destruction to the body made of purely biological materials is too difficult. What good would be immortality if you could be mowed down by a van?

Now, let’s test out what options we have till now over these goals, and see what seems really promising. To begin with, just like Alex, I will right away discard all such funny but useless solutions such as cryonics. Might work for fishes but good luck Disney! Also these are just measure of delay not the actual cure.

Let us consider biological approaches such as genetic mutation. I sincerely believe had we not had so much ethical barricade around it, we would have already achieved both immortality and agelessness by now. There are two ways of approaching the Immortality here:

  • Eliminating all possibilities of diseases (either genetic or post birth)
  • Extension of the telomeres or the time keepers and discovering/eliminating other possible ticking time bombs in our genetics

Great progress has been made on both the ways, with claims such as curing the cancer in near future and mutating telomere lengths. As Alex pointed out, these do seem the most promising. But all the moral/ethical knots around the research in these area needs to be untied to make serious progress. Also, this approach solely won’t give us indestructibility. A minor slit in our throat or accidental fall could still kill us. Also, repair is still an issue. Unless we gain some regenerative powers too like the lizard, we won’t be able to repair any damage done to our body.

Coming to the next approach, Transcendence, or to put it colloquially as Alex, uploading your brain to the machine. I would think over it more seriously. Perhaps, might be because this is what got me interested in Computer Science first place. I always felt the possibility of uploading the human brain to machine achievable in near future. Initial research in neural networks started with mimicking the behaviours of the human neurons but later diverted to pure mathematical/statistical models suitable to our limited computing infrastructure. However, the day is not far when we will be able to unlock all the mysterious patterns of thought and memory in the human brain and emulate them in models suitable for machines. Also, till then I believe, we can take a piecemeal approach. We can look forward to taking up certain biological components, program till we can exactly replicate them mechanically. Meanwhile, we can also focus on developing artificial bodies or vessels with which our artificial selves would interact with the world.

Transcendence thus not only gives the possibility of avoiding the death, but also provides the possibility of Agelessness and Indestructibility. Our minds can then reside in vessels made of materials much resilient then biological material indirectly allowing us to live in more harsher extraterrestrial environments. We might also have some capabilities never thought of such vision/audio reception beyond currently biologically limited bandwidth. Repair would be as easy as replacing new components. It might also help us in traveling far greater distances across the universe, at least up to the speed of light from one vessel on one planet to others. It will also give rise to beautiful and challenging conundrums such multiplicity of our individuality. Moreover, in the long run, it does solve lot’s of current issues of humanity overall be it diseases, lack of space of this planet etc.
However, all such research for Immortality needs active attention, funds and infrastructure. It’s a prodigy which needs a lot of attention but has the potential of far-reaching achievements.

An Easy and Fun Guide to Redux – Intro and Immutability

Hi!

I must admit that I am quite late to the party, but I am quite enjoying my journey in React/Redux universe. One thing, however, always bugs me: most of the online tutorials about React/Redux are seems like a tour de force of all the packages, tools and concepts in the React/Redux ecosystem. Although, I sincerely respect and admire the effort they put into these but such an approach doesn’t suit me well. I believe people learn in different ways. Some prefer the whole picture approach, while others piecemeal. This guide takes the second approach. In each chapter, we build a layer of concepts, focusing on a single framework/tools or particular functionalities of it, building the foundation for the next. Also, I intend to do it in most unofficial, fun way loaded with practical examples.

In this chapter, we would be just covering the basic introduction of Redux and in-length discussion of Immutability. We will end with bare essential setup required for redux. Other than that, there won’t be any code specific to redux in this chapter. We will do that from the next chapter.

So what’s Redux?

From the landing page of redux.js.org : 


A predictable state container for JavaScript apps. 

Let’s decipher it.
A state is simply an object containing your app’s data in one place. The container is the storage where this state is kept. For those familiar with RDBMS like MySQL, container loosely equals database and state the data in it (say a row in the table). However, there is a unique restriction: State must be immutable. In our RDBMS analogy, it’s somewhat like creating a new row for each change rather than editing an existing one. Let’s detour a little to understand the concept of Immutability further.

So what’s Immutability?

Rather than bore you with exact definitions, let me explain it with the following set of examples:

Chess Vignette
Imagine if you are punished to record a boring chess game. You have two options:

  • note each move (e.g. King e1-e4)
  • take a snap of the board after every move like a lazy, spoiled brat

Of course, all of you whose childhood was disciplined by the economy of resources would go for the first option.

But you are now dealt with another punishment. After the completion of the game, you may be required to set up the board to any particular move in the game. Now, which approach of recording game do you think would have made life easier for you?

For the responsible first approach, you will have to start from an initial board each time and executing all the moves till the required one (or do some clever relative slicing of moves]. For the irresponsible second approach, you could just take out the snap of given move and set up the board immediately. It pays to be a spoiled brat sometimes.

The first approach here mutates the existing state of the board on each move, whereas the second approach gives us an immutable snapshot at every move. The immutable approach, although being more wasteful of resources, provides us with following cool benefits :

  • The capability of easily rolling back to any point in time. This is what predictability meant earlier. We can reproduce any state (for any move) at will with surety.
  • Ease of maintenance and reducing the risk of errors. There might be a possibility we record one of the moves wrong. This might cause confusion for all further set of moves. We might need separate book-keeping to add additional surety. (Most modern systems use special audit tables for this purpose, which normally keep both new and old records for each possible change, and are themselves immutable (changing existing audit record is a big NO)).

Coming back to JavaScript, let’s go through an example. Let’s say you have the following array of users, with each item containing the user’s name, email, and age. You later realized that you had entered the wrong age for the user John Galt. If mutations are allowed, you would change the age directly on the original object. In the immutable approach, you would rather return a fresh copy of users. You now need to send an apology email to this user. Thus, you need to identify him first. Below, we show the code samples for both the scenarios.

Mutable Version

let users = [
    {
        name: {
            first: 'John',
            last: 'Galt'
        },
        email: 'john.galt@whois.com',
        age: 30
    },
    {
        name: {
            first: 'Mickey',
            last: 'Mouse'
        },
        email: 'mickey.mouse@didney.com',
        age: 90
    },
    {
        name: {
            first: 'Charlie',
            last: 'Chaplin'
        },
        email: 'charlie.chaplin@hollywood.com',
        age: 129
    },
];

const ChangeUserFirstName = 'John',
    ChangeUserLastName = 'Galt',
    ChangeAge = 38;

// Following change spoils the existing object for everyone. Other users won't 
// have any way of knowing the original state.
users.forEach(user => {
    if (user.name.first === ChangeUserFirstName &&
        user.name.last === ChangeUserLastName) {
        user.age = 38;
    }
});

console.log('users', users);

// Find the changed record.
const changedRecord = users.filter(user => (user.name.first === ChangeUserFirstName &&
    user.name.last === ChangeUserLastName));
console.log('changedRecord', changedRecord);
// No way to retrieve original record now :(
// const originalRecord = users.filter(user=>user.name.first === ChangeUserFirstName &&
//         user.name.last === ChangeUserLastName);
// console.log('originalRecord', originalRecord);
// returns same record as changedRecord
users [ { name: { first: 'John', last: 'Galt' },
email: 'john.galt@whois.com',
age: 38 },
{ name: { first: 'Mickey', last: 'Mouse' },
email: 'mickey.mouse@didney.com',
age: 90 },
{ name: { first: 'Charlie', last: 'Chaplin' },
email: 'charlie.chaplin@hollywood.com',
age: 129 } ]
changedRecord [ { name: { first: 'John', last: 'Galt' },
email: 'john.galt@whois.com',
age: 38 } ]

Immutable Version

let users = [
    {
        name: {
            first: 'John',
            last: 'Galt'
        },
        email: 'john.galt@whois.com',
        age: 30
    },
    {
        name: {
            first: 'Mickey',
            last: 'Mouse'
        },
        email: 'mickey.mouse@didney.com',
        age: 90
    },
    {
        name: {
            first: 'Charlie',
            last: 'Chaplin'
        },
        email: 'charlie.chaplin@hollywood.com',
        age: 129
    },
];

const ChangeUserFirstName = 'John',
    ChangeUserLastName = 'Galt',
    ChangeAge = 38;

let CurrentDayOfBirth = null;

// Following change spoils the existing object for everyone. Other users won't 
// have any way of knowing the original state.
const freshUsers = users.map(user => {
    if (user.name.first === ChangeUserFirstName &&
        user.name.last === ChangeUserLastName) {
        // Create a fresh user record. All the key from both the existing object
        // are copied in the empty object follwed by overwriting from incoming changes.
        return Object.assign({}, user, { age: ChangeAge });
    }
    // Unmodified records.
    return user;
});

console.log('users', users);
console.log('freshUsers', freshUsers);

// Find the changed record.
const changedRecord = freshUsers.filter(user => !users.includes(user));
const originalRecord = users.filter(user => user.name.first === ChangeUserFirstName &&
    user.name.last === ChangeUserLastName);
console.log('changedRecord', changedRecord);
console.log('originalRecord', originalRecord);
users [ { name: { first: 'John', last: 'Galt' },
email: 'john.galt@whois.com',
age: 30 },
{ name: { first: 'Mickey', last: 'Mouse' },
email: 'mickey.mouse@didney.com',
age: 90 },
{ name: { first: 'Charlie', last: 'Chaplin' },
email: 'charlie.chaplin@hollywood.com',
age: 129 } ]
freshUsers [ { name: { first: 'John', last: 'Galt' },
email: 'john.galt@whois.com',
age: 38 },
{ name: { first: 'Mickey', last: 'Mouse' },
email: 'mickey.mouse@didney.com',
age: 90 },
{ name: { first: 'Charlie', last: 'Chaplin' },
email: 'charlie.chaplin@hollywood.com',
age: 129 } ]
changedRecord [ { name: { first: 'John', last: 'Galt' },
email: 'john.galt@whois.com',
age: 38 } ]
originalRecord [ { name: { first: 'John', last: 'Galt' },
email: 'john.galt@whois.com',
age: 30 } ]

Clearly, we see some immediate benefits for the second approach:

  • Original records have not tampered. So let’s say if John Galt disapproves of our change, we can immediately roll back to his original record.
  • Identifying the record which changed is super easy. This is because we now need to just check for object reference rather than delving deeper in it.

I hope these examples would have made the basics of Immutability quite clear, especially its benefits. Also, we now a better understanding of each of the cryptic terms in the terse definition of Redux and it’s the relationship with Immutability.

Bare-Bone Redux setup

I will now end this chapter with the basic setup required for our future Redux experiments.

Few key points about the setup:

  • We would focus only on the very basics of redux here. We won’t be dealing with any starter-kits, non-essential tools like Webpack or other libraries like React except some bare essential.
  • I believe you have Node/NPM already set up on your system and are familiar with common ES6 features. If not, don’t worry. Following links will get you started:

As promised, I won’t be adding loads of dependencies or tools. Only extra packages required would be those needed for babel-node. babel-node is quite similar to the node, except that it supports all missing ES6 features in node including ES6 imports. You can even avoid this and just install the redux package. You may need to do a minor modification to code samples to use Node’s CommonJS module. Just run following commands:

cd app
npm init
npm install --save-dev @babel/core @babel/node @babel/preset-env
npx babel-node index.js --presets=@babel/preset-env

Or you can pull this repository and just do

cd medium-redux
npm install

Next Chapter: Actions, Store, Reducers, and Pure Functions

Please share your valuable comments, suggestion or criticism in response, or applaud/share if you liked the article. You can also follow me for updates on future chapters.

Happy Hacking!

Vim in Action – Basic motion commands

h,l – forward, backward
j,k – up, down a line
0 – start of line
$ – end of line
w – start of next word (holds at punctuation)
W – same as w, but doesn’t hold on punctuation
e – end of next word (holds at punctuation)
E – end of next word (doesn’t hold at punctuation)
f{any char} – go to next instance of char
t{any char} – go till next char

##Reverse commands
b,B – opp. of w,W
ge,gE – opp. of e,E
F,T – opp. of f,t

##Multiple execution
{any num}{command} – run this many times
; – repeat earlier command

Hello Blog!

Get the blog running

Tools Used:

Google Compute Engine
Wordpress
Awesome Free SSL service provided by www.sslforfree.com
TODO: Quick tutorial on forwarding domain from Goddady to Google Cloud.