Saturday, March 31, 2012

أي حاجة

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

It has been long time since I last posted here.

I was supposed to write about many things:
The problems I set for the 2012 local ICPC and their solutions, or my first -official- teaching experience, or even talk about the previous term of the so-called-premaster courses, or maybe post a summary to some highly recommended books I've recently read, or talk about an interesting project I'm currently working on..

But, since there's no much time for all of these :(, I'll only mention them in this post so as to be a reminder for me, if -لا سمح الله- I got enough time to write :D


Your prayers are highly appreciated, اتبرع و لو بدعوة :]

Monday, September 12, 2011

To FCIS'12, Concerning Graduation Projects

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

A year ago I was there, searching for an idea for the graduation project. I remember that our team was the best team on earth to prepare long lists of GP ideas and topics to search for, but worst one to choose a single idea from them!
The million-ideas-list we made was full of repeated topics like speech recognition, OCR, some mobile applications, some killed-in-research computer vision ideas, ...
I won't list them here, and if you want to take a look you can contact me to send them.

I was VERY interested in only 2 ideas: an online IDE, and something like Teddy (discussed later).
If I was the only member in my team, I would have worked on the Teddy one, that's why it's important to choose team members who have common interests with you.

Before I talk about Teddy, you may want to take a look here, and here, for some useful points, or see this if you want your project to be part of a bigger theme or topic. This post also contains some useful advices.

Now, what is Teddy?
Teddy is a sketch-based 3D modeling software. You can make interesting 3D models just by drawing freeform strokes. See this video demonstrating the idea, or try its applet on your browser.
A newer version of Teddy is SmoothTeddy which added texture painting feature and smoother surfaces construction instead of rough meshes constructed by its ancestor Teddy.

Interesting, right? :)
If you found yourself interested in working on a project similar to Teddy or SmoothTeddy, let me know please.

Tuesday, August 9, 2011

It's not simple anymore!

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

The game I've mentioned here a years ago has grown up!. Now it supports recursion as I wished, and also some comparison techniques. It has gone really more awesome.
This game was a very useful tool to make someone love programming :D I used it with my younger sister and it worked :D
Here's the new one:
http://armorgames.com/play/6061/light-bot-20
Enjoy!

Wednesday, July 27, 2011

Scientific Computing Department (2/2)

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

and here's part 2 of that post, where I'll talk about second term in SC.

Second term courses:

1. Computational Geometry
One of my favorites. The course book was an amaaaazing one.
It talks about some Geometry algorithms and how to implement them, like lines intersections detection, polygon triangulation, Voronoi diagrams, space partitioning, ... etc.
Practical part was the most interesting thing. Here's the package we made at the end of the course.
Mid term exam was optional, the doctor left it up to us to choose whether to take a written exam or to pick a topic from the book and explain it to other students in the department. If they understand what you'll teach them, you take the marks, otherwise, you take nothing :D
Final exam was very easy and -surprisingly- doesn't depend on how much you memorize! سبحان الله !! it was the second time for me to see such an exam in FCIS, after the Data Structures exam.

2. Environmental and Global Changes
I didn't realize how exactly should this course be useful for us until we had reached the mid-terms. At the first weeks, we were solving some equations that model how population increases,  energy balance, and some other environmental topics..
At the end, we were able to model some water pollution problems.. and that wasn't interesting..
Exams were very expected, and the practical part was almost nothing! some Matlab tasks..


3. Distributed Computing
It was supposed to be a distributed computing course, but we ended up with a very weak networks course :S anyway its practical part was the only useful thing. Some MPI, openMP and openCL tasks. It was like an extension to the HPC course of the first term..


4. Theory of Computation
It was all about "prove the proven" :D
I was waiting for this course since I was in the second year! I found a book talking about theory of computations in my brother's stuff and read some chapters in it. In the fourth year, it wasn't as I expected it to be, and that was disappointing for me. Anyway I'm happy that I passed its exam at least..
Practical part was somehow interesting. We implemented a universal Turing machine.
Theory of Computations is a common course between SC and CS.


5. ITI Selected Topic
Mine was Microsoft CRM. I didn't choose it by my own will :D so I didn't like it at all, and considered it as a waste of time..
I think next year they should use a better way to assign students to tracks..


Those were second term courses, I hope these 2 parts summary would help new comers to SC إن شاء الله, or help new 4th year students in deciding for the department.  

Tuesday, July 12, 2011

Nature Paintings

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

The easiest activity to do while being sick, is to draw .. needs almost no efforts :D

Here're 2 new things I made:



Computational Geometry Package

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

In the Computational Geometry course, we were required to deliver a package containing some algorithms implementations, like:
- Line intersections tester, with the naive way and sweep line algorithms:

- Convex polygon constructor, also with naive and Graham Hull algorithms:

- Polygon triangulation algorithm:
I liked this one a lot, I made it in the package delivery day morning :D me and Eman used to draw some polygons on my laptop for tracing :D


- and finally, the DCEL (Doubly Connected Edge List) data structure.
I built the data structure itself, tested its functions, and didn't know what to do with it :D so delivered it as it is! 

You can try them from here.

Saturday, July 9, 2011

Scientific Computing Department (1/2)

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

As an SC graduate, it's time to share what I've learnt from SC, so the new comers to this department can know more about it..
First, I want to mention that we were 27 students in this department, about 12 of us chose it to be their first choice (including me :D)

It's a good thing to be in a small department, we used to study together, help each other, take some decisions regarding cancelling a lecture or an exam (6) :D, anyone understands anything can explain it to others, I felt like it was a small family..

Why SC?
For me, because of Visualization, Mathematical Programming, and Geometry. These courses are SC exclusive.

About first term courses:

1. Scientific Visualization
Was one of the courses I enjoyed studying. It was mainly about how to convert some numeric data to visual scenes so it can be easily understood, and assign colors to some types of data. Like coloring the hot areas in a plane's 3D model with red, and cold areas with blue..
It's practical part is to make a package able to building mesh models from data files and color the model according to the color map you'll make.
Here is a sample of what the package should do :)
The instructor was good, and his final exam was very easy, some MCQ and T/F questions! I remember he gave us some topics to search for and discuss the results with him instead of having a mid-term exam :D

2. High Performance Computing - known as HPC
Dr. Hossam Faheem's course :D the very special course in FCIS :D special in everything .. lectures, concepts, exams, labs, ... everything :D
This course talks about some parallel computing techniques and how to run your code on more than 1 processor in a parallel way.. 
It's practical part was about MPI and openMP, and our final task was to deliver some programs able to make parallel matrix multiplication and parallel LCS finding problem using MPI and openMP..
The final exam was an open-everything exam :D use whatever you can use: books, papers, lecture notes, Google, Wikipedia, ... and the most important thing: your brain :D and start thinking of different ways to solve the questions. 
HPC was a common course between SC and CSys.

3. Mathematical Programming
Do you know Dijkstra, Max-flow,  graph coloring, and connected components algorithms, and some other graph algorithms? then you can enter mathematical programming final exam and have high marks without much studying :D
I didn't like our instructor's lectures, but the practical part was very interesting.
Here's my Graph Editor, the final package for this course.

4. Finite Element Methods
Solve differential equations until death :D 
It's a veryyyy easy course -from my point of view- although I didn't enjoy it a lot, but I liked the different methods used to solve mathematical problems..
No practical for this course. 

5. Simulation and Modelling
Common between SC and CS, talks about how to simulate some real life processes to be able to take some decisions according to the simulation results. Example: Simulate how customers arrive to a barber's shop and how long will they wait in a queue to be served, then decide weather to increase the number of barbers or not ..
It's practical part is to deliver some programs able to simulate some real systems, like banks, supermarkets, etc... and take some decisions to save resources and increase profit..
The instructor was excellent, and so was the mid-term and final exams :D

That was our first term courses in SC. Will talk about second term later إن شاء الله :)

Friday, June 17, 2011

أمنية

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

من كام يوم لاقيت عندنا 3 كتب من سلسلة تعليمية للأطفال، يعود تاريخ نشرها لـ 1985. أنا فاكرة اني و انا صغيرة كنت بحب أقلب في الكام كتاب دول بالذات عشان الصور و الرسومات كانت بتشدني أوي :] من غير ما أفهم ولا كلمة عشان مكنتش لسة بعرف أقرا أساساً :]
بعدين لما كبرت بقى و بقيت بعرف أقرأ فهمت انهم عن الفيزياء و الكيمياء و الأحياء.
و بعدين لما كبرت شوية و بقيت بفهم كانت أول مرة في حياتي أعرف يعني إيه الخاصية الشعرية، أو البناء الضوئي، و حاجات كدة من الكتب دي.
دي مثلاً صفحة من كتاب الأحياء عن الخلايا  .. بيشرح إزاي كل جزء في الخلية ليه وظيفة مختلفة، و كله بالرسومات :]

اضغط على الصورة للتكبير
الكتب دي كانت مترجمة للعربية في دار نشر في لبنان، المترجم كتب في آخر كل كتاب نبذة تعريفية عن السلسلة، عجبني منها الفقرة دي:
"و مع أننا لم نأل أي جهد في إخراج هذه الكتب على أحسن صورة ممكنة شكلاً و مضموناً، فإن ثمة مشكلات ما فتئت تؤرقنا. أهمها عدم استقرار المصطلح العلمي العربي في الوقت الراهن. بيد أننا ننظر إلى هذه المسألة على أنها مؤقتة و لا بد من زوالها متى مارسنا العلم بلغتنا الأم و أمسينا مجتمعاً منتجاً لا مستهلكاً، و مبدعاً لا تابعاً. على أي حال، سوف نستمر في مواكبة آخر تطورات هذا المجال في طبعاتنا المقبلة بإذن الله."

قعدت أتخيل، لو عندنا كتب عربية زي دي كدة، بتعلم الطفل حاجات مفيدة بطريقة تشده و تبسط له المعلومة، في كل المجالات بقى: حساب و عربي (نحو و تراكيب و شعر و بلاغة و كله) و علوم (بأنواعها) و جغرافيا و هندسة مثلا!
و بقى عندنا جيل أطفال بيقرأ الحاجات دي بدل قصص سوبرمان و لا قصص بوجي و طمطم مثلا D:
ساعتها ممكن يطلع من الجيل ده علماء يبدعوا في العلوم (بلغتنا الأم) زي ما المترجم كان عايز..





Monday, May 16, 2011

بدون عنوان

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

The best sentence I've read this week:

"If you are honest, people may cheat on you. Be honest anyway…
The good you do today will often be forgotten tomorrow. Do good anyway…
What you spend years to build, someone could destroy overnight. Keep building anyway…
The people you loved may forget about you and let you down. Keep loving them anyway…
Because in the end, it's between you & Allah… It was never between you & them… Anyway…"

and ..

 "فَأَمَّا مَن أَعْطَى وَاتَّقَى ، وَصَدَّقَ بِالْحُسْنَى ، فَسَنُيَسِّرُهُ لِلْيُسْرَى"
سورة الليل

Thursday, April 14, 2011

New Art Work

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

A new piece is added to my art works. Last 2 drawings took me 3 hours to make :)

Sunday, January 16, 2011

Final Graph Editor

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

The Graph Editor I mentioned here has grown up :)

Now it supports:
- Finding connected components.
- Graph coloring.
- Applying Ford-Fulkerson algorithm to find maximum flow and minimum-cut.
- Find maximum cardinality matching on a bipartite graph.

You can try it from here.

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!









Wednesday, June 17, 2009

The difference between GPL and BSD

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

I heard this sentence a day ago and wondered what does it mean..
I already know about the GPL but what's BSD ? :D

See this

and this