Who are we? (Part II)

In the previous post I tried to convince that we are not the data that is stored in our brain – we are actually the matter that composes it. In this post I’ll try yet again to convince that this is not entirely accurate.

The human body , and essentially every body of a living creature is an incredible machine, shaped by natural selection through millions of years of evolution. it is made out of billions of cells of different types and each of them is an incredible machine in its own right. Every cell in a living body is made of various substances and molecules – fatty acids, proteins, water molecules and so on. Our brain is also no exception, each cell that’s part of the organ we call brain is made of the same materials. So following the logic from our previous post , we are actually the molecules and substances that composes our brain. True? not quite.

As most of us know, the most important molecules in living cells are DNA, RNA and proteins. Proteins are the workhorse of every living cell, they are the ones that make life possible – from harnessing the energy that is stored in glucose (the fuel we all operate on) to replicating the DNA that contains the instructions used to create them in the first place. Without proteins, our cells are nothing but micelles with some DNA strands in it. Proteins in the cell are constantly built and destroyed – there are some long living proteins, but most of them have a life span of several hours to several days. The molecules that composes the proteins, fats and water in each of our cells don’t stay at one piece for long. When proteins are degraded by a process called Ubiquitination , they are cut down to their most basic components – amino acids. One can imagine the process as taking a car and disassembling down to the smallest screw and cable.

So the question that arises – it is clear that the matter, the atoms and molecules that composes the cells that in turn compose our brain are constantly replaced , what stays constant is the structure (or, the information content) of these cells and their connections to other cells in the brain. The molecules and might be replaced and changed , but the structure and function generally isn’t.

So we’re clearly having a paradox here – what is consciousness anyway? is it the information that is stored in our brain? (that is defined only by the structure of our brain) or is it the matter that composes it? This paradox is closely related to a paradox/story called The Ship of Theseus and has several interesting solutions. In future posts I’ll elaborate about some of them.

Thanks for reading! :-)

 

 

Posted in Philosophy | Leave a comment

Who are we? (Part I)

I love science fiction. A good science fiction book is very hard to find those days – most  of them have nothing to do with science – sometimes the authors mix fantasy with scientific concepts, sometimes the story line is just futuristic and that classifies the book automatically as science fiction (in some publications…) , although, again, it has nothing to do with science.

A good science fiction story has the ability to introduce new ideas that are based on real science , you know you’re reading a good one if once in a while you find yourself thinking ‘gee.. this idea may sometime in the future become a reallity’ and indeed, Throughout the years , science fiction was (and probably still is… ) the force that drove scientists to make these ideas a reality. Remember Jules Verne’s novel From the Earth to the Moon? this story was written almost 40 years before the first man-made machine took off, and more than a 100 years  before an actual journey to the moon took place. Talking about influence, what about the people who came up with the idea to actually create the Starship Enterprise from Startrek?

Not long ago I read John Scalzi’s great book Old man’s war . The story revolves around an old man trading his old age for youth + a service in the army (CDF). The service apparently is very dangerous – and the protagonist finds himself fighting all sorts of aliens all over the galaxy. The book is a great example of good science fiction – the author portrays a futuristic world that is very ‘real’ – every concept has a solid scientific background behind it. For example – the BrainPal is a brain implant that is suppose to enhance the capabilities of the human mind. Characters in the book use BrainPal to share battle plans, look for the nearest friend, watch cartoons and even translate alien languages.

One idea , in which the protagonist consciousness was ‘transferred’ from his old dying body to a new , young and enhanced one, got me thinking , and still is. Will it ever be possible to transfer your consciousness to another body?

Assuming we are nothing but matter (there is no such a thing as soul), our brain is essentially our consciousness. Our entire being is stored in those billions of connections formed between neurons in the brain , so in order to transfer our consciousness to another body we have to have an ability to read the data that is stored in these billions of connections. Now although it is impossible to do so in our present day, let’s pretend we do have the ability to do just that – does it really means we have the ability to  transfer our consciousness or just copy it to another hard drive? Note the difference; When you move your consciousness to another body, you are still yourself, only wrapped in a different package. You will probably experience the whole process as going to sleep and waking up as the same person in a different body. If you copy the data stored in you to another brain, well, you just create a copy of yourself that has the same memories , way of thinking , etc – but clearly, this copy is not you.  So conclusion is, reading the data from our brain, copying it to another body isn’t quite the same as implanting the brain in another body, leading to the conclusion - we are our brain , without it , we are dead. In the book, the CDF doctors that were responsible for the mind transfer process disposed of the protagonist ‘old’ body, the body was described as ‘brain dead’ and useless after the mind transfer. So clearly, I find this process to be impossible. You may still be the same person to everyone around you , but ‘you’ , the original you, will be dead nonetheless. In the book the protagonist experienced several minutes in which he felt he was ‘in 2 bodies in the same time’ –  again, impossible by the mechanism described in the book, at least.

Answering the original question – will we ever be able to transfer our consciousness? I think the answer is – not in this way. Since we are our brain, the only way to actually move to another body, is to transfer the brain itself. Any other method that involves copying data from the brain is not a consciousness transfer – once your original brain dies – you die ( Although, your relatives may not notice you are gone … :-) )

So if I convinced you that we are nothing but our brain, the grey goo that inhibits our skull, let me convince you in the next post – that we are more than the matter we call  brain :-)

Posted in Philosophy | Leave a comment

Overide eclipse default delete and rename commands

I think I found a bug in eclipse, more accurately, in the integration between the common navigator and the GMF diagram editor. The bug goes like this, when you delete an open diagram from the navigator, the editor doesn’t close and is no longer synced with the file system.
In order to overcome this issue, we had to override eclipse default delete and rename (it also happened when renaming a diagram..) commands.
It turns out the solution is pretty simple – just define some new handlers to the already defined commands:

    <handler
          class="your.package.OverridenDeleteHandler"
          commandId="org.eclipse.ltk.ui.refactoring.commands.renameResource">
       <activeWhen>
          <iterate
                operator="or">
             <and>
                <instanceof
                      value="org.eclipse.core.resources.IFile">
                </instanceof>
                <test
                      property="org.eclipse.core.resources.extension"
                      value="ext">
                </test>
             </and>
          </iterate>
       </activeWhen>
    </handler>

Here we declare a handler that overrides the “rename resource” command from Eclipse Language Toolkit (ltk) – this is the command that’s usually responsible for renaming a resource application-wide. In order to override the delete command, simply use the “org.eclipse.ltk.ui.refactoring.commands.deleteResources” commandId. Also, you can be more specific with your implementation by testing the extension of the file.
In the rename handler, I simply check whether the corresponding editor is dirty:

package my.package;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.IShellProvider;
import org.eclipse.ltk.internal.ui.refactoring.actions.RenameResourceHandler;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;

import my.package.MessageBoxDecorator;

public class OverridenRenameHandler extends RenameResourceHandler {
     
     public Object execute(ExecutionEvent event) throws ExecutionException {
          ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
          if ( !(currentSelection instanceof IStructuredSelection)) {
               return null;
          }
          IEditorPart activeEditor = HandlerUtil.getActiveEditor(event);
          if ( activeEditor.isDirty() ) {
               MessageBoxDecorator.showErrorMessage("Rename resource", "Please save your work prior to renaming the resource");
               return null;
          }
          
          return super.execute(event);
     }
}

The Delete handler is a bit more complicated, we actually need to check whether the editors of the deleted resources (of course, you can delete several resources at once) are open:

ackage my.package.commandHandlers;
import java.util.ArrayList;
import java.util.List;

import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ltk.internal.ui.refactoring.actions.DeleteResourcesHandler;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.ide.ResourceUtil;

import my.package.editors.MyDiagramEditor;


public class OverridenDeleteCommandHandler extends DeleteResourcesHandler {
     
     public Object execute(ExecutionEvent event) throws ExecutionException {
          ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
          if ( !(currentSelection instanceof IStructuredSelection)) 
               return null;
          IResource[] selectedResources = getSelectedResources((IStructuredSelection) currentSelection);
          if ( selectedResources == null || selectedResources.length == 0 )
               return null;
          //maintain a list of editors that need to be closed
          List<IEditorPart> editorsToClose = new ArrayList<IEditorPart>();
          for (IResource res : selectedResources) {
                    if ( res instanceof IFile ) { 
                         //get the diagram editor for this specific resource
                         IEditorPart editorForResource = DiagramUtils.getEditorForResource((IFile)res);
                         if ( editorForResource == null || !( editorForResource instanceof MyDiagramEditor ) )
                              continue;
                         editorsToClose.add(editorForResource);
                    }
          }
          super.execute(event);
          for (IEditorPart iEditorPart : editorsToClose) {
               IResource resource = ResourceUtil.getResource(iEditorPart.getEditorInput());
               
               if (resource.exists())
                    //the user clicked cancel ... no other way to verify it with the current crappy implementation, unless we want to rewrite the whole class
                    continue;
               
               if ( iEditorPart instanceof DiagramDocumentEditor )
                    ((DiagramDocumentEditor)iEditorPart).close(false);
               else
                    iEditorPart.getSite().getPage().closeEditor(iEditorPart, false);
          }
          return null;
     }


}

Hope it will help someone in the future, I sure wasted half a day on that ..

Posted in eclipse, technical | Leave a comment

I’m a builder (or why I left the academy?)

In the last few months I started to see a lot of posts from people who left college / grad school to work on startups or even study by themselves. This is my story – why I left the academic world to start my own venture.

It all began a few months ago when my professor called me to her room one morning, at the time I was well into the last year of my MSc degree (In my country it is customary to complete a Master’s degree before proceeding to a Phd) and was really confused about my future. The conversation began by reviewing the progress I’ve made in the last 2 years and how she was satisfied with my work , etc.. and then she popped the question – would you like to continue your studies as a Phd student under my guidance?
This question didn’t come as a total surprise. I was expecting it for a while, but wasn’t sure whether my professor would actually ask it explicitly. Although I really like the field, my research project and I am a huge fan of the scientific method and scientists in general – the answer came out very easy – “I’m sorry , but I have other plans”, and although it was easy to say it at the time – reaching this answer was one of the most difficult contemplation in my life. There was a time when I really wanted to follow an academic career – but that was before I realized something very fundamental about myself – I’m a builder.

You see, when I look at my friend and colleagues – both from the academia and  the industry I see that all of them can be placed in a spectrum that has a builder on one side and a researcher on the other side. People in the academia are usually closer to the researcher part of the spectrum – they are fascinated by the way nature works , they are thrilled by making discoveries, expanding the boundaries of human knowledge.

On the other side, are the builders. They take all the knowledge the researchers produce and use it to engineer software/devices/etc.

Over my 2 years as a grad student I found my self constantly attracted to research projects that involve ‘building stuff’ – projects that require more engineering and less researching. One of my greatest inspirations was a project that used a computer program called Rosetta to engineer an enzyme that catalyzes a reaction that doesn’t exist in nature. I also found my self enjoying doing what other grad students refer to as ‘grunt work’ – writing scripts that analyze the data , produce plots, etc – making them more efficient, more robust – although most people found it a waste of time since most of those scripts weren’t supposed to be used more than once or twice.

When I realized that I’m a builder , I knew I don’t belong in the academy. By sheer coincidence, few days after this painful realization a good friend of mine called me and asked whether I’m interested in working with him on a really cool idea for a startup, and that made my decision a lot easier. But that is a story for a different time :)

Posted in Personal | Leave a comment