About Me

My photo
PhD Candidate at Purdue University, Computer Science.

Sunday, April 27, 2008

Javascript Flavour

I tried to introduce Prototype recently at my work...I was making some effort to let my peers in other teams get use of it..
I asked myself why did I move to prototype at first place!!
I guess the answer is time. Being alone in a project where you have to take care of all the tiny details (DB design, performance tuning, Data monitoring, HTML and CSS, Javascript, Java code, Ruby on rails, image processing..etc) was pushing me to dig to isolate myself from many details.
In Javascript I picked prototype.
The reasons were..Ruby on Rails helpers for prototype makes life makes much more easier. Although, I didn't use many helpers frequently for reasons and design..just the idea that there is a helper that will do the dirty work for me in case of time crunch makes me feel more safe.
Back to the reasons, 1-For example i think that rendering the helpers take more time than writing straight code. 2-helpers messes with the view. The HTML is blended with Javascript code, I think it is better to isolate your JS code form your HTML.
Prototype syntax is Ruby like, which makes time of development much more faster.
I faced some problems with prototype, mainly when there is conflict with function names. You can stay many hours looking for the error.

May be next time I can try the JQuery, It has many cons I believe that I can taste.

Saturday, April 26, 2008

أنا طير فى السما

أنا طير في السما بعشق بالوما
عاش قلبي ونما من غير نمنمة وبسيط إنما عايش ملحمة
ويعيش له سمة وينول أوسمة ويبعتر شوق من غير لملمة
أنا طير في السما بعشق بالوما

أنا طير طيار عديت أسوار حطمت جدار ونزلت بحار
وطلعت نهار من ليل جبار

ده العمر عمار والقلب خضار مش عين في الجنة وعين في النار
ولاتحزن يوم لأ متبسمة
أنا طير في السما بعشق بالوما

أنا طير وبطير بجناحي أمير واستنى وأسير ولاكنت أسير
والعمر قصير أنا قلبي كبير

ويساع مشاوير وقليل وكتير ولايعشق غير النور والخير
ويخاف إن سهم اليأس رمى

أنا طير في السما بعشق بالوما

Wednesday, April 23, 2008

Pairing, something I missed for so long

"The code should always be written by two programmers on one machine". Is it a rule? ...yes, in the XP world.
don't think it's waste of resources..Today, I found many issues in the code making me beg my environment to introduce a code review in the development process.

But before you go deep into this, you have to know that pairing is not a competition to show who is the best programmer. In order to maintain this , a good common practice is to ask questions.
Also, remember that the questions should eliminate the "why" thing. A lot of ppl don't like it.

The most important thing that I forgot to do when I was reviewing is the acknowledgment for the successful piece of code. Instead I kept focusing on hunting pitfalls, which I believe is a bad behavior that I should avoid the next time :(

Nice Error Message

On the pragmatic-bookshelf web site a got this error message..


I found it funny :)

Sunday, April 13, 2008

Yes we can

I liked the idea of the music video prepared by the Barack Obama campaign.
It is the first time to admire one of the candidates over the others..
I like that guy, I wish I can support him. I found a hilarious entry showing the difference between Hilary and Obama campaigns. I find Hilary's behavior is the extension of the tough, rude, and disgusting policy adopted by the USA government. I wish that Obama doesn't turn over after wining (wishing that he wins at first place)

Scalable Mail System

How Rackspace Now Uses MapReduce and Hadoop to Query Terabytes of Data
This is a very good post about the battle of building a scalable system. This shows you how much time and effort you can spend to test the best architecture that satisfies your needs. If you read this article, if you don't care about the technical solution, if you are convinced that a solution based on relational DB would still be satisfying..No problem. Just watch the life time they took to grow their system and the huge development time they did.

Was it possible to get the logging v3+ with 2,3 weeks of work?

Anyway, the article revealed when i was working as tech and engineering on zimbra :). whenever a problem raised, i grabbed the logs stored on the local disk, and try to analyze data to check the problem..OH! those were the days my zimbra friend...

Saturday, April 12, 2008

The First Cavalryman

"O Prophet of Allah, go ahead with what Allah has inspired you to do. We will stand by you. By Allah, we will never say as the Children of Israel said, `So go you and your Lord and fight you two, we are sitting right here.' Instead, we will say, `Go you and your Lord and we will fight with you.' By Allah, Who has sent you with the truth, if you take us to the end of the world, we will tolerate all hardships until we reach it with you. We will fight on your left, your right, in front of you and behind you until Allah bestows victory on you."AL- MIQDAAD IBN `AMR

AL- MIQDAAD IBN `AMR known as the first cavalry Muslim to strive in the way of Allah... He was once adopted by Al-Aswad lbn Abd Yaghuuth. thus was called Al-Miqdaad Ibn Al-Aswad, and he retained his father name "Amr Ibn-Saad" when adoption was abrogated by Islam. that man show wisdom, intelligence and courage.

One of the quotes said by Al-Miqdaad was the difference between Prophet(PBUH)'s companions and the followers.
When a man addressed Al-Miqdaad saying: "All kinds of happiness are for these eyes which have seen Allah's Prophet (PBUH). By Allah, we wish that we saw what you have seen and witnessed what you have witnessed."..Al-Miqdaad Said "Why should anyone wish to witness a scene that Allah did not wish him to see? He does not know what it would have been like if he had witnessed it or which party he would have been among if he went back in time. By Allah, Allah's Prophet (PBUH) saw people who were thrown right into hell, so you should thank Allah that you were spared such a trial and were honored by firm belief in Allah and His Prophet (PBUH)."