About Me

My photo
PhD Candidate at Purdue University, Computer Science.

Tuesday, September 29, 2009

Algorithm can be dangerous

May be I am writing this down because it was the first time I pay money for thinking about my algorithm assignment.
This assignment was not trivial and students were keeping asking and talking about it. I started to question my solution and If I should review it once again, I felt hungry, went to to KFC with friends, ordered my lunch, and then suddenly the proof of correctness jumped to my mind.
I am not sure what was happening or going around me, but suddenly I found the cashier asking me to sign to approve for my donation.
I found a logical explanation that the cashier asked me if I want to donate for something, and It seems that unconsciously I agreed while drawing my proof on the background of the cashier.
After all, it was not so bad, at least it is a donation. Just this is a reminder that I should be disconnected from assignments.

Friday, September 25, 2009

Endless Enchelada

-Where should we go today?
-Let's go to the Mexican restaurnt.
-Ok, why not? let's try sthg new.
-OOh this is a huge place, this is waste of resources!
-Ok never mind, let's what they do have for dinner.
-This the day of "Endless Enchelada", I will try this Enchelada thg.
-How can I help you sir for tonight.
-Yes, plz we want three endless Enchelada and 1 Sea Food Fajita and another one steak Fajita.
-ok, sure, I will be here with the crisp.
-We are Egyptians, How can we eat beans in a mexican Restaurant in US!!! This is shame.
-yes, sure.
-sure sir.
-Can we replace the beans in the Fajita and the Enchelada with anythg else.
-We have Beans X, Beans Y..
-No no, anythg not beans :)
-yes, mashed potatoes.
-me too, me too, me too.
-yes sir.
-Can we have more Crisp.
-OOH!! you guys are too fast!
-yes, we are.
-you have two choices, bring more crisp right now, or come with the main dish.
-Ok, I will do it right away, oh my god, you were really too fast, u did finish all that!
-after another thought, few minutes and I will be back with the food.
-Ok, we are fine.
-Here you go.
-Plz, Can I have another Enchelada.
-Me too.
-Me too.
-Really, guys you are impressing me. You want more Enchelada! I wonder where do you small guys hide all that food!!!!
-!! howa mesh shayef el 3adhalat wel gessm walla eh!!!!!!

مهما خدتني المدن

One of the most lovely Song.
Emad AbElHaleem, and composed by Gamal Salama.

The video is not so relevant to the meaning, because the song is addressed to the mother. That's why I like it the most.

Wednesday, September 23, 2009

Back to MAC


I am on MAC again :)
This post is from MacBook-Pro 

  Model Name: MacBook Pro 15"

  Model Identifier: MacBookPro2,2

  Processor Name: Intel Core 2 Duo

  Processor Speed: 2.16 GHz

  Number Of Processors: 1

  Total Number Of Cores: 2

  L2 Cache: 4 MB

  Memory: 2 GB

  Bus Speed: 667 MHz

Tuesday, September 22, 2009

Unbiasing the biased thing

I think the title is quite interesting. For VMs guys the biased locking is a well known topic.
I read a post few months ago an entry about the impact of the biased implementation in Java 6, and to get full idea go quickly through the comments as well.
I liked to make the same experiment against the JikesRVM biased implementation which I am working on currently.
It was really interesting that I got a slightly different behavior than the same experiment running on Java6.
It is always the same output, the first thread does all the work, and the other threads display zeros.
Every run, I get a different output: The following are examples of what I got as an output from the little experiment:
$runnable[0]: counter=4
runnable[1]: counter=0
runnable[2]: counter=0
runnable[3]: counter=0
runnable[4]: counter=987

Another one:
$runnable[0]: counter=5
runnable[1]: counter=498
runnable[2]: counter=488
runnable[3]: counter=0
runnable[4]: counter=0
$runnable[0]: counter=1
runnable[1]: counter=990
runnable[2]: counter=0
runnable[3]: counter=0
runnable[4]: counter=0
Ok, I promise this is the last one:
$runnable[0]: counter=117
runnable[1]: counter=875
runnable[2]: counter=0
runnable[3]: counter=0
runnable[4]: counter=0
I run the experiment on my Ia32_linux system and used exactly the same code in the same entry I refer to.
Although the JikesRVM is somehow far from being "fair", I think we are on business. The real question will be how we can increase this fairness without beating the performance of the biased mechanism, or how can we decrease the threads starvations and get the same performance we are aiming for from the biased implementation.
It worth mention that the current implementation beats Java6 in many benchmarks. Stay tuned with more entries about this.

Worst Case

This entry is not an algorithm related entry. I used to used this expression in expressing the complexity of algorithms solving problems.
The matter of fact that I realized a year ago, that it is not just a stupid expression you plot accompanied with my stupid answer to problems.
It is really a matter of life, Whenever I am waiting for an event or submit for something I always get the worst case as a return. and again it is not an algorithm complexity.

  • I had many weird circumstances applying to universities.
  • I had a problem with my pic submitted to the embassy. mistake done by the photographer.
  • Re-do my finger prints because of Computer failure at the embassy.
  • I get problems with my tickets on all the planes I took to arrive USA, 3 problems with three different tickets.
  • I was hold in the registration office at JFK for investigations.
  • Got a water leak on my first night in the apartment.
  • Whenever I try to get a shuttle, it is late.
  • My paper work is always done by just the deadline, still waiting for my SSN, MEdical insurance..etc and nthg yet.
  • Ask deaf ppl questions among all the others.
  • Bad grades in courses, and bad output in my RA work .
  • Positive tests in immunizations after taking all of them (this also a worst case, probably ppl got some of them)
I started to wonder if this is a sign, or what. Maybe I am not welcomed here!
I am really depressed.

Wednesday, September 09, 2009

First Question on Campus

I don't know why I just remembered an incident. I really laughed a lot when it jumped to my mind.
On my first days on Campus in Purdue, I was a little lost.
You know, it is just you are not familiar with language, system, people..etc
I was looking for something and I was hesitated to ask someone to guide me. So I kept thinking to myself about I should formalize my question..let me say excuse me at the beginning.......no no let it be Hello...no no let's say good morning".
I can't remember how much time these thoughts took.
but anyway, after the formalization step is done, the following step is to pick the person who I should ask. Well, let me see..there are many ppl going around, some others are just sitting. It's an easy task. isn't it?
I am not sure how much time this took me also :) . but I believe it was much harder than the first step.
Finally I made my choice, my saver is few steps far from me...
I started firing my well formatted sentence "Excuse me............"
I kept talking and asking, but didn't get any response....so I rephrased my questions and I was trying to make my tome more loud..

Finally, I get a response from the guy.. he said in a discrete tone " I..a.m D.E.A.F"