Follow by Email

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 "" 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";
cout << str;
return 0;

Output (highlight to see):

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.

A cross-platform application loader, an idea

Well, I always get ideas and thoughts in exam times :S. Anyway, here we go.
Imagine your system's desktop as follows:
Gnome (*nix) + Windows sidebar + Visual Studio .NET + xCode (Mac) + GCC + Bash + Need for Speed + (well, any application that runs on another platform, OS, or H/W architecture), and they are all native.
Is that even possible ?
Lets see.
I might think of 5 factors that makes this not possible:
1- Application Binary Interface ( ABI ).
a- Encoding
b- Endianess
c- Instructions ( H/W platform )
d- Name mangling ( Dynamic-linking issues )
2- Application Programming Interface ( API ).
a- Arguably boiled down to only low-level system calls, thus it gets to the interface between pluggable API user-space libraries and the system kernel
3- Cross-compatibility between different expectations of Inter Process Communication ( IPC ) and common shared libraries.
a- A mix of point 1 and point 2.
4- Incompatible shared dependencies.
a- Application A depends on version X of library S and application B depends on version Y and both versions are incompatible if both applications use it for IPC. Well, this kinda also gets down to the scope of one platform
5- Incompatible assumptions about the expected behavior, especially if it was buggy behavior.
a- If an application depends on a known bug in the system API and another applications doesn't. This also gets down to the scope of one platform

I'd be thinking of a resolution to each of these points isA and writes thoughts here as an update isA. If you've got any kindly leave a comment.

Saturday, May 5, 2007


Hossam Sadik has tagged me !

List five things you learnt in FCI –not Technical :D-??
- lazem ya3ny mesh technical :S -
* et3alamt en el 7aya bet3addy besor3a
* we en al 7aya a2sar men en e7na na2adeeha fe za3l we 7'na2at
* we en ana 3ashan asa3d nafsy, lazm asa3ed elly 7awalya
* we en al 7aya gad wel le3b we 3ashan tel3ab lazm teb2a gad fe wa2t el gad
* we aham 7aga at3alamtaha ma3na el sadaka el 7a2ee2aya

Five things you will miss in FCI?
* starting my day seeing the smiles on my friends faces :)
* ra7alatna, 7'asatan fel autobus
* the chance to make anyone fe dof3ty ( wel kolya kollaha ) happy
* el esboo3 el thakafy :D
* Student Union ( futex group ) work and meetings ( for student union, or mozakra :D )

Best day in FCI Helwan?
- el fetarat el gama3ya fe ramadan, el esboo3 el thakafy, yoom el match :D, a7'er yoom fel emt7anat ( cuz i see my friends happy then :) )

Worst day?
- lemma ala2y el dof3a za3lana men zolm doctor aw men ay 7aga tanya

Best week?
- bardo el esboo3 el thakafy :D

Best doctor, course, book, project?
- Dr El gar7y, statistics, C++ the complete reference, GP :D

Worst doctor, course, book, project?
- ( there is much worse doctors anyway ), SW2 , advanced OS, dsp

Best instructor?
- most of them are good, but i want to highlight some instructors who have affected my life deeply and guided me in my learning journey : Mr Ayman Ezzat, Miss Mai Hamdallah, Mrs Marwa, Mr Amr Ghoniem, Mr Ehab elGindy, Mr Mo3taz

Best situation?
- see the video to know

Did you meet your sweet-half in FCI?
- not yet

Did you regret for knowing someone in FCI?
i don't regret anything, if it was bad experience then i learn from it.

What was your favorite place in the faculty?
- with my friends :D wherever that is

What is the size of our digital photos on your hard disk?
- about 1 GB, someday i'll take the full collection from ramy isA :D

What will you do in the last day?
- i will stay to the end and leave as the last person isA

What would you like to say to dof3tnaa?
- 7'odo balko men ba3d :D

What would you like to say to other grades -aldof3at altanya- ??
- antom el sabkon we na7no alla7kon, ... er ... el 3aks ma3lesh :D

i'd like to tag Shereef Sakr, Youssef Mamdouh, and Ahmad Mubarak,
Mohammad Reda, and Kareem Zakaria

How much is your blog worth ?

My blog is worth $6,209.94.
How much is your blog worth?

I first found this in Meshref blog