انا بشجع مصر

February 4th, 2010 by Ahmed S. Farghal 5 comments »

كلنا بنشجع مصر

هي دي سلسلة اعلانات شفتها في التلفزيون و اللي فعلاً حول مباريات مصر الدولية لمناسبة قومية و واحد من الاعلانات بتقول “مفيش حاجة اهم من تشجيع مصر و انا بأيد الكلام دة جداً جداً كمان بس الفارق هو معنى التشجيع هنا

انا بشجع مصر انها تبقى ام الدنيا تاني و انها تبقى اجمل بلاد العالم و اهلها اكثرهم حضارة و تحضر و علم و ثقافة ، بشجع مصر انها تبقي منارة المسلمين و ترجع بلد الامن و الامان (اقصد امن المواطن طبعاً مش حاجة تانيه)

بجد بحبك يا مصر و بتقطع و انا بشوفك بتغرقي قدام عيني و انا مش عارف اعمل ايه و اهلك بيدمروكي و حكامك بيفسدوا فيكي ، لك الله يا مصر

و احلي سلام للمعلم و جدو و احمد حسن و متعب و جمعة و كل الرجالة اللي امتعونا بالعب النظيف و كانوا فعلاً مثال للمصريين المخلصين ;-)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter

Happy 2010

December 31st, 2009 by Ahmed S. Farghal 2 comments »

2010 has a special meaning to me, it reminds me with “Zero” and if you know the story you won’t be surprised.

Anyhow, I believe that we still reside at the same place “Zero” and I wish to see some progress in the next couple of year that lift Egypt from the big zero to even a smaller one.

On the personal side, last year was quite a busy year for me and I’ve made quite some achievements in my technical career. I wish you and me and all Muslims and Christian  Friends a cheerful year, full of wealth, health, joy, happiness, and success to all the world except ‘Zionists’.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter

مصر و الجزائر

November 22nd, 2009 by Ahmed S. Farghal 16 comments »

طبعاً الوضع مشتعل تماما تماما تماماً في الاعلام و فى قلوب المصريين و السودانيين و حتى الجزائريين و رأي الناس متضارب تماماً و اللي بره مصر حاسس بتضارب و مش قادر يفهم و كل الناس في حاله حيره و عشان كده انا قلت اوضح الموضوع لكل الناس عشان كله يفهم وجهه نظر كله.

طبعاً انا معلوماتي في الكوره مش كبيرة  لكن دايماً عندي معلومه ان مباريات مصر مع الجزائر فيها خشونه و الخشونه هنا معناها خشونه في اللعب و ضرب و كده لكن الحقيقه عمر ما كان عندي معلومة ان الجزائريين متعصبين للكورة لدرجه ان الشغب عندهم طبيعي بعد المباريات و مش بس في الجزائر لأ ده في كل حته في العالم هما موجودين فيها ، لكن تظل دي معلومة قديمة و مفيش جديد لكن اللي حصل المره دي جديد و انا عايز افصل الموضوع من وجهة نظرى الشخصية

الموضوع عايز اننا نرجع بالزمن شويه قبل مباراه ١٤ نوفمبر ، المشجعين المصريين عارفين ان لاعبين مصر اتسمموا في الجزائر و ناس بتقول ان مقصود و لازم نوريهم لما ييجوا مصر و هما فعلاً جم مصر و اللي حصل ان زجاج الاتوبيس بتاعهم اتكسر و فيه كام لاعيب اتعورو و الاعلام بتاعنا زائد عدد كبير جداً جداً من الناس مقتنعين ادي تمثيليه و ان مفيش اي حاجه من دي حصلت و بعد المباراه ماسمعناش عن اي حاجة حصلت لكن في المقابل هناك في الجزائر الموضوع ماكانش كده خالص ، تحديداً صحيفه الشروق الجزائرية كانت مولعاها و الاتوبيس اللي اتكسر اصبح هجوم مصري على اللاعبين و الجهاز الفني و حتى الطبيب الصاحب للفريق و بعد المباراة بيقولوا حصلت مجازر و الناس اتعاملت معامله مهينه  و اتضربوا و في ناس ماتت من الضرب و جايبين صورهم كمان و فيديوهات بالهبل و كمان الجريدة قعدت تتكلم بالهبل عن علاقة مصر بأسرائيل و عشان كدة هما اصبحوا حاسين اننا اليهود و استمرت الجريده في الهجوم الشرس و المبتذل بصراحة و النتيجة كانت ان الجريدة حققت رقم قياسي في مبيعاتها “واحد و نص مليون نسخة” و ده يفسر واحد من اسباب هجوم الجريدة بالطريقة دي و ماجبتش سيرة اي نفي حصل للضحايا اللي حصل على لسان السفراء في مصر و الجزائر.

فلك ان تتخيل حالة الناس هناك ، في ذهنهم ان مصر قتلت و ضربت و اهانت كرامة الجزائريين و عشان هما عصبيين فحلفوا ليلقنوا المصريين درس ماينسهوش لما يقابلوهم في الخرطوم و بصراحة لو المصريين كانوا عايشين الاحداث من وجهة النظر دي كان زمان المصريين عملوا نفس الحكايه و لو مش مصدقني افتكر حالتك بعد ماسمعت اخبار الاعتداء على الفنانين المصريين او بعد ما تقرا المقال اسخيف و الحقير ده هذه رموز أبناء جميلة بوحيرد فأين رموزكم يا أبناء فيفي عبده؟ فلو الدم فار في عروقك فاعرف انك وقعت في الفخ الاعلامي ده و لو تصفحت الجريدة عموماً هاتلاقي ٩٠٪ من الاخبار عن مصر و شتائم و سباب لم يسلم منها احد و لا حتى علاء مبارك

» Read more: مصر و الجزائر

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter

نحن نقتل انفسنا

November 5th, 2009 by Ahmed S. Farghal 11 comments »

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

يا جماعه هو احنا بنقتل نفسنا و لا بنعمل ايه؟ هو الناس حاسه بالدخان و مطنشين؟ هو معقول اكون انا الوحيد اللي حاتخنق؟

طب هل لو انا طنشت مش هاعيا و لا هايجلي ربو و لا حتى سرطان و اعوذ بالله منهم كلهم؟

يا جماعه الهوا ده ملكيه مشتركه يعني لازم نقف و نشوف ايه المشكله ، لازم لازم نوقف اللي بيحصل ده ، احنا كده بنقتل نفسنا بسكوتنا و سلبيتنا اللي وصلت اقصى الحدووووود و اللي ربنا هايحسبنا عليها و على اللى عملناه في البيئه بتاعتنا

انا بستغرب قوي لما بقرأ الاخبار بتاعت ان الدلتا هاتغرق على 2050 و انه لازم نتصرف و في نفس الوقت مش شايف و لا حاسس من الحكومة بحاله طوارئ و لا خطط لأنقاذ اولادنا و لا احنا دافنين راسنا في الرمل؟

و الله مش عارف اعمل ايه ؟ و نفسي اسيب القاهرة من التلوث و القرف بس هاشتغل فين؟ للأسف كل الشركات الكبيرة و المحترمة اللي بتشتغل في الشلانه بتاعتي فاتحه في القاهرة ، يأما اسيب البلد خالص

نعمل ايه؟

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter

mercurial-server on Fedora/Centos

November 2nd, 2009 by Ahmed S. Farghal 1 comment »

If you want to setup mercurial-server on fedora or centos/rhel server you are going to see lots of failure messages during installation and the installation will definitely fail.

Mercurial-server was written to run smoothly on debian-based systems, so I patched it to run on fedora/centos and I would like to share the patch with you.

Using the patch is straight-forward, simply download the tip or the latest version of mercurial-server and put the patch file into the extracted directory.

patch < mercurial-server-centos.patch

the patch is a few lines, so it’s naive for professionals.

Get the patch from here

Have Fun.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter

Geniuses are made, not born

November 1st, 2009 by Ahmed S. Farghal 3 comments »

I couldn’t record the presentation, so I will upload only the slides.

Have Fun

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter

Dreaming Loud

October 29th, 2009 by Ahmed S. Farghal 11 comments »

Lately I discovered how fragile I am, I tend to be depressed more than being happy. I tend to be angry more than being patient and quiet. My tentative to feeling upset is because of the cumulative effect of living in Egypt with all the corruption and abusive education system.

So, I started to dream and to think about what I really wish to happen to me and I came to the following. Remember that I’m just dreaming loud.

“Cairo has been awarded for it’s excellent public transportation to be the best public transportation in the world”

“Three Universities in Egypt took the top three positions in the best 500 university around the globe”

“Egypt become the safest country in the world after having the crime rate around 0.0″

“Egypt is the IT valley of the Middle East (including Israil)

“I’m traveling around the world exploring different cultures and enjoying the nature”

“To see people smiling again in the streets and to get help when I need help from the closest person in the street and to provide help to everybody without being scared to be robbed or killed!”

“To build a successful company that compete Google in the workplace that attract the best computer scientists in the whole world”

“To be innovative so I can be a landmark in the history of computer science”

and lots more, I think those are overwhelming enough for me for now.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter

Common Mistake about Python default parameter value

October 1st, 2009 by Ahmed S. Farghal 7 comments »

I know it’s a little bit long title but didn’t find a better one :) It’s one of the common mistakes a python beginner does and even more experienced programmers can fall into the same mistake so I thought it might be useful if I illustrated that out here so you can know the concept.

you can easily fall into writing code that look like that:

def get_me_bad_list(arg1, myList=[]):
    myList.append(arg1)
    return myList

In [1]: get_me_bad_list(“hello”)
Out[1]: ['hello']

In [2]: get_me_bad_list(“world”)
Out[2]: ['hello', 'world']

Interesting, no?

The issue here is that the default value for function parameter is evaluated at function definition time (i.e, module import?) and as list objects are mutable they allow you change the value so you keep having the same default object for every function call and you modify it and return it back and even worse the caller can change it and it’ll reflect the list inside the function like the following

In [3]: x = get_me_bad_list(“Assalam”)

In[4]: x.append(“Alaykum”)

In[4]: get_me_bad_list(“Ya Shabab”)

Out[4]: ['hello', 'world', 'Assalam', 'Alaykum', 'Ya Shabab']

So, what’s the right way to do that? (if you are not doing that intentionally and you just want the plain default function parameters) that you define the initial value inside the body of the function (execution time)

def get_me_good_list(arg1, myList=None):
    myList = [] if myList is None else myList
    myList.append(arg1)
    return myList

In [1]: get_me_good_list(“hello”)
Out[1]: ['hello']

In [2]: get_me_good_list(“world”)
Out[2]: ['world']

and I’ll leave the rest of the tests to you, but generally the explanation is that everytime you call the function we create a new list (if you didn’t supply one explicitly) and that list is populated and returned so you won’t see any nasty behavior.

It’s interesting that you see that the deep you understand how the python interpreter scan and execute the code can really affect the way you fall into mistakes because if you are good enough then you will be somehow safe :)

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter

Do we really need H4ck3rZ?

September 28th, 2009 by Ahmed S. Farghal 3 comments »

An important question popped into my head, do we really need H4ck3rZ website?

We have done enormous efforts for renew our web footprint and now we have stuff that CAT never had, like the central authentication and social networking but with no result on the activity meter.

Currently almost nobody is visiting our website and no activity is being done except for the projects which are terribly slow because no serious contributers are around, so let’s think for a moment, what will happen if we gave up and stopped H4ck3rZ? Will you even notice?

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter

Design Patterns Course

September 25th, 2009 by Ahmed S. Farghal 26 comments »

I’m planning to launch a software design patterns course in Mansoura on Fridays for 5 days that would introduce the most important patterns (8 Patterns) to those who are interested in software design.

The course is comprehensive and will have hands-on example using Java 5. The course is also considered the first professional design patterns course in Mansoura, if you are interested please post because I’m collecting votes.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • DZone
  • PDF
  • Reddit
  • RSS
  • Twitter