Friday, October 30, 2009

On spacetime, theory of incompleness and the axiom of choice (and the wave-particle duality)

NOTE: No guarantee on the correctness of anything mentioned in this article. It's just impression on what I read and I might have got it wrong or haven't read enough.

"Past and future,..
relativity to the speed of light,..
light speed is constant to all observers, the difference is only in red/blue-shift."

1- Invalidity of using the terms "Past" and "Future" as dimensions because they are relativistic terms. We can say positive and negative because they are well defined in relation to zero. But past and future, by analogy is like saying positive and negative with regards to unknown variable x.

2- Assume there is a light wave moving in some direction A. And there are 2 observers. One moving in the same direction with speed I, and one moving in the other direction with speed K. Speed of light to both must have different signs. Also assume I=c, then the "relative" speed between the light wave and the first observer (let it be another light wave to justify it), would be either 0 or c). It should be 0 because otherwise this totally says that the speed of light does NOT obey the laws of algebra.

3- Red and blue shifts are confirmed by observations. But let's look closer at the cause. They say that it's blue if it's coming to you, and red if it's departing from you. If it's departing from you, then how you've got the light wave ? That means that light waves has no direction and they move in all directions at one with only difference in frequency. Imagine a light wave that consists of one photon, is that even possible !!

I don't mean to say that some of these results -which are confirmed with many experiments- are incorrect. I only mean that the explanation provided either needs a total rethinking or I need someone to explain it better to me.

The Godel's theory of incompleteness can be thought of having similarity to the liar's paradox. But however I don't think it's true. It says that given some formal axiomatic system, there is a statement that can not be proven (incomplete) or there is two contradictory statements that can be derived (inconsistency).

Well, incompleteness is relative to what is to be proven. There is no set of formal axioms that can prove everything. But the theory implies that no matter how much axioms we have we can not prove everything.

Ironically, this theory is unprovable ! However, I think that we should think of the domain of the field the axioms was set up for. The set of axioms are complete within the set of theories they prove. If you want to prove something else you changed your field and need axioms related to this field.

I discuss the axiom of choice as an example of that. Think of this result: axiom of choice is independent of ZFC ! Well, doesn't that reflect part of the insight of the previous paragraph ?

Think too that axiom of choice is needed in case your set has subsets which are actually intervals in the Real domain. I am not sure if anyone thought of this, or I am too ignorant or too lazy to read and search for it, but doesn't this signal the end of the domain of "discrete" sets into "continuous" sets ? There is a difference between infinite sets and continuous sets -in my humble/ignorant opinion. However the axiom of choice seems to me more like of a hack to get the -completely in other domain- set of ZFC axioms to work with continuous sets !

Back to the wave-particle duality of photons and waves. One experiment that make me think about it is the refraction experiment where you send a ray of light in a hole whose diameter is less than the wavelength, and you'll get refraction. They claim that if you sent photon by photon instead you'll get the same refractive pattern and the claim is that this confirms the wave-particle duality. However did anyone consider the fact that it came from incapability to orient the photon with this wavelength to be in the same position when in hits the hole ?

Back to quantum randomness theory, that everything in quantum world is random. However I do not think it's random. Seeming random doesn't mean it's random. And randomness -no matter how low- can not build such a bigger coherent system. There is rules and not being able to know the rules made some of us try to interpret it by randomness, shame on you, lazy guys. I agree with Einstein who said that "God does not play dice".

Please if anyone has any insights or corrections he is welcome to comment here for a discussion. Thank you for reading so far and I hope I could deliver my points.

Wednesday, May 20, 2009

Comic: Java

Baby's First Language

Saturday, April 25, 2009

ArabOS gets its first process scheduler !


Friday, April 03, 2009

Screenshots of ReactOS Task Manager, Compiler on VS 2008 Express Edition and running on Windows Server 2003 R2



Wednesday, March 11, 2009

3 years in 40 lines of code; ArabOS page allocator finally arrived al 7amd llah !!


Written in C++, allocated 4 pages as shown al 7amd llah :D.
( p.s. 3o2bal el de-allocation and the sub-page allocator isA :) )

Sunday, December 14, 2008

Captain Majid on a Famicom Simulator



How to install the simulator (FCEUx) :
http://ubuntuforums.org/showthread.php?t=971455
(if you use Windows, then search for it yourself on google :P
it has a version on windows, but it doesn't work on VISTA !)

Arabization team:
http://www.geocities.com/arabic_majid/index.htm

Captian majid famicom game (ROM+Simulator):
http://www.facebook.com/topic.php?uid=21084678650&topic=5983

BONUS: Captain Majid PS2 !
http://www.youtube.com/watch?v=SLy7lBwmNjI

PS: the image is a GIF animation, I don't know why it doesn't animate unless opened in a separate tab alone (FF3). Any idea ?

Tuesday, September 30, 2008

System call graph for IIS/Windows and Apache/Linux

Originally posted : http://www.thisisby.us/index.php/content/why_windows_is_less_secure_than_linux

This is a graph of system calls executed with IIS on a Windows Server, and the second image is the same for Apache on Linux. That's for rendering the same page with a single image.


Monday, September 22, 2008

Argument analysis - another non-technical useless post

((( This post is about t scientific arguments, as in the method, presentation; and value, not as in the science itself )))

When two people engage in an argument, it's because they have colliding opinions on some issue, or they are not seeing the entire other side's opinion

There are 3 possible outcomes of an argument:
1- One side proves his opinion is correct/superior and the other one is wrong/inferior
2- They reach a compromise or a trade-off. In the first one (2A), they were both wrong, and in the second one (2B) they were both right
3- They fail to reach anything out of it

Outcome 1 and 2, will occur because one side is less knowledgeable than the other, in which case I wouldn't classify it as an argument per se but rather an inquiry (1A). But it also typically occur in research teams where the whole team is researching an new topic and no one is more knowledgeable than the other (1B).

Case 3 also doesn't qualify as an argument, because each side left thinking he is right and the other is wrong. Thus a consensus was not reached. There is 3 reasons why this can happen:
1- Communication failure (3A)
2- Both parties are not knowledgeable enough/or is too arrogant (3B)
3- The topic itself does contradict itself, or the field they were discussing was a based on pure un-proven theories (3C)
Each of these 3 cases doesn't allow for an "argument" in the first place

Case 2B (both right) can be divided into 2 cases 2B' and 2B''
- 2B' they didn't reach a trade-off but only demonstrated that they have the exact point of view but were failing to communicate
- 2B'' they reached a trade-off, combining pieces of knowledge and creativity they created something new

What we can come out from that ?
2B'' and 1B are great argument that leads to an advancement and is worth the time spent
1A is good, but doesn't really qualify as an argument

Other cases are just plain useless, waste of time, and worst of all, unweighted sum of 5 argument out of each 8 are so.
Weighted sum differes between different environment and cultures.

To analyse that, I'll split them into three classes, the Great (I), the Good (II), and the Ugly (III)
Class I contains cases 2B'' and 1B, Class II contains only case 1A, and Class III contains the rest.

I'll compare different environments here

(MPC = most probable class)






EnvironmentMPC
UnivII
Barber shopIII
MITI (duh!)


I want to join MIT someday isA :)

Friday, September 12, 2008

Microsoft Subsystem for UNIX-based Applications

Though MS have similar things since 2000's, but I just found about it today.
http://technet.microsoft.com/en-us/library/cc771470.aspx
Wikipedia is quite more informative
http://en.wikipedia.org/wiki/Microsoft_Windows_Services_for_UNIX

For Linux guys, that means MS supports CC and X11, GDB, ls, kill, grep, awk, and the list goes on and on. As I understood from wikipedia, it comes with more than 350 such utilities.

CC is a wrapper around VC++. X11 doesn't come with a working X server so you'd use an open one like Cygwin/X.

To avoid confusing the reader, it's originally an implementation of the POSIX specifications (Portable Operating System Interface, an IEEE standard). I don't know why they took it from a defensive point of view and claimed it is only there to support UNIX apps..

UNIX apps can be source-ported, but not binary-ported. That means you have to recompile them on Windows to work there.

There were such a POSIX-compatibility implementation on Windows that I've heard of and used extensively (like Cygwin), but this is the first time for me to know that MS have "paid" developers to work on that :D :D

Wikipedia says that for Vista it only comes with Enterprise and Ultimate editions.

top 5 items in a TODO list...

5- improve X

4- implement Y

3- comment the code

2- clean the code

1- testing n' debugging

So basically the software have not been tested, is lacking functions, and the implemented functions are not complete nor good, the code isn't commented and isn't even clean...

PS: inspired from the TODO list here
http://lists.gnu.org/archive/html/qemu-devel/2006-11/msg00149.html

Virtualbox seamless mode (screenshot)



now that's CUTE

Tuesday, September 09, 2008

(a quote on google chrome)

Quoting from http://www.sol-sd.com/news/119/ARTICLE/3310/2008-09-08.html:

Chrome alone will not be a major moneymaker for Google, according to the executives, but if Chrome can improve the user experience, that will encourage more Internet use and ultimately create more revenue for Google, they said.
So Google's main problem is to increase Internet use... Google then sees "Internet = Google"...

Wednesday, August 06, 2008

حيرة

انا محتار
وانتا بتبدأ حياتك بعد التخرج بتلاقي اختيارات كتير اوي خصوصاً في مجالنا
يعني مثلا اشتغل ده ولا ده
بلاش
اشتغل اللي بحبة واتبهدل ولا اشتغل اللي مبحهوش واستقر ؟
طب انا بحب ايه اصلا ؟
وهل لو اشتغلت اللي بحبه حفضل احبه كمان كام سنة ؟
طب هو اني اشتغل اللي انا بحبه يسوى البهدلة ؟
قصدي هل حاجي كمان عشرة خمستاشر سنة واندم على اختياري ؟
لو اخيتاري للشغل اللي انا بحبه يعني اني اضيع سنين الله أعلم كام من عمري في الدراسة في دولة غريبة مع ناس غريبة وفي الاخر محوكنش كونت نفسي او استقريت ؟
طب ولو ضحيت بالسنين دي بعدها حفرق حاجة عن اللي قعد هنا واشتغل هنا واترستق ؟
يا ترى بعيد عن الجزئية دي هو غلط اني محاولش ابني مهاراتي التجارية والادارية -البحتة؟ مش قصدي ادارة انك تدير فريق قصدي ادارة انك تكون رجل اعمال ملكش دعوة بالتقنية
مرة سمعت مقولة انك المفروض تحاسب من احلامك عشان ممكن تتحقق.. هل انا فعلا خايف من اللي انا عاوزه ؟
ممكن نحاول نعمل حسبة بسيطه اعترف اني اول مرة احسبها وانا بكتب هذه السطور
لو قلنا مثلا سنتين ماجستير على تلات اربع سنين دكتوراه كده مثلا بقيت تلاتين سنة !!ـ
طب بعد مخلص الدكتوراه حيبقي شغلي عامل ازاي وفين ومستوايا عامل ازاي . الأكيد اني احتمال كبير مش حكون استقريت ولسه حدور على شغل بعد كده في مكان تاني والله اعلم طبعاً بس انا مش متخيل اني اكمل شغل في نقس الحاجة اللي كنت شغال فيها قبل الدكتوراة مثلاً
افرض اني بدأت شغل -على اساس اني استقر- بعد ما بقيت ٣٠ سنة ... عشان اكون نفسي حياخد مني وقت قد ايه ؟ قول خمس ست سنين ادي ٣٦ سنه.. ـ
في المقابل ان الناس اللي مش حيسلك نفس طريقي وحيكمل هنا في حاجة غالبا مش بيحبها وكمان حيبعد عن التقنية كلها في خلال ١٠ سنين على الاكتر حيكون وصل المرحلة دي وهو على ٢٧ ولو من غير جيش يبقى على ٢٦.. فرق ١٠ سنين...ـ
طب ليه اعمل في نفسي كده ؟
والله الحاجة الوحيدة اللى بحاول اقنع بيها نفسي ان بعد كل ده حيكون فاضل ٢٥ سنة لحد المعاش هو حيكون مش طايق الشغل وانا حكون رايح الشغل وانا مبسوط -غالباً يعني..!!ـ
ده غير ان انا حكون بعمل حاجة ليها عائد نفسي اني بفيد العلم بحاجة لكن هو بيعمل اللي العميل بيقوله عليه وخلاص والعميل طبعاً على حق !ـ
وبرضة المفروض ان شاء الله ان اللي معايا في الشغل ناس بتفكر ناس بتفهم ناس عاوزة تعمل حاجة، لكن اللي معاه في الشغل ناس حفظت الدوت نت فريم وورك وبيسمعوه في الكود وخلاص عشان ياخدوا قرشين ويروحوا -لا اهانة للناس دي ولا للدوت نت فريم وورك-ـ
هو صحيح مش كل الشغل حيبقى على مزاجي لكن على الاقل الجزء اللي مش على مزاجي برضة في تفكير
السؤال بقى هل في اثار جانبية هل في حاجات معملتش حسابها ؟ هل ده فعلاً اللي حيحصل ؟ والله اعلم طبعاً
على المدى القصير انا عارف اني مش حستحمل الديفلوبمنت العادية... ححس انها تضييع لوقتي حيث ان انا عارف انا ممكن اضيع وقتي في حاجات احسن !ـ
وبما ان انا جربت الداتا انتري فانا عارف احساسي حيبقى عامل ازاي...!!!!ـ
وعلى المدى القصير برضه، الشغل اللي انا بحبه رغم انه بالنسبة لي لذيذ وتفكير وكده بس فحت فحت فحت خصوصاً في البداية الكام سنة الاولنيين.ـ
قرار صعب اوي
خصوصا انه غير قابل للرجعة فيه الا بخسائر كبيرة - من ناحية السنين-ـ
يعني لو خدت قرار وبدأت فيه لازم اكمل فيه...ـ
في كمان اعتبارات تانية
الناحية الاجتماعية لما ارجع بعد ١٠ سنين مثلاً ان شاء الله حيكون اللي هاجر هاجر واللي نسي نسي واللي اتغير اتغير وخصوصا ان انا برضة مليش حد اوي هنا
حتكون حاجة صعبة اول عليا
خصوصا اني حكون لسة راجع من غربة ووحدة فظيعة
مش عارف
انا قلت كل اللي في قلبي
لعل وعسى حد يقرا الكلام دي ويلاحظ حاجة انا مكنتش واخد بالي منها او يديني نصيحة او يفكر معايا
انا بس مش عاوز العمر يعدي وتفوتني فرصة اني اكون عملت حاجة انا مش عاوز اقضي حياتي اروح شغل اخد فلوس اروح البيت مخنوق، انا عاوزها اكتر تكون اني رايح الشغل كانه هواية حاجة انا فعلا عاوز اعملها، اعمل حاجة مفيدة للعلم والمجتمع، اخد فلوس برضه بس مش حروح مخنوق
انا دايماً بفكر في حتة العمر دي لما الاقي حد طلع معاش
او اشوف حد كبير
اقول طب ده جه وراح وفي الاخر مزودش حاجة
يبقى لازمته ايه ؟
انا نظرتي للانسان انه وظيفتة في الحياة مش انه يشتغل ويجيب فلوس وسلامو عليكو
لا الانسان في نظري موجود عشان لكل جيل جديد الدنيا تبقى احسن مش بس ماديا لكن نفسيا، الناس تحترم بعض اكتر مثلا
لو فكرنا فيها انه مثلا الانسان ده زي النمل
في صخرة كبييييرة
كل نملة تيجي تدي زقة وتمشي
بعد اجيال كتييير حتلافي الصخرة اتحركت والنمل عرف يطلع
لكن تلاقة نملة مستفزة راكنة على الصخرة بتشرب سيجارة بكل برود ويعد كدة تمشي
اهه هي دي نظرتي للانسان اللي جه وراح ومزودش حاجة
ممكن واحد يكون زود حاجة طول مهو عايش لكن اول ما راح الحاجة دي خلصت مثلا مصنع والمصنع ده قفل عشان محدش عرف يشغله صح عشان هو معلمش حد ازاي يستعلمه او يحسنة او يضيف ليه
ده برضه زيه زي اللي معملش حاجة
الانسان عشان يكون عمل حاجة يبقى لازم يكون اضاف للي حواليه حاجة يستفيدوا بيها من بعدة او من غيره.. علم، احترام الاخرين،
attitude
طريقة تفكير
من الاخر يعني
عرف يدي زقة للبشرية والصخرة اتحركت فعلا
التاني ده عامل زي ما يكون رفع الصخرة سنّة وقامت راجعة تاني اول ما سابها
انا حاسس اني طولت عليكوا
وفعلا دي اطول بوست ليا بالعربي بس اول مرة اتكلم من القلب كده على البلوج
وعموماً احب اشكر القارئ انه كتر خيرة صبر عليا وكمل معايا لحد هنا
مش عارف اقفل البوست ازاي بصراحة
خلاص البوست خلصت.......ـ

Friday, June 20, 2008

ArabOS svn-revision 50 commit message

Read it or not. If you are interested check http://arabos.googlecode.com/



* Renamed cpptest.h and cpptest.cpp to cpp.h and cppmain.cpp respectively.
* Renamed cppmain() to enter_cpp() and its duty now to provide a wrapper for the real cppmain(). It just wraps it with call_ctors() and __cxa_finalize().
* Added copyright notice to cppmain.cpp.
* Made the iso image path in bochsrc relative.
* Removed parallel port support from bochsrc because it caused a nag screen to show in bochs.
* page_table_entry is now unsigned long instead of long.
* Added printk() logging to control how many messages appear on the screen. That required moving the real impl of printf into print0 and now printf is just a wrapper around print0. That was needed to support transitive variable-length-arugments passing between several functions (printk should have wrap printf, no way to do it without supporting that).
* Converted most usages of printf() to printk() with respective log level.
* Fixed some signed/unsiged comparison compiler warning messages.
* Commented SHOW_STAT_FAILED calls.
* Cleaned cpp_rt_support.c a bit. Added some useful comments about the __cxa_XXX functions. And repositions some comments to be put in more relavent places.
* Renamed some stuff in the cpp_rt_support.c file, to confrom to the newly read Itanuim C++ ABI http://www.codesourcery.com/cxx-abi/abi.html :).
* The make clean command now deletes *.o and *.d in seperate commands because, if no *.o is present, no *.d would have been deleted ! That's because rm would produce an error that no *.o is present and ignore deleting *.d !
* Made the path relative in run.c (build environment change).

Wednesday, June 11, 2008

My poor PC ! (3 virtual machines, XP w/netbeans, XP w/VC++ express, and Vista) all up at the same time !

Tuesday, June 10, 2008

Rapid compiler development !

I ran today into a project called GNU Lightning. It's an assembly language generator that can generate for many CPUs and platforms.
Combining that with Lex/Yacc (lexer and parse generators) or flex/bison (free alternatives) all you have to do is concentrate on developing your syntax and translating your semantics to GNU Lightning format.
Cool..

Tana7a is ...

Tana7a is when your task has to be done on windows and you do it on Linux
When your task is a Control Panel Applet and you develop the code on Linux
When you run the task you don't run on on real Windows (although you have one), but you run it on Qemu (virtual machine) with virtualized Windows...
If ReactOS was reliable, I would have used it instead too :D :D
Tena7a ba2a :D :D

Update: And when development on Linux fails cuz of the obstacles intentionally put for that, then you install VC++ Express/Platform SDK/ (and JDK too) ON THE VIRTUAL MACHINE and develop on the virtual machine ...

Friday, June 06, 2008

First screenshots of meemory RDBMS v0.0.1



Implemented features:

  • Selection and projection.
  • A robust memory management module to report memory leaks.
  • Simple parsing of SQL statements.
Unimplemented features:
  • Saving to persistent storage.
  • Parsing standard SQL (92, 99, 2003)
  • Indexing, joins.
  • Rest of SQL features.
Project URL http://meemory.googlecode.com/ , developers are welcome.

Saturday, May 24, 2008

تضارب مستفز في رفع تعريفة تاكسي العاصمة

محافظ القاهرة: زيادة تعريفة تاكسى العاصمة إلى قرشا عن كل كيلومتر

الخبر بيقول انه تقرر رفع تعريفة تاكسي العاصمة من 110 للكيلو الى 125 و ذلك لمواجهة ارتفاع اسعار البنزين. و في نفس الخبر, فيما لا يزيد عن عدة سطور يشكر المقال في مشروع تاكسي العاصمة لمحافظته على البيئة و ذلك لأنه يستعمل الغاز الطبيعي.. بجد حاجة تنرفز!!
واضح ان متخذ القرار برضه شايف ان كده مش كفاية حيث انه بمناسبة هذه الزيادة المباركة فتم أيضا رفع تعريفة الأنتظار ل 10 جنيه في الساعة بدلا من 5... مع أنه المفروض أن الأنتظار لا يستهلك أي نوع من أنواع الوقود!!
و أخيرا يقول أنه سيتم تبديل سيارات التاكسي الأبيض في أسود المتهالكة بسيارات صفراء تابعة لمشروع تاكسي العاصمة و أنه سيترك الخيار للسائق أن يعمل مستقلأ!! عمله مستقلاً في حد ذاته ليس فقط هدم محتوم لسمعة تاكسي العاصمة (اللي هيا مش حلوة أصلا, حاحكيلكوا الحكاية ديه بعدين) و لكن أيضا دمار شامل للتاكسي الأبيض فأسود, طب ماهو كده كل التكوسه دول حيولوا أصفر مستقل و حيقوشوا الدور كله!


Friday, May 23, 2008

On Error Resume Next --- No Tech, Just Politics...

For those who didn't use VB 6.0 the statement 'On Error Resume Next' means to ignore exceptions and just go on executing the next statement!!! I think the programmers who are reading will agree this is unbelievable bad thing. It means you will not know that things are going wrong, and will just be surprised when the program behaves incorrectly, and will keep wondering why!

This is what is going on with this country. When the education system ignores that students do not really understand anything from what they are supposed to learn and lets them graduate ignoring that fact, it has to deal with lots of future problems and consequences and will keep wondering why.

Why the production in our country is low-quality? why people are sitting in the cafes having no job? why the entire population have low confidence in our ability to do anything compared to the 'foreigner' (عقدة الخواجة)? why we have regular job 'repetitive jobs' not creative jobs? why Egyptian scientists are leaving the country? ... Why our education system is such a loser? why the educators are almost ignorant (they graduate from the same loser education system)?

It's all because we are letting the incompetents graduate from college. Not talking about engineering and medical school issue. It's all because even the good professors face pressure to make a certain percentage pass a certain course even if they are incompetent. Why? because if a huge percentage is failing, that means there is a problem with the professor. While more deep investigation will show that the problem is the entire education these kids have been through up to that point. And sure that won't please the people in middle-tier management (not the top head, nor the employees).

I mean the people in strong places but not absolute safety! It means they will be fired, face the community, etc etc. كبش فداء من الأخر. They are not punished for causing that, but they are punished they didn't hide it well. Although the entire population knows about it :D strange way of thinking; I keep wondering who are they fooling?? The entire three tiers know about the stupid education system (top head, middle-tier, and citizens).

It's like being bad students. They didn't study, and instead of facing the monthly exam to know how bad they are and study, they are just playing and having fun till the final!! With the exception is that the final isn't theirs. i.e. they are not the ones who are failing, it's the entire country!!!!

How could such thing be resolved? I keep thinking and I can't find an answer...

Wednesday, April 23, 2008

If Egyptian Have Invented Windows ... (a 10 years-old forwarded mail)

Monday, March 17, 2008

Post #100 ! (Reserved)

This is the 100th post in my blog. I think it should be special, and that I should have something special to write in it. I don't like that obligation, and I certainly won't stop writing until I find something special to write. So here I write this post, just to reserve the number, and I when I have something special I will come and write it here isA (if any special thing occurred before the 200th post anyway!)
So, see you later in Post# 101.

Thursday, December 20, 2007

A story of him who wanted to not call the constructor !

Hello there, everybody !
Welcome to my blog. Please seat yourself and enjoy the post.

Once upon time, a old wise man was sitting alone thinking in some problem that was taking all over his mind. He wanted to make things easier for the local programmers who use the RMI library. There problem was that to use RMI you need to override and implement certain interfaces. So the poor villagers, er, programmers had to work extra hours to harvest, er, design the changed system to adapt it to RMI specs.

The old wise man have figured out a simple way to help them. He can provide them with a magical bean, er, program that can do the tedious specs conformation for them. The magical bean overrides the classes and sends the overridden class over the network, instead of an evil magical creature, er, RMI artificial stub that throws them with rocks, er, RemoteExceptions.

The old wise man spent days and days working alone all the day long, until he finally produced what he have promised. The magical bean worked as expected. However, there were one drawback with that bean. It kills the other crops, er, remote stubs still call the default constructor of the super class. That constructor is meant to run on the server side. In some cases it can wreak havok if run on the client side; creating or deleting other crops, er, files for example.

That problem kept the old wise man up for 3 days. although it was the big feast, but he cared for the poor villagers more than his own joy. He set his mule up, and started on his way to search for a solution. Even if it took him to sweep the entire globe.

On his mysterious journey, he met a powerful wizard, called BCEL. BCEL claimed that he has a potion that enables the old wise man to control the magical bean to an unprecedented level. The old wise man believed him and bought the recipe. He spent the next weeks trying to prepare the potion. The results wasn't encouraging at the first, but as he got better in preparing it over time, the results got better.

Trial #1
Now it is the big day. He have gained enough skill to try to prevent that evil magical bean from invoking the constructor. He have manipulated the magical bean and removed the invoke that calls the super constructor. But the soil, er, JVM, struck him with lighting, er, exception that the object is uninitialized.

Trial #2
Bravely standing up after the lighting, he manipulated the magical bean again, to call the Object's constructor directly, without passing the on the original super constructor first. But still, JVM struck him again saying that the wrong constructor is being called!

Trial #3
He thought, if I can manipulate the magical bean's constructor, why don't I manipulate it's super constructor too ? And the next super one and so on. So staying for hours in his laboratory, he invented his own fertilizer, er, class loader. That special fertilizer has the ability to manipulate every magical bean, and even every normal bean that gets out of the soil. Yet he wasn't so lucky. JVM had to make his grow the magical bean twice every time he wanted harvest an RMI application.

The old wise man keeps trying, and hopefully soon he will be able to something. Even if he had to manipulate JVM itself!!

End of part 1...

Update 22/dec/2007: Using JVMTI (JVM Tool Interface) One could change every loaded class in the system. It can also redefine them as many times as he want to. And best of all, it needn't be native code ;).

Monday, November 19, 2007

Typical debugging session


Typical debugging session...

Sunday, November 11, 2007

Chat protocol v1

5-way SIP
P1: s/a (SYN)
P2: s/a (SYN)
P1: hru ? (SYN/ACK)
P2: l7mdL u ? (SYN/ACK)
P1: l7mdL (ACK)

Session:
P1: s'up ? (PING)
P2: aho mashya, u ? / aho 3ayesh, u ? (PONG)
P1: l7mdL (ACK)

Session Suspension
P1: brb/afk (URG)
P2: tyt (ACK)

Half-closed Session Termination
P1: bbl (FIN)
P2: tyt (ACK)

4-way Session Termination
P1: i have 2 go now, need anything ? (SYN/FIN)
P2: no thx (FIN/ACK)
P1: s/a (FIN)
P2: s/a (FIN)

Session Reset
P1: i have to go now, salam (RST)
P2: ... (void)

Sunday, October 28, 2007

The meta-effect

Alan Turing, the mathematician, and father of computer science, died trying to prove somethings are fundamentally unprovable[1].
Finally this long-awaited article comes to light. People who read it might actually think I am really crazy. But I will write it anyway. I don't actually know if this is an already-defined theory with another name or not, but I've been thinking in it for a while now.

The meta-effect happens in every day life, and in different ways, but we never notice it. I've been able only to know 2 instances of it, one of which only exists in the meta-effect itself.

I don't know how to start but through an example, and I have one example as said above. You learn how to sum 2 numbers. Your teacher taught you how to sum two numbers, and he had learned how to teach you how to add 2 numbers. The guy who taught him how to teach you how to add two numbers have learned that too! I don't actually care about any of these facts, only do notice that I can go for ever.

How do humans learn things ? How do humans learn how they learn things ? How people analyze how they learned about they learning things ? Common fields facing that particular effect are psychologists, sociologists and natural language programmers.

That meta-effect things needs a lot of studies to know its true nature. For example, to which level should we go ? Or can we know a level without the other ? At which level there is no more useful information ? Do we need to advance to another level ?

The most fascinating aspect of all that, is how human mind can elevate in meta-levels like that. Studying the effect of how human analyze how their mind are in a higher meta-level, lets call it: meta-cognition-level-2, for short MCL2. In my last article what I was speaking about is MCL2. While we analyze MCL2, we are elevating to MCL3. As a rule-of-thumb, when you give a level a name, say MCL(n), you are actually at level MCL(n+1). In MCL2 we talk at MCL1. And when we talk about MCL2, we are at MCL3.

Warning, the next is much more complex!

We talked about meta-effect in learning, or some topic. What if that topic was the meta-effect itself ?! There is meta-levels, in a single topic. Each level analyzes the level beneath it. But what about analyzing the meta-levels itself (like in differentiation in calculus*). Let's call that, meta-meta-effect. Is there is a single meta-meta-effect for all topics, or there is separate one for each topic, or there is both ? Is the former a higher (another kind) of meta-meta-effect ?

Generalization

If we give a thread of cognition stream the name m/l/t, where m is the differential meta-level, l is the ordinary meta-level, and t is the topic, where t* is applicable to all topics. Normal everyday talk or thinking is 0/0/t*. Some advanced experience of learning activities involving consideration of previous learning experiences, is 0/1/t*. M/L/T (big letters are free unbound variables, means applicable to anything) where M > 0 is only applicable when talking about meta-effect.

Well, I might go more analytical next post isA.

[1] http://bestdocumentaries.blogspot.com/2007/09/dangerous-knowledge-full-documentary.html
* Cool, this might lead to some new science called cognitive calculus :D

Wednesday, October 10, 2007

30 Minutes is not the same as half an hour

No it isn't playing with the words, so stop trying to figure it out that way.
As usual I have been digging in some stuff, this time related to Natural Language processing. And on the other side, I had to determine an estimate for a task in my work. Usually we measure tasks by hours. But the task was somehow small that it takes less than an hour. So I wrote 30 minutes.
After I sent the mail, I kept thinking, why didn't I write half an hour ? Inherently "half an hour" is more rough estimate than 30 minutes. Exactly like when you measure yourself to one and a half meter, against 150 cm.
It is about the scale, no; it is about the precision. I've always been fascinated how reading that the government have spent 30 Billion LE on that project seems normal, while reading that it spent 30,000 Million LE seems huge! Reading that it spent 30,000,000,000 LE would seem gigantic. 3 * 10^10, almost means nothing. Although they represent the same quantity.
What have derived this idea, is thinking how an NLP program will ever comprehend such style in understanding, which I believe is very related to how human mind evaluates things. It maybe even somewhat related to psychology than reasoning; subconsciously: that number takes that many characters, then it must be huge!
A theory I've been thinking in for a while, in NLP and Natural Language Understanding in specific, is that most babies know nothing about languages when they are newly born. Yet they function correctly. So language is complementary, but not essential in learning. Language only aids learning by adding new means to it: communication.
So I believe that before any serious trials are made to make a full natural language understanding program, knowledge representation and learning methods need to be formalized first. You can't add communication facilities to a program that will not use it. Well, in fact you can, but it is useless.
Babies see a bottle, then most of the time, they hear 'bottle', so according to the famous psychology phenomena "Conditioning"[1], both events: seeing a bottle, and hearing the word 'bottle' stimulate each other. That's simplified. It is actually kind of statistical learning. Over time, they learn to be more sensitive to some phonemes than the other, depending on the inherent probabilities in the language most common in their environment. "Koreans notoriously fail to distinguish 'l' and 'r' sounds"[2].
If I would guess similar pattern for vision, and motor skills. For example, I might guess that babies might see the percepted image as-is, but with the aid of the 3 dimensional perception, they can notice certain patterns as they move around, leading to detecting the boundaries of objects. As they do that, and over time, they learn the patterns, and the colors, and learn to use them to distinguish objects and extract them. I might use the existence of optical illusions as evidence. Somewhere in your childhood you have mixed objects like that. Kids usually deal with big cubes and learn the dimensions to sharpen the object-detection neural networks in their brains. And they grow up they get more exposed to more complicated patterns, like text for example.
So if we assumed a simplistic model, that a human is a combinations of sensors, and a statistical pattern-matching learning machine, and non-linear initially-empty knowledge/rule base, that is stimulated by the sensors and the pattern matching machine, then we only need to figure out the inter-dependencies between them and also figure out the abstract functionality contract for each of them, to be able to create a real NLU program sometime.
What on the stage now is artificial hard-coded NLU programs. what I am seeking is a self-learning NLU program, that can teach itself languages, and can then teach itself everything. Of course, sensors are needs, experiments which the system should go through (life-experiments) should be available to the system. But one more thing, that were not in the past assumptions can destroy all that. The assessment problem.
The assessment problem
On what basis should the program accept of reject a new piece of knowledge ? The program till now is only a pure knowledge collection machine, stimulated by external events. What's the use ? The program must ponder the knowledge it gained, and assess the acceptable and non-acceptable pieces of knowledge, especially that there is a lot of contradiction out there, because knowledge available in the world is highly affected by personal view points and preferences. How the program will learn the ability to compromise between two conflicting facts ? If there is two different view points, how can the program choose one ? Or should it compromise or select one, or worse yet, select only two from a set of contradictions ?
Humans, have been forged to the good nature, such contradictions and wrong choices affect their nature after that. It's a matter of trust, which source should the program trust ? And one what basis should it grant or revoke trust ?
This is far beyond the scope of NLU, or machine learning, this.. is .. humanity ! Yes, this is1 human kind. No application what soever will be able to reach that state consistently and independently. As you might have noticed, this is not first-order knowledge. They might create applications that understand first-order knowledge better than the human (i.e. some advanced sort of databases), but they will never create a program that can reach arbitrary orders of knowledge. At least not one that will be close the the human. The humans will prevail the top in that.

This article is related to the meta-ization phenomena that I wanted to write about a long time ago, I don't recall I wrote it yet.

References:
[1] http://www.alleydog.com/101notes/conditioning.html
[2] http://www.asian-efl-journal.com/dec_03_sub.K1.php

Friday, October 05, 2007

تجربه: مقتطفات رمضانيه 2

ديه تجربه احط تدوينه من مدونتي السريه واشوف حتضحكوا عليا وﻻ لأ... اللي حيضحك حيعرف شغله!
لو حد عنده فكره
support
العربي زفت اوي كده ليه في بلوجسبوت يقولي

==============================================

التدوينه تبدأ من هنا ...

==============================================

المره دي التدوينه متفائله شويه

انا زي كل يوم مؤخرا مطحون طحن في الشغل و كان عندي فطار بره و كمان الشغل لازم يتسلم الساعه 9 و الشغل يدوب عليه الوقت اصلا من غير فطار. فضلت شغال لحد ما كان فاضل ربع ساعه على الفطار بقول حاخد تاكس. والمسافه اصلا برضه ربع نص ساعه كده حسب الناس متفقه عليا عشان تزحم الشارع ولا ﻷ. المهم قلت اخد معايا حاجه افطر بيها تحسبا للـتأخير.

المهم وانا في السكه التاكس بطء عشان واحد شاورله و فاضل 5 دقايق عالمدفع. اول ماقربنا من الواد اشرأب -حلوه اشرأب ديه- عنقه عادي يعني زي اي واحد بيوقف تاكس. التاكس طبيعي مفرملش عالاخر يعني و اذا بالواد يرمي لنا بشئ جوه العربيه. انا في الاول اتخضيت و بعد كده قلت اكيد ده اعلان - بس غريبه اعلان ايه ا للي قبل الفطار ده ؟؟ المهم طلعت في الاخر كيس بلح. انا بصراحه قعدت فتره على مستوعبت ان في ناس كده و بصراحه فرحت بيهم جداااا. و قعدت ادعيلهم من قلبي. و كمان شارعين لقيت اتنين تانيين. و كمان شارع لقيت واحد بيوزع ازايز ميه. و بعد منزلت من التاكس -و الادان بيدن- لقيت عربيه وقفت تديني بلح! لو شفتو التدوينه اللي قبلها والست اللي بتقول حاجه افطر بيها يابني. مش عارف اقول ايه يصراحه المهم ان انا مبسوط اوي.

الايام دي بروح المهندسين كتير. قبل كده كانت بالنسبه ثقب اسود لا ادري له مكان. المهم النهارده خدت بالي من حاجه عجبتني برده. الاشاره فيها عدادبيقولك فاضل كام ثانيه والاشاره تفتح او تقفل!! بصراحه حسيت اني احترمت اللي عمل كده عشان هو بيحترم السواقين. كان نفسي اخدلها صوره احطها بس للاسف معنديش كاميرا رقميه.

هي الحاجات ديه اللي مخلياني حموووت واشتري كاميرا..

Sunday, September 16, 2007

نقطه تحول

في حياه كل واحد فينا بتبقى في نقط معينه في حياته بتعبر عن تغييرات ضخمه في شخصيته. احيانا بتبقى النقط سببها تغيير في الظروف او الاحداث المحيطه بالواحد. مثلا على اعتاب مرحله جديده في حياته او نتاج تجربه معينه اثرت فيه او نتاج سلسله احداث سببت ظروف صعبه.
اكيد مثلا مرحله الجامعه ديه اثرت في كل واحد فينا تأثير كبير اوى مش حاقول اعادت كتابه شخصيتنا كلها.
انا بكتب التدوينه ديه عشان في نقطه تحول احتمال تأثر على تدويني كمان. اللي ملاحظ انا بقالي فتره مش بكتب كتير ( قال يعني كنت بألف كتب قبل كده :D ). بس في الواقع انا بقالي فتره بفكر احول اكتب عربي و كمان اكتب كلام عادي - يعني مش تقني.
للأسف الكلام العادي اللي انا عاوز اكتبه مش حأحس براحه الأ وانا مش معروف انا مين. بصراحه انا مكنتش بكتب غير تقني مش عشان معنديش حاجه تانيه اقولها و لكن عشان مش ببقى براحتي وانا مش عارف مين اللي ممكن يقرا الكلام اللي انا بكتبه.
و لما شفت مجتمع المدونين - خاصه المصريين - لقين ان نسبه كبيره منهم مش معروف شخصياتهم و انا حسيت ان ده بيدي حريه اكتر في الكلام. اه يعني القارئ احسن مني في ايه انه يكون عارف انا مين وانا اساسا معرفش انه قرا التدوينه, مش كده لازم يكون في عدل لازم يكون في مساواه ( مش المساواه التانيه قصدي المساواه بين القارئ والكاتب)
عشان كده قررت اخيرا اني اشارك في مجتمع المدونين المجهولين. و عشان كده برضه مش حابعت العنوان لحد نهائي.
بيتهيألي كده كفايه حد عنده سؤال ؟

Tuesday, September 11, 2007

The dark forces of evil have conspired against this program !


No comment... !

Update: As confusing as it may seem, but it has a reasons. The Java compiler doesn't recompile already compiled files if a file they depend on have been changed since the last compile time (doesn't consider dependencies). The SEGMENT_LENGTH _IN_KILOBIT is final static variable involved with other constants in an arithmetic operation, the compiler optimizes that (constant folding). So when CoolStreaming class gets recompiled (the value of that final static variable changes), this class won't get updated with new value, although the debugger did. A clean rebuild is sufficient to solve that.

Saturday, July 21, 2007

When Math is Misused - Revenge



It's revenge time. You should have read the last post on the same topic. I've got the chance to write a paper and I just wanted to see how it feels like to write such complicated mathematical stuff. The paper was about a min-heap and stuff, pretty simple and can be written in a few paragraphs. Take a look at the pictures.
The amazing thing is that after the 2 days I spent writing in 2 pages, I realized that well-formalizing the issue allowed for much much more potential that was initially possible. Initially we just move the load from a loaded machine to the lightest node in the system, but after well-formalizing the problem it is now possible to prove the degree to which this algorithm is really effective and efficient or not. It also showed me a point I didn't look to before, that if a machine get lightly loaded, it can take the load from other machines, without the need of the other machines to ask it to, and thus making real load-balancing.
I really was amazed not only because of the new potentials, but also that writing mathematic proofs and well-formalization is very much like programming, the logic of the proof follows like lines of code follows for the goal of the program/proof. I can say that I enjoyed writing that paper, well, like I do enjoy writing complex C++ code (and I do enjoy that more than games) (maybe it is cause I used the paper to learn Latex, I dunno).

Saturday, July 14, 2007

The bigger view, redefining the impossible

Many people of which I have dealt with, even if not saying it, are profoundly convinced that some of the applications which they use, maybe on daily basis, cannot be made by them. How many of the readers right now convinced that they can make, say, a web server, a SQL server, an OS, or a C++ compiler ? How many are convinced they can make a web browser!

I know some readers might think I encourage reinventing the wheel, they should know that this is not true. I mean that if a person knows and believes that he can make a wheel, he can then trust his own ability and imagination to start thinking beyond that and make a whole car, and maybe a space shuttle even. I am convinced that people who cannot trust their ability to make such -system- software are tied and will be forever dependent on other companies to make that software for them.

Under such circumstances it becomes natural why people limit their mind to predefined software categories, which have standard development procedures (i.e. web sites, database applications, etc..). In order to innovate you do not only need a vision, but also you need to trust your ability to achieve that vision. Often people disregard good ideas only because -deep inside- they know they can't do it. To hide that from themselves and from others, they tend to belittle the idea or call it foolish or inapplicable etc.

Thinking outside the box is also one feature of innovation. But to be able to do you need to know what's inside the box, and you also must have the liberated(1) thinking to do so. Because we are not surrounded by a lot of liberated minds, innovative minds might be afraid to go outside the box because they will be made fun of and belittled by those unliberalized minds.

(1): by "liberated" I mean those people who trust their selves and their thinking and are not tied by limited thinking of the surrounding environment.

I want to implant a certain concept in the minds of those people of IT in our country. Which is, nothing is impossible, and nothing is so hard that it can't be done. For example, you might think application X is hard to make. This is only built on the fact that you don't know yet how to make or how to approach it. But actually once you know the drill, it is almost like any other application you did (remember your first program, and your last program, and compare if you would have thought that this last one was possible when you did your first).

For example, from what I discovered, that the drill to approach an OS kernel is to make a simple Hardware abstraction layer (HAL) and to base other stuff (memory management, etc.) above it (like a simulation), and to approach the HAL you need to start by reading the Intel System Developer guide -for Intel systems-. The remaining is just regular work, read and apply, no thinking. (notice I said the drill to 'approach' not to 'make').

Also I found the way to start in an RDBMS is to start by making the Table class, and one-by-one add functionality to it (select, project, save, getSchema etc.). Once you've found a start point, the remaining, as I said, is just regular work, like any other program.

I know some people which was saying to me that making an OS and RDBMS is just reinventing the wheel and a waste of time. Well, I just wanted to know the drill, and know how they are done, so I can liberate my thinking and achieve the freedom of thinking and not to be limited by stuff I don't know. How are we going to innovate in such fields without that ?

I am not saying that the reader should go and -reinvent the wheel?- and make his/her own RDBMS or OS, but I am saying that if this what it would take to liberate your mind, then do it. Or take whatever necessary to liberate your mind. If just reading about them is enough for you, then be it. About myself, I had to do them myself, I just don't believe all I read, and I didn't think that the authors are better than me in a way that makes them able to do it while I can't.

All I want to reach in this article, is that don't think in terms of what's there, but think in terms what you can do. For example, don't think "This program doesn't do X :( I'll have to wait for the next release", but think "This program doesn't do X, so I'll make my own X!" or "I want a program that does X, there isn't ? I'll make my own :)" or better yet, "I wish I don't find a program that does X so I can do it!". And if you find such a program, you might take a look at the source to know how it was done.

One by one, you will reach a phase where you don't know the word 'impossible'. For example, imagine a program that you can ask to explain quantum physics for you, and the program scans the internet for it, and -built on your background, which he knows, cuz he chats with you a lot- he builds a tutorial with the style he knows that you prefer, and start explaining in a conversation with you, in which you can interrupt and ask, all in voice, not text. The program also can detect your face and knows when you look like you don't understand. I'll ask you: is that possible ?

Tuesday, July 10, 2007

Blogging Addiction Tag

From Ahmad Essawy's blog tag

70%How Addicted to Blogging Are You?

Mingle2

Monday, July 02, 2007

Database applications, a message ...

Finally, a short period of rest before continuing working in the graduation project. So many blog posts I wanted to send and I didn't because I was tired.

Note that this is not in anyway disregarding the importance of database or website development. They are very important fields in our life.

Most of you know that my interest is theoretical scientific research. So I am not so much in favor of 'pure' applications that doesn't add new technologies or ideas; just uses them to tailor a predefined template of programs. This post is going to 'attack' and try to refine that sort of applications, and it's most common example: 'Mere' database applications (well, both desktop and web).

My idea is that having such repetition in the implementation of one -mostly the same every time- idea, and the variation is only in using or fine graining, makes the concept needs rethinking. So that instead of making a separate application that just uses a database, for each use of databases, you can broaden the concept so that there is only one database application that suits every possible use.

First, let's include some examples, digg.com, flickr.com, and every forum that exists. If we exclude creative search techniques (Google for example.), and appealing GUI (flicker; web 2.0 in general), and the concept of user-oriented content (forums. Digg - like the radio show, 'what the listeners ask for'), what do we have left ? Database, adding data, retrieving data and information, calculating statistics, and everything you find in a database book.

The core of many projects and websites is data processing, converting data from one form to another, and saving and retrieving data. I don't think I've found a data mining website before (can anyone mention an example of one, please ?). The rest of the program is just eye candy and mostly --except in rare cases-- non-reusable non-extendable --in a scientific way I mean, not in a sales way-- ideas (the general purpose of the website).

It's like talking about pen and paper. Every new website, or database application, just uses pen and paper and it just tells you this paper is for writing questions, and this paper is for writing posts. Paper is paper, and excluding fundamentally new ways of writing, and fundamentally new paper, the task is user-performable. So why not give the user the power to use the paper the way he wants to, and let us concentrate on the rest: fundamentally new stuff; inventing.

The idea in a very similar problem is: separate the paper mills engineers and the newspapers writers. They are totally separate jobs. Thus in our field, separate the 'computer scientists' (or computer professionals in general, including CS and IS) from the website authors.

Not only database applications or websites I am talking about. I am also talking about GIS. Geographical information systems, used to be an information system thing (IS) and is considered an advanced field. My thinking is that once that field gets ripe and the only variations left is to change uses and purposes, just leave it to other peoples (GIS geologists, or traffic authority or whatever they will call themselves) and concentrate (I mean IS people) on making the next technology, for example: Voice Information System, Space Information System, or ... there are many stuff left to be done, don't stick to the easy and clear one just because the other new fields seems fuzzy or not very well-defined, that's where history-remembered scientists starts this way by exploring what no one did before.

And by the way, I want to call the term 'computer professional' to be obsolete a meaning-less. I don't know if I am the only one to say that, but anyway. We computer scientists, information system guys, information technology guys, and whoever mission is to create new technologies in their field, should let a technology go after it is ripe to people who are only dedicated to it. Websites, should no longer be called as 'our' field. There is website-professionals who need not know binary or internal working of a computer, they might also need not know programming at all. Thus computer-professional should be replaced with a 'field'-professional. Because they will be very diverse and have absolutely nothing in common, except that they use computer hardware, RAM and hard disks.

Not all database applications and not all websites are like that, after all, the content judges. For example, a website to do calculations on a set of people stored in a database to classify them on a certain complex criteria that you need to make your own algorithm (not just be sorting and branching) that can't be made using a simple SQL query, that no so-called website-professional can do. That can be acceptable for us to do. But otherwise, either repetitive memorized website-development, or content writing, is not acceptable for us to do as it is not our field, nor our profession, nor what we were prepared to do, we were prepared for something much higher, much complex, and much greater.

If you (CS, IS, or IT guy) are still convinced that the new idea for your website justifies making a website, then you didn't get the idea of this article. Save such ideas to website-professionals. Your job is much creative than that.

A little example, if you are making a program that uses a database, and uses communication between computers, you can do it using SQL/DLinQ and Sockets/WCF, but you can also devise your own way like making a new spontaneous way of accessing your data, and a new spontaneous way for calling your program on the other machines. The new ways, need not be so general, they only need to serve your specific needs in that program (i.e. single protocol, single language communication; single language data access; the language you use). Only try to make them as reusable as possible. Do whatever you need so you can concentrate on the creative parts of your application not the 'exhaustive' parts.

Reusability concept is more than I imagined, it isn't just making 'code' reusable so you don't need to write the same functionality twice, but also the whole process, so you don't need to drag and drop the same components twice!

I hope the idea have reached you. Thanks for reading so far.

Friday, June 01, 2007

Can you guess what these are ?



When I was surfing the net searching for object-oriented operating systems, I ran into NeXTSTEP, an operating system made by NeXT (Created by Steve Jobs after he was fired from his own company, Apple!) back in 1989, written in Objective-C. When I read about it I also seen that it worked on NeXT computers. Early NeXT computers shipped with a Magneto-Optical drive instead of a hard disk, the former was invented by them.
These pictures is a Magneto-Optical disk. This technology is still used today: look here.

Sunday, May 27, 2007

Latex for blogger

If you need to type mathematics, Latex will help you (pronounced Latek, source: Wikipedia).
The formula shown above is written in Latex as:

$$\pi = \int_{0}^{1} \frac{4}{1+x^{2}}$$

Compiled on the fly using the link "http://www.forkosh.dreamhost.com/mimetex.cgi?" concatenated with the formula in Latex.

The professional tool for writing scientific documents: LaTeX NOT Microsoft Word. By Waleed Youssef Ph.D (FCI Helwan)
A reference to Latex here.

Thursday, May 24, 2007

STL Clips 1

Guess the output of that program:


#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
string str = "<F";
transform(str.begin(),str.end(),str.begin(),bind2nd(plus<char>(),-2));
cout << str;
return 0;
}


Output (highlight to see):
:D

Saturday, May 19, 2007

A piece of code

Well, the title says it :D. I was bored so I did this image from a screen shot of the memory management module in ArOS. El mafrood en dah granite :D and don't ask elly gab 3aleeh code :D. I imagine it like a piece of paper that got wet and the ink was flushed. I've seen a similar black and white effect in "The code, Linux" documentary (which I am searching for the original English version, because the one I have is in Finnish)

Thursday, May 17, 2007

Electromagnetic shields - can SciFi be realized ?

First, those who will search for the term on Wikipedia, they are speaking about another thing. They mean shielding components against electromagnetic interference. But what I am talking about is making a physical shield from an electromagnetic field ( yup, a one that can prevent bullets from hitting you ).
It all began when I watched the "Elegant Universe" documentary on the theory of everything. Usually these theories aim to unify theories about weak and strong nuclear force, electromagnetic force, and gravity.
There was an example in it showing the gravity is much weaker than electromagnetic force that when an object falls to the ground, it is met by a resistance/repulsion between the electromagnetic field of it's electrons with the electromagnetic field of the ground's electrons. ( That's why electrons don't just mix up and object blend into each others mysteriously. )
So I thought if we can generate such an electromagnetic field to imitate that resistance, we can imitate that a physical shield does exist, and it will generate a repulsive force that prevent a moving entity from moving further using a collision.
The question is how we can generate such a thin layer of electromagnetic field without generating a big interference with the surrounding systems, especially the human body, which is sensitive to such field.
I don't actually have the exact knowledge to answer that. It is especially that I don't recall the exact relation between electromagnetic waves and electromagnetic fields. I don't also know the exact shield power needed to actually prevent something from going through, but I think it might be gigantic ( something related to "Energy = Mass X C2", where C = light speed in vacuum ). I need to revise electromagnetic shields and remember how they are calculated and if their direction might affect the total result or not. ( I might revise our freshmen year physics course ).
Anyone out there can help by suggesting topics or even telling me if this is possible or not ?

Tuesday, May 15, 2007

A computer can't think, because of this

What usually human's think about ? talk about ? dream about ? live for ?
I've been thinking for several years about the process of human learning and perception. I gained several thoughts about it.
Regardless of humor, compassion, irony, and recalling memories; the rest of human brain power is directed towards what they don't know, being the most famous factor: the future.
Tomorrow's weather, the match result, the exam result, the future job, the future salary, the future inventions, can we someday reach the stars ?
And past mysteries: who murdered President Regan, El-Sadat, etc. How did the pharaohs build the pyramids.
Even gossip talks: Who said what about who, who cheated in the exam etc.
In the exception of the last point, the first 2 are usually lead science forward.
You would NEVER - almost ? - find someone who is interested in hearing ( or thinking ) what he already knows, stating the obvious they call it.
Who would care to know "again" that the High Dam gives Egypt electricity ?
But they care to think "what if it was destroyed?"
Humans usually think in stuff they don't know. And as paradoxical as it might seem, they need to know what they don't know so they can think about it !
So in my point of view, a computer system, to be able to think, and represent knowledge, it can not ignore the need to represent ignorance !
I might put it simpler: knowledge representation won't be perfect unless it can represent what is not known !
That's already the case in QAS ( Question Answering Systems ) when the represent questions. But can a computer system, generate such questions ?
It did, by comparing the input knowledge representation to a pre-defined cases of full meaning representation patterns, so it only meant to complete the given pattern.
But can the computer think beyond that ?
Till now that is not thinking. I mean can the computer system generate the full-meaning representation patterns by itself, and be able to induce the answer to the generated question by using common expert system techniques, and perhaps mathematical induction rules ?
Can it afterwards confirm the results of its own induction by launching virtual simulations and comparisons to basic scientific rules and maybe - sometimes - common sense ? ( I might write another one about common sense isA )
"generate the full-meaning representation patterns"... based on what ? Creativity. Can computers be creative ?
"generate the full-meaning representation patterns"... what will trigger the generation anyway ? What guides the direction of generation ? Might we say genetic-algorithms ? Is randomness the key ? I think this is strange, it might, and might not be the direction, but I don't feel like it is the correct way.