What is that define power? Is it the ability of doing something? Is it the acknowledgement? How does the transformation from the powerlessness to powerfulness occur? Is it that power already lies inside us? Is it that we are always potentially powerful? Only when the event of the demonstration of power happens, we realize it? But people seem to actively seek for power as if it lie’s somewhere outside. Is money power? It seems everyone believes having more money will give them more power. Is the purchasing power equivalent to the psychological power? Given that we live in a knowledge, information economy, does the acquisition of more information make us more powerful? What is the main semantic difference between power and energy? I am energetic vs I am powerful- they sound different, why? What gives you energy vs what gives you power? Is energy more like a physical thing, whereas power is more psychological? Do you choose to be powerful? Do you choose to be powerless? Is it a zero sum game?

Music, Hippy & Spirituality

I find music as something that can give some bliss, satisfy me. It definitely depends on what you listen and how you let music touch your heart. But there’s always a kind of music that can fit with your mood. There are so many amazing talents in the world of music who want to reach through their vocal genius. I am always drawn to a song with good lyrics and good music. Even though I have fascination for rock music, I try to listen every genre as long as it satisfies the two criteria- some good poetic, musical, rhythmic words and the awesome enchanting music – which means I feel the joy. If I think with which I have spent most of my young and adult life- during my time of joy and sorrow, it will definitely be some form of music. Some music just refresh me when I wake up, some just push me to work a little bit harder when I almost give up, some are inevitable in my tired evenings and some just can soothe me and put me to sleep. When I was at my late teen years, when I started exploring the world, when I left my country and started my traveller life, it was the music which accompanied me on my way, it was those headphones that I used to wear everywhere and shake my head in a crowdy train platform surprising everyone. I was always a boy who loves to express where ever he feels to. I felt like a hippy so many times, I discovered the bohemian in me through the music, I realized my spiritual connection with nature through music. Some music are imprinted in my brain so deeply, I can just close my eyes and I can time travel from one corner of the world to other corner, I can fully explore my imaginary world, music works for me as an emotional vehicle, gives me wings to fly, fly higher. I am lucky to have learnt several languages like Bengali, English, Japanese, Hindi- and all these four cultures admire music so much. I wish if I could add Spanish to this, that would be perfect. Anyway, I thoroughly enjoy the similarities and the differences of these different music of different culture. Bengali, being my mother tongue, touches me and caresses me. Most of my crucial teen years, when I was dashing, Japanese music gave me the strength, gave me the power to think broadly, inspired me to explore. And what can I talk about English music – they are just my life in one sentence. From classic rock to alternative rock to pop rock to country, everywhere I swing depending on my mood. And my young life back in Bangladesh was mostly surrounded with Hindi music. No wonder why my romantic me has so many different moods, lol.. I feel like a Bengal tiger, then a Japanese samurai, then an English traveller. I am going to share some music which are very integral to me, has always been with me for some very real reasons, remind of specific time and I will continue listening to them till my last breath.

















Adversity can be blessing

Adversity is not always bad. In fact, adversity or lack of something provoke you to come up with some useful solution. If everything you need is right at your reach, it may feel comfortable but I am telling you that it’s delusional to think that state as a sustainable one. It’s not a stable situation where you don’t feel the lag or emptiness. It’s probably only an utopian state where you get everything ready, prepared, arranged or organized around you. So, the lack of something, the emptiness may bother us, frustrate us, bring anxiety to our psyche but then those same feelings force us to do something, do something to fill the gap or the void. And sometimes we may turn out to be really creative that can impress our own selves. Innovation at its heart depends on the desire to solve an issue, a problem and being passionate or motivated towards implementing those solutions. And when we have absence of something we truly want; the shortage, the scarcity of the elements, materials or instruments; the unavailability or deficit of the required things turn on our discoverer us to flow, move, interact, look and experiment. It’s not always alright to have vertical structure, sometimes we need to inspect horizontally. Going deeper and deeper may sometimes make us at a loss when we need to look widely. One important thing adversity tells us that you can solve anything you want with only the things that you have at hand. Focus on the things that you have and carefully examine, investigate whether there’s a possible scenario to create. When you are smart, adversity is blessing in disguise. I realize more now the words of Steve Jobs

Stay hungry. Stay foolish.

You and me

May be I couldn’t say it better about the tragedy of my own love. To you and me..

@ bittersweet diary

There are just edges that never fit,

It’ll only turn out as a tragedy.

When colors mix in the saddest way,

It produces an image of you and me.

When dead trees sprout in the middle of The freshest meadows;

And flowers wilt in the beginning of spring

And when fireflies loses their glow,

It reminds us of our things.

When clouds cry and never stop,

And stars fall in the form of shards,

When towers tumble from the tops,

It reminds me of our heart.

When lightening inhabits every cloud,

And When words and laughter seem so foreign to us,

When we see to each other but no sound,

It’s reminds me how we faded to dust.

So every time,

When someone say the word of “TRAGEDY”

My mind can’t help but come back to the time,


View original post

Never been a necessity

Well, he hasn’t been here for last two weeks. Did anybody care? Did we really bring him into the conversation? He was invisible, did we feel his necessity? May be some closed ones did, but it wasn’t that inconceivable or unthinkable without the presence of him. Was it? And he left this place, a month or two ago, he was here everyday, he was integral to every morning of this wonderful place. Didn’t we already stop missing him? We did. And then he died, nobody knew him. He is not being missed either. We just talk about him sometimes and then it fades away. Well, our mind at a time only can hold a little in its tiny working memory, so we need to leave things behind us. We are not really big necessity for anything ultimately, it’s just that we try to be relevant up to some point. It’s just like a freak show everyday, some noise, some rumbling, then all quiet and calm and it’s all gone. Without you, the freak show would still continue, is that realization give any sensation of fear or frustration? It’s all inside you. All those chattering, all those blabbering – it’s all what you and only you collected from your outside. Not many of them will linger more than few hours. The eternal process of literally losing everything will go on. Isn’t she happy now? Does she really care what happened on this day five year, six years ago? All that matter is what’s she eating for her lunch now. That’s all matter. It’s all about you and your desire as long as they don’t collide to hurt someone else, you will be treated fine and won’t need any medication. Look at him, he is checking her ass like he has never seen such a beautiful thing before. What a spark on his face full of lust, but how long that will last? Well, who said it needs to be lasting? But isn’t that what we try with everything? Make it sustain, make it sustain, don’t try to forget, remember this, remember that, earn this skill, earn that. Well, it’s all in vain. Or may be not. All you need to do is to not care.

Thinking about intelligence

So.. we, human are intelligent beings. Life ,in general; here I am talking about all forms of life, not just human beings but all living beings, seems to be a race for acquiring more intelligence to solve the existing problems, improve the way of living and to infer and predict the future using the accumulated intelligence of present and past. Think about a typical day of yours. You wake up, shit, eat, think, plan, work, eat, shit, work, think, plan, play, mate, sleep, wake up… Now every human may have some uniqueness in how they organize or  re-orient these behaviors along with the plethora of common behaviors. And definitely these small changes, re-orientation or orders of behaviors make you different than me, make each one of us, in fact, unique, make a chimpanzee different than you even though chimpanzees share 96% of your DNA. However, I am trying to focus on the general common behaviors here to later mention the importance of intelligence. Think about a day from ancient time, may be just imagine that you were the ancient Egyptian pharaoh Akhenaten from the 18th dynasty who ruled for 17 years and is especially noted for abandoning traditional Egyptian polytheism. Now you are reborn in this age. Now how different was your regular day then from now? Weren’t you going through the same cycle of daily events? And if you carefully look, lots animals also have the same behaviors, in a broad sense, except the important two behaviors – think and plan. So, thinking and planning are the keys. When a child is born in this world, it already has its innate human abilities, but then it needs to learn; it needs to learn to stand up, walk, talk, interact using all the senses. Learning can be challenging. The rate you learn is important, the way you learn is important, the desire to learn is important. What you learn from your surroundings is what defines you ultimately. In a way, it’s the matter of experiencing what’s happening outside you, acquiring knowledge about how physics, chemistry work, what is dangerous versus what is not, understanding your physical limitations, storing all the knowledge and being able to use them when necessary. Now how efficiently you can use the knowledge you gained gives a good measure of your intelligence. Sometimes just having enough information can give you an edge over others. Like, when you are pursuing a career.. Let’s say you are a doctor; that means you have more information about how human body works, how to treat certain abnormalities of human body which are known to be treatable, let’s say you are a physicist; you try to gain all the rules of the physical world and try to understand physical events of the universe and challenge yourself to answer some of the unsolved questions like when did time start, let’s say you are a farmer; you have the information about when to sow seeds, when to wipe away the weeds, when to water, if you are an agricultural engineer; you have information about how to engineer or breed new crops to produce more food. So, work of some sort in general requires gathering specific information related to that specific work. And as an intelligent being, you try to use your information, increase your knowledge, solve particular problems in your work area. The basic challenge of life is to feed yourself everyday which requires access to food, which requires access to money, which requires certain skills to earn money, which drives you to grow to learn certain things of your interest. A day is like planning different actions, making priorities for solving different problems of your life. So, thinking and planning are the two necessary things which you need to master. The better you can solve your problems of feeding yourself, entertaining yourself, communicating your needs, understanding others, gaining edge over others to prove your uniqueness, the more intelligent you are. I am looking everything from a problem solving perspective. Some may say that you need to learn about how to ask questions, how to approach, how to employ different solutions, how to look from different angles, how to think to identify the patterns, how to plan in an organized way and then how to execute accordingly. Now what will be super intelligence. Is it just the extension from intelligence, just to be able to store more information, compute more approaches so that you stumble upon new ways so that you can give better answers to the questions posed? I was watching Sam Harris asking whether we can build AI without losing control over it. I liked this part where he mentioned how we will just continue forever..

.., given how valuable intelligence and automation are, we will continue to improve our technology if we are at all able to. What could stop us from doing this? A full-scale nuclear war? A global pandemic? An asteroid impact? Justin Bieber becoming president of the United States?


The second assumption is that we will keep going. We will continue to improve our intelligent machines. 

He talks about general intelligence which ,in his words, is an ability to think flexibly across multiple domains.

Intelligence is a matter of information processing in physical systems. We have already built narrow intelligence into our machines, and many of these machines perform at a level of superhuman intelligence already. And we know that mere matter can give rise to what is called “general intelligence,” an ability to think flexibly across multiple domains, because our brains have managed it. 

I probably disagree when he said the rate of progress doesn’t matter, because any progress is enough to get us into the end zone. But may be he tried to mean somethings else. Then I also watched talking another visionary Ray Kurzweil. He gives a evolutionary history of how we reached where we are now as a mammal by expanding our pre-frontal cortex and then he proposes how we can take us to make another leap towards being more intelligent.

Anyway, it’s all exciting to think about how our futures will shape, how we will even define intelligence and how we will strive to be more intelligent.

5 Amazing Running Benefits

As a regular runner, I feel the same way.

Healthy Is Happy

In lieu of the Boston marathon today I figured a running post would be quite fitting.

When you hear the phrase “let’s go for a run” it will either excite you or intimidate you. Running is one of the cheapest yet most effective forms of exercise however many of us are reluctant to do it simply because it isn’t something we are used to doing. Running is one of those things that can seem daunting at first, but I promise you once you get in a habit of making it part of your everyday lifestyle and slowly increase your weekly mileage it will become something you enjoy doing more.

When I first began running a few years back I would have been happy to have ran a mile. I would find myself getting tired running the three mile loop around the lake in my hometown. If could do this in…

View original post 623 more words

Live Bravely

It takes a while to calm down, to stay relaxed. Waking up worried is just a norm; the moment the eye is open, the rush of the upcoming meeting, the unread twenty-five emails, the missed calls, the replies on facebook which are supposed to be already sent, the worry about the electricity and internet bills, the cold war with your room mate, the unfinished project, the anxiety of failing in the assignment, the silence from her, the noise of the surrounding – all can be overwhelming. The random thoughts will take you here and then there and in the end, you will find yourself out of nowhere, passing several hours. But then you will probably listen Pharrel William’s wonderful song “Happy” because happiness is something that’s missing, you will feel. And then the joy- out of nothing, random joy and pleasure that you haven’t really expected. Suddenly when that beautiful stranger girl will smile at you when you were walking absent minded on the pave way, you will feel the rush of good feelings. When your friend will say that he is missing you, you will feel needed. When you will read some silly jokes on 9Gag, you will start laughing your ass off when everybody’s trying to concentrate and then joyfully feel the awkwardness in you. You just want to be relevant – don’t you? You just don’t love to be ignored. You know that all these are within your psychological reach, but you still can not always trick yourself. Why is so much craving for having been seen? The book “Craving For Ecstasy” that I have been reading is saying-

Given that we may voluntarily alter our neurotransmission to achieve a desired feeling, why do only some of us become compulsively involved in this pursuit? After all, most people can have a drink or occasionally rage at the race track without going off the deep end. Most addictionologists – even those who disagree about other matters of causation and treatment – agree that low self-regard is a crucial factor in all forms of addiction. The chronic absence of good feelings about oneself provokes a dependence on mood-changing activity. Manifest or masked, feelings of low self-worth are basic to dysfunctional life-styles.

That high self-regard that keeps you motivated is an absolute necessity. That’s why you need good news after all the bad news. And for that, you just need to live bravely the next moment.


Message Passing using OpenMPI : Production and Consumption via Broker

I am working on several assignments and through the problem solving process, I am learning OpenMPI. OpenMPI is a great library that gives you capability of using multiple CPUs in parallel. Think about you are given 100 random numbers which are not sorted. Normally you would write a sequential program where you will implement a O(nlogn) sorting algorithm like quick sort or merge sort to sort those random numbers in an increasing or decreasing order. But what if you partition the 100 numbers into 10 buckets. And sort each bucket using your sequential sort algorithm parallelly using 10 process. At the end, you need to combine those 10 buckets. This is just an example of how using parallel process, we can speedup. Sometimes certain information needs to be synchronized in all running processes for further computation. Unlike threads, processes don’t share shared memory. So, you can not really use a global variable for storing. Moreover, you can never exactly tell which instruction are being executed by  a process at a certain moment. The way processes communicate with each other is through sending and receiving messages. That is why MPI stands for Message Passing Interface. The first problem that I have been working is a problem where a producer produces item and send item to broker, then broker receives the message, saves it in its internal buffer and finally, sends acknowledgement message back to the producer. However, a broker can only insert a newly produced item into the buffer only if the buffer is not full. In case, the buffer is full, the producers will be waiting. Broker also waits for consumer request to consume items. A consumer sends request to broker and if the buffer is not empty, the broker sends an item for consumption to the consumer on receiving a valid request. While handling the consumer request, the broker also releases the waiting producer by inserting the produced items when the buffer becomes free. This whole production, consumption scheme now needs to run for a given amount of time. There are several challenges in implementing this parallel program. Deadlock is a common issue in parallel  programming. It occurs when two or multiple processes race against each other for accessing the same resource. Imagine a professor is discussing with his two students. Let’s assume the old professor can only remember one question at a time (his memory is like the communication buffer). The first student asks the professor a question, until the professor answers the question, the second student can not ask any question. Now imagine, if the first student is constantly asking question, the second student may not get chance to ask at all. (….)

// Question 1. Producer, Consumer, Broker in MPI

#include <sys/time.h>
#include #include

#define MAX_THREADS 256

// MSG type definition
#define WORK_MSG 1
#define ACK_MSG 2
#define REQ_WORK_MSG 3
#define CONS_MSG 4
#define TIME_OUT_MSG 5

// broker rank definition
#define BROKER_RANK 0

struct timeval tz;
struct timezone tx;

// size and rank of the communication world
int world_rank;
int world_size;

int nprod; // number of producers
int ncons; // number of consumers

int *buffer; // circular buffer for broker to insert into for producers or extract from consumers
int buffer_item_count;
int BUFFER_SIZE; // size of buffer
int head, tail;

int time_out = 0;
int time_out_recommendation = 0; // this is required to stop the consumers, this complication is because of the non-blocking receive of consumer
double start_time, end_time, total_time; // variable for calculating time

double MAX_TIME = 2; // maximum time the simulation will run

MPI_Status status;
MPI_Request request;

// Check whether buffer is free or not
int buffer_free() {
if(buffer_item_count == BUFFER_SIZE) {
return 0;
return 1;

// Check whether buffer is empty or not
int buffer_empty() {
if(buffer_item_count > 0) {
return 0;
return 1;

// Broker process body
void *broker(int world_rank, int* buffer) {
start_time = MPI_Wtime();

int number;
int time_out_recommended = 0;

int inserted = 0;
int total_consumed = 0;

// queue of waiting producers
int *prod_waiting;
prod_waiting = malloc(sizeof(int) * nprod);
memset(prod_waiting, 0, sizeof(int) * nprod); // no producer is waiting

while(!time_out) {
// if buffer free in broker, receive work msg from produer
if (buffer_free()) {
MPI_Recv(&number, 1, MPI_INT, MPI_ANY_SOURCE , WORK_MSG, MPI_COMM_WORLD, &status);
// if buffer is not empty in broker, receive work request msg from consumer
else if(!buffer_empty()) {

int source_rank = status.MPI_SOURCE;
int msg_tag = status.MPI_TAG;

// block for message handling starts
// manage the work message from the producer
if (msg_tag == WORK_MSG) {
if (buffer_free()) { // extra checking for buffer_free
// insert the received number from the producer into the buffer
buffer[tail] = number;
// increase the count for items in buffer
buffer_item_count++; // increase buffer item count
//printf("Broker-Prod. Inserted number %d(tag=%d) from producer = %d into buffer position %d\n", number, msg_tag, source_rank, tail);
tail = (tail + 1) % BUFFER_SIZE;
// send ack msg to the producer
//printf("Broker-Prod. Sending ACK MSG for number %d to prod %d.\n", number, source_rank);
MPI_Send(&number, 1, MPI_INT, source_rank, ACK_MSG, MPI_COMM_WORLD);
else {
// if buffer is not free put the producer in the waiting producer queue
prod_waiting[source_rank] = 1;
//printf("Broker-Prod-Waiting. Buffer item count = %d\n", buffer_item_count);
//printf("Broker-Prod-Waiting. prod %d waiting for ACK MSG.\n", source_rank);
// manage the work request msg for the consumers
else if (msg_tag == REQ_WORK_MSG) {
if (!buffer_empty()){ // if buffer not empty, consume (extra checking)
// extract the number for the consumer
number = buffer[head];
// increase the count for items in buffer
//printf("Broker-Cons. Extracted number %d(tag=%d) for consumer = %d from buffer position %d\n", number, msg_tag, source_rank, head);
head = (head + 1) % BUFFER_SIZE;
// send the extracted number to consumer
//printf("Broker-Cons. Sending extracted number %d to cons %d.\n", number, source_rank);
MPI_Send(&number, 1, MPI_INT, source_rank, REQ_WORK_MSG, MPI_COMM_WORLD);
// send the waiting producers ack msg
int i;
for (i=0; i < nprod; i++) { if (prod_waiting[i] == 1) { buffer[tail] = number; buffer_item_count++; // increase buffer item count tail = (tail + 1) % BUFFER_SIZE; // set the producer to be non-waiting prod_waiting[i] = 0; // send the ack msg to the producer //printf("Broker-Cons-Waiting. Sending ACK MSG for number %d to prod %d\n", number, i); MPI_Send(&number, 1, MPI_INT, i, ACK_MSG, MPI_COMM_WORLD); } } } } // block for message handling ends // block for time out checking starts end_time = MPI_Wtime(); total_time = end_time - start_time; if (total_time > MAX_TIME) {
time_out = 1;
//printf("Broker. Time out. \n");

if (time_out == 1) {
int i;
number = -1;
for(i=0; i < world_size; i++) {
// receive consumed count from all the consumers
for(i=2; i < world_size; i += 2) {
int consumed_count = 0;
MPI_Recv(&consumed_count, 1, MPI_INT, i, CONS_MSG, MPI_COMM_WORLD, &status);
total_consumed += consumed_count;

printf("Broker. Total time = %lf s\n", end_time - start_time);
printf("Broker. Total inserted = %d \n", inserted);
printf("Broker. Total consumed = %d \n", total_consumed);

//printf ("Broker. Finished. \n");

return NULL;

// producer process body
void *producer(int world_rank) {
int number;

srand(time(NULL) + world_rank);
while(!time_out) {
// producing random number
number = rand() % 100 + 1;
//printf("Prod. Produced random number %d by prod %d \n", number, world_rank);

// blocking wait for acknowledgement message

int msg_tag = status.MPI_TAG;
if(msg_tag == ACK_MSG) {
// printf("Prod. Received ACK message for number %d by prod %d\n", number, world_rank);
else if (msg_tag == TIME_OUT_MSG) {
//printf("Prod. Time out for prod %d. \n", world_rank);
time_out = 1; // break out of loop

//printf("Prod %d. Out of while loop.\n", world_rank);
printf("Prod %d. Production finished.\n", world_rank);

return NULL;

// consumer process body
void *consumer(int world_rank) {
int number;
int consumed_count = 0;

while(!time_out) {
// Sending work request msg to broker
//printf("Cons. Sent work req msg to broker by cons %d.\n", world_rank);

int source_rank, msg_tag;

// non-blocking receive for consuming the number
MPI_Irecv(&number, 1, MPI_INT, BROKER_RANK, MPI_ANY_TAG, MPI_COMM_WORLD, &request);
// testing until receive occurs
while (1) {
int flag = 0;
MPI_Test(&request, &flag, &status);
if (flag != 0) {
source_rank = status.MPI_SOURCE;
msg_tag = status.MPI_TAG;
//printf("Cons. Consumed the work req msg (number %d) by cons %d\n", number, world_rank);
else {
//MPI_Irecv(&number, 1, MPI_INT, BROKER_RANK, MPI_ANY_TAG, MPI_COMM_WORLD, &request);

if (source_rank == BROKER_RANK) {
// if the request is done
if (request == MPI_REQUEST_NULL) {
//printf("The receive request is null now. \n");
if(msg_tag == REQ_WORK_MSG) {
//printf("Cons. Consumed random number %d by cons = %d \n", number, world_rank);
} else if (msg_tag == TIME_OUT_MSG) {
//printf("Cons. Time out for cons %d. \n", world_rank);
time_out = 1; // break out of loop
//printf("Cons %d. Out of while loop.\n", world_rank);
printf("Cons %d. Consumption finished.\n", world_rank);

return NULL;

int main(int argc, char** argv) {
int i;


MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
MPI_Comm_size(MPI_COMM_WORLD, &world_size);

int w_s = sqrt((double)world_size);

if (world_size % 2 != 0 || w_s * w_s != world_size || world_size < 4) { printf("Process number incorrect. \n"); MPI_Finalize(); return 0; } if (argc > 0) { // You can pass max time as the first argument
MAX_TIME = atoi(argv[1]);

if (world_rank == 0) {// broker processor
nprod = world_size / 2;
ncons = world_size / 2 - 1;
BUFFER_SIZE = 2 * world_size / 2;
buffer = (int *)malloc(sizeof(int) * BUFFER_SIZE);

head = tail = 0;
broker(world_rank, buffer);

} else if (world_rank % 2 != 0){// Producer processors, odd world rank
} else {// Consumer processors, even world rank


return 0;

Hegelian View

Quick Summary of Hegelian Views:

  1. Important part of ourselves can be found in parts of history. Ancient Greece for example.
  2. Learn from ideas you dislike. Learn the alien points of views. What is hiding there? What underlying good idea is there? To identify ..
  3. Progress is messy. Overcompensating the previous mistake is tough.
  4. The German philosopher Hegel believed that strange and alien bits of history have much to teach us. He believed story and civilization do not move in a straight line, so important ideas and attitudes get left behind.
  5. Art has a purpose. Art is the sensuous presentation of idea. Take good, already known ideas and stick them into our mind creatively.