Posts Tagged ‘ruby’

The Book Of Ruby

Posted: فيفري 24, 2009 in General
الوسوم:, , ,

انهيت قراءة كتاب The Book Of Ruby .. الكتاب جميل جدا ويتكامل مع مقدمة فى روبى بصورة جميلة جدا ، ينقسم للتالى

فصل مقدمة عن روبى ورايلز ، البداية مع روبى والبرنامج الأول

وفصول الكتاب

1، 2 -تعرض لمقدمة مع انواع البيانات -Data Types- السلاسل النصية (Strings) والأرقام Numbers وتحدث عن السياق من ناحية المتغيرات العامة والمحلية، وايضا مقدمة جميلة عن ال OOP ومفاهيمها مثل الصفوف والكائنات ومتغيراتهما instance/class variables والطرق-methods- والصفات وطرق تحديد الوصول وتعدد الأشكال Polymorphism والثوابت وبعض التعمق مع الواراثة.

3- يتحدث عن السلاسل النصية وال Ranges ومعالجتهم

4- يتحدث عن الArrays وال Hashes وبعض طرق التعامل معهم

5، 6- يتحدث فيهم عن الحلقات/الدوارات Loops (مثل for, while, until, Loop) ووحدة Enumerable وتحديد مقارنات مخصصة، ويتحدث عن جمل الإختبار if,then, else, والنفى

7، 8- يتحدث بالتفصيل عن الطرق (طرق تابعة للصف ، طرق خاصة بال Singleton واعادة تعريفها وصلاحيات الوصول public, private, protected) وعن تمرير القيم لهم.

9- يتحدث عن الإستثناءات ومعالجتها ببعض التفصيل

10- يتحدث عن الBlocks والlambdas

11- يتحدث عن ال symbols وعلاقتها بالStrings وفائدة استخدامها

12- يتحدث بالتفصيل عن الوحدات Modules

13- التعامل مع ال IO والملفات والمجلدات والإستدعاء الذاتى

14، 15- التعامل مع YAML ووحدة Marshal لتخزين البيانات وتحميلها

16- التعامل مع ال Regular Expressions

17- التعامل مع الخيوط ال Threading

18- تعرض لعمليات التنقيج والإختبار

19- مقدمة فى رايلز من حيث بعض المفاهيم الأساسية كال MVC وانشاء التطبيق والإستفادة من ال Scaffolding والتعرض لل Migration والpartials

20- فصل جميل عن ال dynamic programming

بإختصار الكتاب جميل جدا وبيغطى حاجات مش اتعرضتلها فى مقدمة فى روبى زى ال lambdas, blocks وال threading وال RE والعكس صحيح كتاب مقدمة فى روبي بيغطى حاجات اضافية زى قواعد البيانات ومعالجة ملفات ال XML والواجهات الرسومية

*طبعا لكتب اكثر تعمق The Ruby Programming Language و Programming Ruby

شغال حاليا فى تجربة جميلة فى الماتلاب مع FreeMat

*ال tutorials الجاية ان شاء الله عن SQLAlchemy و Data Mapper ويمكن لو دماغى رايقة يكون فى حاجة عن FreeMat و Ramaze

صحيح موضوع مهم لكل واحد :d

HowTo Break Up with your girlfriend

Monad me!

Posted: فيفري 15, 2009 in General
الوسوم:, , , , ,

الحمد لله خلصنا ال Docathon وبشكر كل اللى ساهم فى توفير مجموعة ممتازة من الدروس

Mono C# WinForms
GTK# Tutorial
GTK+ Tutorial
Mono IronPython WinForms Tutorial
PyGTK Tutorial

الحمد لله مش استسلمت مع Haskell بس ليه Haskell او ال Functional Programming بصورة عامة صعبة ؟

الصعب انك تبعد كل حاجة عرفتها قبل ماتبدأ فى Haskell

ال Functional Programming تجربة فريدة ومش صعبة لكن النقطة انها مختلفة عن الأساليب اللى برمجت بيها قبل كدا فمش سهل انك تربط مع التجارب السابقة. مثلا انت اتعلمت لغة زى بايثون بكل سهولة و اشتغلت بيها مدة كافية وجيت تتعلم لغة تانية فسهل لأن معظم المفاهيم واحدة وكل اللى عليك التركيز فى إنك ازاى تعمل كذا فى اللغة التانية بنفس طريقة تفكيرك فى بايثون.

لكن مع ال Functional Programming بتكون كأنك بتتعلم بايثون من اول وجديد!

من المصاعب اللى بتواجه القادمين ل Haskell هو فهم ال Monads .. كم الدروس حولها يوضحلك قد ايه ال Monads مهمة وفى نفس الوقت محتاجة اهتمام. ايه الصعب فى ال Monads ؟ الصعب فيها فى انك تفهم انها سهلة!-شوفت بسيطة ازاى؟ 😛 – افضل شرح قريته Understanding Haskell Monads وحااليا انا شغال فى Real World Haskell

صحيح نزلت دروس جديدة فى موقع symfony بإسم Jobeet بعد سابقتهاAskeet

وكودإجنيتر نزلت 1.7.1 راجع الخبر

23 لينك حول روبى 1.9.1

ولنا لقاء قادم…

Writing Myself a Scheme

Posted: فيفري 8, 2009 in General
الوسوم:, , , , , , , , ,

حاجات كتير بعملها فى الأجازة بحاول استغل وقتى لأقصى حد.. فخلصت شوية كتب

Head First PHP & MySQL

الكتاب مش وحش لكن بصراحة مش يستحق كلمة Head First استفدت منه فى بعض الأجزاء ولكن ضايقنى فى جزئيات اكتر زى انه عدى على جزئيات كاملة زى السيكيورتى مرور الكرام غير ان حاجة تانية انقصت فى اسهمه كتير جدا وهى عدم الشرح من منظور ال OOP بحجة ان قد تكون ال procedural programming انسب وتخطى ال Testing كذلك

لو قررت تقراه استفيد من التطبيقات لكن مش تعتمد عليه بنسبة 100%

Head First Rails

الكتاب احسن من سابقه

الكتاب عبارة عن tutorial او ممكن نقول مقدمة فى Rails اتعرض لمفاهيم كتير زى ال MVC فى رايلز (كإستخدام الكنترولرز وتحديد ال routes و انشاء الواجهات واستخدام Erb وانشاء ال Templates وال Layouts وايضا ال Partials واستخدام ال ActiveRecord -الإستخدامات الشائعة- ليه كتاب مخصوص PRO ActiveRecord ) وتطبيقات حقيقة سواء من البداية او باستخدام ال scaffolding وتحسينه واستخدام ال Ajax وفى نفس الوقت عدى حاجات كتير زى ال testing وال deployment

هتستفيد منه لو اول مرة مع Rails او عايز تجرب تنشئ كذا تطبيق على السريع.. غير كدا انصحك انك تقرا Simply Rails 2 او Agile Web Development with Rails

Write Yourself a Scheme in 48 Hours

مع مشوار Haskell والمعاناة فى ال Monads -مش معاناة لحد ماتفهمها 😀 – جه الوقت اللى يكون فيه قلبى قلب اسد 😀 واقرا الtut دى لإنشاء interpreter ل Scheme ..ايه اللى استفدته منها ؟

1- تثبيت اللى اتعلمته فى Haskell

2- عرفت ايه النقط اللى مش واضحة بالنسبة لى -دا بيساعدنى فى انى اصلحها-

3- استخدام Haskell فى شئ مفيد

4- معرفة Scheme (فى احسن من معرفة لغة انت كتبتها ؟ اعتقد لأ)

BTW, ترجمة PyGTK Tutorial هبدأ فيها ان شاء الله بعد انهاءها فى ZetCode مباشرة

وبس كدا دا اللى عملته فى الكام يوم اللى فاتو.. انت عملت ايه ؟

Merb gets merged into Rails 3!

Posted: ديسمبر 25, 2008 in General, Scripting
الوسوم:, , , , , ,

مفاجأة غير متوقعة تماما ولكن حركة استراتيجية ممتازة


It’s christmas, baby, and do we have a present for you. We’re ending the bickering between Merb and Rails with a this bombshell: Merb is being merged into Rails 3!

We all realized that working together for a common good would be much more productive than duplicating things on each side of the fence. Merb and Rails already share so much in terms of design and sensibility that joining forces seemed like the obvious way to go. All we needed was to sit down for a chat and hash it out, so we did just that.

What this will mean in practice is that the Merb team is putting their efforts into bringing all of the key Merb ideas into Rails 3. Yehuda Katz will outright join the Rails core team, Matt Aimonetti will work on a new evangelism team, and Carl Lerche and Daniel Neighman (hassox) will be co-starring the effort to bring all this over. We’ve immortalized the merge with plaque page at rubyonrails.org/merb.

What’s being brought over? Some of the key ideas that they’ll be taking with them from Merb into Rails 3 are:

  • Rails core: Yes, Rails is a full-stack framework and will remain so, but there’s no reason we shouldn’t also make it possible to run with less than the full monty. Rails 3 will make it easy to run just a bare minimum and then allow you to opt in just the stuff you want, if that’s necessary for your particular situation. Think “rails myapp—core” (and “rails myapp—flat”).
  • Performance optimizations: Merb has a lot of Rails pieces rewritten to be faster. We’ll be bringing all that good stuff over. We’ll also bend the architecture in the places where that’s necessary for a big yield. In short, Rails 3 will get all the performance attention that the Merb guys are known for.
  • Framework agnosticism: Rails will always have a default answer to every question within the stack. If you don’t care about testing frameworks, you’ll get test/unit. If you don’t care about which ORM, you’ll get Active Record. But some people do care and want something else. Some people want RSpec for testing, others want to use Sequel or Data Mapper for ORM, others again prefer Haml for templating, and some might prefer jQuery for Ajax. All these people should feel like Rails is welcoming them with open arms. Yes, we’ll have a default, but we shouldn’t have any form of discrimination against alternatives.
  • Rigorous API: Too many plugins break when Rails is updated because it’s not clear where they can safely hook into the internals and when they’re monkeypatching and should expect things to break. The Merb guys committed to a public API with tests to ensure that it wouldn’t break. They’ll bring over that line of thinking and give Rails 3 a tested and documented API for extensions that won’t break willy-nilly with upgrades.

This is not a big bang rewrite It’s important to understand, however, that this is not a “big bang” rewrite of Rails. We’re far beyond the time when we could just throw out everything and start over. This is going to be a progressive improvement of Rails that’ll carefully judge new initiatives on their impact on backwards compatibility as well as their general utility.

I’m sure there’ll be some parts of Rails 3 that are incompatible, but we’ll try to keep them to a minimum and make it really easy to convert a Rails 2.x application to Rails 3. The Merb guys will also be working hard on giving existing Merb users a manageable upgrade path to Rails 3. We’re working with lots of ideas including allowing existing Merb controllers to be mounted alongside new Rails 3 ones. We’ll see how it all plays out, but play out it will.

Also, the Merb guys aren’t just abandoning the existing Merb user base and their applications. They’ll still be doing bug fixes, security fixes, and work on easing the upgrade path to Rails 3. This will all progress in a nice, orderly fashion.

The timeline Rails 2.3 is just around the corner. We hope to wrap up and release in January. It’s a blockbuster release packed with goodies to the tilt. But as soon as that’s done, all eyes will be on Rails 3.

The probably-overly-optimistic goal is to have at least a beta version ready for RailsConf 2009 in Las Vegas. Who knows if we’ll make it, but we’ll certainly have made tons of progress on it by then.

So all of these changes are pretty much effective immediately. We’ve already started the collaboration and we’ll be rolling out a bunch of public initiatives announcing the concrete elements of the work under the Rails 3 milestone very shortly.

No hard feelings, just kumbaja This is quite a dramatic turn of events. We went from testy relations to coming together in not very long at all. But I’ve been incredibly positively surprised at how well everyone on both sides have been gelling behind the scenes. The more we talk, the more we realize that we want the same things. And in the few cases were we do care about something different, it’s usually complimentary.

I really hope that everyone within both communities will deal with this news as gracefully as the key contributors from both camps. Let’s just wipe the slate clean on anything that has gone before and cherish that we can now move forward in unity instead of as fractions of the same ideas.

Rails 3 is going to kick ass.

http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3

http://rubyonrails.org/merb

http://yehudakatz.com/2008/12/23/rails-and-merb-merge/

الحمد لله بعد نجاح الإصدار الأول قررت ان يكون فى إصدار تانى مع تحسينات للتصفح اونلين

فى الإصدار التانى هيتم اضافة برمجة الواجهات الرسومية وتم انهاء ال 3 اجزاء Gnome, Qt, wx
وإضافة دراسة rSQLiteGUI (معتمدة على ال gtk وال active records كتطبيق)

ازاى اقدر اساعد؟
لسه فى مكان لأساسيات threading, networking وكتابة ال extensions وبعض الإضافات على rails
اذا تقدر تنهى التنسيق ومراجعة اللغة ياريت تراسلنى