Friday, October 11, 2019

I can F.E.E.D on Good and Bad Days

I can F.E.E.D on Good and Bad Days


There are days when I am feeling at the top of the game. All my faculties are performing on point. I wake up clear headed with enough rest, get started on my morning routine without a hitch and when I'm out the door I am ready to take on the traffic. When I reach the office, I tackle each task with enthusiasm and efficiency. By the end of the day I feel as energized as when I reached the office. 

On days like these, I feel I could accomplish anything. I could put my head into my goals, work on the mini goals to get to my long term goals. Any challenges that comes in the way would not feel like a wall but merely a puzzle to figure out in order to move on to the next item.

Other days are not so great. If I did not get a good nights rest, or the day somehow started off badly, then somehow my energy levels will not be that high. I would struggle to get started on what I need to get done. I would procrastinate and get distracted by emails or social media.

It was frustrating. Especially when there is a realization that you could have done things better or get that particular task cleared off your plate. At times like this, I push myself and say to myself, I can get through this day. I can do it, I just need to start. I can F.E.E.D - Focus. Effort. Effortlessness. Determination. F.E.E.D definitely helped me with my energy and motivation as well as many parts of my life. F.E.E.D is from Rewire Your Brain a book by John B. Arden that helped me understand more about my brain and how it works and how I can rewire it. It led me to other books and articles. Couldn't have done what I have done without this book. Or it would have took me longer. 

Monday, October 7, 2019

Getting Started with OpenMP



Getting Started with OpenMP

https://www.geeksforgeeks.org/openmp-introduction-with-installation-guide/
https://medium.com/swlh/openmp-on-ubuntu-1145355eeb2
http://deeplearning.lipingyang.org/2017/01/30/openmp-on-ubuntu/

The above links was very helpful in getting me started really quickly in getting a Hello World code up and running.

Step 0 - Install GCC compiler: I did initially was not aware if my Ubuntu had gcc installed, I read it would at least have a version of it, so I decided to just install it. I opened at terminal (CTRL+ALT+T) and keyed in the command below.


 sudo apt-get install gcc  

Step 1 (Optional) - Install OpenMP library: Once I had the gcc compiler installed, then OpenMP should already be configured in the compiler. I went ahead to install OpenMP library anyway.


 sudo apt-get install libomp-dev  


Step 2 - Setting Number of Threads:
Then next we can set the number of threads using the command below.


 export OMP_NUM_THREADS=3  

Step 3 - Hello World Code:
I have not mastered using VIM. Coming from Windows environment (don't laugh), I was more comfortable with Notepad++. Thank goodness Notepad++ is available as an application download in Ubuntu, so I used it to write a "hello world" code. Saved it in ".c" of course. 


 #include 
 #include 
int main() {
  int i;
  #pragma omp parallel
  {
   for(i=0; i<10 br="" i="">    printf("%d\n",i);
   }
  }
  return 0;
} 


Step 4 - Compile and execute: Compile and execute command. It was running! Hooray!

Compile:
 gcc -fopenmp helloworldmp.c -o helloworldmp

Execute:
time ./helloworldmp




Using another code:
#include 
#include 
int main() {
 #pragma omp parallel
 {
   printf("Helloworld\n");
 }
 return 0;
}




Ubuntu Freeze On VMware


Ubuntu Freeze on VMware

I'm running Ubuntu 18.04.3 LTS on VMware for a university project and it constantly freezes on me midway into my C coding assignment. 


Google search came to the rescue. Edited the virtual machine settings (increased memory from 2GB to 4GB, I had added 8 more GB with total memory now 16GB, so increasing to 4 should not be a problem) after reading a solution from this site.


Click on it to edit machine settings

Now problem solved and I have more hair for it. Thank you Google.

Monday, June 10, 2019

We are living a good life

In our minds, our reality is always telling us we are not doing as well as can be or as successful as others. I find myself sometimes walking with a frown on my face, figuring out how to be successful. I am always coming away tired, beaten down by the thought of how difficult it would be to be successful. It was even difficult defining what would be considered successful.

Maybe I should change the narrative. Change my reality. I'm able bodied. I have a job earning a good salary, with that salary able to pay for a house, a modest car and childcare. I have a family whom I love very much. I'm grateful for what I have. Therefore whatever I am doing next is not going to be tough. It is going to be an adventure. An adventure that will take me to meet new places, new people and learn new things.

If we really look around us, nothing is easy. All is tough. Why put our minds through that lens? Why not change that language. Yeah, life is tough. Other people have triumphed over more difficult circumstances. If we instead look and think of it as the opposite...instead life is going to be fun, adventurous, road less traveled, a wonderful world of self-discovery.

Start sowing the seed of endless energy by first changing the language, narrative and lens in which we describe our current lives.

We can do it...we can define our own success and discover our new selves.

Saturday, March 30, 2019

Fearless Facing Fears

The only way to to overcome fear of working with people who talks louder and are more authoritative is to focus on facts and do your homework before meeting them. No guarantees of coming out ahead, but if you aim for win-win, however it turns out, you will come out of it almost without an injured ego (since you're focusing on facts) but most certainly you will come out of it learning something. 

Therefore, face your fears and be fearless, with facts and due diligence on your work. Know your limits and acknowledge your weaknesses, only then you can work on moving forward and pushing your limits...being fearless.