🇵🇸 Call for a #CeasefireNOW 🇵🇸

Act Now

DotNetArabi دوت نت عربي

Finally, here I am declaring the technical Arabic talk show www.dotnetarabi.com. I didn’t realize it will take such effort, although it was the website thing more than anything else, WE SHOUD PAY DESIGNERS EVEN MORE! DotNetArabi is a talk show about technology in general and about .net in specific, held in Arabic language with me interviewing tech specialists. أخيرا، ها أنا أعلن عن تدشين “دوت نت عربي” www.dotnetarabi.com ، برنامج إذاعي يتكلم عن التكنولوجيا بشكل عام، و عن تكنولوجيا الـ .net بشكل خاص أقابل فيه تقنيين مختصين. استغرقني العمل على هذا الموقع الكثير من الوقت يعود معظمها للعمل على شكل الموقع، النتيجة كانت زيادة احترامي لجماعة المصممين، كان عملا مضنياً!آمل أن ينال إعجاب الجميع. ...

March 23, 2009 · Emad Alashi

Fear and Humbleness…Obstacles in The Way of Success

“Oh no, I won’t go into that code; I am not that intelligent!” “oh no, I don’t want to try this software…I don’t know what it will do to my machine!” “Oh no, I can’t write such a unique blog post!” “Oh no, I will not twiply to that celebrity…come on…he is a celebrity!” These phrases kept chasing me for a long while in my life, and sometimes still does. It had the worst effect on my progress, I couldn’t move an inch forward; by a deep feeling I didn’t confront, I was afraid of failure, mixed with a feeling of negative humbleness. But that was it, I couldn’t stay as a prisoner to these chains, and leave these cookies of success to people who might have less resources and powers. ...

March 10, 2009 · Emad Alashi

JavaScript Date Object and Code Convention

“is Code Convention important?”, I couldn’t find better time to answer this with a big, decorated, shiny, flashing “YES” more than now! I was doing some coding with JavaScript in which I needed to create a Date object and add to it 30 days, simple job! So I did the following: var x = new Date(); ...

February 26, 2009 · Emad Alashi

Beware of Static Constructors

In Bunian we needed to use a static constructor for some reason, it was all going good; we tested the code and it ran smoothly…excellent (Code Coverage anyone?!). But when I came across this situation, it appeared that the static constructor wasn’t invoked!even when “Class.Method();” is called! so lets examine it. I have two simple classes as an Example: public class Parent { public static string DoSomething() { return “Parent: DoSomething() called”; } } public class Child : Parent { ...

February 6, 2009 · Emad Alashi

default ASP.NET Membership provider on different database

Every ASP.NET developer should already know about the Membership Provider that ships with ASP.NET 2.0. Configuring it is as easy as opening Visual Studio > select the Web project file > navigate to the Project menu item > and select “ASP.NET Configuration”. Follow the wizard and you are up and running now. But the problem with this approach is that it will build it’s OWN database in the App_Data folder and create the required tables there. Wouldn’t most of us have their own databases to work with? ok then, if you want the defualt ASP.NET Membership Provide (AspNetSqlMembershipProvider) to work on YOUR database do the following: ...

January 25, 2009 · Emad Alashi

Get On With It!

When we started gathering requirements from the charity organizations for Bunian, it appeared that there are other kinds of people who benefit from the charity organization; there are “needy families” whose father is still alive but can’t sustain their families, and “students” who can’t afford their study. So Bunian needs to support all these Beneficiaries in smart way; we solved the problem by creating the IBeneficiary interface. But the problem is that in order to get out with the best solution ever (damn perfectionism!), we kept coming up with different solutions, and overriding them with other solutions every once in a while, and this kept going like forever! ...

January 16, 2009 · Emad Alashi

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 ...

December 27, 2008 · Emad Alashi

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: a wiki help that is hosted on Google Knol: http://knol.google.com/k/fabio-maulo/-/1nr4enxv3dpeq/21# Not really appealing to be used extensively; no smooth flow between chapters, frames dazzle the eyes, no table of contents, but surely a great step forward for a documentation that is maintained by the community ...

December 26, 2008 · Emad Alashi

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. ...

December 14, 2008 · Emad Alashi

Travians be Warned…Rapacious is Rising

I don’t know whether to 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 built upon, the server handling thousands of players, and scripts (yes, lots of hacks! 😄). Even the hacking idea itself is so delicious (programming-wise only 😄), 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. 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 endpoints for developers, maybe Web Services in the future. ...

December 12, 2008 · Emad Alashi