Tuesday, October 30, 2007

بعد إزالات المنيل، ما زالت أراضي الغلابة المتاخمة للمعادي تلمع في عيون بتوع البزنس


الأهالي خلال مظاهرة أمس

تظاهر العشرات من سكان جزيرة القرصاية، لليوم الثالث علي التوالي، ورددوا هتافات تندد بمحاولات طردهم من الجزيرة، منها «بالروح بالدم نفديكي يا جزيرة» مؤكدين أنهم لن يتركوا الجزيرة مهما حدث.

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

وأرسلوا عدة استغاثات مكتوبة إلي كل من رئيس الجمهورية وجمال مبارك، أمين السياسات بالحزب الوطني، ورئيس مجلس الوزراء، وووزير الداخلية، كما أرسلت نساء الجزيرة استغاثة إلي سوزان مبارك، قرينة الرئيس، طالبوا فيها جميعا بحمايتهم وإلغاء قرار طردهم من الجزيرة.

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

قال ماهر يوسف، أحد الأهالي: إنه فوجئ أثناء تناوله إفطاره صباح أمس بأمين شرطة يدعي «عبدالعاطي» يقتحم عليه منزله، ويهدده بالاعتقال إذا لم يترك الجزيرة فورا.

Monday, October 29, 2007

strlen() vs. sizeof() Tip

Only use sizeof() for locally allocated buffers.
Always use strlen() for variables passed from outside.

Why: using sizeof() with a pointer to char passed to you will return
the size of the pointer itself (which is 4 always) not the size of the
allocated space to that buffer.

Friday, October 26, 2007

شراء الولاء

أسئلة كثيرة مرت سريعا بخاطري حينما تأملت نماذج مختلفة غاية في التطرف في اعتناق فكرة ما و الاستماتة في الدفاع عنها بصورة فجة تصل لحد الشذوذ و الامنطق رغم يقيني التام أن أي من هذه النماذج لا يعبر عن قناعات شخصية لديه أو مبدأ ما يود لو يموت في سبيله أو أيديولوجية فكرية يؤمن بها إيمانا لا يتزعزع، فوجدت أن الرابط بين كل هذه النماذج على اختلافها هو: ـ
ـ " أن تعطي من لا يستحق ما لا يحلم به، فقد ضمنت ولاءه" ـ

Thursday, October 18, 2007

string in hex

Sometimes, I need to see characters of a string in Hex values:

void printhex(unsigned char* str)
{
    for (int j=0;j<strlen(str);j++)
        printf("%02X ", str[j] );
}


Thursday, September 20, 2007

pointer to const memory


char * s = "ab";
memset(s, 0 , strlen(s)); //empy string

This code won't run because s is considered pointer to const char.
As well, this applies on a statement like this:

memcpy(s, "\0\0" , strlen(s));

That's because the compiler first reserved a memory space to hold the value "ab" then it returns to you a pointer to it. i.e. this is not considered intialization of the pointer.
Of course, defining s as an array of characters will be ok, where s will be handled as a normal variable that can be inialized not as pointer to const memory.

Monday, September 17, 2007

receiving an SMS status report message

If you set the status report request TP-SRR bit when sending an SMS-SUBMIT message, you'll receive an SMS-STATUS-REPORT message when it is delivered to the recipient.
To be able to receive this message, set the mode of new message indication as the following:

AT+CNMI=3,3,2,1
or just AT+CNMI=,,,1 (as the forth parameter is the one of our concern)
then you'll get the the status report as soon as it is delivered to the recipient:

+CDS: 06000B910221815716F2709021510121807090215101718000

The PDU String consists of the following:
Octet(s)Description
06First octet of this SMS-STATUS-REPORT message.
00
TP-MR. Message-Reference identifying the previously submitted message.
0BAddress-Length. Length of the sender number (0B hex = 11 dec)
91Type-of-address of the sender number
02 21 81 57 16 F2Sender number (decimal semi-octets), with a trailing F
70 90 21 51 01 21 80TP SCTS. Service Center Time stamp (semi-octets)
70 90 21 51 01 71 80TP DT. Discharge Time (semi-octets)
00TP ST. Status of the previously sent message .

Friday, August 31, 2007

لأ، غلط، مش منطق - متلازمة صعاب المراس

لفت انتباهي إليها غير واحد عندما تذكرت عنوان إحدى محاضرات التنمية البشرية عن "معاملة صعاب المراس" أو "Handling difficult people". فتذكرت انطباعي عن المحاضرة حينها حيث رفضت فكرة تقسيم الناس إلى عاديين و صعاب المراس، فلا يوجد في الواقع ذلك الشخص النموذج الذي تروج له كتب تطوير الذات و التنمية البشرية و قلت أن هذا ينفي خصوصية كل فرد و يعمل على التمييز بينهم على أساس أن هناك فئة منهم من ذوي المعاملات الخاصة، و لكن حينما انتبهت إلى هذه المتلازمة وجدت أنه كان الأولى أن يكون موضوع المحاضرة "التكيف مع الآخرين" على أساس أن هذه الفئة الأخرى تحتاج بالضرورة أن تعرف كيف تعامل الأولى أيضا.

Wednesday, August 15, 2007

Design: Top-Down or Bottom-Up?

Once, I prepared a session on practices for good design, symptoms of bad design, time given to design, giving considerable attention to interfaces, testable design, loosely coupled design, cohesive design, principles of good design, test-first design...

When I got to real life, I found myself following the same old practices of almost not going into design at all.
As before, I started writing code immediately, doing all things in main() with a just-get-it-done attitude, when things finally work I start to refactor code in the structured old fashion - just putting common behavior into functions, then when things begin to be slightly complex I eventually start ask my self what about classes, responsibilities of them, relations between them, interfaces ...etc.

I don't know how to follow all these practices and design guidelines from the start. Whatever you're aware of problem domain and requirements are neat, you never see things clearly until you get your hands into solving the problem.

It's unreasonable to start designing thing you don't know, or writing test cases (in TDD culture) for something you don't grasp fully. It's natural to improve incrementally, nothing could get perfect from one shot, so there is no one happy design you'll adhere to from the start to the end and your code will be refactored several times until it becomes mature.

Wednesday, July 25, 2007

metered ADSL ?

this piece of news is 3 years old..,
يظهر انهم لقوا ان ما يصحش تكون بلاد الواق واق سابقانا بخطوات كتير للخلف كدة !

http://www.theinquirer.net/?article=19445

Wednesday, July 11, 2007

Beyond Social Bookmarking


One of the services introduced in the Web 2.0 boom is social bookmarking, where people can share, organize and categorize their bookmarks (favorites) and promote any links they see useful for some purpose, where sharing all that with each other is the key of Web 2.0 user-centric services (or community-driven web).

From these social bookmarking services I was inspired by del.icio.us . But before going to create an account on del.icio.us, I discovered ClipClip, which introduced a new concept beyond just bookmarking and tagging. It's that you are able to clip parts of the web page you'd like to bookmark for future reference as if you clip a piece of newspaper page. This is great to clip just important parts of what you read and comments to it, and preserving clips is very useful if the bookmark changed or went away.

Now the time comes to say Googbye to ClipClip after giving a try to Diigo for the following reasons:
- A look at rich Diigo features says a lot about a very promising service
- with Diigo you can highlight (clip) different parts of the web page and multiple comments on each, while in ClipClip you've to re-clip the same web page different time to do so
- The killer feature for me is that, with the Diigo toolbar, you can do all clipping and commenting offline or at least without bothering you waiting for connection and communicating with server for each clip or edit in your tags or categories.

But because there is no end to user needs, there is a feature partly supported (only by Diigo, doesn't exist in ClipClip) I wish to see it complete is the ability to browse all my categories, tags, bookmarks, highlights fully offilne without the need to on-demand querying the server. Preserving a complete local copy of clippings and doing synchronization periodically will be more than great.

P.S. I don't know why (the non-integrated) Google Bookmarks and Google Notebook are far away from the fast pace of development by small (or very small) innovative companies. The same way like slow pace of Google Doc & Spreadsheet in comparison to Zoho's online Office. Or maybe giants don't care about competition and just wait to swallow one of these startups like Yahoo that acquired del.icio.us !

Wednesday, May 30, 2007

الإسلام بين التنوير و التزوير - د.محمد عمارة

أسلوب رائع، أفكار مرتبة، بحث منهجي، حياد مترفع عن الأهواء أو الآراء الشخصية العاطفية، استقصاء للفكرة من جذورها و أعماق أصولها، اعتماد الدليل و البرهان و عدم إطلاق الكلام على عواهنه... تلك هي الصورة التي ارتسمت في ذهني عقب أولى قراءاتي للدكتور محمد عمارة.
 
من خلال هذا الكتاب أيضاً تبين لي أن د.عمارة خصم شرس مرهوب الجانب في الكثير من المعارك في الفكرية مع مناهضي التوجه الإسلامي شكلاً و موضوعاً أياً كانت مرجيعاتهم و فسر لي هذا سر التربص الشديد و الترصد له و محاولة تصيد أية زلة له و إثارة زوبعة عليها لكنه أحوط و أشد حرصاً، كما علمت أن خلفيته الماركسية القديمة أصقلته و جعلته أقدر على المواجهة و فضح الخصوم.
 
في هذا الكتاب: "الإسلام بين التنوير و التزوير" يعالج د.عمارة ظاهرة الاستقطاب الفكري الذي بلغ مبلغا عظيما من الغلو و الطائفية الثقافية التي يحرسها الخارج من أجل تحقيق كامل التبعية له. فهو يدعو لفتح قنوات حوار مع كل التيارات لتحقيق الاستقلال الفكري أولاً ليبحر الجميع معا في زورق غير "مخترق". و كواحدة من آليات تحقيق هذا الاستقلال، يسعى الكاتب في هذه الدراسة إلى "تحرير المفاهيم" حتى نستطيع التحدث بلغة واحدة و إنقاذ حوارنا من مصير حوار الطرشان.
 
يتناول الكتاب هنا، في قضية تحرير المفاهيم و المضامين للمصطلحات النتداولة، مصطلح التنوير في سياق حملة وزارة الثقافة سنة 1993 التي أصدرت 50 كتابا بمعدل كتاب كل يوم تحت شعار التنوير و المواجهة أو "رموز التنوير في مواجهة الظلاميين" فيدعو الكاتب لاتخاذ سبيل الحوار بديلا عن تلك "المواجهة" و الاستقطاب فيتساءل ،بعيدا عن التعمية و حجب الحقيقة، عن حقيقة التنوير أهو غربي أم عربي وما مدى اتفاق مضامينه مع ثوابتنا. فيصل إلى أن جذور التنوير المقصود ترجع إلى فلسفة رفض تجاوز الكنيسة حدودها و الدعوة لتمجيد العقل بديلا عن قداسة الدين و التحرر من التقاليد كرد فعل للوضع السائد في أوروبا وقتها؛ وكان رواد تلك الفلسفة فرنسيس بيكون ثم فولتير و روسو و جوتة و كانت .. إلخ
بالمقارنة يثبت الكاتب عدم وجود أدنى تشابه بين حضارتنا الإسلامية و النسق الفكري الإسلامي و بين ظروف نشأة التنوير الأوروبي الذي بلغ في شدة النزعة المادية إلى نشر الإلحاد كردة فعل إزاء الموقف الكنسي الكهنوتي المهيمن على كل المقاليد وقتها؛ من ثم فما الذي يدعونا لاستدعاء هذا النموذج التنوير ليكون تنويرا لنا نحن المسلمين؟ إنه لا مانع من حيث المبدأ شريطة أن نعي تميز و تغاير المضامين التي يحملها المصطلح عندما نستخدمه في السياق الإسلامي، فالمصطلحات - كأوعية - تتحد اسماً في الأنساق الفكرية و الحضارية المختلفة لكنها تتباين في المضامين و المفاهيم من نسق فكري لآخر.

Monday, May 21, 2007

كم قلة


سؤال ألح على ذهني قبل الرحيل....

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

من هنا كان السؤال: ـ

* كم قلة سيسمع دويها تنكسر؟
* هل سيسمع دوي قلل كثيرة تنكسر معا أم تترى وراء بعض أم تفصل فترة زمنية بين كل قلة تنكسر و الأخرى؟
* ما هو توزيع القلل بالنسبة لمن يرمونها، هل معظم القلل تُرمى من مصدر واحد أم من مصادر مختلفة؟
* كم شخص سيقف مشاهدا و مستمعا لدوي القلل المتكسرة في سعادة حتى و لو لم يشارك في إلقائها؟
* من سيسارع من البداية لإحضار القلل لرميها؟
* من سيبادر بلم كسر القلل أم سيتم تركه لفترة؟

ثم ... كيف سيكون رد الفعل عند العودة مرة أخرى و إلغاء قرار الرحيل، و هل سيكون الحزن فقط على ثمن القلل التي تكسرت في الأرض دون فائدة؟

Saturday, May 19, 2007

إزالة التعديات علي النيل بالمنيب ومنيل شيحة

الصفحة الرئيسية: " 0 2 حفارا لإزالة التعديات علي النيل بالمنيب ومنيل شيحة
ارسلت وزارة الموارد المائية والري 20 حفارا الي منطقة المنيب ومنيل شيحة لازالة اعمال الردم والتعديات علي النيل بالمنطقة.. وذلك تنفيذا لتوجيهات الرئيس حسني مبارك بمنع اي اعمال للردم في النيل نهائيا"

---------------------------------------------------------------

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

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

Wednesday, May 16, 2007

Testing Strategy

A good way to decide which testing strategy to use to test a module is to base your decision on the developer of that module who can give you information about:
  • Expected bugs from that module
  • Cost of each bug (wrong functionality, system crash, hanging, or just nothing happens)
  • Amount of logic in that module
  • Ideas about scenarios, tricks or tweaks that may not be handled well by the module
Such information hopefully will help in deciding to what extent this module should be tested.

Friday, May 04, 2007

The world of Arabic Language Technology

I try here to collect the names of figures and key people behind the great development of technologies serving the Arabic Language either whom I knew personally or met once or just heared about:

Dr. Mohsen Rashwan - RDI
Dr. Salah Hamid - RDI - Umm Al-Qura University
Dr. Sherif Mahdy - RDI
Dr. Wael Hamza - RDI - IBM USA
Dr. Ossama Emam - IBM Egypt
Hany Hassan - IBM Egypt
Salah Malaeb - Sakhr
Dr. Nabil Ali - Sakhr
Dr. Taghride Anbar - Coltec
Mohamed Mustafa - Coltec
Dr. Hossam ElDin Mahgoub - Al-Khawarizmy

Wednesday, May 02, 2007

Emerge Then Evolve

  • Don't try to make things perfect from the first time, do a very simple stupid thing that just works then enhances come after that.
  • If you didn't make the stupid thing, you won't learn the perfect thing.
  • One who makes no mistakes, never makes anything.
 

Saturday, April 28, 2007

هنبطل و هنسافر و هنسيب

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

أما يكون كل وظيفة العالم و الباحث إنه يسرق رسالة عشان يترقى يبقى دي مش بلد علم
أما يكون كل مهمة رجل الأعمال ملء الكرش و استنزاف الجيوب يبقى دي مش بلد إنتاج
أما يكون كل مهمة النائب حماية الفساد و التستر عليه و اشتراكه معه في شبكة المصالح المتداخلة تبقى دي عزبة

دي مش بلدنا !! ـ


Thursday, April 12, 2007

Boo7a - the first "Egyptian 3D Game"

`
This is my complete reply on mmeshref's response about Boo7a:
----------------------------------------------------------------

0 - for whom asked, check this about the game and the company
http://en.wikipedia.org/wiki/Artificial_Studios
http://en.wikipedia.org/wiki/CellFactor

1- it's a trivial concept that outsourced work is The Property of the contracting company not the outsourcing company..., "Egyptian" doesn't "place" !

2- Egyptian doesn't mean "staff", you neither can consider Ahmed Zowail's discoveries "Egyptian" nor can you consider Technology developed at Microsoft Egyptian or Indian !

3- I should only blame myself if I did a lot of work, researches or inventions and didn't advertise for it nor did I market it... but working in silence until another one do the same, then he deserves the lead and I'll just fall in the silly cycle of crying about "success stealers" and "success enemies" !!

4- Who needs real support is who struggles to produce a national product in his country, who forms a company in his country, who hires employees in his country, who participates in developing the economy of his country, who refuses a lot of very attractive offers from multinationals here and abroad in different western countries for the sake of his dream in his country.

5- This is who deserves our full support and not the one who chooses the easy way, who sells his great work for a high class car, who doesn't strive against giants, who stops working in a competitive engine and accepts being swallowed by a great fish.... which support would you give and for the sake of what ?!

6- A final note, I hope from you to be more objective and stop this campaign you started against them since a while and try to be more positive by giving them support or just by silence... and if CellFactor developers really were harmed in some way, let them express that themselves in their way.

Thanks

Friday, March 23, 2007

offline forever

It's a long time since the last time I opened my msn messenger...
 
I scanned the contacts quickly, to discover that there's one I won't see online again... he passed away months ago - several days before Eid El-Adha.
 
As a close friend since secondary school, it was a shock that I remembered again now... he was preparing for proposal and finishing his flat perparation to start a new life for marrying just before he passed away.
 
 
وما تدري نفس بأي ارض تموت ان الله عليم خبير
 
 
As you read this, don't delete me from you contact list even if I'm offline forever.

Tuesday, January 30, 2007

انهي تحفة

انهي تحفة

قبل ذهابي للمعرض أوصاني أحدهم أن أشتري له كتاب "تحفة العروس" ... وكهواية أو ربما إدمان قمت بعمل جوجل سريع على الكتاب قبل شرائه لأفاجأ بهذا الكم الرهيب من الفوضى في عناوين الكتب... 5 كتب بنفس الاسم (*) .. ـ
تحفة العروس و متعة النفوس - محمد بن أحمد التيجاني (من التراث) ـ
تحفة العروس - محمود الإستانبولي
تحفة العروس - هيثم هلال و سعد رستم
تحفة العروس - محسن عقيل
تحفة العروسين - مجدي الشوري

فأي تحفة كان يقصد؟


(*) بقوا 10 بعد رجعت من المعرض .. ربنا يزيد و يبارك !!!
تحفة العروس - أبو عبد الرحمن عادل بن سعد
تحفة العروس - محمود بن الجميل
تحفة العروس - أسامة السيد عبد المجيد
تحفة العروس - حامد أحمد الطاهر
تحفة العروس - مجدي الشهاوي


المهم عرفت إن الكتاب الأصلي و النسخة الشرعية الوحيدة هي نسخة الاستنابولي + كتاب التراث القديم ... يعني فيه 8 نسخ مزورة !! دة رقم قياسي .. السؤال بقى هل المصنفين الثمانية الفضلاء دول اكتفوا باستغلال الاسم التجاري للكتاب الأصلي لترويج بضاعتهم أم أنه وصل بهم التطاول لحد التعدي على المتن نفسه بطريقة القص و اللصق الشهيرة ؟ (**)

للأسف فات عني أن أحتفظ في هذه القائمة بأسماء دور النشر العظيمة التي لا تتعدى رسالتها أن تكون بزنس رخيص و تجارة رائجة و تستمرئ هذا الاجتراء على الحقوق المشين


(**) استدراك : ربما أكون قد أسأت الظن في حق بعض من هؤلا المصنفين و دور النشر لكن هذا هو الانطباع الأول الذي تشكل لدي إثر فوضى العناوين المتشابهة تلك التي صدمتني و أنا بسبيل شراء كتاب لا أعرف عنه غير عنوانه... لكن للأسف هذه هي حال سوقنا في أي مجال من المجالات .. إذا ظهرت بضاعة رائجة تسابق الجميع لتقليدها لنيل و لو نذر يسير من أسهمها في السوق دون أدنى محاولة للإبداع و الإضافة و جبر النقص في المنتج الأصلي و تحسينه
و لا حول و لا قوة إلا بالله