Archive

Archive for the ‘Programming’ Category

Stars were glowing at JDC 2010

February 28th, 2010 Ahmed El Gamil No comments

Since this blog was starting to be full of ghosts, i said that i must break the silence by some quick post.

Last Saturday I attended the JDC 2010 (Java Developer Conference) which is organized by EGJUG , I attended the last JDC which was at 2008 and it was pretty good and after looking at the agenda of 2010, i just couldn’t resist :)

Most of the sessions were quite interesting, i got to know some of the new technologies and made some good contacts with great people in the industry here in Egypt.

I also bought an excellent book “Secrets of the Rock Star Programmers” by Ed Burns who was a speaker at the conference (and he was also a speaker at 2008), and he signed it for me ;) , Thanks Ed.

After the conference we had a quick visit to Google :)

Actually that was at the Google Booth :) , Some of the Google guys were there like AbdelKarim Mardini showing the new Nexus one and some other cool stuff.

A lot of interesting people was there like Sang Shin, Fred Sauer, also from Egypt Mohammed El-Refaey whom i really enjoyed talking to.

So in the end, it was a pretty good day and meeting a lot of my friends added a tasty flavour to the mixture, JAK Shabab.

Time to move on and finish that piles of work to do !

Auto-completion in Ruby IRB

February 5th, 2009 Ahmed El Gamil 4 comments

الحمد لله و كفى وصلاة و سلاماً على عباده الذين اصطفى ثم أما بعد..

فبينما أقوم بتجربة لغة البرمجة Ruby كلغة بديلة لل Bash Scripting للقيام ببعض أعمال اداره نظم التشغيل (System Administration) (والتى تبين لى انها قوية جداً فى هذا المجال و يبدو أنى سأستخدمها من الان فصاعداً), اذ تعرضت لل Interactive Ruby او ما يسمى أختصاراً  Irb و هو عبارة عن نوع من ال Shells و لكنه للتعامل مع لغة Ruby نفسها لتجربة بعض الطرق البرمجية قبل استخدامها فعلياً فى برامجك..

المشكلة التى قابلتنى هى انى وجدت Irb لا يقوم بعملية الاكمال التلقائى (Auto completion) لل Class & Methods و هذا شىء صعب للغاية على مدمن Shells مثلى ! :-D

و بعد البحث عن الموضوع مع العملاق جوجل وجدت انه يجب عليك ان تقوم بضبط بعض الخواص فى ملف ال Configuration الخاص ب Irb و الذى يوجد فى مجلد ال Home بأسم irbrc. حتى يكون الملف كالاتى

IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:LOAD_MODULES] = []  unless IRB.conf.key?(:LOAD_MODULES)
unless IRB.conf[:LOAD_MODULES].include?('irb/completion')
  IRB.conf[:LOAD_MODULES] << 'irb/completion'
end

و هكذا ترى النتيجة بعد الانتهاء من هذا التعديل البسيط  8-)

irb

سبحانك الله و بحمدك..أشهد ان لا اله إلا أنت..أستغفرك و أتوب إليك