Monthly Archives: December 2008

Gaza, Starvation For 18 Months And a Massacre Today!

Update: death toll rate reaches 470 and 2400 injuries, and I will stop counting.

After a 20 months siege during which there was no water, food, medicine, gas, oil, and electricity…today Israel thinks that’s not enough…and starts a massacre; 160 dead, 200 wounded by 40 rockets hit Gaza and still going.

Photos From the Massacre Taking Place Today

English news: here
Arabic news: here




Photos From the Siege

English news: here
Arabic news: here, and here

26337_11223465084 smuggling food through the tunnels

26337_21223465084 Milk for the small children who lack the basic ingredients for healthy food, finds its only way trough tunnels under ground.

6210x no electricity, you know what this affects; imagine yourself without electricity for 1 week, not saying 20 months!



Importance of Documentation



Lately we have decided in Bunian to move on to NHibernate 2.0, and the contributor assigned to the move started out, only to send an email one day after: “THERE IS NO DOCUMENTATION!’.
We had errors as a result to the move which couldn’t be fixed without a documentation explaining why this happened.

After searching for a while, we found two resources of the new documentation:

Neither links were included anywhere in the NHibernate zipped file.

I didn’t realize how important a documentation is until it stopped us from moving on in our project; Only after we made sure that the documentation is available we decided to move on to version 2.0. The lesson to be learned is that if you are an enthusiast developer and want to add another piece of code to the world, keep in mind that your project is not only code; it is people, resources, community, ease of use, documentation, and any other simple thing that people need while you think it’s not important.

Of course I couldn’t find developers or contributors to open source projects greater than the NHibernate team, having such a project in the first place is awesome, and I thank each and everyone of them. I hope one day I can really contribute back to NHibernate. Thanks again guys.

HttpApplication EndRequest Event Invoked Many Times In Single Request?

The other day I was putting the last touch of a temporary way to manage the NHibernate session (ISession) in Bunian. So part of the task was to bind a method to the HttpApplication EndRequest event (in the Global.asax.cs file) like the following:

public override void Init()


       this.EndRequest += WorkContext.NHibernateSessionManager.Instance.HttpRequestEnded;


By doing this, at the end of each page request the NHibernateSessionManager.Instance.HttpRequestEnded() will be called and I can clean the session then. But to my surprise this method was called at least 10 times!! So I thought maybe the Global.Init() method is called many times for some reason and I ended up binding the same method to the EndRequest event many times, so I set a breakpoint at the Global.Init() method and…it’s called one time only.

That was strange, ok so it’s only the HttpRequestEnded() mehtod that is called many times, but I am requesting only one page!! how come there are 10 requests!

So I opened Firefox which is already “armed” with the magnificent add-on Firebug, and I requested the page again, Firebug showed the following:


And that was it!! the page contained 10 resources (1 CSS file and 9 images), OH! so it is one page, but for each resource referenced on the page you get a request, hence a raise of the EndRequest event.

I couldn’t love Firebug more; I am not only happy that I wasn’t doing something wrong, but yet I learned something new about the ASP.NET internals. awesome.

Travians be Warned…Rapacious is Rising

I don’t know whether thank or scold my good friend Omar Qadan for introducing me to Travian, a strategy game played online.


It’s amazing how a simple,  web-based, HTML-front game can be so rich and vast entertainment wise! It’s a real strategy game where you build villages, resources, armies, embassies, and conduct trading, diplomacy, wars, and alliances…all through simple images, numbers and text.

On the other hand, I can’t ignore the programming part of the game (being a developer that is), it must be big, fun and tiring; think of all these rules and the simulation algorithms the game is being built upon , the server handling thousands of players, …and scripts (yes! lots of hacks!  161 ). Even the hacking idea it self is so delicious (programming wise only  251 ), a true heaven for developers :).
Also the makers of the game are on the right track of providing developers points through which they can access the game and display information on other sites or applications; ok for now it’s only exporting database tables of statistical information about the game status, but still I consider it a cool step toward supplying nice end-point for developers, maybe Web Services in the future 4.gif .

Every time a new idea hits the web I say “ok, that’s it…there are no more idea’s!”, and every time I say that I  am proved to be wrong; YouTube, Facebook, Wikipedia, Delicous, Digg, SlideShare, Flickr…and the list goes on.
So this is a message for all of us, don’t limit your imagination, ideas never run out.

The only concern now is that I don’t want to be addicted, so let’s wish for the best…and be warned…because Rapacious is rising 😉

Introduction to NHibernate Session at Jordev Was Good

The feedback was very good, and I was glad that everybody liked it. Jordev is really moving ahead, and I am very excited being part of it 🙂

Below is the slide show (it’s an enhanced version from my previous one):

[slideshare id=821222&doc=introductiontonhibernate-1228487480885456-9&w=425]

Code is the same of the previous one which you can download from here