Sunday, December 11, 2011

FCIH Initiative family call for new members

FCIH initiative is group of FCIH graduates who are interested in passing their experience & knowledge to FCIH students. The kick off was on 7 November 2009; during these two years, we managed to hold number of sessions and  Java training.

We think of the initiative as our role towards the society and as a chance to help others find their way in life. Currently, we are hoping to add new members to FCIH  initiative family. Kindly, if you are interested, take a few minutes to fill  this form, if you are already a member please fill the form as well.

Please, feel free to spread the word to other FCIH graduates who might be interested.

Saturday, May 28, 2011

#Vodafone #Buzz #Fail

I was online through my favorite IM client; Google Talk, when a work-colleague started talking to me, asking me:

دا ايميل مين انا تعبت رابع ايميل يفتح غلط

I am using Vodafone Buzz from my mobile. Get it now for free from

After talking for a while, I realized he was a total stranger; not my colleague. He's another user of Vodafone Buzz, like my colleague. The issue was that every time he signs in to Google Talk (using Vodafone Buzz), he signs in with my colleague's account. As far as I remember, Buzz associates your Vodafone number with the passwords you supply for your social networking sites (likes Facebook, Gmail , etc) so you don't have to type them every time you fire up the app.

If that was not scary enough, I'd just direct your attention to the fact: that stranger is not intending harm, (he's not a hacker for eg, or even evil enough to abuse the situation, he probably lack technical expertise too) so I'm expecting a disaster if he intended!! That if he was the only case of compromised password!!

Conclusion: If you're using Vodafone Buzz, just don't! And more importantly: UPDATE EVERY PASSWORD YOU'VE EVER SHARED WITH VODAFONE!

Side note: Thank GOD I don't save my credit card number on their website!!

Wednesday, March 23, 2011

Client-side Form Validation using jQuery Mobile

Lately, I've been involved in a project which is mainly targeting mobile browsers. The decided to use kinda "new" jQuery mobile "library". jQuery Mobile is a ……built over jquery, css, js, multiple browser support, etc…… It's still in beta? Yet, it renders pretty fine, and we didn't have more than a couple of issues with it. But it save us loads of time rendering on a nice range of supported mobile browsers.

For eg, I stepped into a problem with client-side validation lately. When jQuery Mobile renders input of type submit (i.e. a submit button for a form), it actually hides the "input" tag, and replace it with an anchor? (ie "a" tag).

Say, you want to add function to handle "onclick" event, validate the form, before hitting the server-side, and prevent it from submitting if it failed; something like:

<input type="submit" onclick="return ValidateForm()" />

The  function is actually never called because the actual input tag is as jQuery Mobile hides and replaces it by an anchor.

Adding the validation function via js/jquery after the document is ready to the anchor, will allow you to call it on clicking the anchor. Yet, it won't stop the form being submitted.

A nice alternative, is to use an input tag of type button, that is:

 <input type="button" onclick="ValidateForm();" />

And submit the form inside the function handling "onclick", rather than returning true/false, like:

   1:  function ValidateOwnerId() {                
   2:      if (/*form is valid*/) {
   3:          $('#myForm').submit(); // Submit from
   4:      }
   5:      else//not valid
   6:      {
   7:          /*show some error message without submitting form*/
   8:      }
   9:  }

Friday, March 18, 2011

الذين قالوا نعم و الذين قالوا لا

الإسبوع ده كان من أكتر الأسابيع المرهقة بالنسبة لي. مش بس عشان النقاشات(الأسعدتني جدا لانها أول مرة في حياتي تبقى بالشكل المفتوح/المتفتح ده) الغير منتهية عن تعديلات الدستور والاستفتاء. لأ كمان عشان كان من أكتر الأسابيع الكنت مضغوط فيها في الشغل  لدرجة إني -لأكثر من مرة- تقريبا "طردت" زملاء لي بيتناقشوا في نفس الموضوع من حوالين مكتبي عشان أشتغل :D

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

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

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

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

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

Saturday, March 05, 2011

TEDx, El Sawy Culture Wheel, Bibliotheca Alexandrina, Open Brands, etc

I was having a chat with a friend, who is an enthusiast about community work, about that same topic (more specifically in Suez, my hometown) last week. Our conversation drove me to think about an idea that should have been done a little while ago (IMHO).

We all like the cultural "presence" of "organizations" like El Sawy Culture Wheel, and Bibliotheca Alexandrina. But unfortunately their effect is pretty local to where they exist. Another thing, similar organizations are too limited in resources, to reach out of their physical locations. They might try to expand vertically; creating more services, and enhancing them. But they almost never try to "branch out" in other places.

My idea for them is to spread their spirit/culture, share their experience with others who are willing to create similar experiences for their local communities, in a way similar to TEDx. Imagine if every city/governorate had their own Culture Wheel, which operate the same way, with the same spirit, but totally independent (financially for eg) on El Sawy's. Imagine instead of the usual bureaucratic "cultural palaces" (قصور الثقافة) there's a real cultural experience where people from all ages (specially youth) can find a decent place to mingle with like-minded people talking and sharing ideas, etc.

Thursday, March 03, 2011

"Note in (Google) Reader" issue Fix

Probably you're familiar with the sharing button (at least on Firefox and Chrome) offered by Google reader to help you share stuff that don't have feeds. Today, for some reason I realized that mine wasn't working!



After tweeting about it, thanks to Flavio Gomes and @mtobis, I realized what went wrong. Seems like the JavaScript file used by the button was updated, without updating the button script accordingly.


To solve this, all you have to do is set _IS_MULTILOGIN_ENABLED a variable that's not defined (but used) in the script file in the button script. So add something like:

// or
// or better


at the beginning of the button script, just to set _IS_MULTILOGIN_ENABLED before it's accessed as "undefined" in the script.

Sunday, January 09, 2011

How to force undo checkout? #TFS

Sometimes you'd pop into cases where you find yourself in a situation where you have to force undo pending code changes of someone else (say a colleague who is no more around, or even temporarily) or your own pending changes if say your machine (along with your workspace on it).

Well, there a Visual Studio tool for that.. That's tf command-line utility, which you can look for in your VS directory under Common7\IDE..

Using tf has lots and lots of uses, here's a really LONG list of them. Note: there's 3 sub-lists for VS2005, 2008, 2010. But for our tiny problem here, we mainly have to options, I'm using here the most straight forward ones:

Undoing pending changes for a specific file:

That will need mainly main parameters to start with: The name/path of the file checkout, User name (of the user who did the checkout), and the Workspace in which the checkout was done (usually your machine name if you didn't create an new workspace).

You could have an issue with the third one (workspace name), so you might have to check the Workspaces command for more details, but generally a small command like the one below will do just ok in most cases:

tf workspaces /owner:UserName

Knowing the above you can easily undo the pending changes as below, note: parameters are in squiggly braces like {these}:

tf undo {file path} /workspace:{workspace};{username} /server:{TFS name/IP}

Of course the "/server" part can be removed if you're on the same server running TFS. An example with some data will look like:

tf undo $/myProject/myFile.cs /workspace:mySpace;FCIH\shady /server:FCIH_TFS

Deleting the whole workspace:

The other option is to delete the whole workspace, which in turn delete any related checkouts. A simple command for that could be:

tf workspace /delete {workspace};{username} /server:{TFS name/IP}

which with some example parameters might look like:

tf workspace /delete Shady-PC;FCIH\shady /server:


After a comment by Meligy, I think I needed to add this: Most of the above needs you to be logged in as an account with TFS admin privileges, check the exact required permissions for Undo, Workspace and Workspaces commands.

If you're not logged in as the appropriate account, you can append {/login:username, [password]} to provide the authorized username and password.

Meligy, also, mentioned another tool called TFS Sidekicks that can do similar stuff.

Saturday, January 01, 2011

The main thing

I was having a long walk/talk with a friend today when this came up:

“The main thing is to keep the main thing the main thing.” ~Stephen R. Covey

We first agreed that our major problem is that we don't keep the main thing the main thing.. Later we agree that may be the problem is that: we are not sure what our "main things" really are?


All the opinions expressed on this blog are my own and don't necessarily represent my employer's positions, strategies or opinions.