2008-09-24

DeKlarit and Observed Requirement

A few days ago I have read the article of Observed Requirement by Martin Fowler.

In this articles he stated that what customers ask for is not always what they need, regardless of the common interpretation errors and ambiguity and so on. Typical customers can ask for some features which they actually don't use, or forget about some other features they badly need.

The solution in Fowler's opinion is to "observe" the actual behavior of the customers, and this is typically possible in web applications where you have the ability to log everything; common user navigation scenarios, areas used most, areas almost ignored, and so on.

I took a while thinking about the same case for desktop applications, and how we can apply such technique. Of course logging might not be much important as in the case of web applications, because communication is much easier with few customers, and sales personnel can watch customers behavior while in demo.

But the customers need something (a prototype) to "play with" so that we can watch their behavior. And this prototype should be easily modified, rapidly built, and it should be as close as possible to the business model of the customer.

I then recalled a Model Driven Architecture (MDA) tool I have came across a couple of years ago and it was known to build database applications with associated GUI in few hours, if not less.

Please watch the demo of the tool DeKlarit which shows you a quick example on how to build, manipulate a simple business object in few minutes and have a convenient GUI to persist and view data to database. This GUI also can be used by you (the developer) to enter test data in a convenient way without worrying about building data layer and business layer. And if you change the physical layer, your saved data is copied automatically to the new model.

And if you are interested to explore its other features, you can download a fully functional 60 days trial.

2008-09-23

Coding to the core

I remember in my first job, I have joined a project that was based on an infrastructure built by some other developers, and they were not working in this project anymore.

During my first days of training, I was told "never to touch" that infrastructure, and it made me write a funny poem about that on our whiteboard.

I was always encouraged to find other workarounds rather than modifying the infrastructure. And when it was really needed, it has to be kept minimal, done under close supervision, treated with high suspection, and always thought of first as the source of every bug that appeared later.

And in the following years, I started to read about good software design, refactoring, so I was always leaning toward "butchering" old code, but I always depended on my own manual testing to verify that I didn't break anything in my refactoring "rides". Manual testing was good for about 90% of the times, but there were few cases that skipped me, and hence I got that look "we told you not to touch it!!". I was much experienced then, but it didn't give me the right to try something that was considered a "taboo" before.

I still remember how terrified was one of my junior colleagues when I proposed adding a method to a base class instead of adding it to all subclasses.

Today, one of my colleagues asked me about a problem, and after 5 or 10 minutes of discussion, we found out that one of the solutions is to add the new required functionality to the base class (may be it was not the best solution, but it was better than the one she implemented). And then I wondered why didn't she thought of it in the first place, and as I expected, she didn't want to "touch" the base class although it was the straight forward solution, and thought of workarounds. And I was happy I encouraged her not to fear the "core".

My point is, why do we keep building barriers to improvements? development is an innovative process, and it is the duty of seniors to encourage juniors to learn and try. In addition, we have all the tools that help us in our mission; source control, refactoring helpers, clone detectors, code analysis, unit testing, and more. And believe me, the cost of maintaining a badly designed project, is much much higher than the cost of a bug that might skip from the core.

I have also to stress that refactoring with freedom has to be coupled with extensive Unit Testing and Code Coverage, but that might be the topic for anothe post.

2008-09-18

موقع مجانى للأسئلة فى البرمجيات

هذا هو البلوج الثانى لى وقد رأيت أن أخصصه للمقالات باللغة العربية (رغم أنى لا أؤيد تعريب التكنولوجيا) ولكنى أحببت أن أحاول تبسيط و ترجمة المقالات الشهيرة لكبار الباحثين فى مجال تكنولوجيا المعلومات و هندسة البرمجيات و التى لا تتاح لأغلب المطورين العرب

كما أرحب بكل من يرغب فى المشاركة فى هذا المجهود الضخم
فى البداية سأحاول ترجمة المواضيع التى نشرتها على البلوج الأول ICodeForLiving وهذا هو أول المواضيع و هو عن موقع جديد للإجابة عن الأسئلة فى البرمجة
اذن ما هو الجديد فى هذا الموقع والذى يجعله مختلفا عن باقى المواقع المشابهة؟
يقول Joel Spolsky ـ وهو واحد من المبدعين في الموقع والرئيس التنفيذي لشركة Fog Creek Software المنتجة لـ FogBugz وهو بنامج لمتابعة أخطاء البرمجة ـ فى تعليقه عن السبب في قيامه مع Jeff Atwood ـ صاحب بلوج Coding Horror ـ فى انشاء هذا الموقع:

إذا كنت محظوظا جدا ، وعلى الصفحة الرابعة من نتائج البحث
[أثناء البحث عن سؤال تقنى] و اذا كنت تملك الصبر، تجد سبع صفحات من المناقشة مع
المئات من الردود ، 25 في المائة منها إعلانات و ردود الية...

... وأعتقد أن مجتمع البرمجة يمكن أن يقوم بدور أفضل من
خلال الجمع بين فكرة السؤال والجواب مع التصويت والتحرير.

مثل ويكيبيديا ، كل مسألة يجب أن تظهر على الموقع مرة واحدة فقط مع حذف الأسئلة المكررة كما يمكن للقراء "التصويت" نزولا أو صعودا على الإجابات والباحث عن الجواب يمكن أن "يقبل" إجابة محددة

كما تمنح "شارات"حسن السمعة على سبيل المكافأة للإجابات الصحيحة و المقبولة
ونظرا لأن هذا العمل التعاوني ، فأنه مجانى تماما ، لا إعلانات ، لا رجال مبيعات ، ولا اجابات الية