Thursday, June 25, 2009

Move from Nokia to IPhone with style, thanks to Google Mobile Sync

I'm continuing to enjoy my newly unlocked IPhone 3G and tonight I started to snap out of the fascination and set out to sync all my contacts and calendar entries from my (now old and obsolete and dull) Nokia N76 to my IPhone, I had a very simple strategy in mind, sync the Nokia with PCSuite on Vista, and Sync that back to IPhone using ITunes. Unfortunately it wasn't that simple ...

On Vista PCSuite sync's your contacts with Windows Contacts which is stupid and dull and so 1990's, but the real issue for me is that it drops information while syncing, specifically if a contact has more than one mobile number it just syncs the default one, and it does the same with home numbers, a limitation that you simply can't live with because nowadays everyone has a mobile number for business hours, mobile number for evenings, mobile number for weekends, you name it ... and if you care to stay connected you got to keep all those

I thought that this can be a good time to explore the world of OTA (Over The Air) Syncing of mobile data, and I was reasoning that if I managed to do that from my Nokia, there is a big chance that I can Sync back to my IPhone, a simple query on Google lead me to one of their new "Beta" services surprisingly enough named "Google Sync" :)

I started at this page, Google Sync fo Nokia S60 and panicked at the fact that if I would setup Google Sync, I will not be able to sync anymore with PCSuite afterwards without losing data or at least messing it up ... but I can do without that at the moment, after all it hasn't done me much good anyways. To make sure that I'm not loosing any information from my contact list (which is over 800 entries by the way and that makes it worth the effort) I started by doing a one time OTA Nokia-Compatible-Only Backup on OVI free OTA service just to be safe

Here are the steps to setup OTA sync for Contacts, Calendar, Tasks and (Soon) Mail on Google Sync for your S60



Get Google Sync on your phonenokia_smart_large



  1. Backup your data

  2. Download mail software

  3. Set up Google Sync



First few times I tried to Sync with Google from my S60 I got errors, obvious ones like "Server Error, please try again later", and another more subtle one like "your account doesn't have permission to sync with current settings contact your administrator" ... guess that referred to the server side account, I looked around on my Google Account for something that can be related to Sync permissions but didn't find any. After a short while and some perseverance in re-trying as advised by the first error ... it succeeded. I located some forums and blog entries talking about the Google Sync Exchange server not being stable at the moment

Now for the Easier part Syncing with IPhone, that is an easy one, and doesn't require any software installation or re-tries, here are the steps I followed:

Get Google Sync on your phoneapple_large



  1. Backup your data

  2. Set up your iPhone

  3. Learn about options and features


While setting this up, I chose to delete all contacts on the IPhone when asked, usually you are asked when you turn ON Contacts Sync, and the same applies for the Calendar, after finishing the configuration just open your IPhone Contacts app and wait for few seconds, Sync will start automatically provided that you enabled "Push" for the Exchange Account you created.

Now I have my personal Contacts and my personal Calendar Sync'd with my personal Gmail account, life should be pink enough, but not for me ... My expectations are now raised and I wanted to do the same with my Business email account, hosted also on Gmail Business mail, but life can't be perfect ...

There is a limitation that you can only setup ONE and only ONE Microsoft Exchange account on your IPhone, so here goes my dream, I reduced my expectations and wanted to overwrite the Exchange account settings for my business email and choose to Sync my business Calendar only, such that I have my personal Contacts (Sync'd once in the begining and left in peace) and my business Calendar (actively syncing) on my IPhone, so I tried to switch off the Contacts Syncing now in order not to delete or mess up my happily stashed 800 contacts, but if you do so IPhone tells you that if you turned it off all contacts on your IPhone would be deleted!! didn't find a way to work around this one yet ... again looks like life indeed can't be perfect

Still at least I have all my Contacts, and active Syncing is really cool, add, edit or delete either on the mobile or on your email account and the changes are reflected to the other side, another neat service from logo_sm

Tuesday, June 23, 2009

IPhone 3G firmware 2.2.1, BB 2.30.03, BL 5.9 UNLOCKED !

Finally and after a lot of waiting and frustration I unlocked my two IPhone 3G with the cursed 2.2.1 operating system, baseband version 2.30.03 that were not downgradable to 2.28 because both had Boot Loader 5.9 ... yes, I have 2 and got them separately from eBay and both were stuck and have been used as thick IPods for the past 2 months

I tried to get an Ultra SIM, I purchased one from a reseller in Mansoura, Egypt, here is their website http://www.gsmegypt.com/VB/index.php, they started by stating that it doesn't work for Mobinil Egypt SIM cards, not sure why ... then they got it to work once on a Vodafone Egypt line of their own, when I tried my own Vodafone SIM, it didn't work, taking the iPhone back to them they tried to re-program the Ultra SIM to work with my SIM card, but failed big time and they refused to refund the money, that attempt costed 70 EGP and a lot of time from my "Mansourian" colleagues, thanks to Ahmed Abdalla and Ahmed Soliman for the help in that. Bottom line is that I won't recommend that Ultra SIM to anyone, because it is not stable and it can register to your network for a while and later you would lose that and get back to the locked state.

Finally the Dev-Team guys released ultrasn0w, the unlock for IPhone 3G firmware 3.0, the previously blogged here that they are skipping the Bootloader 5.9 problem and had an unlock ready for firmware 3.0 but according to the cat and mouse game they won't release it until Apple has done its official release of the new IPhone 3G S fearing that if they would release it earlier Apple would notice the crash that allowed them to inject the unlock and fix it and they would have lost an important edge

so, here it is, and without further ado, the steps that I followed and redeemed my IPhone, quoted from the Dev-Team official blog with a couple of links added




Ultrasn0w for iPhone 3G is ready!

  1. Ensure you have upgraded to iPhone OS 3.0 (download the image here), press SHIFT while clicking on the restore button in iTunes then browse for the image file

  2. Jailbreak your iPhone 3G using redsn0w or PwnageTool (this will also install Cydia/Icy)

  3. Run Cydia or Icy

  4. Please add the repo repo666.ultrasn0w.com to Cydia or Icy. That last “o” is actually the number zero “0”! If you use the letter “o” you’ll get an error.

  5. Search for ‘ultrasn0w’ in cydia or icy and install ultrasn0w

  6. Reboot your iPhone 3G

  7. T-Mobile USA users should disable 3G before using ultrasn0w

  8. Enjoy



And I'm enjoying indeed


Big thanks to Ahmed Soliman for his support in this one as well, Soli, you are the God Father of my iPhone ;)

Sunday, June 14, 2009

Getting You Started with Python

I was introduced to the world of Python 18 months ago, and since then I love the language and always consider it my first choice and my fluent tongue, specially for fast prototyping or small to medium scale web development

A problem that many software engineers confront when they first come to python is that they are very occupied with (and religious to) their original tongue and they are trying to speak python with a Java accent or adding a C/C++ dialect to the language ... simply don't try to do that, you would only feel the beauty of a language and benefit from its strength when you surrender to its unique nature.

Long time ago when I was still struggling with my English, a teacher gave me a very useful piece of advice that helped me a lot since then, he said "if you wish to be a good English speaker, you got to THINK in English" ... he put a lot of emphasis on how harmful it is to your learning of a new language to think in your mother tongue and then translate the meaning to the new language, you would learn very slowly and your English will be also polluted with odd words and language constructs that are not applicable in such context.

I have a lot to say in this subject, but I thought it is better to share here some basic resources, blog entries, articles and videos that I used to learn to THINK in Python and allow you to be shaped by that literature first hand ...

Python is not Java (A must read if you have a Java background)

http://dirtsimple.org/2004/12/python-is-not-java.html
http://www.ferg.org/projects/python_java_side-by-side.html


Basics


Python home:
http://python.org/

Official Tutorial

http://docs.python.org/tutorial/

Are you using Eclipse, here is the Eclipse plugin for python development:
http://pydev.sourceforge.net/

Be Pythonic
http://wordaligned.org/articles/essential-python-reading-list
http://eikke.com/how-not-to-write-python-code/

Noteworthy Persons


Guido Van Rossom

Alex Martelli

Python on Youtube

a very soft introduction to python, by Alex Martelli, Author of the Oreily book "Python in a nutshell":
http://www.youtube.com/watch?v=bDgD9whDfEY (part 1)
http://www.youtube.com/watch?v=y7vwZ20SDzc (part 2)

python, a dynamic language for all kind of applications (Guido van Rossum):
http://www.youtube.com/watch?v=ImfbpMjpKe8

More advanced, Design Patterns in python (may be you would come to those later):
http://www.youtube.com/watch?v=1Sbzmz1Nxvo (part 1)
http://www.youtube.com/watch?v=tJXhtncDBu4 (part 2)

More and more advanced, in depth talks:
http://www.youtube.com/watch?v=VOzvpHoYQoo (python object model)
http://www.youtube.com/watch?v=23s9Wc3aWGY (python internals)

Guido talking about the new python, 3000:
http://www.youtube.com/watch?v=66NThkgfc1U

Python & Machine Learning

Peter Norvig talks to facebook engineers about Google translate and machine learning in general, and uses python code to demo his ideas

Have a good code

Monday, June 1, 2009

كويس, بس في أحسن من كده


حلو بس مش رائع" ... "شغال بس مش مميز" ... "عجبني بس مش مدهش", "عملتها بالظبط زي ما طلبت منك, مش أحسن" !!!

لو حظك المذكر حطك معايا في شغل, أكيد هتسمع مني جمل من النوع ده من وقت للتاني ... مش طول الوقت طبعا, أوقات هأهشكك, و أدلعك, و أطبطب عليك و ألاعبك "أبه و ألقف" ... (لو مافهمتش دي اللعبه لما ترمي النونه في الهوا, و تمسكه تاني فيكركع) ... بس هتسمع يعني هتسمع جمله بتتحداك و تستفذك و تغيظ إمكانياتاك عشان تطلع





عارف بتفكر في أيه, في الهجوم المألوف و الإتهامات اللي ياما ناس قالتهالي: "بيرفيكشونيست" ... "شارب", "ديماندينج", "أبو رجل مسلوخه", "أمنا الغوله" ... إتهمني, براحتك, ماهياش شطاره منك يعني انك تبخ الكلمتين دول, زيك زي غيرك, بتهاجمني عشان تدافع عن نفسك, بتتهمني عشان ترتاح و تغلوش علي غيظك, بس ده بعدك!!


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


النهارده قابلت "إسكندراني" ... واحد من الشباب اللي دربتهم و علمتهم لمده سنه و بعدين سافر يعمل ماجستير في أمريكا ... كنت هاتفرتك من الفخر بيه و هو بيقوللي أن الحاجات اللي كنت بأقولهاله و أعلمهاله و أجبره يقرأها خلته أحسن من زمايله هناك و أنه لما بيعلمهالهم بينبهروا... و كمان أنه بيعمل رسالته مع مؤلف واحد من الكتب اللي درستهالهم في الشغل
"إسكندراني" يا أبني ... قطّعهم!!!


من وقت للتاني بأخد حد من الشباب للميتنج رووم أو البلكونه و أديله "زا توك" ... مع الوقت أثبتت فعاليتها
فقررت أكتبها يمكن تفيدك النهارده و أنت في مكانك, من غير ماحياتك تبوظ و تضطر تشتغل معايا و أقولهالك, جاهز؟ يالا بينا ...

"قبل أي حاجه أنا عايز أقوللك أنك عندك كل الأمكانيات اللي تخليك من أحسن الناس في مجالك في العالم, صدقني, لولا عندك الأمكانيات دي ماكنتش بقيت في التيم بتاعي النهارده! خليك فاكر الحقيقه دي طول قعدتنا.
أنت عملت حاجات كتير كويسه, بس حجمها كان محدود و تابعتك فيها خطوه بخطوه. ده شجعني أديلك مسئولية حاجات أكبر و أثق فيك إنك تحتاج متابعه أقل. لكن إتكرر و أكتر من مره أني أديلك موضوع من بابه و أثق فيك أنك تعمله حلو, و ماتطلعش حاجه أنا و أنت نفخر بيها. الشغل اللي طالع جودته ضعيفه و مش متقفل كويس, حاجات متكروته و لجأت أكتر من مره للفهلوه! و لما سألتك عن حاجات في شغلك جاوبت بالشبه!!
المشكله مش إمكانيات, أنا و أنت عارفين كده, و مش وقت لأنك أنت اللي حددت الوقت. المشكله في "طريقه تفكير" و "روح" معينه مش موجوده في الشغل ده, خليني أوضحلك:

لازم تحس أن الشغل ده بتاعك, الحاجه اللي في إيدك جزء من سمعتك و نجاحك, ملكك, لازم يكون عندك "روح المالك" أنت مش بتعمللي الشغل بتاعي, أنت لازم تتطلع الشغل بتاعك حلو لأنك بتستمد فخرك من جودته ... بتاعك هي الكلمه المفتاحيه هنا.


لازم تكون مستعد كمان تمشي الخطوات الزياده, حتي بعد ما "تخلص" بالمفهوم المصري البلدي, حسن, جمل, جرب, قارن مع شغل عاملينه ناس تانيه علي الأنترنت ... ماتسكتش غير لما تحس بالفخر. لو حاجه ماعرفتش إزاي تعملها للأخر ماتسكتش غير لما تقرأ و تدور و تفكر, عشان حتي لو مانفعتش يكون عندك سبب يقنع كل الناس و نعرف أنت وقفت فين و نكمل من بعدك


و أنت بتشتغل فكر كده: الوقت و المجهود اللي هأقضيه في تجهيز دفاعات و أسباب ليه الشغل وحش بعد ما "أخلص" و أدافع عني أنا الضحيه المسكين قدام مديري المفتري و العملاء الإنتهازيين الماديين, هأقضيه دلوقتي أشتغل و أطلع أحسن حاجه




Raise the bar
Raise the bar


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

تحب تكون كده؟ لو إجابتك "أيوه" مش هأسحب ثقتي منك و هأساعدك المره دي في الموضوع الكبير ده و نطلعه سوا أحسن حاجه, بس بشرط تطلّع دايما نفس المستوي



لو إجابتك لأ ... عادي, خليك عادي و أنا هأبذل مجهود إني أتأكد أني ماظلمكش أبدا بشغل فوق العادي.
"عادي" هي محور الجمله

هتقرر النهارده تكون عادي و للا مميز؟



أشجعك تكون مميز, الحياه أقصر من أنها تتعاش بشكل عادي