Death Cafe

Death is an inevitable reality, but no one wants to talk about it, yet all of us have experienced it in some way or another i.e. death of relatives, friends and our loved ones.

Death Cafe in London is a unique concept, with the goal to raise awareness about death and to encourage people to live their lives to the fullest, to make the best of their lives and to have a purposeful life.

New scientific evidence suggests death is often misunderstood, and boundries between life and death are blurred and overlapping.

In death cafe, people would talk about unique questions such as “IF YOU planted an apple tree in the ground where your mum had been composted, would you eat the apples?”—Newscientist (From mushroom shrouds to cyber funerals, a 21st-century guide to death)

I will definitely visit this place during my next visit to London. If you are in the UK, give it a go.

References:
1. https://www.theguardian.com/lifeandstyle/2014/mar/22/death-cafe-talk-about-dying
2. https://www.newscientist.com/article/mg24432570-400-from-mushroom-shrouds-to-cyber-funerals-a-21st-century-guide-to-death/?utm_medium=SOC&utm_source=Facebook&fbclid=IwAR12839EuCRk6YiMrBy7EzAfhX7j7JcRfQTQ2_3aGikhDMHabBNjkn3SJ08#Echobox=1574857661

Does it happen to you?

I was using blender and after putting my ingredients in the jug, I placed it on the kettle base, then realized my mistake after few seconds. I tried to keep my milk in the kitchen rack rather than the fridge, I got boiling water from the boiler to drink, instead of the normal water from the dispenser. Does it happen to you?. If yes you are as shattered and depressed as me.
The reason I am writing all this is becaue I just realized I skipped todays breakfast, without realizing it and have lost appetite for food.

A few days ago, there was an event in my life which changed
everything, I got the biggest shock of my life and I wasn’t prepared for it. I am shattered into thousands of pieces and attempting to assemble myself together. I try every day, it works for sometimes, however the glue is not strong enough to hold together my pieces all the time.

Life can be hard and cruel at time. There can be regrets which make it difficuilt to live. I hope time heals my wounds.

How to install Nvidia Driver and CUDA toolkit on Linux

You can install the latest version of Nvidia driver for your GPU in three easy steps given below. I have tested these on Ubuntu but they may work on other flavors of Linux too.

If you already know your Nvidia hardware model you can skip to step 2.

Step 1: Get to know your Nvidia Hardware name (mine is Nvidia Geforce 940MX), by executing the following

lshw -numeric -class display

Read the description should say "3D controller" that’s where nvidia is. Note the name of the product in bracket, mine was Geforce940MX

Step2: Once you know the name of your hardware, go to the nvidia website (http://www.nvidia.co.uk/Download/index.aspx) and select your driver, in the operating system, scroll down to select "All operating system", make sure you all checkboxes have the right details and operating system is linux, click on search. In the next page you will get information something like this
Version: 384.98

Release Date: 2017.11.2
Operating System: Linux 64-bit
Language: English (UK)

File Size: 77.23 MB

Note the Version number before the decimal, its 384 in my case.

Step 3: Proceed with installing the Nvidia driver by executing command sudo apt-get install nvidia-384 (note 384 is my version for Nvidia 940MX, yours maybe different).

After install nvidia drivers, you may also want to install the CUDA toolkit.

Step 1: Download the Nvidia CUDA toolkit , I had to download 7.5 (https://developer.nvidia.com/cuda-75-downloads-archive) due to some program requirement, you may download the newer version if you want. The CUDA 7.5 is not available for Ubuntu 16/17, you can still download the Ubuntu 15 version and it works perfectly on 16/17 too.

Step 2: To install CUDA driver, we need to shutdown the X Server(The ubuntu GUI), so I advice you to open these instructions on a mobile browser before proceeding as the GUI will close and a terminal like screen will appear after applying this command.

sudo service lightdm stop

Now you are in a black screen, press ALT+CTRL+F1-F7 to bring the terminal input screen, after you get the input screen. You can enter the following command to install the Nvidia driver.

sudo ./cuda_7.5.18_linux.run -extract=~/Downloads/Nvidia

This will extract the files into nvidia folder.

Step 3: Next go to the extracted folder(Downloads/Nvidia) and execute the following commands.
sudo ./cuda-linux64-rel-7.5.18-19867135 (The digits after cuda-linux64-rel may vary for your cuda version)

sudo ./cuda-samples-linux-7.5.18-19867135

Follow the on screen instructions to install both the cuda linux toolkit and the cuda samples. This will install cuda tool kit and samples in default location /usr/local/cuda-7.5

Step 4: Edit your system wide environment variable to set the paths for CUDA

sudo nano /etc/environment
Paste this please note the actual paths may vary for your configuration. These are default paths for CUDA 7.5

PATH=/usr/local/cuda-7.5/bin:$PATH
LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH

Step 5: CUDA installation is done at this stage, time to test nvidia driver with CUDA by running a sample.

Go to the folder

cd /usr/local/cuda-7.5/samples/1_Utilities/deviceQuery

Execute sudo make, this will build the deviceQuery file. Run the file

./deviceQuery

This should show "Result: Success" at the end. If it does, congratulations Nvidia Driver and CUDA toolkit has been installed successfully. If it doesn’t you may need to follow this tutorial https://kislayabhi.github.io/Installing_CUDA_with_Ubuntu/ for common issues.

.

Dark Matter and Dark Energy

Dark matter is a mystery, we don’t even know for sure if there exist such a thing in the universe.Now the scientists are claiming an entire galaxy to be made up of dark matter.

Dark matter is a fancy concept which scientists had to invent as there is more gravity in the universe than the standard established general theory of relativity predicts.As mass produces gravity, scientists believe there must be mass which we can’t see, termed as dark matter.

A very similar but related concept is dark energy. As galaxies are moving away from each other, scientists postulate the universe must be expanding, however which is causing the universe to expand at such a precedent rate(there is some evidence, the universe is expanding faster than speed of light), unable to understand the cause behind this phenomena, scientists term it as dark energy.

Reference: http://www.scientificamerican.com/article/this-weird-galaxy-is-99-99-percent-dark-matter/?WT.mc_id=SA_FB_SPC_NEWS

Brain regeneration in the future

Our soul is a door to our immortal self encompassing our
thoughts,memory and personality but where is this part stored exactly in body?. Scientists say in our brain.Now if we can somehow preserve the neural structure of the brain in a printed form termed as “connectome”, then we may be able to regenerate our complete selves sometime in the future.

That’s precisely what a medical research company is doing and they are starting with animals—mouse brain first, after successful
preservation of a rabbit kidney.In fact, we have been quite used to it in the science fiction Hollywood movies, where transplant, enhancement and other amendments with brain has become the norm, this is known as “mind uploading in the fiction”, a concept originated from a novel “novella Izzard and the Membrane” by Walter M. Miller, Jr.The concept has been materialized in movies like “Transcedence” (a must watch), where the hero “Johny Depp” is able to create a digital imprint of himself and transform the imprint to a digital computer, and is able to be reborn after his demise.

According to scientist, it might take another millenium to make it a reality, but we can’t say for sure, as many inventions originally anticipated for billions of years were realized in decades, technology is changing faster than ever and its becoming increasingly difficult to predict the future in 10 years let alone a 100 years.To mitigate this problem, scientist have turned to a machine learning approaches to prediction with limited success.The future where we can create and reborn as scheduled by our cloud service (that would make an interesting service), awaits us.Happy immortality to homo sapiens.

Reference:
http://www.scientificamerican.com/article/can-our-minds-live-forever/ https://en.wikipedia.org/wiki/Mind_uploading_in_fiction

The Unlucky Flapping Sparrows

After Praying Jumma at Mubarak Mosque yesterday, I saw a teenager selling sparrows confined in threaded cages. He was holding 3 cages, each with 4 sparrows. I felt a wave of sympathy for them. The scene made me realized how self-obsessed and cruel we humans can be.

birds

I approached the guy and asked him, “what’s the benefit of purchasing these sparrows?” he said,“it’s ‘Sadqa Jariya’ (immortal charity), all you have to do is to give me 150RS and then you can free the sparrows in one of these cages.” I was about to pay him, when all of a sudden, other side of the picture conjured up my mind. I asked him “What if I free all of these sparrows, you will go and catch the other ones and this will go on and on indefinitely. Freeing these birds meant imprisoning some other free birds. I can’t do that, why should I free some birds at this expense of others.” He replied, “we don’t capture them, we just go and purchase them from the market” Regardless, and irrelevant, I contemplated the cycle will continue, if everyone start freeing these sparrows, it will just accelerate the demand for catching more free birds to sell in the market.

I was confused, thinking about the future fate of these species. Meanwhile my eyes stared at one of the cages, a little sparrow was continuously flapping in the cage, screaming in its own voice which probably was beyond human audible range in an attempt to find the exit gate. I could see and feel the terror she was experiencing in a series of futile attempts to ascend above the cage, the heinous event was hard to bear, when no one else seems to care.

I was leaning towards freeing the sparrow, when I saw my senior friend. I went to him and described my situation. He said, “If you are really considerate why don’t you go for ‘Petition in the court’?” Unable to solidify my decision,I decided to free at least one sparrow. I went back to the place where the guy was standing. However I was unable to find him. I looked on my left, right and everywhere else, but he wasn’t there. I felt helpless and incapable of helping them now. Maybe I should have freed those birds and the petition was a later issue. Am I supposed to live with regret or was it meant to be like that in the first place.Only God Knows!!

Life meaning

What is life, why we are here, and what is purpose of us being here? These questions have puzzled scientist, philosophers, and
intellectuals for decades.When I was a kid, I used to contemplate over these questions.

Lets begin with the beginning, it all started with a big bang about 14 billion years ago, our present universe is 46 billion light years wide and contains about 200 billion galaxies.There was nothing before it.How could something erupt from nothing?
One simple abstract understanding is negative and positive matter, mostly called matter and anti-matter.The quantity of matter and anti-matter is equal, when they meet, they annihilate each other, which means matter can be created from nothing. But an important question is what triggered the creation of the universe? Was it some super natural God or was it a spontaneous process triggered by a parallel universe.

Whatever we can think of, someone has to trigger the process, it could be either a chance or a God.We creationist believe it was God and atheists a mere chance.There is not much difference between the two.Rationally our version makes more sense than the mere chance, but everyone is free to believe what they want.

So as a creationist, if our universe is created by God and we all are product of an intelligence design theory(That God created the universe), why would a God create us? Who created the God himself? What is our sole purpose of being here?.

There are so many questions, daunting ones sparked by the human curiosity.Scientists and philosophers are equally funded by the humanity to spend their entire lives finding answers to some of them.I will touch one question here, what is the sole purpose of our lives?

According to my high school teacher, its about “Doing your duty”, doing what you are meant to do.In other words we all have certain responsibilities and duties assigned to us.Doing your duties honestly and in the best manner is what gives our life a purpose.
Doing our duty leads to a meaningful life.Our every act, talk and activity should have a meaning in it.I believe sooner or later we are gong to regret about our every meaningless activity.If you are rational you might be asking at this point what exactly is a meaning and meaningless activity.

Any activity, which we only do for time pass and has no anticipation of being productive is meaningless.I admit, we do some things for fun only, which is OK as long as we are done with out fundamental duties(In reality usually its a zero sum game (theory), we always do fun activities on expense of neglecting our other core duties). Any activity which increases our knowledge, help us to know more about ourselves, or helps someone in one way or another if they really need it, is meaningful.

Sometimes we have a hard time, distinguishing between the two activities, that’s coz we are mostly unconscious of what we do, to counter that, we need to constantly ask one question to ourselves, Is the act I am doing has any meaning, can it improve my or other people lives in some way or another.

We are gifted with amazing senses, one of them is a gut feeling, somehow it already is per-programmed to label our activity as meaningful or not, and it persistently remind us if they are not. We just need to have more self control and do only what is meaningful. I conclude this article with a quote.
“A life unexamined is not worth living”—-Plato

The Kabhi Kabhi Attitude

I am neither a doctor nor a nutritionist, nevertheless I am intensely conscious about the food we feed our bodies.What we eat not just directly affects our health but also skin, mood and even behavior.Sometimes food effects only manifest themselves in old age, for e.g a diet not rich in calcium and vitamin D can weaken bones resulting in fractures in old age , medically known as osteoporosis.

About a week ago, I went to a local burger shop, and I saw a father with three kids, he ordered burgers for them and each one was offered a frizzy/cold drink of his choice.The little kids happily took drinks of their choice and I was sitting there wondering why they are even allowed to consume soft drinks.

I boosted some courage and asked him, are you aware these soda drinks are bad for your kids?, he answered yes I know, but “Kabhi Kabhi (occasionally)” chalta hai (its ok). I was like in shocked state, the kabhi kabhi attitude has caused more damage and problems than we can ever imagine. Likewise I have been offered cigarette numerous times by my friends(I prefer not sitting in their company) to try cigarette kabhi kabhi. If something is bad, its always bad, what’s the point to try it kabhi kabhi? For instance If you kabhi kabhi smoke, there is a greater probability of you getting addicted

Cold drinks are not just bad for kids, they are equally bad for adults, but as kids are growing, it is very important that they only consume healthy food.So what’s all the fuss about cold drinks?. Lets look at the ingredients first. Soft drink is composed up of filtered water, soda, and refined sugar.

Sugar: Its very high in calories and empty calories make people fat and increases the risk of obesity.Obesity is a very serious issue and is the root of all health problems.Its bad for our teeth too, it accelerates their decay process.Recent research suggest it might contribute to loss in memory

Soda: is extremely bad for for the enamel, it can dissolve the mineral of it and make the teeth weaker and sensitive. It contains caffeine which can be of mild addiction. Soda also contains minor amounts of phosphorus (phosphoric acid), which reduces bone density and may promote weakening of bones.

So in short, cold drinks add fats and negates calcium from our bodies, they are analogous to sweet poison and result in obesity with weaker bones.I saw those effects practically for my friend who was extremely smart but had weird shape after he began consuming free soda drinks in the beverage company that he worked for.
“Prevention is better than cure”, take care of your body before it grumbles.

C++ weird boolean behavior

Imagine after compileing your c++ program, it runs and sometimes it works as expected and sometimes it stuck somewhere like at a cursor, unfortunately the error is not reproducable, its a random recurring error, occuring only when its in the mood.

If you have ever been in a similar situation,then you are not alone so don’t panic, its not magic or mystery, there is definitely an error in your code.I had a similar issue when I attempted to code quickly.

Problem: I declared a boolean variable without initializing it.

A boolean variable can only have two values, true or false, so when we ran the program, sometimes the boolean variable got initialized to false and sometimes to true, a very random behavior of a c++ program, i have never witnessed such a thing in my life, so i thought to share with you all, in case you ahve been in a similar situation, you know where to look for an error.

WHY I love unit testing: Unit testing and its benefits

With the recent course of events, I have become a big fan of unit testing.I fully support and encourage the use of unit testing.I am currently working on a critical real time project, in which there is no roam for error, a slight ignorance can result in destruction of the whole system.

What is it?

So what is unit testing?. Unit testing allows developers to test the basic building blocks of their code written normally by developers themselves.This article is not about how to write unit tests.Basically in unit testing there are two output, “PASS” or “FAIL”. You specify the input information and the expect output for a code unit, to pass a test, input should be processed and converted to output by the magic inside the unit, otherwise it fails.In this article i share the benefits of unit testing which i have personally experienced while writing them for my project.

1) Formal Testing: Feature Testing vs Method based testing
Perhaps the biggest advantage of unit testing is they allow you to test your code in a formal manner without missing intricate details.

There are basically two ways to formally test your code.Suppose you want to test a class XY with five methods inside it.
One way to test it is to create five more methods with the same name as the original XY class but with prefix test. For example calculateArea should be tested with method calculateTestArea.

Unit testing should never be mixed with the code, instead a separate class namely “TestXY” should be created.

Another way is to only test the basic expected features of a class.Its a known fact that number of features in a class is always less than the number of methods.So in feature testing, we only test the features expected from a class.This is my preferred way of testing.Features testing usually encapsulates the method testing and is superior but the risk in such type of testing is missing some of the expected features.Method testing makes sure that all the methods are tested which in turn tests all the features.

2) Become a user surrogate
When writing unit test cases, you become the client literally (temporary) as you call the methods like a client and type the expected output like a client would expect.

This is a very unique advantage of unit test cases.It allows you to take the role of a user and think from client point of view.As a result you realize the teeny tiny problems that a common user will encounter while using your code, for example you included the setters/getter but forget to provide a constructor to instantly create objects.
3) Improvement in your coding skills
Great coders understand the need of their clients, when you write unit test cases, you develop a better understanding of how the client will expect your module to behave.The synergy between this knowledge and your development skils results in better quality products, and bridges the gap between developers and clients.Consequently you slowly shift your ways of coding from an isolated programmer to a hybrid geek, are are at the same mental level as the user.

4) Increases your confidence

With so many paths, features and methods, it is extremely difficult to test each and every thing, but with the magic of unit testing, you only test things once, and be confident that they will remain tested through the life cycle of the project.Any ripple affects will immediately be reported by the compiler itself executing the unit tests.By clearly giving the input information and expected output, you are testing the module regardless of its internal nuts and bolts.This generates a sense of pride and confidence boost for the work you have done.
5) Catch the ripple affect
This is why the unit tests were originally invented so as to eliminate the recurring testing of the same module after each change in the code.The theory behind it is after you have successfully tested your module and handover it to the client, client may request another feature asking you to make changes in the code, these changes sometimes create waves of disturbances called ripple affects in which new features work but existing features start to fall apart.So rule of thumb is for every new change, the whole module should be tested from the start from existing features to the new ones incorporated.Unit testing allows users to write only new unit tests for the new features as existing features will automatically be tested after each change.

6) Assistance to developers

Imagine you are writing a module that needs to be plugged into some larger project.Now it may seem obvious, but even with excellent documentation, developers often need to sit in with other developers and dictate them on the usage of their modules.Unit test cases allows other developers to not just know about the critical features of the module, but also get to know details on how the module is expected to be used.This is just incredible advantage in a team based work.

7) Empowerment of critical sections

It is normally not possible to write unit test cases for all the modules in a project as they are somewhat time consuming and developers have to specify the expected output.Even with this con, they offer an excellent way to test and validate your code to make sure it meets the client expectation.I recommend that although its sometimes not possible to write unit test cases for each and every class, its certainly possible to test the most critical areas/modules of the project which must work well to support the whole of project.For example in the development of a new operating system, a critical module that should be extensively tested would be a kernel.
8) Find critical bugs early on

Humans are imperfect, no matter how careful a developer is, a module may contain a number of bugs which might be difficult to visualize and anticipate even by an experienced developer.Unit testing allows developers to find bugs early on and make sure their module is right on the track and works exactly as it is meant to be.In case it doesn’t work as anticipated, a quick revision is all it takes and this cycle is repeated until and unless unit test case passes.