mpcabd's مدونة

I’m Learning Python part 10 (last one)

صورة mpcabd
أرسل من قبل mpcabd في يوم الأربعاء, 2009/09/16 - 12:20am

I'm Learning Python part 10
(last one)

Python Logo

Back to blogging

As usual, I will apologize for not blogging for a long time.
I have been very busy, university exams, university projects, job projects, teaching and learning.

Python Course

At Damascus University, in the faculty of informatics we managed to create free courses for students, and I was one of the teachers there, I taught Python to students. As far as I know this course was the first Python course in Damascus University.
Even though the students were a few (actually a very little few about 8 ~ 10 students) the course was great. We managed to learn Python 2.6 Syntax, a little bit of its standard library and a little bit of PyQt4 in about 7 days x 2 hours daily. As far as I know too, students understood it and found it great, and I hope they'll be using this great language more in their programs.

Why last one?

The tour with Python ends here, while it ends here it starts here too, it ends here because so far you've learned what you need to start your own path in Python. And it starts here because you're fully equipped with the base tool to discover more tools, I'll let you discover the standard library and 3rd-party libraries on your own, because everyone differs in his/her interests.


ألف باء النقاش

صورة mpcabd
أرسل من قبل mpcabd في يوم الثلاثاء, 2009/06/09 - 1:07am

ردا ً على المنحى اللا حضاري الذي اتخذه أحد النقاشات ضمن المنتدى من أحد الأطراف على شكل تصرف طفولي, وجدت أنه من اللازم أن نتعرف كلنا على ألف باء النقاش الحضاري, النقاش الذي يجب علينا أن نتناقشه, هذا الكلام ليس لشخص ٍ بذاته, وهو لي أولا ً قبل أي شخص آخر, ومع كامل الاحترام لمن لا يريد التقيد به.
هذه المدونة محاولة لجمع آراء وأفكار من أنحاء العالم لبيان مقومات النقاش الحضاري والأسلوب المتبع في النقاش.


( )

اليوم الصعب

صورة mpcabd
أرسل من قبل mpcabd في يوم السبت, 2009/05/23 - 11:41am

مرحبا من جديد Smile
يوم الخميس أول مبارح, كان يوم لا ينسى, عنجد يوم صعب كتير, شوفو شو صار معي:
الخميس كان عنا مقابلة مشروع البيانيات, وكمان كان عنا تسليم تقرير الأتومات.
الأتومات كانت شبه خالصة, التقرير كان مو مكتوب طبعا ً, بس يفترض أنو قواعد اللغة كنت مصممها والكود جاهز, كنت عامل PDA و CYK, القواعد كنت كاتبها ومظبطها عالـ PDA من زمان, بعدين ساويت الـ CYK وكان صفيان ننقل القواعد بشكل ظابط للـ CYK وبعدين ندمج الكود الجديد مع القديم.


( )

استعمال Gedit كمحرر للكود

صورة mpcabd
أرسل من قبل mpcabd في يوم الأربعاء, 2009/05/13 - 12:46am

منذ أن بدأت استعمال نظام Linux وبدأت التعلم والعمل عليه افتقدت برنامج محرر النصوص الشهير Notepad++, كان هذا المحرر يعد من وجهة نظري الأفضل في مجال تحرير النصوص, وخاصة البرمجية منها على نظام Windows.

يأتي مع Ubuntu محرر النصوص Gedit بشكل افتراضي, وهو محرر جيد لكنه غير عملي في تحرير الكود في البداية, لكن مثله كمثل أي برمجية أخرى على Linux (أو برمجية حرة بشكل عام) فهو قابل للتعديل بشكل كبير (طبعا ً كان Notepad++ وما زال برمجية حرة, وهو أيضا ً يتميز بقابلية التعديل الكبيرة), والتعديل هنا من حيث الإضافات Plugins وليس تعديل كود البرنامج Smile


I'm Learning Python part 9

صورة mpcabd
أرسل من قبل mpcabd في يوم الجمعة, 2009/03/20 - 1:53am

I'm Learning Python part 9

Python Logo

Classes In Python

As I told you before, Python is a powerful programming language, and powerful it won't be without Object Oriented design.
Python supports both Pure Object Oriented Programming (Every thing must be in a class) and Structural Programming (You can type code everywhere).
It supports also other programming paradigms like Functional Programming. I won't write about OOP and its uses, why we should use it, I'll just give you the keys to use OOP in Python.

Defining a Class

Classes in Python are defined like this:


من ركل القطة؟!

صورة mpcabd
أرسل من قبل mpcabd في يوم الخميس, 2009/03/19 - 12:38pm

قصة من كتاب "استمتع بحياتك" لـ "د. محمد بن عبد الرحمن العريفي" أعجبتني وأردت أن أشاركم بها:

 

قبل أن تجيب على السؤال .. اسمع القصة كاملة ..

كان يعمل سكرتيراً لمدير سيء الأخلاق .. لا يطبق مهارة واحدة من مهارات التعامل مع الناس ..

كان هذا المدير يراكم الأعمال على نفسه .. ويحملها ما لا تطيق ..


( )

I'm Learning Python part 8

صورة mpcabd
أرسل من قبل mpcabd في يوم السبت, 2009/02/21 - 12:27am

I'm Learning Python part 8

Python Logo

Python 3.0

Since the last time I wrote an article Python many changes happened in my life, one of them is the release of Python 3.0 (Which is known also as Python3K and Python3000).


اجتماع مع النخبة

صورة mpcabd
أرسل من قبل mpcabd في يوم الخميس, 2008/12/04 - 1:07am

يوم من أجمل أيام حياتي, يوم لن أنساه ما حييت, الثاني من كانون الأول عام 2008, يوم جعلني أطير من الفرح والبهجة والسرور. لم يدخل السرور قلبي منذ زمن, لكنه في ذاك اليوم أعاد النظر في علاقتنا ليعود بزيارة ٍ ما زارني مثلها قط.
 
من النادر أن أجتمع بشخص يقبلني كما أنا ويتفهمني ويشاركني اهتماماتي بنفس الوقت, وهذه كانت أكبر مشاكلي في حياتي أنني لا استطيع أن أتناقش مع أي شخص بما يدور في بالي لأني أبدو غريبا ً عندها.


I'm Learning Python part 7

صورة mpcabd
أرسل من قبل mpcabd في يوم السبت, 2008/11/29 - 1:10am

I'm Learning Python (part 7)

Python Logo

Apology:

First of all I wanna apologize for being late with this part, I've had busy days first during Shaam 2008 expo and second during some studies at the college and last busy time past launching Bawabaty project.

Numbers:

Numbers in Python are divided into 5 sections:


I'm Learning Python part 6

صورة mpcabd
أرسل من قبل mpcabd في يوم الجمعة, 2008/11/07 - 11:10pm

I'm Learning Python (part 6)

Python Logo

Dictionaries

Dictionaries in Python are like dictionaries in life, they consist of key-value pairs, each key maps a value, values can be any object type, and keys also. Keys must be unique, I mean that we can't have two identical keys with different values.
Dictionaries are defined using curly braces { and } as the following:
>>> D = {'name' : 'Abd Allah Diab', 'age' : 19, 'job' : 'Web Developer'}
Now we can access any of the pairs using only the key:
>>> D['age']
19
Dictionaries are mutable objects, which means we can change their values in place:
>>> D['age'] += 1
>>> D['age']
20
We can add new pairs also easily:
>>> D['eyes'] = 'brown'
>>> D
{'job' : 'Web Developer', 'age' : 20', 'eyes' : 'brown', 'name' : 'Abd Allah Diab'}
As you can see, the dictionary is not sorted, we entered the name first then the age and job, and at last we added the eyes, but it prints in a different order.