TEDxCairo 2011 – Resurrection – part 1

TEDxCairo 2011The annual TEDxCairo event is the most interesting event that you will do every thing possible to attend. I was lucky enough to get invited to participate in the online coverage of that event. daily tweeting can’t be as entertaining as listening to those great speakers and trying to put what they say in 140 characters to inspire someone else. TED is all about spreading the word about the inspiring ideas you will see during the event. the theme of TEDxCairo 2011 was “Resurrection”. this was a perfect choice as this is exactly what describes Egypt and Egyptians after 25 Jan. Egypt is coming back to life.

Start of the day

Reem Maged the host of the day

Reem Maged (by @ahmednaguib)

The day started around 10:00 am. Reem Maged the Egyptian TV host was the host of the day. she started by welcoming the attendees and giving an introduction about what is TED and TEDxCairo and encouraging the attendees to spread the word about all the ideas they will see during the day. it’s worth noting that the event had TV coverage too, but I don’t know if we will see the recordings of the sessions being aired on TV soon.


What Newton didn’t see coming? – Mohamed Abdel-Mottaleb

The first speaker was Mohamed Abdel-Mottaleb. Abdel-Mottaleb is a nano-technology Expert. he started by explaining what is nano-technology and how this science is affecting every one of us and every other science. previously, scientists used to see the material as a big cube and they couldn’t change its features. nano-technology came later to study what can happen if cut that cube to millions of smaller cubes. if we cut the material and make each part of it as small as possible, we will be able to do things that we couldn’t be able to solve before and mixing materials together to make something new with better features.overacting

My comment

This was so informative and a bit heavy to start the day with. people  expected the first talk to be entertaining and informative at the same time. This session was good and the speaker did good work to explain his idea but he lost the attention of the attendees early. from the tweets and talking with the attendees later I saw that it would have been better to put this session in the mid of the day schedule.

Primeval Ocean – Gehan Zaki

Gehan Zaki is an Egyptian Archaeologist. She started by saying that Egypt had a revolution this year 2011 and it had another revolution too [near] 2011 BC. The Egyptian King Pepi II ruled Egypt for 94 years to be the king with the longest rule of a country in history. his son Merenre Nemtyemsaf II succeeded him but the son reigned only for one year before getting murdered and another king came after him to rule Egypt.
She continued by talking about the dogma of old Egyptians. The old Egyptian built his dogma depending on the things that happen around him. he noticed that the sun rise every morning and die at the end of the day and come to life again at the next morning and he noticed that Nile floods every year at the same time. he noticed that every thing repeats itself again and again. so he believed that after death, people will come to life again. Egyptians are always optimistic about the future and this is something that we inherited from the old Egyptians who believed that there is always another chance and life is a complete circle. We have today to continue being optimistic and work on building our country.

My comment

I liked it and the people received it well. Gehan had a good start by mentioning that Egypt had a revolution in 2011 BC, while the number wasn’t that accurate according to Wikipedia but this part helped in getting the attention of the attendees early and this made a good amount of positive tweets about that talk. The idea was good and matched the theme of the event.

Top ten “Belmasry” – Ali Faramawy

Faramawy, Vice president of Microsoft international. He started by making it clear that he isn’t coming today to talk about technology and he isn’t even planning to use any kind of technology or even apples during his talk (he was pointing at the Apple Mac on the stage). He said that he want to talk first about 3 things that can describe how the Egyptians felt during the days of the Egyptian revolution. the first is that Egyptians lost their memory, as we forgot all our other problems and forgot about how we have to respect the president. The second is confusion, we didn’t know what we should do now. the third was fear, as we were afraid of what will happen next and we were afraid of the past too and we did even give it a name “folool”.

Our target now is that we turn again to be Egyptians. there are a lot of Egyptians living outside Egypt and there are millions living inside Egypt. most of the Egyptians want to help this country to be better but Egypt still doesn’t know how to use them. We have to start connecting with each other and exchange knowledge. we have to start working on one big national project that can reunite us. We have to start showing out the achievements of the great Egyptians. we shouldn’t focus only on scientists and businessmen, we can focus too on the good man who refused to accept a bribe. We all have the right to dream about tomorrow and we have to work today for it and it’s not accepted to be afraid of the past.

My comment

The guy was somehow known for most of the attendees if not all of them and people expected to see a good talk. His talk was really good and good enough to be one of the talks that would have started the day.

Bread and salt – Fadel Solieman

Fadel is a professional international speaker that’s known for his efforts on explaining what is Islam and resolving the conflicts between it and other religions. He started by talking about how no body ever would have dreamed of the revolution and replacing the president. he said that his wife asked him “did you ever imagine that Mubarak could leave the presidency before dieing? ” and he answered “honey, we met each other during the rule of Mubarak, and we got our daughter during the rule of Mubarak, and she got to college during his rule, sure I imagined that we will die during his rule and even we will get resurrected while he is still ruling the country”.

The days of Tahrir square were the days of the true Egyptians. Muslims and Christians stood  together and protected each other. Our problem in the past was that there were a devil who hit the Muslim on his back and disappear quickly, then the Muslim will turn back to see who hit him to find that his Christian brother is standing behind him and a fight starts. the devil was the bad people who always wanted us to hate each other and focus on these fights instead of building our country. If we start looking at the shared things between the two religions, we will find that both of them have a big number of shared prophets. if we start looking at the language and start searching on the web to find information about the old Arab poets, we will find millions of results. this means that Muslims aren’t only owners of the Arabic language.

Then if we start thinking about the roots of both, we will find that Copts are the original people who lived in this country, and the word Copts doesn’t mean Christians, it means Egyptians. We both lived in this country for more than 2000 years. Till now there is no real difference between an Egyptian Muslim and Egyptian Christian, we all wear the same type of clothes, we look the same, we eat similar things and there are no special cities in Egypt for Muslims only and others for Christians only. but what was the difference between those Egyptians inside Tahrir square and those Egyptians who were outside it. those who were inside the square believed that this is their country while those outside the square believed that this is the country of those who rule it. The solution is to get back to the republic of Tharir.

My Comment

Fadel showed us a real TED talk. He is a professional presenter and he had an idea worth spreading and it was wrapped inside a talk full of entertainment. depending on my choice and most of the tweets and the taste of attendees I met, I can say that this is one of the best talks we had in TEDxCairo 2011.

An Egyptian tale – Mina Shenoda

Mina is a writer and speaker, he co-authored the best selling Arabic book “Astigmatism in the brain”. He started telling a story of a young Christian kid called peter who was always get punished and hit by his mother and father and he was their only child. peter used to go to his room and start crying. one upon a day, he found that another child in his age is knocking the window and asking him to open the window to let him get inside. peter refused to open the window and asked him “who are you?” the other kid replied “I’m Ali El-Adl, open the window, peter”. peter opened the window and let Ali in. peter used to talk to Ali and play with him, and peter’s mother saw peter talking to no one, and she started crying and ran away. peter didn’t know what’s her problem, but he was really concerned about what his Christian teacher tell him about how Muslims are bad. he didn’t believe the teacher as Ali was his best friend and they played together. but after some time, peter started to feel that Ali El-Adl started to treat him badly and peter decided that he won’t ever talk to Ali again. in the next day, peter was in his room and he started hearing Ali knocking the window. peter screamed “go away Ali, I won’t open the window”. the knocking started again, then peter said “if you won’t go away, I will come to hit you and push you away”. here, the story ends. peter wsa found later dead, he opened the window and tried to push Ali who didn’t ever exist, and peter fell from the window and died.

My comments

I don’t know if you got touched by the story or not, but you still have to see the video of the talk. this wasn’t only a story as Mina was acting too and this helped in making us live the story. I talked with some people and I have to say that some of them saw that Mina was acting too much. I don’t know what’s the problem with his acting, but I liked it. at first, I thought that it’s a story about a child who had Astigmatism no more, but at the mid of the story I found that there is another message in the story. I didn’t read his book yet, but sure I will put it in my reading list.


Due to the fact that I wrote this in 4 hours, and it’s around 3:30 am now. I will try to publish the other parts later. thanks for reading all the way till this line :)

BTW, If you have pics with good quality (shouldn’t be perfect) of the speakers during the event, I will be happy if you pass them to me as my only source of pics till now is @ahmednaguib‘s awesome photo ablum and I didn’t find there pics for the speakers mentioned in this post.

Roundup: Cairo Startup Weekend [April 2011] / #Balooshy

Startup Weekend CairoIt was great to have the chance to attend the first Startup Weekend event in Cairo. If you didn’t hear about this event before, then let me quote part of the description on their website.

It’s a 54-hour event where developers, coders, designers, marketers, product managers and startup enthusiasts come together in Cairo to share ideas, form teams, build products, and create startups!

Cairo Startup Weekend is all about conquering your fears, laziness or uncertainty and work on converting your smart idea into a a real Startup in less than 54 hours. You don’t have to be a developer, designer, or  a business guy to be part of the event. you just need an idea and the passion, then you will learn a lot of things in the 54 hours.

First day – April 28

The fist day started around 7:00 pm and the most important part was the pitching of ideas. Everyone who had an idea and wanted to work on converting it into a Startup during the event, had to go on stage and convince the attendees to vote for his/her idea. Everyone had only one minute to explain why his idea is awesome and can be a successful startup. This is the part when you have to conquer your fears and start asking yourself if you really believe in your idea.

As I remember, we had to listen to more than 50 ideas, and it was really hard to choose which one to vote for. We were sure that some ideas got lost after the voting. maybe because the presenter of the idea didn’t present it well or that the idea was somehow complex to understand in one minute. but still we know that most of the best ideas were selected and this was good.

The presenters of the selected ideas had then to start building their teams by convincing some of the developers, designers and business guys who were attending the event to help them convert the ideas into real startups. this was another important part of the process, as your team can kill or build your idea. one bad team member can affect the the rest of the team and delay its progress, but a small team of people who can understand each other can move smoothly toward building an awesome startup in only 54 hours.

Second day – April 29

If you woke up at 6:00 am and got ready to be the first one with your team to arrive to the American University’s new campus in Cairo where the event is hosted, then you definitely knew that you are on the right track. The continues hard work starts from here.


I was lucky enough to join an awesome team. the name of the idea and the team is Balooshy and the creator of the idea is Ahmed Essam (@Neo_4583). The idea was all about building ad platform for non-smart phones ( Feature phones ).

Ahmed Essam showing Balooshy team the plan

The number of this kind of mobile phones is very huge compared to the number of smart phones in Egypt and the Middle East. The problem with the owners of these kinds of mobiles is that they don’t like or don’t have enough money to pay for mobile internet. the suggested solution was to share the revenue with the users themselves to make them able to pay for the mobile internet service. This way, the developers who make software for these kinds of mobiles will have bigger number of users when they use the Balooshy ad platform and will get better revenue, while the users won’t have to lose money to pay for the mobile internet service. The idea had other details about the kind of vendors who will benefit from advertising on this ad network specially that the platform will be location aware and will use that information to show ads with good value to the users.

We started early working on implementing the idea and things were moving smoothly because of the great amount of understanding and passion that all the team members had. The team consisted of Ahmed Essam, Nihal Fares, Bahaa Galal, Mai Medhat and me.

Balooshy explained on white board

Balooshy explained on white board



All teams started working on their ideas and some of them quit early after facing some problems with finding a good team or after facing some problems with implementing the idea. Those who believed in their ideas continued working all the day and continued working till the next morning and just had a little nap to wakeup again to continue working. it was exhausting and coffee was treated like gold.


Third day – April 30

Another day, most people started getting into zombie mode after staying up most of the night working to finish their projects. Mentors were there since the second day and continued to help the teams to develop their ideas and make them better. I can’t lie, at first we were annoyed of the amount of interruptions we got whenever a Mentor come to ask us about the idea, but later we knew that each one of them helped us someway or another and we really appreciate their help.

At around 5:00 pm all teams were in the main hall getting ready to present their ideas again, but this time to the judges. every team had only 4 minutes to explain his idea again and show a prototype and explain how he can monetize it. then another minute to answer questions. This part was important as it will require good presentation skills and an organized thinking as the judges will have very hard questions about your idea and you will have to answer in a very short time.

We saw a number of great ideas and presentations, people worked very hard to grow the ideas and even some of the teams succeeded in getting new clients in that weekend.

At the end, I really found that I learned a lot of things that I wouldn’t have ever learned if I didn’t attend that event, and I met awesome people and some of the smartest and creative minds in Egypt. I know that another Startup Weekend will be soon in Alexandria my home city and I hope that I will be able to be there, and sure will love to see you there too whether in Cairo, Alexandria or anywhere on earth.

From left to right: me, Bahaa, A. Essam, Mai, Nihal, Noha Mahmoud (Mentor)

Balooshy team, From left to right: me, Bahaa, A. Essam, Mai, Nihal, Noha Mahmoud (Mentor)


for more pics and reports about the event:
Balooshy team ablum by Mai Medhat
Startup Weekend Cairo album by Hazem Khaled
Startup Wekend Cairo ablum by Egypreneur

I’m sure that some videos will be soon on the awesome Egypreneur.com , also if you have some links to pics or blog posts about the event, just leave a comment and I will add them to the list.

Google’s GEgypt 2010

GEgypt logoFrom 8 to 10 December 2010, Google organized a 3 days event in Egypt. it was Google’s first time to organize an event like that in Egypt, and it looks like we will see Google getting more active in the Middle East as a similar 3 days event will happen too in Jordan from 12-14 of the same month. it will be a start of Google’s presence as a company in the region and will start to work more on winning the market and building a community of Google fans between software developers and business people. I think this comes after Yahoo’s acquisition of Maktoob. Google won’t leave Yahoo! to own that part of the world without a fight. but anyway, all this is a good opportunity to see new activities in the region and It’s sure that having 2 big companies like Google and Yahoo! in the region will help in pushing the technological evolution.

First day

This day was targeting computer science students and professors. while I didn’t attend that day; from what I heard from people who attended that day, Google showed its Google Apps for Education service and how universities can benefit from it by providing its students access to many free and powerful solutions like Gmail and Google Docs and how all this can be controlled by the university itself. also, Google introduced the students to many of Google’s technologies and services that they can use to build rich web applications and building mobile applications for android.

Second day

Target audience: software developers.

Keynote: Nelson Mattos

Keynote by Nelson Mattos  at 2nd day of gEgypt

Nelson Mattos

Day started by a keynote from Nelson Mattos the Vice President of Product Management & Engineering for Europe, Middle East and Africa. Nelson talked about some points like the lack of Arabic content online and how the high price of DSL and mobile internet can be a reason of this low amount of Arabic content. then he started talking about how Google is trying to serve the needs of the Arabic speaking users by helping in increasing the amounts of information on the Arabic version of Wikipedia and  by building other tools and services like Tashkeel (تشكيل) that can add diacritics to Arabic text , Google Chrome’s translation plugin, Google News in Arabic, the Gmail to SMS service (only in Palestine till now), supporting driving and walking directions in Google Maps, Google sites, Google Ejabat the questions and answers website (which a low number of the attendees said that they are using), Google’s Health Speaks Arabic project which aims to translate all English Wikipedia health articles to be available in Arabic, Google Ahlan online (أهلا أونلين) which aims to educate new internet users about how internet works, Arabic Youtube interface, and lastly reaching out for software developers by making events like GEgypt.

Nelson continued talking about how modern browsers changed how software applications work and how they helped in making richer user experience, and like how browsers changed, the advantages of moving to the cloud started to appear too. moving your data to the cloud can make managing your data easier and scaling out won’t be a problem. people start to freak out when they think about how their data will get locked out, but he said that they are working using open standards and you can move at anytime if you want. he talked too about Android and the numbers of Android mobile phones sold daily which reached  +250k . and about Arabic support in Android, he said that he still doesn’t have a specific date. finally, Nelson asked the attendees to help by giving their feedback to Google on what should be done to make things better.

Demo of HTML 5 support in Chrome

Sebastian Trzcinski-Clément gave a quick demo on Google Chrome’s current support for HTML 5 by showing some Canvas usage examples like the matrix rain and the Gmail game. also, he showed more demos on using WebGL to make 3D graphics in the browser and the use of the File API to drag & drop files from your system to the browser or even selecting a full directory, and other demos on using the device orientation information, and Chrome’s support for speech recognition.

Google in the Middle East

Google's logoAhmed Hamzawi the Head of Engineering ,MENA started by a video showing Google’s history from the its beginning till now. then talked about how Google’s country domains in the middle east (like google.com.eg) provide more features that’s not available on the other Google domains, like translated search and auto-correction of mistyped words, support for converting search queries typed in Franco-Arab to be in English. then he gave a demo on translation support in Android by translating a SMS message written in German to be in English. Hamzawi showed another demo with Sebastian to show how speech recognition works in Android combined with the translation support, Sepastian started speaking in French to the Android mobile phone and then Android started translating what he said to English and then it read the translated text out loud, they repeated this many times also from English to French. then Hamzawi showed the Chrome to phone plugin which allowed him to send information from his Chrome to his Android mobile phone instantly. he continued with showing how to use voice actions in Android to set Alarms, play music, sending SMS and searching in maps. finally, he showed how to use Visual search to get information about any thing you see, by just pointing your mobile’s camera to that ad or sign.

Work in Open Source

Chris Dibona

Chris DiBona

Chris DiBona, Open source and public sector programs manager; started by giving a quick introduction to what is open source and talked about the major reasons of why people like to give their code for free for others to use and learn from, and the top two reasons were intellectual curiosity and skill improvement. He then talked about the history of Google’s servers setup and how they are using many open source softwares to power their business like Linux kernel, Apache tools, SSH and many system management tools. open source allowed Google to have full control and ownership of the software it use and it’s easy to modify a software directly when you have its source code, instead of waiting for longtime till the original software company to modify/fix it for you. Chris then talked bout Google Code and said that it’s now the 2nd  big code repository online with 300k projects. Google is always contributing to open source and till now Google created and contributed to ~900 open source projects. Android and Chromium projects are two of Google’s biggest open projects. WebM/WebP are two open media file formats developed by Google and Google’s goal is to get it into HTML 5. Chris continued by talking about how Google is always encouraging software developers to contribute to many open source projects through Google’s summer of code project. there is 76k projects and 94 countries in 2010’s Google summer of code project.

Google AppEngine

me with Paa. Ryan is the guy at the back

me with Paa. Ryan is the guy at the back

Paa Kwesi and Ryan Brown, talked about Google’s AppEngine. AppEngine enables anyone to build and host web applications on Google’s servers. they gave a quick overview of how it works and its architecture. till now, AppEngine only supports python and Java.  a one more advantage is that hosting your web application on AppEngine is free at first (more about billing). also, they gave a step by step example on how to work with the SDK and creating a simple application using AppEngine’s framework and APIs. at the end of the session, they asked the attendees to try improving that small application and submitting their code before the end of the day to win a Nexus S.

[sorry for not giving more details about this session, I did receive an important phone call at the beginning of the session, so I couldn’t follow what happened well]

Code Competition

Around 18 developers submitted their code to win the stylish Nexus S mobile phone (I knew later, that many other guys quit early and didn’t submit their work). Paa and Ryan chose only 5 of them to Demo their work on stage and then another 5 Googlers chose one of them (competitor number 4) to win the prize.

[if you know the name of the winner, please tell me to add it here]

till this point of the day, I didn’t take more notes and tried to focus more on writing some code for the competition, while I couldn’t make it to the top 5, I did enjoy the amounts of adrenalin that was running in my veins while I was trying to write more code before the end of the competition. my biggest problem was the phone calls that got me behind every one by around an hour, I have to focus in any future competitions -isA-. I did push the sample application with my added modification to my repository on github.

Third day

target audience: Technology Entrepreneurs, Small Businesses & Marketers.

Keynote: Ari Kesisoglu – Regional Manager, MENA

Most of the main points in the keynote were mentioned before in the keynote of the 2nd day, except that it was modified a bit for the targeted audience. Ari added that, a challenge can be an opportunity; if there is no big Arabic content online, this doesn’t mean that people aren’t searching for content.   he also talked about how the number of new MENA internet & computer companies, registered domain names and websites were increasing exponentially in the last years. Ari gave an example of a Lebanese company (Mosaic Marble) that did start as a small shop in 2004 and then covered USA, Canada and Europe in 2008 and it’s getting bigger now, to tell the audience about the importance of starting early and not to plan huge while they still didn’t anything. just start today.

Internet insight & Trends in MENA

Google & Chrome cupcakes

Google & Chrome cupcakes

Wael Ghonim is the Marketing Manager in MENA, Ghonim started by talking about how internet changed our world and how many things that took long days, now only takes just a number of clicks to be done.  some people were able to change the world using the internet, like Khan when he built Khan Academy to improve education methods. and the thousands of people who are contributing to Wikipedia without asking for money. Ghonim told us a story he had with a young guy from Alexandria who was an active Wikipeida contributor. Ghonim contacted that guy to meet him in Cairo, but that guy told him that he won’t be able to afford getting 30 Egyptian pounds to travel from Alexandria to Cairo. this guy is an example of those many who don’t have money, but still they can change the world using the internet. Ghonim continued, we can help you to know what people are searching for, so you can target them with your products. when you know that a really big amount of youtube video views come from MENA, why don’t you start think about creating multimedia content and putting it online to start profiting from it?!
Ghonim showed many statistics about what people search for online, and he said that, in MENA; more than 10% of search queries comes from mobiles and KSA is leading mobile internet growth in the region. also, did you know that more than 5k Egyptians join FaceBook every day? also, when you know that most search queries in MENA are in Arabic, why you are still building your applications in English while you have to build it in Arabic first?!

After that session, things wasn’t that interesting. there were sessions about the basics of Adsense, Adwords, Google Apps, Google maps. I still liked the technical Google maps session by David Renie. the most interesting demo was when he used the Google earth plugin to simulate a car moving from Cairo to Alexandria.

Be innovators, be entrepreneurs !

Walid Bakr - do your homework .. as boring as it may be

Walid Bakr: do your homework .. as boring as it may be

Here things started to get interesting again. Walid Bakr from Abraj Capital gave a very good session about entrepreneurship and what it takes to be a successful entrepreneur. then Shereif Nassr the founder of Nefsak.com started talking about the experience he gained from starting his own business and the challenges that faced him and still facing, specially online payment in Egypt and people’s slow adoption of the idea of buying online. then, Amr Ramadan the founder of vimov came on stage and shared his experience with us too on how he struggled at the beginning till he made his company a successful example.

Ahmed Alfi the Chairman of Sawari Ventures gave another inspiring speech about how he grow as a young kid and how his father was always preparing him to be a businessman and to respect work ethics, he said that he always work with a safety net, as this makes him to work harder and harder. then he started taking questions and answering them.

Panel discussion: “From product to business”

Ziad Aly, Wael Ghonim, Tarek Saad and Hany Sonbaty were on the panel. and started taking questions from the audience and answering them. Most of the questions were about how to be an entrepreneur and how to get investment and when to start searching for a partner.

At the end, I’m sure that I missed many interesting session specially in the 2nd day because they had many parallel sessions. but all in all, this was a great event that we wish to happen again soon and in more countries and cities in the region to reach more people and give them hints on what can be done using Google’s technologies and services. and sure, in events like that; meeting great people like you is always the best part.

The story of version 1.1

Once upon a time, a software project took around 7 months to get to version 1.0 . We didn’t have any problem all that time with our SVN (Subversion) repository as we didn’t have to release anytime before version 1.0 . we didn’t have any SVN strategy till that moment and all of us were happily committing to the trunk and enjoying a branching-less life.

The last 2 months before releasing version 1.0 were mainly focused on enhancing performance and bug fixing. we couldn’t stop at that point as we had many developers with nothing to do and more features waiting to be added to the next version. the work on the new features had to go in parallel with the code enhancements being applied to version 1.0 to get it released and ready to be deployed to production. we did create another branch for the 1.1 version.

Some of our developers started committing to the 1.1 branch while some others continued to commit to the trunk. then after 2 months of work, we wanted to release the 1.1 version. the plan was to merge the 1.1 branch into trunk, test it, fix bugs and then deploy that to production. things didn’t go that simple as we had very big code base and there were many differences between the 1.1 branch and the trunk. merging took more than a week and lots of bugs that were fixed before in the trunk, came back to life with more new bugs that had to be fixed as fast as possible to get the 1.1 version released and deployed to production.

The bug fixing phase took more than what was expected and our product team (who were playing the rule of the owner in our little software development game) had a plan with lots of features that had to be completed before the end of year and they didn’t want to stop the development of new features till we finish fixing all the bugs.

They gave us a plan for the rest of the year and they wanted to change our release strategy so we release and deploy to production at the end of every week. this was a kinda good strategy for our kind of business. the problem was that we still didn’t have a stable code base that we were sure that we can build on. we had lots of fatal bugs waiting to be fixed and we didn’t yet release version 1.1 .

Anyway, we started working on the features of the first week of the plan. while the amount of features was more than what can be finished in one week, we couldn’t finish the features in less than 10 days. this left us behind the plan by some days and we didn’t have enough time yet to fix the bugs of version 1.1 . we were pushed more to start working on the planned features for the second week. that week had more complicated features and it took us 2 weeks to finish it.

At that moment we had all that code in the trunk with lots of new implemented features and more bugs. we didn’t release anything in the previous 3 months (since version 1.0) . the project didn’t benefit of the new features. every team is blaming the other for making things go like that. the product team had more plans and features to be implemented till the end of year. the development team can’t make a new release with all those bugs.

that’s not the end of the story, but I have to stop here and start analyzing what happened. mainly, I see 2 problems.

First, the development team was committing all the code directly into the trunk. we would have created a branch for each feature. this way each feature will stay isolated with all its bugs and then when it’s stable, we can merge the branch into the trunk. this will keep the trunk always ready for deployment at any moment.

like what Mr.Radwan say, “your main code base is gold, you can’t mix it with rubbish code”. this way we can keep our gold in the trunk always ready for deployment and we can keep history of each release in a tag with the right label.

branching in source control systems

Second, the product team shouldn’t have continued requesting new features while there were many bugs not fixed and while they can’t release the finished features. they should have stopped till the development team can get all the bugs fixed and then they can meet with the development team to see how they can stop the problem from appearing again in the future.

software development isn’t that simple and not respecting this craft can turn a project into a big failure. problems in projects like that doesn’t appear just over night, people are the main reason of the problems. if you can’t control all the participants and keep them focused on what they should do, they will start behaving the way they like and will start fighting each other instead of collaborating. if they were focused, they would have noticed that the project is shifting from the right way and they would have started early to fix this.

Soap Web Services in PHP & hint on consuming from .Net

last week, I was working on implementing a SOAP server for one of our projects at work, this web service was built to be consumed by some other software that is built using .Net . It wasn’t that easy and I faced some problems that made me go crazy for some hours and I wanted to share them here with the solutions. let me first show you how I built the web service in PHP.

by the way, This project was built using CakePHP, but the web service I made doesn’t depend that much on that framework except that I use its MVC implementation.

If we want to build a SOAP web service, we will need first to create a WSDL file and make it accessible from a defined URL. I made a new controller with a new action named [index] that will return the WSDL file when requested using GET, and will also handle SOAP requests when requested using POST.


class SoapController extends AppController

     * handles SOAP requests
    public function inedx()

        if ( $this->RequestHandler->isGet() ) { //just show the wsdl
            echo self::_getWsdlContent();

        $soapServer = new SoapServer( Configure::read('soap.wsdlFilePath') );

        $soapHandler = new Shreef_WebService_SoapHandler( /* Inject Dependencies here */ );




     * gets WSDL content for the SOAP service
    protected static function _getWsdlContent()
        $fileName = Configure::read('soap.wsdlFilePath');

        if (file_exists($fileName) ) {
            return file_get_contents($fileName);

        $soapAutodiscover = new Zend_Soap_AutoDiscover( );

        $wsdlContent = $soapAutodiscover

        file_put_contents($fileName, $wsdlContent);
        return $wsdlContent;


as you see, I’m dynamically generating the WSDL file using Zend_Soap_AutoDiscover. and caching it into a file. Zend_Soap_AutoDiscover will read the DocBlocks defined in Shreef_WebService_SoapHandler to build the WSDL file.

Notice that I gave SoapServer an instance of Shreef_WebService_SoapHandler instead of giving it the name of the class. this will give me the chance to inject any needed dependencies into the constructor.

here is my SoapHandler class with a simple method [getCurrentTime()] that will return a String, and another method [doSomething()] that returns Array.


class Shreef_WebService_SoapHandler

     * construct
    public function __construct()
        /** Dependency Injection happens here **/

     * returns the current server time formated like YYYYMMDDhhmmss
     * @return String
    public function getCurrentTime()
        return date('Ymdhis');

     * do something
     * @param String $something
     * @return Array
    public function doSomething($something)
        return array(1, 2, 3);
    /** other methods **/

and that’s it, now if I open http://localhost/soap in my browser, I will see the WSDL. then I can use that WSDL to make requests to the web service. this was working fine on my machine and on the testing server, but it started to go crazy when we deployed that to the staging server. all methods returned null.

DocBlocks and OpCode caching

After some hours I noticed that the generated WSDL on the staging server was different than what was generated on my machine and on the testing server. there were no Out messages and the type of all method parameters was set to “anyType”. at first, I thought that this is a bug in Zend_Soap_AutoDiscover, but later I commented out the lines that cache the generated WSDL to a file and started to change things around.

I noticed that whenever I make a change to the file that contains the SoapHandler, the WSDL gets generated like expected for one time, but if I open the URL of the WSDL again, it will go back to generate the wrong WSDL. and here we have another “Aha!!” moment.

We have eAccelerator installed on that server. it is doing opcode caching for all the PHP code. this means that after every modification to the file that contains the SoapHandler class, the class is read from the file with all the DocBlocks, but in the next request, SoapHandler classs will get read from the opcode cache with all DockBlocks removed. so Zend_Soap_AutoDiscover won’t find DocBlocks to read and will guess that all methods are void and all method parameters are of type “anyType”.

As stopping eAccelerator doesn’t make sense, I turned on the WSDL file caching again and ran the “touch” command on all files that contain code that should get described in the WSDL ( the soap handler and any other complex types used ). this will make the WSDL get generated well the first time and cached.

I have to automate this later using a shell script or something.

.Net and Soap Arrays

The second problem was that Visual Studio.net was refusing to generate the required proxy classes using that WSDL file. It didn’t understand the type “Array”. I searched for this problem, and it looked like that were no way to make VS.net understand it. I solved that by instead of returning values of type Array, I changed my code a bit to return a complex type.

Also, I had to tell Zend_Soap_AutoDiscover that I want to use another WSDL strategy by passing the string ‘Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex’ to its constructor.