Thursday, December 23, 2010

Our Dear Contour Lines

السلام عليكم و رحمة الله

The visualization package for this term requires adding contour lines drawing feature, and here're our lovely contours :D

I'm not sure yet if their places are correct or not, but I liked them a lot :D

click on image to maximize

Thursday, October 21, 2010

Graph Editor [Mathematical Programming]


السلام عليكم و رحمة الله

Our first Mathematical Programming task was to make a graph editor, a simple application that allows the user to draw some nodes, connect them with edges, remove nodes or edges, and find the connected components in the graph.
Till now, it doesn't apply any algorithms on the drawn graph, I'll add some later ..

Monday, October 18, 2010

منوال و وسيط و متوسط

السلام عليكم و رحمة الله

Today's Simulation and Modeling lecture was talking about some basic concepts. like mean, mode, and median ..
The doctor explained the mode as the value that occurs the most frequently in a probability distribution. An interesting thing he mentioned that its name in Arabic is المنوال. His old statistics teacher told him that it was named so because it's the most frequent value in a data set, and in Arabic: المنوال هو الذي يكثر تناوله.
Also, the median is الوسيط and its definition is الذي يقع ترتيبه في الوسط تماما
and the mean is المتوسط
و هو نقطة الارتكاز اللي تتوسط القيم

I find these Arabic definitions very meaningful. I think I'll never forget their meaning again :)

Monday, July 19, 2010

WE SURVIVED !!

الحمد لله

After knowing the results of my third year in FCIS, it's possible to say: We survived!

الحمد لله again :)

By the way, Third year wasn't that hard thing :huh. It was much easier than the second one :D

Saturday, June 12, 2010

simple Educational Game

السلام عليكم و رحمة الله

At the AI final exam night, I found this game and couldn't resist leaving it before finishing all 12 levels !
It's a simple way of teaching some basic concepts like arranging instructions correctly, function calling, good use of available resources, ...
It would be more interesting if it supports recursion. Actually it does, but a kind of infinite useless recursion because of the lack of logical comparison instructions.

Here's the game .. Enjoy! :D
http://armorgames.com/play/2205/light-bot

Wednesday, May 26, 2010

Graphics Project

السلام عليكم و رحمة الله و بركاته

Our graphics project was a 3D Visualization of the Hard Disk structure.

The program reads all directories and files in the computer then draws a 3D tree representing drives, folders, subfolders, and files in it. This is useful to show you how some locations in your computer are crowded while others are nearly empty! "I discovered some empty useless folders in my computer".
It also enables searching for specific folder/file and shows the result colored in the tree. Then by a click on it you get its path or some info about it. Or by a right click you can expand/collapse its children subfolders.

To draw a tree of 10+ levels with 300+ nodes in some levels, the openGL camera will not be able to show the whole scene. So we stopped drawing at level 5 with fixed level size of 6 nodes. However, the resulted tree was very big and we had to zoom-out a lot to get a viewable scene.

From the Graphics point of view, this was not a graphics project :D, because of the lack of models, textures, lighting and sound effects. We used only 1 texture for the background, and 2 models in the main menu for the 2 options: view and search. and I didn't find a reason to use lighting or sound since it's not a game. Files and folders were represented by colored cubes and tree edges were connected by simple lines.
The result was: a good idea with not-so-good interface. It was possible to make it better but there wasn't enough time :(

Here is a screen shot when some levels are collapsed:
Drives are blue, folders are orange, files are green



finally, Many thanks to
Dr. Omar Othman, Noran El-Kafrawy, Mohammad Fouad
for their help.

Thursday, May 20, 2010

Operating Systems Project

السلام عليكم و رحمة الله

Today -الحمد لله- we delivered the OS project. I don't consider it a real 'Project'. Maybe I can call it a task :D. Everything was already written for us -not everything literally, we also wrote some- but the main things were made and we just completed some missing parts. Anyway we learned a lot at the end.

It was also divided to 3 parts:
- Implement a fault handler
- Implement a dynamic allocation/free function to make runtime allocations and frees the heap.
- Free the Working Sets.

My part was the third one. Freeing the pages and tables working sets and the directory table. It was so easy task, though not interesting!

We passed all testing scenarios successfully الحمد لله. so we didn't get a modification task.

There was a challenging task which was to invent a table replacement algorithm using the normal clock that minimizes the number of table faults during testing. We didn't have time to make it but doctors extended its delivery time to be with the practical exam, so إن شاء الله we'll try to make it.

That's all!



Monday, May 10, 2010

Architecture Project

السلام عليكم و رحمة الله

Today - الحمد لله - we delivered our architecture project, after 2 sleepless nights and 3 awake-less days ..

The project was divided to 3 main parts:
- making an Assembler
- making an Emulator
- modifying the given computer design to support interrupts.

Since our group members are only 3, each one of us got a part. My part, which I enjoyed a lot, was the Assembler, it had 2 main tasks to achive:
- produce machine code for the given assembly code.
- handle some syntax/compile-time errors. (or we may call it "Assemble-Time" :D)

Assembler's design was as follows:
1. a 'Scanner' class to scan the editor's text box and parse its lines, returns object of type 'ParsedLine'.
2. this parsed line is sent to 'FirstPass' class that does the First Pass operations (generating Address Symbol Tables, code & data tables with offsets, detect some syntax errors, ...)
3. then 'SecondPass' operates on tables generated by 'FirstPass', translates to machine code, detects some instructions' errors, and returns 'MemoryEntry' objects.

The best part was parsing the code lines and producing line tokens. We used C# RegEx classes. Other parts were just applying what was mentioned in the book and project document . This was so boring.

For the errors to handle, I handled 9/10 basic errors:
Invalid Label, Invalid pseudo instruction, Undefined operand, Unknown instruction, Memory reference out of range, Invalid value, Invalid no. of operands, Operand-instruction mismatch, label double definition.
Plus 8 other additional errors, and we got 8 bonus marks for that :)

Testing levels were 3 for the emulator, we passed level 3 and 2 successfully, level 1 test cases were full of mistakes, so the doctor asked us to run level 1 of yesterday and we passed it successfully too الحمد لله. To test the assembler we had 1 input assembly-code file to produce 1 machine-code file that should match with the correct machine code, and they were identical الحمد لله .
Then we were asked to modify both Assembler & emulator to support additional memory reference instruction, it was easy and we made it successfully.

My overall rating for the project is 7/10. I don't know why I'm not completely satisfied of it, but next projects I'll try to do better ان شاء الله.

At the end, I came up with a conclusion: "I love Architecture" :D I wouldn't have done such an interesting project if I didn't study it!