About Me
- Ahmed Abd-ElHaffiez Hussein
- PhD Candidate at Purdue University, Computer Science.
Monday, December 24, 2007
Keep my MAC Screen Clean
Of course this is applicable for all screens, not just for MAC.
Building Ruby and Rails on MAC 10.4
you can just change the versions you need to install. (I get the latest ones)
After finishing don't use the $ruby -version
In this case, you will get an error. the error is due that ruby tries to evaluate ruby -v then "ersion".
to check ur version just run $ruby -v
Saturday, December 22, 2007
I will "Facebook" you
Grat Goal for Facebook.....
Thursday, December 20, 2007
Top 10 ways to un-bake your brain
baking brains has a negative impact on the surrounding, not just you. so, Plz be helpful and try to De-Stress.
In the following I am listing the entry with some comments:
1. Mindfulness-based stress reduction: I don't have access for this , so maybe later I can experience it.
2. Get lost in music : I do that a lot. I try to be ready with my hits player armed. I use to listen to Quraan, soft music, french melodies..etc
3. Get Active for 30 minutes: I don't do that :( , but I really need to do it. I am thinking of getting a part of it during my half hour break. I think it will help me a lot.
4. Get a breath-break: My favorite practice :), I just knew by nature that this helps me a lot to de-stress.
5. BioFeedback: I liked the idea. I hope I can do it sometime.
6. Game-out: Actually I don't feel good with gamed requiring an intense concentration. so, maybe i should reconsider this habit.
the part of writing things down is very nice. I thought it was only me the stupid person who totally forgets the details of his finished tasks.
Wednesday, December 19, 2007
بسبب نوم السائق مصرع وإصابة 24 حاجا مصريا في السعودية
لقي 5 حجاج مصريين مصرعهم وأصيب 19آخرون أثناء توجههم من مدينة الرياض إلي مكة المكرمة لأداء مناسك الحج والحجاج المتوفون هم: محمد جمعة مقصود ومحمد سيد أحمد محمد ومحمد عبدالله أحمد وابراهيم أحمد متولي وأحمد عبدالعال والمصابون في مستشفي الملك عبدالعزيز في الطائف هم: سعيد عبدالغني أحمد ومحمد عبدالفتاح وسلوي أمين عز ووائل صالح ورنيم وائل صالح وفاتن عبدالباقي وهويدا حسن ناصر وعز الدين عبد الرؤوف ونادية عبدالرحمن وحسن محمد عبدالغفار ومعتز سيد محمود وإسلام محمود إسلام وطه محمد أبو الفتوح وسوسن المصري. أما المصابون في مستشفي الملك فيصل بالطائف وهم: أحمد سعيد محمد وأحمد عبدالبديع وأسماء محمود وأشرف سعيد وكريم محمد. وقال فتحي خميس الملحق الإداري في القنصلية العامة المصرية في جدة: إن السفير عفيفي عبدالوهاب القنصل العام قام بتشكيل فريق من ممثلي الجالية المصرية في الطائف للتوجه إلي مكان الحادث وزيارة المصابين في المستشفيات، وأشار فتحي خميس إلي ان الفريق توجه إلي المصابين وأطمأن عليهم وكانت حالتهم متفاوتة ما بين متوسطة وكبيرة لأن الحادث كان صعبا بسبب انقلاب الاتوبيس عدة مرات، وأضاف أن القنصلية تتابع الحالات أولا بأول كما ستقوم بالتنسيق مع الجهات السعودية لإنهاء إجراءات دفن المتوفين في الأراضي السعودية أو نقلهم إلي مصر حسب رغبة ذويهم. وكان الحادث قد وقع أول أمس في منطقة 'ظلم' بالقرب من الطائف غرب السعودية حيث تسببت غفوة قائد الحافلة في انحراف الاتوبيس عن الطريق علي بعد 25 كيلو مترا من مركز 'ظلم' علي طريق الطائف الرياض مما أدي لانقلابها عدة مرات وتناثرت الجثث وأجساد المصابين علي جنبات الطريق فيما احتجز أكثر من 8 أشخاص بين ركام الحافلة، وهرعت إلي مكان الحادث 28 فرقة إسعافية من الهلال الأحمر والمراكز الصحية.
GoodBye My Friend
To a kind heart..to kind friend..
It's bad u don't feel how much you like someone until you loose him. :'(
اللهم تقبل منه صالح عمله و تجاوز عن سيئاته.
اللهم ثبته عند السؤال، وعند العرض عليك.
اللهم اغفر له و ارحمه
اللهم غسله بالماء و الثلج و البرد
اللهم نقه من الذنوب و الخطايا كما ينقى الثوب الأبيض من الدنس
اللهم اجعل عن يمينه نورا وعن شماله نورا ومن فوقه نورا ومن تحته نورا ومن خلفه نورا و من امامه نورا.
بِسْمِ اللّهِ الرَّحْمـَنِ الرَّحِيمِ
الْحَمْدُ للّهِ رَبِّ الْعَالَمِينَ
الرَّحْمـنِ الرَّحِيمِ
مَـالِكِ يَوْمِ الدِّينِ
إِيَّاكَ نَعْبُدُ وإِيَّاكَ نَسْتَعِينُ
اهدِنَــــا الصِّرَاطَ المُستَقِيمَ
صِرَاطَ الَّذِينَ أَنعَمتَ عَلَيهِمْ غَيرِ المَغضُوبِ عَلَيهِمْ وَلاَ الضَّالِّينَ
صدق الله العظيم
انا لله وانا اليه راجعون
Sunday, December 16, 2007
JAI handling files
The problems started when I moved to Windows. Somehow, when I try to delete the image file from the hard disk, it didn't work.
Seems that JAI keeps a reference over the file indefinitely.
Example:
PlanarImage image = JAI.create("fileload",path)
The file load operation doesn't release the handler.
I tried to nullify the source handling the image, then call the System.gc(). (which is a really bad solution)
another solution is as following:
//replace fileLoad operation
File image = new File(path);
FileInputStream fis = new FileInputStream(file);
byte[] buffer = new byte[(int)file.length()];
fis.read(buffer);
fis.close();
PlanarImage image = JAI.create("stream",new ByteArraySeekableStream(buffer));
//replace file store operation
JAI.create("filestore",image,file.getAbsolutePath(),"jpg",null);
If this doesn't work, it maybe because file descriptor is not released. you may need to call the garbage collector.
Tuesday, November 06, 2007
Configure libtiff for Visual C
To use LIBTIFF in your existing VC++ 6.0 Project/WorkSpace, you need to do the following setting modifications:
- Open your existing Project/WorkSpace file in VC++ 6.0
- Choose Project-Settings... menu item.
- Click "C/C++" tab.
- Choose "Preprocessor" item in the "Category:" menu.
- Choose "All Configurations" item in the "Settings for" menu.
- Add to the "Additional Include Directories:" field the path to the include directory of the libtiff folder.
- Choose "Code Generation" item from the "Category" menu
- Choose "Win32 Release" item in the "Settings for:" menu
- Select "Multithreaded" option in the "Use run-time library:" menu.
- Select "Win32 Debug" item in the "Settings for:" menu
- Set "Use run-time library" menu to the option "Debug Multithreaded".
- Click "Link" tab in the dialog.
- Select "Input" item in the "Category:" menu.
- Choose "All Configurations" item in the "Settings for:" menu
- Add to the "Additional library path:" the path to the lib folder in the libtiff folder.
- Choose "Win32 Release" item in the "Settings for:" menu
- Add to the "Object/library modules:" field: libtiff.lib
- Choose "Win32 Debug" item in the "Settings for:" menu
- Add following text to the "Object/library modules:" field: dlibtiff.lib.
- Click "Ok".
Saturday, November 03, 2007
Installing Windows, Ubuntu7.10, Mac OS 10.4.10 on MacBook (Triple Boot)
I am happy with my MacBook with its running Mac OS X 10.4.10. I can't stand working on windows any more, I feel more comfortable with Mac OS.
My master Thesis is running on linux environment(basically Fedora, but I successfully turned it to be Ubuntu)
My current project delivery should be done on windows. An easy solution costing 60$ would be to purchase Fusion.
Although Fusion looks very interesting, I didn't submit to this solution, for the following reasons:
- Running virtual machines consumes more memory, in this case I will loose some performance which is something I will certainly need during development.
- More memory usage, means more power consumptions, hence less battery life time. in normal cases I enjoy having ~4hrs battery life time with my lovely Mac. this is sthg i don't stand to loose.
- to overcome the first problem, I can extend my RAM. this will make the virtual software costs me almost (60+90)$....I really can't afford this for now. (I didn't get paid for salary 3 months ago)
My MAC specs are:
Processor: 2.16GHz Intel Core 2 Duo
Memory: 1 GB 667 MHz DDR2 SDRAM
MAC OS X: 10.4.10
The target is to install Ubuntu 7.10 and WinXP SP2 on MacBook.
steps:
- Get BootCamp: I think it may force you to update to Mac 10.5. (luckily I installed it 1 month ago before leopard is released)
- Update your Mac OS.
- Install rEFIT.
- run BootCamp assistant and follow instructions to burn driver CD for windows. (don't proceed with installing steps)
- Backup your data. (you may not loose your data if things go smoothly)
- Check your disk partitions and identify the Mac Partion. I most cases it is /dev/disk0s2. but if you are not sure, you can verify this by running a shell command using the diskutil:
$ diskutil list
resize your HDD using Diskutil by running the following command. first you specify the volume to be resized, and its new size, then the type, and the name of the new volumes followed by their size.$ diskutil resizeVolume /dev/disk0s2 70G "Linux" "Linux" 20G "MS-DOS FAT32" "Windows" 20G
- insert your XP SP2 CD and hold down the "ALT" key.
- install XP on the valid partition, just give it a quick FAT32 format.
- you should now have a dual boot(windows with Mac).
- insert your Ubuntu 7.10 Live CD.
- run the installation normally. You should set up the partition manually. Don't mount the EFI system partition. you need only to mount / to the drive you allocated to your linux installation. I didn't make a SWAP file, I just don't need this for now, I relied on my 1GB RAM.
- Continue through the following steps.
- When you reboot, you should have triple boot.
Extracting metadata from PDFs
plan A:
The first idea i got in my mind is to create a Lexical Analyser.
I should parse the PDF file word by word then check if it is "Held" then i should expect a location description after that...If I find "Present" then i should expect a bunch of actors' names.
TO parse Text of PDF file I used PDFBox. Surprisingly, it didn't work as i expected.
- the PDFParse can split a single word into multiple words. So my code would receive "hel" then "d", and not "held". In this case to make it works I should generate a state machine that keeps track of the history which I found non feasible solution.
- I have French documents among these files. Applying a text analyser for french document is a kind of stupidity, in french..instead of saying "hold on", they type "le". Le is a very frequent string (if u r not familiar with french, it is equivalent to the".
which implies that putting positions of text in consideration, hence I can build a set of blocks, and based on this structure I can isolate different logical blocks and then separate their contents.
this didn't work :( the problem this time was with the OCR generating these PDFs. the OCR is not accurate with text positioning 100%. hence the input to my code is buggy. in consequence, the OCR merges two different columns, or split 1 column to different columns.
plan C:
Implies to work on the TIFF files directly(ignores the Buggy PDF)
I read the original TIFF file, then parse pixel by pixel to split the original tiff into sub tiff. in this way I have control on the blocks without need to let the OCR do this for me.
after identifying basic blocks in the tiff file, I call an OCR SDK to transform my Tiffs into text, which finally will be my fields in the DB.
Friday, November 02, 2007
Joke of the year
I was trying to Burn A CD....Well, it was my first time to burn a CD on my MacBook...
I tried inserting the CDs for 20 minutes(i tried 10 blank CDs)..but Nothing happened, so i decided that i may have corrupted CD blanks and I should buy some new ones.
Luckily, I noticed that all that time I was inserting the blank CD in my DESKTOP DVD , not my MacBook... :D
I should lost my mind somewhere...
grrrrrrrrrrrrr.
Saturday, October 27, 2007
Free Access To All Human Knowledge
Saturday, October 20, 2007
No ldd on MAC OS X
Monday, October 15, 2007
Le Naufrage
L'avantage des tempêtes, c'est qu'elles nous libères de tout soucis. Contre les élèments déchainés, il n'y a rien à faire. Alors, on s'en remet au destin.
Ce qu'on doit bien comprendre que le départ est dûe par Dieu.
Parfois; ton navire ne bouge plus. Il devait étre blooqué sur un banc de sable ou sur des récifs. ne penses plus que ton navire peut fuir sous la tempête pendant des centaines de kilomètres sans rien rencontrer.
Wednesday, October 10, 2007
Wikimania 2008 at ALEXANDRIA
Yes, we did it and we won the bid :)
Statements about the Jury choice can be grabbed here.
We have to meet now to plan for the next steps. Hopefully it will be good experience...
Wednesday, October 03, 2007
Friday, September 28, 2007
Wikimania 2008
Tuesday, September 18, 2007
New Task - الباز أفندى
I have a new Project as assignment...
A huge data for Dr Boutros Boutros-Ghali, which I should manipulate and categorize, create metadata, then finally create launch a site to browse the documents..
Whenever I look at the boxes at my disk I remember the Arabic old movies, where we used to see an employee handling tons of papers in front of him in a caricature profile for Egyptian employee. There is also a well known character who appeared in the movie "Ebn Hameedo" played by Tawfik El-De'n known as "El Baz Afandy". :)) he was a skilled employee, pretending the knowledge of everything while he has not gotten any certificates...
Actually I like the task...I find it has some kind of challenge... It tests how much you can handle these docs, how much you can be organized, knowing where a specific document can fit, and how you can make good procedures to organize the structure of such data.
Well, I guess It is a new kind of experience.
Friday, September 14, 2007
VISTA.....
It displays 3D stereoscopic images generated from a PC cluster, on four 10-ft × 10-ft vertical walls and the floor. The cluster is Five workstations linked together. The four projectors used in the VISTA render 1400 × 1050 pixels each and have a very bright light output rated at 7200 ANSI lumens. this can be very good for simulating real phenomenon. There are a lot of applications applied to Vista concerning Aero Dynamics, Chemistry, Medicine..etc.
One of the applications, which I see it quite impressive, is a 3d chart visualizer. It gives you a nice feeling that you are running on the axis, or between the points of the plot.
Actually, I have no pics for the VISTA.... but i can give you an approximation...
imagine the Gapminder in 3D effect.. That's wt u get when you use the VISTA_3dCharts.
Friday, August 31, 2007
Gapple: A google phone!!!
Google can make use of web service integration(gmail,google docs, ..etc). Google maps/GPS will play a big role to add to the Gapple features. In this way google can be really tight to anybody's life. online synchronization will be a feasible feature, you won't need any m/c to access ur life as u already have ur blog/gmail/docs/../../../etc on ur phone. this is really awesome.
Actually i don't know how google is going to compete with iphone? It's clear that they will provide a variety of features unavailable for iphone users.
but how about Hardware? is HTC able to compete the Apple slickness? the same issue for OS!!
iphone reached already 700,000 users and still counting. So, Google should be very wise to compete this mountain and to convince all these users to migrate their mobile device to Gapple. They can focus on services, cost (given that iphone remains expensive). so 100$ down cost can be good factor for migration.
Anyway, let's see how this will go.
By the way, iphone is on top of my wish list (it's not available yet here in Egypt) you can buy it for me on my birthday !!
google is not the only company moving to the phone worlds, there are rumors that Microsoft is trying to buy BlackBerry!!!!
Zmail
I found that Zimbra created a gmail like skin called zmail. I got used of gmail skin and I would like time ago to have all my mail boxes with same interface at least.
A lot of people may get bored that gmail skin is not customizable. You can customize it using Firefox plugin.
check more details about zmail from here.
Wednesday, August 29, 2007
What Keeps me Happy at Work?
- Pause your computer: it is not necessary to turn it off, but at least i take few seconds to make a small walk to refresh my mind and give my eyes some rest.
- Don't check my email at the start: A lot of people check their email at the start of the day, once they arrive at their disks. I think this is not good attitude. I check the email related to my tasks first, then start on my tasks. I check emails after i finish, or when i go home. I finish my top priorities first.
- Drop tasks: frequently I drop tasks I find that they are less important. hence, I have always an inner satisfaction that I should not always finish my tasks list.
- Learn from my faults: I find it a great habit to be ready to hear people's criticism about myself and discuss it with them open-mindly.
- Be Creative: I like to achieve my tasks in a creative way. I should try always to add value to my work.
- Learning: look for ways to add to my knowledge by following new trends and new technologies.
- Evaluate myself before anybody evaluates me: I try to reconsider my habits and my behaviors periodically. Try to break any negative habits I have in dealing with my team, or with customers.
- Take Vacations: :)
- Be Positive: Add positive effect on people around you, and avoid their negative impact.
- Add to conflicts: when I have conflicts with others, I should try to think about a way of how to accelerate the disappearance of that conflict.
- Focus: when I am in a task, I focus just on this individual task. I avoid tasks mazes.
- share my achievements with others: I should communicate my achievements to my team to feel the value of our work all together. We should Speak up and find ways to let the right people know how we are contributing to the success of the company.
Firefox Add-ons for developers and designers
this link lists all these add-ons.
Wednesday, August 22, 2007
MAC character set reference
Ever wanted to type the copyright icon, or do an accent over an A without having to resort to some character palette? We have, and it takes time and is an effort. So we put together a series of help sheets that reference all of the characters that aren’t listed on your keyboard, along with their shortcut keys to make your life easier.
Get the List from Liquidicity
Desert Rose
I dream of rain
I dream of gardens in the desert sand
I wake in vain
I dream of love as time runs through my hand
I dream of fire
Those dreams are tied to a horse that will never tire
And in the flames
Her shadows play in the shape of a man's desire
This desert rose
Each of her veils, a secret promise
This desert flower
No sweet perfume ever tortured me more than this
And as she turns
This way she moves in the logic of all my dreams
This fire burns
I realize that nothing's as it seems
I dream of rain
I dream of gardens in the desert sand
I wake in vain
I dream of love as time runs through my hand
I dream of rain
I lift my gaze to empty skies above
I close my eyes
This rare perfume is the sweet intoxication of her love
I dream of rain
I dream of gardens in the desert sand
I wake in vain
I dream of love as time runs through my hand
Sweet desert rose
Each of her veils, a secret promise
This desert flower
No sweet perfume ever tortured me more than this
Sweet desert rose
This memory of Eden haunts us all
This desert flower
This rare perfume, is the sweet intoxication of the fall
Thursday, August 16, 2007
PDF Library on MAC
I was dragging a PDF file, then I dropped it mistakenly on itunes. I expected an error message or something popping into my face. Surprisingly, the PDF file was added ti the library.
At first glance, I thought it would be a bug or sthg :), so I clicked the file, and it opened the MAC viewer to display the PDF file.
WAAW, the itunes support PDF Files :), I am new to MAC world and it is clear that I miss a lot. I decided to give it a chance and check how much itunes can go far with me as a PDF organizer for files on my MAC.
I created a new library and called it "ebook" and I dragged some pdf to that library.
the itunes copy any files dragged to its library. In this case, I will have at least two copies of each files.
from preferences->advanced uncheck the "keep itunes music folder organized" and "copy files to itunes music folder when adding to library".
This doesn't look enough so far, i need some kind of tagging. thx to the "smart playlist" I can automatically assign a keyword and it will be added automatically to this playlist.
Hence, all I have to do is to add a prefix to my PDF files depending on the folder structure i need it to be.
I browse media and documents through only one application now :)
the advantage of itunes was to make a virtual structure. So, it wasn't a big deal where i place physically the file as long as i organize it well by tagging through the playlist, and the file can exist in many playlist (many-to-many relation) and this is sthg u don't get by folders.
Don't forget that this also will work under Windows as well ;)
I was happy with my itunes so far, although it doesn't support search in PDF contents.
searching in PDF contents is supported in Spotlight, so it was not a big deal. Another problem is that files are not opened inside itunes, instead, they were opened by the MAC Viewer.
What else can I have here?
I found a great tool called yep, It is really a great tool. It has the same decent look as any MAC tool.
It does everythg: searching, printing, tagging, browsing..etc it is really a great document store. It is freeware; I hope it remains so.
Wednesday, August 15, 2007
Flock's Distraction
The way to overcome such moments discriminates the nations and determines which nation will dominate the others.
I don't get why we always obfuscate our problems, the government is not honest in the press releases about any event. Actually, it is not surprising to see that the country's obsession with celebrity is increasing during the last 60 years.
People look for escape during hard times. It is an acceptable way to reduce your pain. I admit that there are a lot of evidences of how this can be used positively. But my concern is that when it becomes to a daily routine running over and over by everybody.
Someone uses people's need to a constant in their lives and a hero who can boost morales by devoting more interest in Celebrities such as famous actors or athletes.
We should try to make the mentality more mature , not to destroy it by making it a shallow mentality seeking gossip columns and films posters.
The best way to face your problem is to know it, not to escape it.
It becomes annoying when a citizen feels that his country is forgetting his pain. Instead, all what his country is doing is to love its celebrities.
Japan didn't submit to these silly procedures after its defeat. they focussed to restructure their country, and they did it as a charm.
Tuesday, August 14, 2007
RSS Reader For MAC OS
I find an application called Shrook
At first glance, i didn't like it. I can't drag a link from Firefox. It works only with Safari.
Actually I am not a Safari fan as it has some problems with many sites. Rendering Arabic sites is always corrupted on Safari.
I decided to move to Google Reader
I didn't use it b4. I relied on Google Desktop reader, and it was enough for me at that time.
But I realized sthg very weird that may push me to refer to Shrook again.
I didn't find "SEARCH" in Google Reader!!!!
I didn't try to bother to look for it at first, I never expect that it is not there. IT's GOOGLE!!!
The Thai won the Imagine CUP
Details for the judge moments can be found here
Monday, August 13, 2007
The C++ Future
check the video here
you can get a list of applications built on C++ here
Saturday, August 11, 2007
Install Beast the open source forum
- I prefer to get the code from Trunk, but last time I tried to do so, i found the version unstable. So, i used the tags link.
$ svn co http://svn.techno-weenie.net/projects/beast/tags/rel-1.0pre/ beast
- Install RedCloth
$ gem install RedCloth
- Install open-id
$ gem install ruby-openid
- Install gettext
$ gem install gettext
- Edit the environment.rb by changing the Salt Password by any different value.
- You Are Done
Monday, August 06, 2007
Windows Vs Linux
Sunday, July 22, 2007
Zimbra Violating the Open Source Term
I am still in my battle field working on Zimbra.
We upgraded to the new zimbra version now....
In this new version I found sthg in the code that made my nerves; all variables are written in this format "_158", "_140".
I found this hilarious...
Saturday, June 30, 2007
The fall of MS fan
I had great passion to try the Vista out, the long delayed version, 6 years or sthg. We all read abt it for many years, and how much it will be sthg fascinating and a new..bla..bla..bla
When I tried it on my PC, i was expecting sthg that could dazzle me.
finally, I got Vista business. I was totally wrong, I regret the day i installed Vista.
well, it is beautiful, the 3-D desktop switcher looks nice.
I faced many many problems with Drivers. the problem is not that they r not verified by Vista. the problem that from time to time, I had to redefine the drivers.
my network card kept me to be disconnected. I couldn't stay online for couple of hours. the stupid thing that when it disconnects, i have to press by myself "diagnose and repair" then should also "get IP" to ask the Vista to get another IP. What is this stupidity!!! didn't I define that already in the connection properties!! the answer to that question is the "ALLOW" :))
If u run sthg on vista, and precipitate away from ur PC, don't expect it is working.
u should wait because u will have to answer "Continue with getting a new IP?", "continue with opening this executable file"..etc I really hate this stupid thg in vista. i don't think i have to press 3 clickes just to run exe file..
The gadgets are terrible, I have never turned them on. they are not innovative and poor.
fighting to have a network connection really annoyed me.
this Vista eats the processor and the Memory. it slows down ur PC. without any tasks running ur RAM usage can be 512 MB. to use a PC now. u have to add $X o buy extra RAM for the Vista beast and $Y extra to more powerful processor, don't forget that u will pay for the Vista too :)
it seems to me that Vista price is too high. despite the license price is the almost the same since many old versions of windows, it is too high comparing with HW costs these days. Windows license can exceed 20% of ur costs!!!!
the only thg that may keep windows alive is that majority of mobile tools need windows to sync, and some softwares are not still available for MACs.
anyways, I didn't like the Vista thg.
Wednesday, June 27, 2007
My Writely Document
but I noticed some problem with it.
If u copy from openOffice and paste in ur writely document, the numbering will be abused in some cases.
Also, if u face a problem with connection, and while disconnection another buddy is updating the Doc, u may have a trouble when ur connection is back.
u will try to refresh to check if anybody has updated the doc while u r offline. the problem is u won't get anythg by refreshing. so, u will think nobody updated anythg.
What is happenning is that when u come back online, the writely will consider ur old version is the most recent update and replace any changes happened while offline. if u didn't put this in consideration u will work on ur old version and didn't get ur buddy's updates.
to get ur buddy's work u have check the revision by urself, and if u find that some work has done while u r offline , click revert to the version preceding the last one.
Thursday, June 07, 2007
Erlang Vs Object Oriented
the functional is easier to any person. any one can write a functional code. Erlang for example has a light VM that can make profit of multiprocessors availability. this doesn't depend on certain compiler that enables parallelism in Java or C.
if you don't care about performance, think about parallelism as simpler way to structure software in a domain where there is a lot of natural concurrency.
I read a paper "Structured Programming Using Processes" in which the author tried to prove that the Erlang was capable to support a personal accounting software application. Maybe you can take a look to it later.
also, I like to point to Yaws, Yaws is a HTTP high performance 1.1 webserver particularly well suited for dynamic-content webapplications. I ma really amazed by its performance.
well, but why Erlang is not widely used till now?
Well the world likes Java. the type safe language. Security in distributed Erlang is “all or nothing,” so when a node is authenticated to another, it can perform any operation.
process isolation is not complete, a process can flood another process with messages, or it can steal all the CPU cycles by entering into an infinite loop.
Thursday, May 24, 2007
Agile Process
Anyway, let's move to another point...
Challenges in Agile Distributed Development
- Communication need vs. communication impedance: How can we achieve a balance in formality of communication in agile distributed environments?
- Fixed vs. evolving quality requirements: the Agile relies on ongoing negotiations between the developer and the customer while Distributed Development often relies on fixed, upfront commitments on quality requirements.
- People- vs. process-oriented control: We appreciate the people-orientation the most.
- Lack of cohesion: Generally speaking about the distributed environment, people may feel In distributed development, participants are less likely to perceive themselves as part of the same team when compared to co-located participants. the agile adds some more excitement to it :)
- Process Refactor: Continuous process adjustments instead of following strictly the agile practices. It is also recommended to document the requirements at different levels of formality.
- Knowledge Spreading: the team should share their knowledge regarding different domains(business, code, test cases..etc). Alot of tools were developed to reduce the overhead of knowledge-sharing activities. Code/process Repository is a must. the Wiki also is a very important way to share the How-Tos between members. I can't neglect the Bugzilla with its role in creating database to help teams report issues and assign priorities.
- Short Iterations: any iteration should not exceed 2 weeks. short iterations help to detect any misunderstandings for the project business and prevent any time waste.
- Start with well-understood functionalities: In order to create the best atmosphere for developers there should be a solid sand to start to be familiar with the processes, tools, and the application. this can be some kind different that the agile which advocates the development of features prioritized as critical by the customer.
- Improve Communication: Synchronized work hours are very important for the team. Also try to make the informal communication be done through formal channels. for example, let it through the emails so that it can be archived. In the distributed Projects it is recommended that the project leader/manager should be involved in the communication and the synchronization process than the Agile practice. finally, some daily mechanisms should be done to maintain minimal communication like morning online meeting.
- Building Trust: trust involves both the team and the customers.
1. Ebert, C. and Neve, P.D. Surviving global software development. IEEE Software 18, 2 (Mar./Apr. 2001), 62–69.
2. Highsmith, J. and Cockburn, A. Agile software development: The business of innovation. IEEE Computer 34, 9 (Sept. 2001), 120–122.
3. Matloff, N. Offshoring: What can go wrong? IT Professional (July/Aug.2005), 39–45.
Saturday, May 12, 2007
Web Antivirus
It is sufficient only one visit from you to make the attacker able to detect and exploit a browser
Are the web masters, or the site creators are responsible for this?
The answer is, it is not always the case.
User Contribution
Advertising
Although web masters have no direct control over the ads themselves, they trust advertisers to show non-malicious content. Sometimes, advertisers rent out part of their advertising space; in this case the web master needs to trust the ads provided from a company that might be trusted by the first advertiser. And so on, you may find nested relations which considered as pitfall in the trust relation by making it a transitive one.
Third-Party Widgets
A third-party widget is an embedded link to an external JavaScript or iframe that a web master uses to provide additional functionality to users. Example for this, Google Analytics :)
Webserver Security
Exploitation Mechanisms
A popular exploit we encountered takes advantage of a vulnerability in Microsoft’s Data Access Components that allows arbitrary code execution on a user’s computer.
Typical steps taken to leverage vulnerability into remote code execution:
- The exploit is delivered to a user’s browser via an iframe on a compromised web page.
- The iframe contains Javascript to instantiate an ActiveX object that is not normally safe for scripting.
- The Javascript makes an XMLHTTP request to retrieve an executable.
- Adodb.stream is used to write the executable to disk.
- A Shell.Application is used to launch the newly written executable.
Detecting Dangerous Pages
Simply, by monitoring the CPU and the processes executed on accessing the page. When some unknown processes are added to the list, this will be a strong sign that a drive-by download has happened.
Google will be more and more involved in our life, it will report to you malicious sites for free....
anyway, it is not a big deal, you can do it yourself for some levels. but there a little bit sophisticated cases when you need multilevel reverse engineering...
source: Google Research Paper
Update: Google online security blog, the latest news and insights from Google on security and safety on the internet.
Wednesday, May 09, 2007
Upgrade your Experience with Google Analytics
Few days ago Google Analytics has released a new version. The new user UI enables easier use of the reports and metrics within the data sets,
NEW:- Email reports and improved clarity of graphs allow users to explore and discover new insights
- Customizable dashboards ensure the right data gets to the right people at the right time
- Plain language descriptions of the data allow users to take action to improve their web site
Attitudes for Creativity
I am sure if the creativity can be learned anyway, a lot of people just born to be creative...
maybe someone can see this link listing 9 attitudes for creative people, and tell me if creativity can be learned or not.
the attitudes as listed by the link are as follows:
1. Curiosity
"What if?", "Why?", "Why Not?"...
2. Seeing Problems as Interesting and Acceptable
Creative people see problems as a natural and normal part of life - in fact they often have a fascination with problems and are drawn to them.
3. Confronting Challenge
Asking ‘how can I overcome this’?
4. Constructive Discontent
Awareness of what’s wrong with the world around, then let it be a motivation to doing something constructive.
Friday, May 04, 2007
The 100 most Influential Personalities
The journal does not rank such personalities, not necessarily to justify why chosen figures, only saying that it wants to honor the "men and women who change the world using their talents, their authorities or their moralities"
This is a strike to the Egyptian system, choosing Abdullah is an indication of the absence of the Egyptian effect on the middle East, where Egypt has been always the most effective player. Currently, it is really obvious that Saudi Arabia stole this role from Egypt.
We don't forget picking Amr Khaled is also a big strike, there were rumors that Amr Khaled was forbidden from Egypt because of the worry of his effect on the Egyptian people, and he faced a lot of Media battles to deny his effect and his role in the islamic world.
Thursday, May 03, 2007
The BlackWater's Danger
The USA uses these kinds of gangs to fight for them instead of get involved in IRAQ, Afghanistan.
These gangs cannot be punished for war crimes, because they are not nothing actually. they are not a military, nothing except...........
They achieved numerous massacres in IRAQ and Afghanistan, wearing Navy Uniform.
Privatization in Egypt is totally different than privatization all over the world :)...This is about the privatization of war and how that subverts even basic notions of democracy. The blackWater is used as a mirror for "Radical Christian Right".
If we are still not aware of wt does this really mean...then here we are..
Blackwater is also the name of private company, formed by an ex-Navy Seal, which owns the training facility and sells "security" to countries or organization doing business in high-risk areas of the globe.
Blackwater's security services included making available - for a price - a small army of heavily armed, experienced mercenaries with access to their own helicopter gun ships, armored vehicles and war planes.
Some says that in 2006, Blackwater had 2300 soldiers deployed in nine countries with a database of 21,000 additional on-call mercenaries.
Where these soldiers come from?????
There are EX-Special Forces from US and UK. they simply can't find inner peace in thir civilian life, so they looked for wars in other countries (Islamic ones). We don't need to say that they r very cruel, experienced, commandos, seal...etc everythg we may think about.
the BlackWater can defeat a significant number of countries.
Some others confirmed that Blackwater has won - on a sole-source basis - more than $500 million of US government contracts, not including unlisted "black" contracts. In addition to Iraq, Blackwater has contracts for work in the Louisiana flood area and on the Mexican boarder. The total global value of private military security contracts is estimated to be $100 billion and rising.
Aren't these terrorist gangs?
they make me sick, that's enough for now :S
Saturday, April 28, 2007
Communication Barriers
I think that we are the most skillful people to achieve a team work. I thought that the majority of us have been working in teams since their first academic year, and for me, this was good reason to justify my theory.
Team chit chat
- I have a problem in transferring my knowledge to them.
- I am "expression-less", so that someone asked me to put a sign indicating my mood whether "I am sad" or "I am happy".
Again, there should be something wrong...This time I thought about it in more abstract way.
Evaluation Barrier
My partner's comment made me notice a small problem...
Listening with Understanding
You should achieve real communication by avoiding evaluative tendency. This means seeing the attitude from the other person's point of view, touch his/her frame of reference about the subject.
I see that I should answer question, in the contest I can do it. Some efforts should be done by the questioner to get and understand the whole picture. In practical life we are not open books, my head is not indexed like the book, I have no appendices pointing to keywords which the questioner look for.
What will happen when you listen to my answer and analyze it to get your satisfactory answer? Does this sound absurdly simple??
Actually "listening" is not widely used. There are a lot of reasons in my opinion to avoid the "listening" thing.
- Most of us have a defensive attitude when it comes to opinions' discussions. We are afraid to get affected and changed by what we hear. Weird, isn't it?
- Emotions, in some discussions emotions become strongest, so they forbid us from achieving the frame of reference of the others. (let's not focus on this right now, as we are more involved with technical discussions)
Thursday, March 29, 2007
Practical RESTful rails Example
Note: Web-Browsers neither support PUT nor DELETE
Create a Rails project and the Resource Scaffolding
$ rails warehouseWe can now have a look to the generated controller.
warehouse> ruby script/generate scaffold_resource product name:string desc:text
exists app/models/
exists app/controllers/
exists app/helpers/
create app/views/products
exists test/functional/
exists test/unit/
create app/views/products/index.rhtml
create app/views/products/show.rhtml
create app/views/products/new.rhtml
create app/views/products/edit.rhtml
create app/views/layouts/products.rhtml
create public/stylesheets/scaffold.css
create app/models/product.rb
create app/controllers/products_controller.rb
create test/functional/products_controller_test.rb
create app/helpers/products_helper.rb
create test/unit/product_test.rb
create test/fixtures/products.yml
create db/migrate
create db/migrate/001_create_products.rb
route map.resources :products
warehouse> rake db:migrate
== CreateProducts: migrating ==================================================
-- create_table(:products, {:options=>"default charset=UTF8"})
-> 0.0160s
== CreateProducts: migrated (0.0160s) =========================================
URLs.
An example of URL in REST is (/product/1) instead of (/products/show/1). We notice that the action is dropped from the URL, we can't know what is the action that should happen to the addressed resource.
The REST actions are activated through a combination of resource-url and HTTP verb. Another feature in the REST action, is that it can react with different response-formats . REST uses the respond_to. We can see this in the generated controller we got from the above steps.
The format specification can be simply done by appending it to the request.(http://localhost:3000/products/1.xml)
Views
Remember the old days when we used to find the following line in the generated views:
link_to :controller => "products",:action=>"show", :id => productLooking to our generated views, we see the following code instead:
>>>< href="/products/show/1">Show
<%= link_to 'Show', product_path(product) %>The 'link_to' call is the same, but the hash is replaced by the path_methods.
>>>< href="/products/1">Show
Same thing for the following methods:
<%= link_to 'New product', new_product_path %>It is not surprising to expect that the REST will affect our forms too. Now, we have to use Path-Methods in our Create/Edit forms.
>>>< href="/products/new">New product
<%= link_to 'Edit', edit_product_path(product) %>
>>>< href="/products/1;edit">Edit
The :url-hash is replaced with the calling of a Path-Method
- product-path for the new-form.
- product_path(:id) for the edit form.
<%= form_for(:product, :url => products_path) do |f| %>
>>>< action="/products" method="post">
<%= form_for(:product, :url => product_path(@product),
:html => { :method => :put }) do |f| %>
>>>< action="/products/1" method="post">
< style="margin: 0pt; padding: 0pt;">
< name="_method" value="put" type="hidden">
< / div>
Finally, the Destroy. The method used for both showing and deleting is 'project-path'. The only difference is that the destroy link additionally uses the parameter :method to name the HTTP method to use (:delete) because the browser doesn't support DELETE.
<%= link_to 'Show', product_path(product) %>In the same manner controllers have to take special care in using the new technique during redirect operation. Rails uses the URL methods generating a method for each path methos:
%= link_to 'Destroy', product_path(product),:method => :delete %>
project_url for project_path
projects_url for projects_path
redirect_to :controller =>"products", :action=>"show", :id=>@project.id
>>>>
redirect_to project_url(@project)
Monday, March 26, 2007
RJS
This is a quick start to work with RJS.
$ rails RJS_Example
Create your controller:
RJS_Example> ruby script/generate controller Examples
exists app/controllers/
exists app/helpers/
create app/views/examples
create test/functional/
create app/controllers/examples_controller.rb
create test/functional/examples_controller_test.rb
create app/helpers/examples_helper.rb
Let's modify the default controllers now:
class ExamplesController < ApplicationController
def index
end
def display
@statement = params[:statement]
end
end
Now, we should go to create our views.
Create in the $RJS_Example/app/views/examples create your index.rhtml
In the header include this tag
<%= javascript_include_tag :defaults %>
The :defaults helps to add all the Scriptaculous visual effects and controls.
In the body, add this code.
<%= form_remote_tag :url => { :action => 'display' },
:html => { :id => 'display-form' } %>
<%= text_field_tag 'statement', nil, :size => 40 %>
<%= submit_tag 'submit statement' %>
<%= end_form_tag %>
We use the form_remote_tag() helper instead of the form_tag().
:html option helps to reset the form after completion.
:url option specifies the controller action that receives the form data.
Finally the empty "div id=statement",The id provides a way to reference the element from the RJS template.
Create partial template app/views/examples/_example.rhtml
[<%= Time.now.to_s(:db) %>]<%=h example %>
Create the RJS template: app/views/examples/display.rjs
page.insert_html :bottom, 'statements', :partial => 'example'
page.visual_effect :highlight, 'statements'
page.form.reset 'display-form'
The page object is an instance of the Rails JavaScriptGenerator.
the partial template app/views/examples/_example.rhtml is rendered, and the resulting content is inserted into the bottom of the statements div.
Sunday, March 25, 2007
Globalize on Ruby-On-Rails
- Translates both db content and view text.
- Supports automatic selection of an alternate, localized template for each view.
- Built-in localization and translation of strftime, numbers, and currency formats.
- Supports pluralization.
- All based on three automatically migrated database tables.
The globalization wiki is not yet complete. But I think the "Get Started" part is fair enough to help you out making your globalized application, it provides very helpful external links.
- Sven’s Globalize Writeup – has many times been refered to as “the best documentation available for Globalize” .
- Example Application – takes you step by step through the process of creating a Globalized example application.
- Unit-tested Example – a walkthrough using a test-driven approach by Josh Harvey.
Saturday, March 24, 2007
Leadership User Guide
Who is a leader?
A leader is someone who makes things happen by:
* Knowing the objectives and having a plan to achieve them.
* Building a team committed to achieving the objectives.
* Helping each member to give his best effort.
A leader must demonstrate two active traits: expertise and empathy. Also he takes active roles in remaking the environment in productive ways.
What is Leadership?
Leadership involves cooperation and collaboration activities that can occur only in a conductive context. It is the art of influencing a body of people to follow a certain course of action; the art of controlling them, directing them and getting the best out of them. A major part of leadership is man-management.
Leadership is the capacity to translate vision into reality.
There is a different between Management and Leadership.
Leadership | Management |
People | Things |
Empower | Control |
Effectiveness | Efficiency |
Principles | Techniques |
Purpose | Method |
Doing the right things | Do things right |
Is the ladder against the right wall?? | Climbing the ladder fast. |
Leadership styles.
Creation of resonance can be done in six ways, leading to Six Leadership Styles. Typically, the most effective leaders can act according to and they can even skillfully switch between the various styles, depending on the situation.(According to Daniel Goleman).
| Visionary Leadership (Transformational Leadership) | Coaching Style | Affiliative Leadership (People-Oriented) | Democratic Leadership | Pacesetting Leadership (task oriented) | Commanding Leadership |
How style builds resonance | He moves people towards shared dreams. | Connects what a person wants; with the organization's goals. | Creates harmony by connecting people to each other. | Appreciates people's input and gets commitment through participation. | Realizes challenging and exciting goals. | He decreases fear by giving clear direction in an emergency. |
The impact of the style on the (business) climate | + + + | + + | + | + | Often ― ― when used too exclusively or poorly | Often ― ― |
When style is appropriate | When changes require a new vision. Or when a clear direction is needed. Radical change. | To help competent, motivated employees to improve performance by building long-term capabilities. | To heal rifts in a team. To motivate during stressful times. Or to strengthen connections. | To build support or consensus. Or to get valuable input from employees. | To get high-quality results from a motivated and competent team. Sales. | In a grave crisis. Or with problem employees. To start an urgent organizational turnaround. Traditional military. |