<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>acmASCIS Blog</title> <atom:link href="http://www.acmascis.org/blog/feed/" rel="self" type="application/rss+xml" /><link>http://www.acmascis.org/blog</link> <description>Spreading Knowledge</description> <lastBuildDate>Sun, 06 May 2012 00:26:37 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>سميرة موسى .. وحلم القنبلة</title><link>http://www.acmascis.org/blog/2012/05/06/%d8%b3%d9%85%d9%8a%d8%b1%d8%a9-%d9%85%d9%88%d8%b3%d9%89-%d9%88%d8%ad%d9%84%d9%85-%d8%a7%d9%84%d9%82%d9%86%d8%a8%d9%84%d8%a9/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25d8%25b3%25d9%2585%25d9%258a%25d8%25b1%25d8%25a9-%25d9%2585%25d9%2588%25d8%25b3%25d9%2589-%25d9%2588%25d8%25ad%25d9%2584%25d9%2585-%25d8%25a7%25d9%2584%25d9%2582%25d9%2586%25d8%25a8%25d9%2584%25d8%25a9</link> <comments>http://www.acmascis.org/blog/2012/05/06/%d8%b3%d9%85%d9%8a%d8%b1%d8%a9-%d9%85%d9%88%d8%b3%d9%89-%d9%88%d8%ad%d9%84%d9%85-%d8%a7%d9%84%d9%82%d9%86%d8%a8%d9%84%d8%a9/#comments</comments> <pubDate>Sun, 06 May 2012 00:26:37 +0000</pubDate> <dc:creator>Anas A. Ismail</dc:creator> <category><![CDATA[Scientist Post]]></category> <category><![CDATA[Weekly Posts]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2680</guid> <description><![CDATA[سؤالي المعتاد الذي اعتدت أن أسأله منذ فترة لأصدقائي وأقاربي .. هل تعلم من هي سميرة موسى؟! وللأسف لم تكن الإجابة مرضية على الأقل بالنسبة لي .. وكان هذا دافعي لكتابة المقال .. العالمة الراحلة سميرة موسى -رحمها الله- هي أحد أنجب تلاميذ العالم الجليل مصطفى مشرفة -رحمه الله-  نشأت في محافظة الغربية. تميزت سميرة [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: center;"><strong><strong><img
class="aligncenter" src="https://lh5.googleusercontent.com/MdVjqalodA7WXt_XfgDGqrUgh5v0XnKpQH-xr3M0yWdZNwQ7j6mqtsYnbcmzz4DTnexyogDKqEImrFK3Kwf5gYgp5kt9QNZ5zpWv9aG23OZ5iqR4x4o" alt="" width="219px;" height="280px;" /></strong></strong></p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">سؤالي المعتاد الذي اعتدت أن أسأله منذ فترة لأصدقائي وأقاربي .. هل تعلم من هي سميرة موسى؟! وللأسف لم تكن الإجابة مرضية على الأقل بالنسبة لي .. وكان هذا دافعي لكتابة المقال ..</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">العالمة الراحلة سميرة موسى -رحمها الله- هي أحد أنجب تلاميذ العالم الجليل <a
href="http://www.acmascis.org/blog/2012/02/05/%D8%B9%D9%84%D9%89-%D9%85%D8%B5%D8%B7%D9%81%D9%89-%D9%85%D8%B4%D8%B1%D9%81%D8%A9/">مصطفى مشرفة -</a>رحمه الله-  نشأت في محافظة الغربية.</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">تميزت سميرة موسى بنبوغها العلمي في جميع مراحل الدراسة ذلك النبوغ فاق قدرات المألوف لأمثالها في ذلك الوقت فعلى سبيل المثال لا الحصر إعادتها لصياغة كتاب الجبر وهي في الصف الأول الثانوي.</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">ثم انتقلت سميرة موسى إلى كلية العلوم بجامعة درا فؤاد -القاهرة حاليا- وذلك النبوغ لفت نظر أستاذها العالم مصطفى مشرفة أول عميد مصري لكلية العلوم آنذاك.</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">تم تخرجت سميرة موسى في كلية العلوم ثم عملت كمعيدة في الجامعة وهي أول معيدة بكلية العلوم، بعدما دافع عنها أستاذها الجليل مشرفة.</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">ثم حصلت على شهادة الماجستير في موضوع &#8220;التواصل الحراري للغازات&#8221; ، وسافرت في بعثة إلى إنجلترا لتستكمل دراستها.</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">ومن هنا تبدأ قصتنا مع العالمة سميرة موسى ..</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">سافرت سميرة موسى في بعثة إلى إنجلترا ودرست الإشعاع النووي وحصلت على الدكتوراة في &#8220;الأشعة السينية وتأثيرها على المواد المختلفة&#8221; ثم عادت إلى مصر وساهمت في تأسيس هيئة الطاقة الذرية.</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">وسنحت لها الفرص واحدة تلو الأخرى في السفر من مكان إلى آخر، فسافرت إلى أمريكا وسمح لها بالعمل في معامل جامعة سان لويس بولاية ميسوري.</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">ومما لا شك فيه أن التلميذ سيحذو حذو أستاذه، فضلت سميرة موسى العودة للعمل بمصر لاستكمال نداءات أستاذها مصطفى مشرفة في أن تمتلك مصر قنبلة ذرية والدعوة للاستخدام السلمي النووي .</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">ورفضت جميع العروض المقدمة لها، وقبل أن تعود إلى مصر وجهت إليها دعوة بزيارة معامل نووية في كاليفورنيا وبينما كانوا في وسط الطريق المنحدر ظهرت فجأة سيارة نقل صدمت سيارتها وأودت بها إلى واد عميق، وكان لها مساعد هندي يقال أنه قفز من السيارة واختفى منذ ذلك الوقت إلى الآن.</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">وذهبت ميس كوري الشرق في ظروف غامضة، ذهبت وذهب معها كل نداء مشابهلندائها. .. ومات حلم القنبلة.</p><p
class = "arabic" style="direction: rtl; text-align: right;" dir="ltr">رحمك الله ورحم الله كل من أمل خيرا في بلادنا.</p><p
style="direction: rtl; text-align: right;"><strong><strong><div><object
type="application/x-shockwave-flash" data="http://www.youtube.com/v/jVdVmvnVouw&#038;hd=1" style="width:630px;height:480px"><param
name="wmode" value="opaque"><param
name="movie" value="http://www.youtube.com/v/jVdVmvnVouw&#038;hd=1" /></object></div><p></strong></strong></p> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/05/06/%d8%b3%d9%85%d9%8a%d8%b1%d8%a9-%d9%85%d9%88%d8%b3%d9%89-%d9%88%d8%ad%d9%84%d9%85-%d8%a7%d9%84%d9%82%d9%86%d8%a8%d9%84%d8%a9/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Grandmas and Trolls</title><link>http://www.acmascis.org/blog/2012/05/02/grandmas-and-trolls-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=grandmas-and-trolls-2</link> <comments>http://www.acmascis.org/blog/2012/05/02/grandmas-and-trolls-2/#comments</comments> <pubDate>Tue, 01 May 2012 22:34:32 +0000</pubDate> <dc:creator>Abdullah Najuib</dc:creator> <category><![CDATA[Problem]]></category> <category><![CDATA[Weekly Challenge]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2687</guid> <description><![CDATA[You are on your way to visit your Grandma, who lives at the end of the valley. It&#8217;s her birthday, and you want to give her the cakes you&#8217;ve made. Between your house and her house, you have to cross 7 bridges, and as it goes in the land of make believe, there is a [...]]]></description> <content:encoded><![CDATA[<p>You are on your way to visit your Grandma, who lives at the end of the valley. It&#8217;s her birthday, and you want to give her the cakes you&#8217;ve made.</p><p>Between your house and her house, you have to cross 7 bridges, and as it goes in the land of make believe, there is a troll under every bridge! Each troll, quite rightly, insists that you pay a troll toll. Before you can cross their bridge, you have to give them half of the cakes you are carrying, but as they are kind trolls, they each give you back a single cake.</p><p>How many cakes do you have to leave home with to make sure that you arrive at Grandma&#8217;s with exactly 2 cakes ?</p> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/05/02/grandmas-and-trolls-2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>لُغَـــــتُنا الجَميـــــلَة</title><link>http://www.acmascis.org/blog/2012/05/01/%d9%84%d9%8f%d8%ba%d9%8e%d9%80%d9%80%d9%80%d9%80%d9%80%d8%aa%d9%8f%d9%86%d8%a7-%d8%a7%d9%84%d8%ac%d9%8e%d9%85%d9%8a%d9%80%d9%80%d9%80%d9%80%d9%80%d9%84%d9%8e%d8%a9/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25d9%2584%25d9%258f%25d8%25ba%25d9%258e%25d9%2580%25d9%2580%25d9%2580%25d9%2580%25d9%2580%25d8%25aa%25d9%258f%25d9%2586%25d8%25a7-%25d8%25a7%25d9%2584%25d8%25ac%25d9%258e%25d9%2585%25d9%258a%25d9%2580%25d9%2580%25d9%2580%25d9%2580%25d9%2580%25d9%2584%25d9%258e%25d8%25a9</link> <comments>http://www.acmascis.org/blog/2012/05/01/%d9%84%d9%8f%d8%ba%d9%8e%d9%80%d9%80%d9%80%d9%80%d9%80%d8%aa%d9%8f%d9%86%d8%a7-%d8%a7%d9%84%d8%ac%d9%8e%d9%85%d9%8a%d9%80%d9%80%d9%80%d9%80%d9%80%d9%84%d9%8e%d8%a9/#comments</comments> <pubDate>Tue, 01 May 2012 11:18:27 +0000</pubDate> <dc:creator>Anas A. Ismail</dc:creator> <category><![CDATA[Weekly Posts]]></category> <category><![CDATA[X - Post]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2598</guid> <description><![CDATA[كَلامُنَا لَفْـــــــظٌّ مُفِيدٌّ كاسْتَقِم … وَاسْمٌّ وفعلٌّ ثُمَّ حَّرْفٌ الكَلِــــــــمْ واحِـــــــــــــــــــــدُهُ كَلِمَةٌ والقَوْلُ عَمّْ … وَكــــَـــــــــــلِمَةٌ بِهَا كَلَامٌ قَدْ يُؤَمْ بِالجَـــــــــــرِّ والتَّـنـْــــــــوِينِ وَالنِّدَا وَأَلْ … وَمُسْنَدٍ لِلاسْمِ تَمْيزٌ حَصَــــــــلْ لا تعجب سنعلم ما هذا سويا بعد لحظات .. حقيقة لم أجد أبلغ من هذه الأبيات في وصف كلامنا العربي .. هذه الأبيات من ألفية بن مالك [...]]]></description> <content:encoded><![CDATA[<blockquote><p
style="direction: rtl;" align="center"><span
style="font-size: large;">كَلامُنَا لَفْـــــــظٌّ مُفِيدٌّ كاسْتَقِم … وَاسْمٌّ وفعلٌّ ثُمَّ حَّرْفٌ الكَلِــــــــمْ</span></p><p
style="direction: rtl;" align="center"><span
style="font-size: large;">واحِـــــــــــــــــــــدُهُ كَلِمَةٌ والقَوْلُ عَمّْ … وَكــــَـــــــــــلِمَةٌ بِهَا كَلَامٌ قَدْ يُؤَمْ</span></p><p
style="direction: rtl;" align="center"><span
style="font-size: large;">بِالجَـــــــــــرِّ والتَّـنـْــــــــوِ</span><span
style="font-size: large;">ينِ وَالنِّدَا وَأَلْ … وَمُسْنَدٍ لِلاسْمِ تَمْيزٌ حَصَــــــــلْ</span></p></blockquote><p
class="arabic" style="direction: rtl; text-align: right;">لا تعجب سنعلم ما هذا سويا بعد لحظات .. حقيقة لم أجد أبلغ من هذه الأبيات في وصف كلامنا العربي .. هذه الأبيات من <a
title="ألفية بن مالك- ويكيبيديا" href="http://ar.wikipedia.org/wiki/%D8%A3%D9%84%D9%81%D9%8A%D8%A9_%D8%A7%D8%A8%D9%86_%D9%85%D8%A7%D9%84%D9%83" target="_blank">ألفية بن مالك</a> – باب الكلام وما يتألف منه.</p><p
class="arabic" style="direction: rtl; text-align: right;">أحد أسرار تقدم الدول هو الاعتزاز بلغتها الأم .. في فرنسا مثلا منذ بضع سنوات قام المسؤول عن جهاز الإعلام بإصدار قرار بمنع التحدث بأي لغة غير الفرنسية على التلفاز، وأنه سيتم محاسبة كل من يخالف ذلك .. فقط لاعتزازهم بلغتهم.</p><p
class="arabic" style="direction: rtl; text-align: right;">وفي بلادنا نجد المذيع على الشاشات ينطق باللغات الأجنبية مفتخرا بذاته، والأفظع من هذا أنه حتى لا يجيد استخدام اللغة الأجنبية.</p><p
class="arabic" style="direction: rtl; text-align: right;">وللأسف إعلامنا القوي كان له عظيم الأثر في تشويه صورة مدرس اللغة العربية في الأفلام مدعين أنهم أصحاب رسالات ولا يمكن إيصال الرسالة إلا بهذه الصورة المهينة.</p><p
class="arabic" style="direction: rtl; text-align: right;">هناك أسباب وأسباب لو تكلمنا فيها ما انتهينا ولكن حديثنا في الأسباب مضيعة للوقت.</p><p
class="arabic" style="direction: rtl; text-align: right;">حفاظنا على اللغة العربية أحبتي هو حفاظ لماضينا و حاضرنا و مستقبلنا .. أبحاث اللغة العربية في هذه الآونة في أشد الحاجة إلى التطوير ونحن .متمسكين بـ(هاي،باي،سوري) حتى لا نكون رجعيين. وشتان بين التمسك بسفساف الأمور ومعاليها.</p><p
class="arabic" style="direction: rtl; text-align: right;"> الغرب يكيدون لنا المكائد منذ سنين ليساعدوا في اندثار اللغة العربية فيمكننا أن نرى ذلك مثلاً <a
title="اللغه المصريه الحديثه- ويكيبيديا" href="http://arz.wikipedia.org/wiki/%D8%A7%D9%84%D9%84%D8%BA%D9%87_%D8%A7%D9%84%D9%85%D8%B5%D8%B1%D9%8A%D9%87_%D8%A7%D9%84%D8%AD%D8%AF%D9%8A%D8%AB%D9%87#.D9.84.D9.87.D8.AC.D9.87_.D9.88.D9.84.D8.A7_.D9.84.D8.BA.D9.87.D8.9F" target="_blank">هنا</a> .. وسأترك لك التخمين لتعرف من كتب هذا&#8230; وكل لبيب بالإشارة يفهم.</p><p
class="arabic" style="direction: rtl; text-align: right;">وهذا مقطع للدكتور مصطفى محمود – رحمه الله – يرد فيه على أحد المدعين أن اللغة العبرية هي أم اللغات:</p><p
class="arabic" style="direction: rtl; text-align: right;"><div><object
type="application/x-shockwave-flash" data="http://www.youtube.com/v/dF25erx2SCg&#038;hd=1" style="width:630px;height:480px"><param
name="wmode" value="opaque"><param
name="movie" value="http://www.youtube.com/v/dF25erx2SCg&#038;hd=1" /></object></div></p><p
class="arabic" style="direction: rtl; text-align: right;">نحن هنا لسنا بصدد الدفاع عن اللغة العربية و إن كانت في حاجة إلى ذلك ، ولكن علينا أن ندرك أن لغتنا العربية هي أعمق من أن تكون لغة التخاطب، فالبكم يتخاطبون بلغتهم الخاصة .. ولكن للعربية شأن آخر فهي محمية من التفتت مهما اختلفت اللهجات فلم نجد يوما العربية المصرية كمثال للإنجليزية الأمريكية.</p><p
class="arabic" style="direction: rtl; text-align: right;">وهذا آخر ما يمكنني عرضه اليوم .. أوجز فأنجر .. لقاء للشيخ الشعراوي:</p><p
class="arabic" style="direction: rtl; text-align: right;"><div><object
type="application/x-shockwave-flash" data="http://www.youtube.com/v/8NWsTo9VUgg&#038;hd=1" style="width:630px;height:480px"><param
name="wmode" value="opaque"><param
name="movie" value="http://www.youtube.com/v/8NWsTo9VUgg&#038;hd=1" /></object></div></p><p
class="arabic" style="direction: rtl; text-align: right;">وأخيراً أعزائي أوصي نفسي وإياكم أن نتوقف جميعاً من الآن عما يشين لغتنا العربية ويساعد في ضياعها من مستحدثات العصر الفاشلة مثل (الفرانكو) وغيرها والتي تؤثر على اللغة العربية فإن لم نشعر بتأثيرها علينا، سنشعر عما قريب بتأثيرها فى أولادنا.</p> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/05/01/%d9%84%d9%8f%d8%ba%d9%8e%d9%80%d9%80%d9%80%d9%80%d9%80%d8%aa%d9%8f%d9%86%d8%a7-%d8%a7%d9%84%d8%ac%d9%8e%d9%85%d9%8a%d9%80%d9%80%d9%80%d9%80%d9%80%d9%84%d9%8e%d8%a9/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Stamps [Answered]</title><link>http://www.acmascis.org/blog/2012/04/30/stamps-answered-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=stamps-answered-2</link> <comments>http://www.acmascis.org/blog/2012/04/30/stamps-answered-2/#comments</comments> <pubDate>Mon, 30 Apr 2012 18:05:53 +0000</pubDate> <dc:creator>Sharaf</dc:creator> <category><![CDATA[Solution]]></category> <category><![CDATA[Weekly Challenge]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2658</guid> <description><![CDATA[Answer B had Green-Red. B says: &#8220;Suppose I have red-red. A would have said on her second turn: &#8216;I see that B has red-red. If I also have red-red, then all four reds would be used, and C would have realized that she had green-green. But C didn&#8217;t, so I don&#8217;t have red-red. Suppose I [...]]]></description> <content:encoded><![CDATA[<h2 dir="LTR">Answer</h2><p
dir="LTR"><strong>B</strong> had <strong>Green-Red</strong>.</p><p
dir="LTR"><strong>B</strong> says: &#8220;Suppose I have red-red. <strong>A</strong> would have said on her second turn: &#8216;I see that <strong>B</strong> has red-red. If I also have red-red, then all four reds would be used, and <strong>C</strong> would have realized that she had green-green. But <strong>C</strong> didn&#8217;t, so I don&#8217;t have red-red. Suppose I have green-green. In that case, <strong>C</strong> would have realized that if she had red-red, I would have seen four reds and I would have answered that I had green-green on my first turn. On the other hand, if she also has green-green [we assume that <strong>A</strong> can see <strong>C</strong>; this line is only for completeness], then <strong>B</strong> would have seen four greens and she would have answered that she had two reds. So <strong>C</strong> would have realized that, if I have green-green and <strong>B</strong> has red-red, and if neither of us answered on our first turn, then she must have green-red.<br
/> &#8220;&#8216;But she didn&#8217;t. So I can&#8217;t have green-green either, and if I can&#8217;t have green-green or red-red, then I must have green-red.&#8217;<br
/> So <strong>B</strong> continues:<br
/> &#8220;But she (<strong>A</strong>) didn&#8217;t say that she had green-red, so the supposition that I have red-red must be wrong. And as my logic applies to green-green as well, then I must have green-red.&#8221;<br
/> So<strong> B</strong> had <strong>green-red</strong>, and we don&#8217;t know the distribution of the others certainly.<br
/> (Actually, it is possible to take the last step first, and deduce that the person who answered YES must have a solution which would work if the greens and reds were switched &#8212; <strong>red-green</strong>.)</p><h2 dir="LTR">Winner:</h2><p
dir="LTR"><strong>Sara 3laa Saywd</strong></p><p
dir="LTR">Congratulations <img
src='http://www.acmascis.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/04/30/stamps-answered-2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>قصة الأسد و الانسان</title><link>http://www.acmascis.org/blog/2012/04/23/%d9%82%d8%b5%d8%a9-%d8%a7%d9%84%d8%a3%d8%b3%d8%af-%d9%88-%d8%a7%d9%84%d8%a7%d9%86%d8%b3%d8%a7%d9%86/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25d9%2582%25d8%25b5%25d8%25a9-%25d8%25a7%25d9%2584%25d8%25a3%25d8%25b3%25d8%25af-%25d9%2588-%25d8%25a7%25d9%2584%25d8%25a7%25d9%2586%25d8%25b3%25d8%25a7%25d9%2586</link> <comments>http://www.acmascis.org/blog/2012/04/23/%d9%82%d8%b5%d8%a9-%d8%a7%d9%84%d8%a3%d8%b3%d8%af-%d9%88-%d8%a7%d9%84%d8%a7%d9%86%d8%b3%d8%a7%d9%86/#comments</comments> <pubDate>Sun, 22 Apr 2012 22:43:29 +0000</pubDate> <dc:creator>Sharaf</dc:creator> <category><![CDATA[Weekly Posts]]></category> <category><![CDATA[X - Post]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2573</guid> <description><![CDATA[ربما البعض منكم يعلم بقصة الأسد الذي اغتال مدربه ((محمد الحلو)) وقتله غدرا في أحد عروض السيرك بالقاهرة وما نشرته الجرائد بعد ذلك من انتحار الأسد في قفصه بحديقة الحيوان واضعا نهاية عجيبة لفاجعة مثيرة من فواجع هذا الزمان . والقصة بدأت أمام جمهور غفير من المشاهدين في السيرك حينما استدار محمد الحلو ليتلقى تصفيق [...]]]></description> <content:encoded><![CDATA[<p
class="arabic" dir="RTL">ربما البعض منكم يعلم بقصة الأسد الذي اغتال مدربه ((محمد الحلو)) وقتله غدرا في أحد عروض السيرك بالقاهرة وما نشرته الجرائد بعد ذلك من انتحار الأسد في قفصه بحديقة الحيوان واضعا نهاية عجيبة لفاجعة مثيرة من فواجع هذا الزمان .</p><p
class="arabic" dir="RTL">والقصة بدأت أمام جمهور غفير من المشاهدين في السيرك حينما استدار محمد الحلو ليتلقى تصفيق الجمهور الحاضر بعد نمرة ناجحة مع الأسد المسمى ((سلطان)) .. وفي لحظة قفز الأسد على كتفه من الخلف وأنشب مخالبه وأسنانه في ظهره &#8230; وسقط المدرب على الأرض ينزف دما ومن فوقه الأسد الهائج &#8230; واندفع الجمهور والحراس يحملون الكراسي وهجم ابن الحلو على الأسد بقضيب من حديد وتمكن أن يخلص أباه بعد فوات الأوان .</p><p
class="arabic" dir="RTL">ومات الأب في المستشفى بعد ذلك بأيام .</p><p
class="arabic" dir="RTL">أما الأسد سلطان فقد انطوى على نفسه في حالة اكتئاب ورفض الطعام .</p><p
class="arabic" dir="RTL">وقرر مدير السيرك نقله إلى حديقة الحيوان باعتباره أسدا شرسا لا يصلح للتدريب.</p><p
class="arabic" dir="RTL">وفي حديقة الحيوان استمر الأسد سلطان على إضرابه عن الطعام فقدموا له أنثى لتسري عنه فضربها في قسوة وطردها وعاود انطواءه وعزلته واكتئابه .</p><p
class="arabic" dir="RTL">وأخيرا انتابته حالة جنون فراح يعض جسده وهوى على ذيله بأسنانه فقضمه نصفين .. ثم راح يعض ذراعه ، الذراع نفسها التي اغتال بها مدربه ، وراح يأكل منها في وحشية وظل يأكل من لحمها حتى نزف ومات، واضعا بذلك خاتمة لقصة ندم من نوع فريد &#8230; ندم حيوان أعجم وملك نبيل من ملوك الغابة عرف معنى الوفاء وأصاب منه حظا لا يصيبه الآدميون .</p><p
class="arabic" dir="RTL">أسد قاتل أكل يديه الآثمتين&#8230;</p><p
class="arabic" dir="RTL">كانت آخر كلمة قالها ((محمد الحلو)) وهو يموت .. أوصيكم أن لا تقتلوا سلطان .. وصية أمانة لا أحد يقتله.</p><p
class="arabic" dir="RTL">سمع الأسد وصية مدربه ؟ وهل فهمها ؟ وهل عرف معنى الندم ؟ وهل عاقب نفسه على جريمته ؟</p><p
class="arabic" dir="RTL">درس بليغ يعطيه حيوان للمسوخ البشرية التي تأكل شعوبا وتقتل ملايين في برود على الموائد الدبلوماسية وهي تقرع الكؤوس وتتبادل الأنخاب وكأنه لا شيء حدث . ودرس للذي يقتل انسانا بريئا طمعا في متاع الدنيا الفاني ثم ينام قرير العينين.</p><p
class="arabic" dir="RTL">إني أنحني احتراما لهذا الأسد الإنسان .</p><p
class="arabic" dir="RTL">بل إني لأظلمه وأسبه حين أصفه بالإنسانية .</p><p
class="arabic" dir="RTL">قصة منقولة من صحيفة مصرية .</p> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/04/23/%d9%82%d8%b5%d8%a9-%d8%a7%d9%84%d8%a3%d8%b3%d8%af-%d9%88-%d8%a7%d9%84%d8%a7%d9%86%d8%b3%d8%a7%d9%86/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>مصطفى محمود &#8230; لو كنت بيننا اليوم</title><link>http://www.acmascis.org/blog/2012/04/22/%d9%85%d8%b5%d8%b7%d9%81%d9%89-%d9%85%d8%ad%d9%85%d9%88%d8%af-%d9%84%d9%88-%d9%83%d9%86%d8%aa-%d8%a8%d9%8a%d9%86%d9%86%d8%a7-%d8%a7%d9%84%d9%8a%d9%88%d9%85/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25d9%2585%25d8%25b5%25d8%25b7%25d9%2581%25d9%2589-%25d9%2585%25d8%25ad%25d9%2585%25d9%2588%25d8%25af-%25d9%2584%25d9%2588-%25d9%2583%25d9%2586%25d8%25aa-%25d8%25a8%25d9%258a%25d9%2586%25d9%2586%25d8%25a7-%25d8%25a7%25d9%2584%25d9%258a%25d9%2588%25d9%2585</link> <comments>http://www.acmascis.org/blog/2012/04/22/%d9%85%d8%b5%d8%b7%d9%81%d9%89-%d9%85%d8%ad%d9%85%d9%88%d8%af-%d9%84%d9%88-%d9%83%d9%86%d8%aa-%d8%a8%d9%8a%d9%86%d9%86%d8%a7-%d8%a7%d9%84%d9%8a%d9%88%d9%85/#comments</comments> <pubDate>Sat, 21 Apr 2012 23:18:17 +0000</pubDate> <dc:creator>Anas A. Ismail</dc:creator> <category><![CDATA[Scientist Post]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2532</guid> <description><![CDATA[حينما قررت أن أتناول العالم الجليل مصطفى محمود في هذا المقال، تشتت كثيراً وقُّلت لنفسي من أتناول.. مصطفى محمود عالم الطب ، أم عالم الفلسفة، أم عالم الدين أم السياسي المُمنطق. حيث وجدت أنه ألف 89 كتاباً منها الكتب العلمية والدينية والفلسفية والاجتماعية والسياسية إضافة إلى الحكايات والمسرحيات وقصص الرحلات والمقالات &#8230; وأخيرا.. قررت أن [...]]]></description> <content:encoded><![CDATA[<p
dir="rtl" align="right"><span
style="font-size: large;"><span
style="font-family: 'Times New Roman';">حينما قررت أن أتناول العالم الجليل مصطفى محمود في هذا المقال، تشتت كثيراً وقُّلت لنفسي من أتناول.. مصطفى محمود عالم الطب ، أم عالم الفلسفة، أم عالم الدين أم </span><span
style="font-family: 'Times New Roman';">السياسي المُمنطق.</span></span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman';"><span
style="font-size: large;">حيث وجدت أنه ألف 89 كتاباً منها الكتب العلمية والدينية والفلسفية والاجتماعية والسياسية إضافة إلى الحكايات والمسرحيات وقصص الرحلات والمقالات &#8230;</span></span></p><p
align="right"><span
style="font-family: 'Times New Roman';"><span
style="font-size: large;">وأخيرا.. قررت أن يكون عنوان مقالي ، لو كنت بيننا اليوم ..</span></span></p><p
dir="rtl"><span
style="font-family: 'Times New Roman';"><span
style="font-size: large;">معظم كتابات هذا الرجل كانت تُّنبئ بما نحن فيه اليوم – الأمة العربية – من جهل وتأخر في الناحية العلمية.</span></span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman';"><span
style="font-size: large;">ودعونا قبل أن نبدأ حديثنا نشاهد هذا المقطع <span
style="color: #1e1e1e;">&#8230;</span></span></span></p><p
style="text-align: center;" dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;"> <div><object
type="application/x-shockwave-flash" data="http://www.youtube.com/v/Tg66Fni1LzA&#038;hd=1" style="width:630px;height:480px"><param
name="wmode" value="opaque"><param
name="movie" value="http://www.youtube.com/v/Tg66Fni1LzA&#038;hd=1" /></object></div><p> </span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">ياالله!! كان هذا المقطع منذ حوالي من 40 سنة ..</span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">لا أعلم لماذا قررنا نحن الشعوب العربية أن نلعب دور(النسناس) – أعزكم الله – ونكتفي بالمشاهدة والتأثر ولا تصيبنا الغيرة لما وصل إليه غيرنا.</span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">اعتقد أن ما نحن فيه اليوم من التأخر والجهل هونتيجة لإهمالنا شيئين مهمين .. لا يصح أحدهما بدون الآخر<span
style="color: #000000;"><strong> (العلم والإيمان)</strong></span> فأنا أتذكر لمصطفى محمود قولته الشهيرة:</span></p><blockquote><p
dir="rtl" align="center"><span
style="font-family: LilyUPC; font-size: medium;"><em><strong>“ العلم والإيمان هما وجها الإنسان الكامل الذى لا يمكن أن يكون كاملاً بدونهما”</strong></em></span></p></blockquote><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">فالجانب العلمي أهملناه طوعا أو كرها .. فالواقع أننا أهملناه حتى أصبح مفهومنا حتى عن كيفية تلقي العلوم ضعيف.</span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">وضاعت الفرصة على مجتمعاتنا في استيعاب كثير من العلوم الحديثة -علوم الحاسب مثلاًّ-</span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">والجانب الآخرهو الجانب الَّروحاني الَّرباني .. جانب الإيمان .. فشغلنا بشهوات الدنيا من أكل وشرب.. إلخ </span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman';"><span
style="font-size: large;">كل هذه الأمور جعلت منا أناس عاديين وهذا ما أشار إليه عالمنا الجليل– رحمه الله – في حديثه عن الفرق<strong> </strong>بين الإنسان العادي والعبقري</span> ..</span></p><p
style="text-align: center;" dir="rtl" align="right"><span
style="font-family: 'Times New Roman';"><span
style="font-size: large;"> <div><object
type="application/x-shockwave-flash" data="http://www.youtube.com/v/eavvJoOVXoI&#038;hd=1" style="width:630px;height:480px"><param
name="wmode" value="opaque"><param
name="movie" value="http://www.youtube.com/v/eavvJoOVXoI&#038;hd=1" /></object></div><p></span></span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman';"><span
style="font-size: large;">وكان لهذا تأثير عميق في كل مناحي الحياة .. وافتقدنا اللحظات المؤثرة في حياتنا .. وأنا شخصيا <strong>تأثرت </strong>بقول الدكتور في البحث عن مثل هذه اللحظات.</span></span></p><blockquote><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman';"><span
style="font-family: LilyUPC; font-size: medium;"><strong>“ </strong></span><em><span
style="font-family: LilyUPC; font-size: medium;"><strong>أريد لحظة انفعال.. لحظة حب.. لحظة دهشة.. لحظة اكتشاف.. لحظة معرفة.. أريد لحظة تجعل لحياتى معنى.. إن حياتى من أجل أكل العيش لا معنى لها لأنها مجرد إستمرار”</strong></span> </em></span></p></blockquote><p
dir="rtl" align="left"><strong><span
style="font-family: 'Times New Roman';">أكل عيش&#8212; مصطفى محمود</span></strong></p><p
dir="rtl" align="right"><span
style="font-size: large;"><span
style="font-family: LilyUPC;"><span
style="font-family: 'Times New Roman';">ولم نبحث يوما عن أي من أمثال هذه اللحظات التي قد تغير مسار الحياة لإنسان .. ولهذا صار الوطن العربي وطن عربي ، وأصبحت أمريكا أمريكا ..</span></span></span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">حقيقة الأمر يا سادة ..أنا لم أقصد بعنوان مقالتي (لو كنت بيننا اليوم) العالم الجليل مصطفى محمود فقط .. بل قصدت كل علماء ماضينا الكرام .. </span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">ابن سينا، الفراهيدي، الخوارزمي، الشافعي، الرازي، الطبراني … </span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">مصطفى مشرفة، سميرة موسى، الشعراوي،الغزالي … إلخ</span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">ماذا لو كانوا بيننا اليوم .. ؟!! فلنسأل أنفسنا، ولنبحث فينا عمن يجيب.</span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">لا اعتبر مقالي تعتيماً على ما في حاضرنا من جمال، ولكن هو واقع الأمر ومن أسباب ما نحن فيه اليوم خوفنا من مواجهة حقيقة يومنا متمسكين بزهو تاريخنا.</span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;"> كفانا فخرا بحكايات أجدادنا التى كانت تروى لنا .. ونرويها الآن لأبنائنا .. فلنجعل أبنائنا يروون قصصنا لأبنائهم ، حتى لا نرى اليوم الذي يرى فيها أحفادنا قصص أجدادنا قد باتت أساطيرا.</span></p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman'; font-size: large;">وأخيراً.. حسبنا مما ذكرت مال قاله الدكتور..</span></p><blockquote><p
dir="rtl" align="center"><span
style="color: #000000; font-family: 'Arabic Typesetting'; font-size: xx-large;"><strong>الشـــــــــــــــــرفُ مراتب..</strong></span></p><p
dir="rtl" align="center"><span
style="color: #000000; font-family: 'Arabic Typesetting'; font-size: xx-large;"><strong>هناك رجلٌّ يصنعُ نفسَه .. وهناك رجلٌ يصنع أولاده</strong></span></p><p
dir="rtl" align="center"><span
style="color: #000000; font-family: 'Arabic Typesetting'; font-size: xx-large;"><strong>وهناك رجلٌ يصنع المجتمع .. وهناك رجلٌ يصنع التاريخ</strong></span></p><p
dir="rtl" align="center"><span
style="color: #000000; font-family: 'Arabic Typesetting'; font-size: xx-large;"><strong>وهو أشرف الشرفاء جميعًا</strong></span></p><p
dir="rtl" align="center"><span
style="color: #000000; font-family: 'Arabic Typesetting'; font-size: xx-large;"><strong>وإذا أردت أن تعرف نصيبك من الشرف ..</strong></span></p><p
dir="rtl" align="center"><span
style="color: #000000; font-family: 'Arabic Typesetting'; font-size: xx-large;"><strong>فاسأل نفسك يومًا !!</strong></span></p><p
dir="rtl" align="center"><span
style="color: #000000;"><strong><span
style="font-family: 'Arabic Typesetting';"><span
style="font-size: xx-large;"><strong><span
style="font-size: xx-large;"><span
style="font-family: 'Arabic Typesetting';">ماذا صنعت لأصبح أحسن من الأمس ؟!</span></span></strong></span></span></strong></span></p><p
dir="rtl" align="center"></blockquote><p
dir="rtl" align="right"><strong><span
style="font-family: 'Times New Roman';"> </span></strong></p><p
dir="rtl" align="right"><strong><span
style="font-family: 'Times New Roman';">ملحوظة : هذا المقال موجه لجميع الأمم.</span></strong></p><p>&nbsp;</p><p
dir="rtl" align="right"><span
style="font-family: 'Times New Roman';"><br
/> </span></p> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/04/22/%d9%85%d8%b5%d8%b7%d9%81%d9%89-%d9%85%d8%ad%d9%85%d9%88%d8%af-%d9%84%d9%88-%d9%83%d9%86%d8%aa-%d8%a8%d9%8a%d9%86%d9%86%d8%a7-%d8%a7%d9%84%d9%8a%d9%88%d9%85/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Stay Focused!! [Answered]</title><link>http://www.acmascis.org/blog/2012/04/22/stay-focused-answered/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=stay-focused-answered</link> <comments>http://www.acmascis.org/blog/2012/04/22/stay-focused-answered/#comments</comments> <pubDate>Sat, 21 Apr 2012 23:13:40 +0000</pubDate> <dc:creator>Abdullah Najuib</dc:creator> <category><![CDATA[Solution]]></category> <category><![CDATA[Weekly Challenge]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2556</guid> <description><![CDATA[Answer  The two children were so befogged over the calendar that they had started on their way to school on Sunday morning! Winners First: Hanaa Gaafar Then: Mohamed Samy Congrats]]></description> <content:encoded><![CDATA[<h2 dir="LTR">Answer</h2><p
dir="LTR"> The two children were so befogged over the calendar that they had started on their way to school on Sunday morning!</p><h2 dir="LTR">Winners</h2><h3 dir="LTR">First:</h3><p
dir="LTR">Hanaa Gaafar</p><h3 dir="LTR">Then:</h3><p
dir="LTR">Mohamed Samy</p><p
dir="LTR">Congrats <img
src='http://www.acmascis.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/04/22/stay-focused-answered/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Stamps</title><link>http://www.acmascis.org/blog/2012/04/22/stamps-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=stamps-2</link> <comments>http://www.acmascis.org/blog/2012/04/22/stamps-2/#comments</comments> <pubDate>Sat, 21 Apr 2012 23:11:19 +0000</pubDate> <dc:creator>Sharaf</dc:creator> <category><![CDATA[Problem]]></category> <category><![CDATA[Weekly Challenge]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2551</guid> <description><![CDATA[The Grand Master takes a set of 8 stamps, 4 red and 4 green, known to the logicians, and loosely affixes two to the forehead of each logician so that each logician can see all the other stamps except those 2 in the Grand Master&#8217;s pocket and the two on her own forehead. He asks [...]]]></description> <content:encoded><![CDATA[<p><strong>The Grand Master takes a set of 8 stamps, 4 red and 4 green, known to the logicians, and loosely affixes two to the forehead of each logician so that each logician can see all the other stamps except those 2 in the Grand Master&#8217;s pocket and the two on her own forehead. He asks them in turn if they know the colors of their own stamps:</strong><br
/> <strong>A: &#8220;No.&#8221;</strong><br
/> <strong>B: &#8220;No.&#8221;</strong><br
/> <strong>C: &#8220;No.&#8221;</strong><br
/> <strong>A: &#8220;No.&#8221;</strong><br
/> <strong>B: &#8220;Yes.&#8221;</strong><br
/> <strong>What color stamps does B have?</strong></p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/04/22/stamps-2/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Roots Of Software Inefficiency</title><link>http://www.acmascis.org/blog/2012/04/22/roots-of-software-inefficiency/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=roots-of-software-inefficiency</link> <comments>http://www.acmascis.org/blog/2012/04/22/roots-of-software-inefficiency/#comments</comments> <pubDate>Sat, 21 Apr 2012 22:56:43 +0000</pubDate> <dc:creator>acmASCIS</dc:creator> <category><![CDATA[Technical Post]]></category> <category><![CDATA[Weekly Posts]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2541</guid> <description><![CDATA[Being a GEEK ACMer or TopCoder beast (i.e design and analysis of algorithms) is about writing an efficient algorithm in the scope of 3 or 2 functions doing a very specific and limited task. However, writing software that runs on customers’ computers is bigger than this. Typical windows commercial mid-sized software consists of a set [...]]]></description> <content:encoded><![CDATA[<p>Being a GEEK <a
href="http://uva.onlinejudge.org/">ACMer</a> or <a
href="http://www.topcoder.com/">TopCoder</a> beast (i.e design and analysis of algorithms) is about writing an efficient algorithm in the scope of 3 or 2 functions doing a very specific and limited task. However, writing software that runs on customers’ computers is bigger than this. Typical windows commercial mid-sized software consists of a set of Executable, Services and DLLs interacting with each other to shape what is called software. The efficiency of algorithms and data structures is necessary but not sufficient: By itself, it does not guarantee good overall program efficiency. It is important to know the roots of software inefficiency if we care about writing a fast one.</p><p>What are the factors that affect efficiency? <em>Efficient C++ Performance Programming Techniques</em> book By Dov Bulka, David Mayhew made a very good high-level categorization to these factors:</p><p>Design Efficiency<strong> </strong>This involves the program’s <strong>high-level design</strong>. To fix performance problems at that level you must understand the <strong>program’s big picture</strong>. We are talking here about <em>software architecture</em>, <em>UML diagrams</em>, <em>pseudo codes</em>, <em>algorithms</em>, <em>data-structures</em>, and anything you can consider it <strong>language independent</strong>.</p><p>Code Efficiency<strong> </strong>Small-to medium-scale implementation issues fall into this category. Fixing performance in this category generally involves <strong>local modifications</strong>. For example, you do not need to look very far into a code fragment in order to lift a constant expression out of a loop and prevent redundant computations.<strong> The code fragment you need to understand is limited in scope to the loop body.</strong></p><h2>Both these 2 levels can be broken down more:</h2><h3>1. Design</h3><p><strong>1.1 Algorithms and Data Structures </strong>Technically speaking, every program is an algorithm in itself. Referring to “algorithms and data structures” actually refers to the well-known subset of algorithms for accessing, searching, sorting, compressing, and otherwise manipulating large collections of data. Oftentimes performance automatically is associated with the efficiency of the algorithms and data structures used in a program, as if nothing else matters which is inaccurate.</p><p><strong>1.2 Program Decomposition </strong>This involves decomposition of the overall task into communicating subtasks, object hierarchies, functions, data, and function flow. It is the program’s high-level design and includes component design as well as inter-component communication. Few programs consist of a single component. A typical Web application interacts (via API) with a Web server, TCP sockets, and a database, at the very least.</p><h3>2. Coding</h3><p><strong>2.1 Language Constructs </strong>A programming language is a tool we use to express to computers how to do a specific task. Whether you use C++, C#, Java and you care about performance, you need to understand the cost of your programming language constructs so as not to be shocked at run time when you program scale. C++ adds power and flexibility to its C ancestor (i.e Object Oriented capabilities). These added benefits do not come for free—some C++ language constructs may produce overhead in exchange.</p><p><strong>2.2 System Architecture </strong>System designers invest considerable effort to present the programmer with an idealistic view of the system: infinite memory, dedicated CPU, parallel thread execution, and uniform-cost memory access. Of course, none of these is true—it just feels that way. Developing software free of system architecture considerations is also convenient. To achieve high performance, however, these architectural issues cannot be ignored since they can impact performance drastically. When it comes to performance we must bear in mind that:</p><ul><li>Memory is not infinite. It is the virtual memory system that makes it appear that way.</li><li>The cost of memory access is non-uniform. There are orders of magnitude difference among cache, main memory, and disk access.</li><li>Our program does not have a dedicated CPU. We get a time slice only once in a while.</li><li>On a uniprocessor machine, parallel threads do not truly execute in parallel—they take turns.</li></ul><p>If you write Windows software, you need to read well about WinAPI and dig deep in Windows programming world, to understand how your host operating system – Windows in this case – will execute your program. This applies if you write software for Linux, iOS or any operating system. Good understanding of the host operating system is a must.</p><p><strong>2.3 Libraries </strong>The choice of libraries used by an implementation can also affect performance. For starters, some libraries may perform a task faster than others. Because you typically don’t have access to the library’s source code, it is hard to tell how library calls implement their services. For example, to convert an integer to a character string, you can choose between<br
/> sprintf(string, “%d”, i); or an integer-to-ASCII function call, itoa(i, string); Which one is more efficient? Is the difference significant?</p><p>There is also the option of rolling your own version even if a particular service is already available in a library. Libraries are often designed with flexibility and reusability in mind. Often, flexibility and reusability trade off with performance. If, for some critical code fragment, you choose to put performance considerations above the other two, it might be reasonable to override a library service with your own home-grown implementation. Applications are so diverse in their specific needs, it is hard to design a library that will be the perfect solution for everybody, everywhere, all the time.</p><p><strong>2.4 Compiler Optimizations </strong>Simply a more descriptive name than “miscellaneous,” this category includes all those small coding tricks that don’t fit in the other coding categories, such as loop unrolling, lifting constant expressions out of loops, and similar techniques for elimination of computational redundancies. Most compilers will perform many of those optimizations for you. But you cannot count on any specific compiler to perform a specific optimization. For ultimate control, you have to take coding matters into your own hands.</p><p>I remember how Visual Studio saved my team in an Image Processing performance competition in my faculty. In this competition your image processing package has to run many image processing algorithms and your package timing in each algorithm is used to rank it among the others. We optimized some of our algorithms manually, but didn’t have much time to optimize the others. I got an evil idea of enabling Visual Studio code optimization, and I was shocked by the results. The running time of many algorithms dropped down greatly and I couldn’t believe how C++ code optimization held by the compiler can be that effective.</p><h2>Conclusion</h2><ol
start="1"><li>Teach yourself how to design and analyze algorithms and practice well (i.e problem solving through ACM Online Judges and TopCoder)</li><li>Pick a programming language and master it (i.e read about its internals and understand the scary dark side of it).</li><li>Know the internals of a certain operating system on which you prefer to write your software (e.g Windows, Linux or Mac OS programming).</li><li>Write big multi-file, multi-module projects with real requirements.</li></ol><div><strong>Written By: Mohammad Hesham</strong></div> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/04/22/roots-of-software-inefficiency/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Constraints On Type Parameters</title><link>http://www.acmascis.org/blog/2012/04/15/constraints-on-type-parameters/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=constraints-on-type-parameters</link> <comments>http://www.acmascis.org/blog/2012/04/15/constraints-on-type-parameters/#comments</comments> <pubDate>Sun, 15 Apr 2012 18:05:36 +0000</pubDate> <dc:creator>Anas A. Ismail</dc:creator> <category><![CDATA[Technical Post]]></category> <guid
isPermaLink="false">http://www.acmascis.org/blog/?p=2463</guid> <description><![CDATA[What are we doing here?! We’ll learn in this article how to apply some restrictions on (Generic Type Classes).We can apply restrictions to the kinds of types that client code can use for type arguments when it instantiates Our Class. If client code attempts to instantiate our class with a type that is not allowed [...]]]></description> <content:encoded><![CDATA[<h2><span
style="font-family: Ubuntu;">What are we doing here?!</span></h2><p><span
style="font-family: 'Ubuntu Light'; font-size: medium;">We’ll learn in this article how to apply some restrictions on (Generic Type Classes).We can apply restrictions to the kinds of types that client code can use for type arguments when it instantiates Our Class. If client code attempts to instantiate our class with a type that is not allowed by our predefined constraints, then the result is a <strong>compile-time error</strong>. Simply, these restrictions are Constraints. In this article we’ll show some examples in C#.</span></p><p><span
style="font-family: 'Ubuntu Light'; font-size: medium;">Constraints are defined using the where keyword in C#, you can take a look on some type of constraints </span><span
style="font-family: 'Ubuntu Light'; font-size: medium;"><a
title="msdn: Constraints on Type Parameters" href="http://msdn.microsoft.com/en-us/library/d5x73970(v=vs.80).aspx" target="_blank">here</a>.</span></p><h2><span
style="font-family: Ubuntu;">Why shall we use such Constraints?!!</span></h2><p><span
style="font-size: medium;">l<span
style="font-family: 'Ubuntu Light';">et’s imagine that you want to examine an item in a generic list to determine if it’s valid or not, to compare it with other items, then the compiler must guarantee that the operator or method it needs to call will be supported by any type argument that might be specified by client the code.</span></span></p><p><span
style="font-family: 'Ubuntu Light'; font-size: medium;">This guarantee is obtained by applying some of these constraints. For example,we have a super class and we want only objects of this type or derived from this type to be used as type arguments, then we’ll make constraints. Once the compiler has this guarantee, it can allow methods of that type to be called within the generic class.</span></p><p><span
style="font-family: Ubuntu; font-size: medium;">OK, let’s dirty our fingers with some code .. !!</span></p><div
style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;"><div
style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px;"><span
style="color: #ffffff;"><a
title="msdn Example" href="http://msdn.microsoft.com/en-us/library/d5x73970(v=vs.80).aspx" target="_blank"><span
style="color: #ffffff;">msdn Example</span></a></span></div><div
style="background: #ddd; overflow: auto;"><ol
style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;" start="1"><li><span
style="color: #0000ff;">public </span><span
style="color: #0000ff;">class</span><span
style="color: #1e1e1e;"> Employee</span></li><li><span
style="color: #1e1e1e;">{</span></li><li>    <span
style="color: #0000ff;">private</span><span
style="color: #1e1e1e;"> string </span><span
style="color: #0000ff;">name</span><span
style="color: #1e1e1e;">;</span></li><li>    <span
style="color: #0000ff;">private </span><span
style="color: #0000ff;">int</span><span
style="color: #1e1e1e;"> id;</span></li><li>    <span
style="color: #0000ff;">public</span><span
style="color: #1e1e1e;"> Employee(string s, </span><span
style="color: #0000ff;">int</span><span
style="color: #1e1e1e;"> i)</span></li><li>    <span
style="color: #1e1e1e;">{</span></li><li>        <span
style="color: #0000ff;">name</span><span
style="color: #1e1e1e;"> = s;</span></li><li>        <span
style="color: #1e1e1e;">id = i;</span></li><li>    <span
style="color: #1e1e1e;">}</span></li><li>    <span
style="color: #0000ff;">public</span><span
style="color: #1e1e1e;"> string Name</span></li><li>    <span
style="color: #1e1e1e;">{</span></li><li>        <span
style="color: #1e1e1e;">get { </span><span
style="color: #0000ff;">return </span><span
style="color: #0000ff;">name</span><span
style="color: #1e1e1e;">; }</span></li><li>        <span
style="color: #1e1e1e;">set { </span><span
style="color: #0000ff;">name</span><span
style="color: #1e1e1e;"> = value; }</span></li><li>    <span
style="color: #1e1e1e;">}</span></li><li>    <span
style="color: #0000ff;">public </span><span
style="color: #0000ff;">int</span><span
style="color: #1e1e1e;"> ID</span></li><li>    <span
style="color: #1e1e1e;">{</span></li><li>        <span
style="color: #1e1e1e;">get { </span><span
style="color: #0000ff;">return</span><span
style="color: #1e1e1e;"> id; }</span></li><li>        <span
style="color: #1e1e1e;">set { id = value; }</span></li><li>    <span
style="color: #1e1e1e;">}</span></li><li><span
style="color: #1e1e1e;">}</span></li><li><span
style="color: #0000ff;">public </span><span
style="color: #0000ff;">class</span><span
style="color: #1e1e1e;"> GenericList&lt;T&gt; </span><span
style="color: #0000ff;">where</span><span
style="color: #1e1e1e;"> T : Employee</span></li><li><span
style="color: #1e1e1e;">{</span></li><li>    <span
style="color: #0000ff;">private </span><span
style="color: #0000ff;">class</span><span
style="color: #1e1e1e;"> Node</span></li><li>    <span
style="color: #1e1e1e;">{</span></li><li>        <span
style="color: #0000ff;">private</span><span
style="color: #1e1e1e;"> Node next;</span></li><li>        <span
style="color: #0000ff;">private</span><span
style="color: #1e1e1e;"> T </span><span
style="color: #0000ff;">data</span><span
style="color: #1e1e1e;">;</span></li><li>        <span
style="color: #0000ff;">public</span><span
style="color: #1e1e1e;"> Node(T t)</span></li><li>        <span
style="color: #1e1e1e;">{</span></li><li>            <span
style="color: #1e1e1e;">next = null;</span></li><li>            <span
style="color: #0000ff;">data</span><span
style="color: #1e1e1e;"> = t;</span></li><li>        <span
style="color: #1e1e1e;">}</span></li><li>        <span
style="color: #0000ff;">public</span><span
style="color: #1e1e1e;"> Node Next</span></li><li>        <span
style="color: #1e1e1e;">{</span></li><li>            <span
style="color: #1e1e1e;">get { </span><span
style="color: #0000ff;">return</span><span
style="color: #1e1e1e;"> next; }</span></li><li>            <span
style="color: #1e1e1e;">set { next = value; }</span></li><li>        <span
style="color: #1e1e1e;">}</span></li><li>        <span
style="color: #0000ff;">public</span><span
style="color: #1e1e1e;"> T Data</span></li><li>        <span
style="color: #1e1e1e;">{</span></li><li>            <span
style="color: #1e1e1e;">get { </span><span
style="color: #0000ff;">return </span><span
style="color: #0000ff;">data</span><span
style="color: #1e1e1e;">; }</span></li><li>            <span
style="color: #1e1e1e;">set { </span><span
style="color: #0000ff;">data</span><span
style="color: #1e1e1e;"> = value; }</span></li><li>        <span
style="color: #1e1e1e;">}</span></li><li>    <span
style="color: #1e1e1e;">}</span></li><li>    <span
style="color: #0000ff;">private</span><span
style="color: #1e1e1e;"> Node head;</span></li><li>    <span
style="color: #0000ff;">public</span><span
style="color: #1e1e1e;"> GenericList() </span><span
style="color: #008000;">//constructor</span></li><li>    <span
style="color: #1e1e1e;">{</span></li><li>        <span
style="color: #1e1e1e;">head = null;</span></li><li>    <span
style="color: #1e1e1e;">}</span></li><li>    <span
style="color: #0000ff;">public </span><span
style="color: #0000ff;">void</span><span
style="color: #1e1e1e;"> AddHead(T t)</span></li><li>    <span
style="color: #1e1e1e;">{</span></li><li>        <span
style="color: #1e1e1e;">Node n = </span><span
style="color: #0000ff;">new</span><span
style="color: #1e1e1e;"> Node(t);</span></li><li>        <span
style="color: #1e1e1e;">n.Next = head;</span></li><li>        <span
style="color: #1e1e1e;">head = n;</span></li><li>    <span
style="color: #1e1e1e;">}</span></li><li>    <span
style="color: #0000ff;">public</span><span
style="color: #1e1e1e;"> IEnumerator&lt;T&gt; GetEnumerator()</span></li><li>    <span
style="color: #1e1e1e;">{</span></li><li>        <span
style="color: #1e1e1e;">Node current = head;</span></li><li>        <span
style="color: #0000ff;">while</span><span
style="color: #1e1e1e;"> (current != null)</span></li><li>        <span
style="color: #1e1e1e;">{</span></li><li>            <span
style="color: #1e1e1e;">yield </span><span
style="color: #0000ff;">return</span><span
style="color: #1e1e1e;"> current.Data;</span></li><li>            <span
style="color: #1e1e1e;">current = current.Next;</span></li><li>        <span
style="color: #1e1e1e;">}</span></li><li>    <span
style="color: #1e1e1e;">}</span></li><li>    <span
style="color: #0000ff;">public</span><span
style="color: #1e1e1e;"> T FindFirstOccurrence(string s)</span></li><li>    <span
style="color: #1e1e1e;">{</span></li><li>        <span
style="color: #1e1e1e;">Node current = head;</span></li><li>        <span
style="color: #1e1e1e;">T t = null;</span></li><li>        <span
style="color: #0000ff;">while</span><span
style="color: #1e1e1e;"> (current != null)</span></li><li>        <span
style="color: #1e1e1e;">{</span></li><li>            <span
style="color: #008000;">//The constraint enables access to the Name property.</span></li><li>            <span
style="color: #0000ff;">if</span><span
style="color: #1e1e1e;"> (current.Data.Name == s)</span></li><li>            <span
style="color: #1e1e1e;">{</span></li><li>                <span
style="color: #1e1e1e;">t = current.Data;</span></li><li>                <span
style="color: #0000ff;">break</span><span
style="color: #1e1e1e;">;</span></li><li>            <span
style="color: #1e1e1e;">}</span></li><li>            <span
style="color: #0000ff;">else</span></li><li>            <span
style="color: #1e1e1e;">{</span></li><li>                <span
style="color: #1e1e1e;">current = current.Next;</span></li><li>            <span
style="color: #1e1e1e;">}</span></li><li>        <span
style="color: #1e1e1e;">}</span></li><li>        <span
style="color: #0000ff;">return</span><span
style="color: #1e1e1e;"> t;</span></li><li>    <span
style="color: #1e1e1e;">}</span></li><li><span
style="color: #1e1e1e;">}</span></li></ol></div></div><p><span
style="font-family: 'Ubuntu Light'; font-size: medium;">as we see in this example, in this code snippet:</span></p><div
style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt;"><div
style="background: #ddd; overflow: auto;"><ol
style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;" start="1"><li><span
style="color: #0000ff;">public</span><span
style="color: #0000ff;">class</span><span
style="color: #1e1e1e;"> GenericList&lt;T&gt; </span><span
style="color: #0000ff;">where</span><span
style="color: #1e1e1e;"> T : Employee</span></li><li><span
style="color: #1e1e1e;">{</span></li><li>    <span
style="color: #008000;">//&#8230;.</span></li><li><span
style="color: #1e1e1e;">}</span></li></ol></div></div><p><span
style="font-family: 'Ubuntu Light'; font-size: medium;">this constraint enables our generic class to use this property (Employee.Name) since all items of type (T) are guaranteed to be either an (Employee) object or an object that inherits from Employee.</span></p><p><span
style="font-family: 'Ubuntu Light'; font-size: medium;">Of course !! .. if you are asking can I make multiple constraints to be applied to the same type parameter?</span></p><p><strong><span
style="font-family: 'Ubuntu Light'; font-size: medium;">Just a moment .. the question may be: Can I make this with another language (i.e C++)? Although this language does not contain something like “where” clause, don’t panic, this is just for C++ Lovers.</span></strong></p><p><span
style="font-family: 'Ubuntu Light'; font-size: medium;">For C++ lovers , May you think about this Question? and I’m waiting your solutions and we’ll post the solution soon.</span></p><p><strong>Note:</strong><span
style="font-size: medium; font-family: 'Ubuntu Condensed';"> Not for the faint hearted !! Don’t try this at home !!</span></p> ]]></content:encoded> <wfw:commentRss>http://www.acmascis.org/blog/2012/04/15/constraints-on-type-parameters/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
