2008-10-09

Planning Poker Cards

If you don’t know what are planning poker cards are, it is one of the nice ways used by Agile teams to estimate the effort of a user story, as the whole team of developers are involved in estimating the effort, not only managers.

If that estimation is done manually, you can have funny cases like these, so some would recommend doing it using cards. I personally think that a nice deck of regular poker cards would do the job, but they might not be as interesting as the Agile version.

You can also play the planning game online here which is brought to you by agile consultants and trainers at Mountain Goat Software.

Random Data Generator Tool

Have you ever needed to fill a table with random data and started to get bored after 10th or 20th row.

And have you tried to enter rubbish data for the sake of saving time as you cannot find meaningful names for 50 or 100 persons (you can use your friends names, but this won’t be so quick, and what about if you need their phone numbers :)

Here is a quick and easy tool that can get you full tables of any size of rows with any size and type of columns you need. And the output can be in HTML, XML, Excel, CSV, or SQL Inserts.

http://www.generatedata.com/#generator

The best of all is that it is totally free.

An insight on functional programming

It has been a long vacation, with quite some events to talk about

I had been following up the release of F# CTP which I haven’t got comprehensive knowledge yet, but to sum it up, it is a functional, declarative programming language.

In a functional language, each function should get some inputs, and return an output, with no other “side effect”; which means the internal implementation of the function doesn’t affect the state of the object or the state of any other related objects or global variables.

This is what differs functional languages from procedural or object oriented languages where a “method” can affect the instance fields or properties of the same object and/or other objects, can print something on a screen, or can persist something on other media. Each of these action doesn’t qualify a language to be a functional language.

Some “pure functions” are mathematical functions such as “SUM()”, “AVG()”, “MAX()”, “MIN()” which typically get one or more input and return an output regardless of the context it is called from.

That decoupling from the context, make it easy to define “what” instead of “how” and hence it is a declarative programming language as well.

You can get a quick understanding of this language and the concepts of functional languages from this 20 minutes tutorial.

2008-10-01

Visual Studio 2010 (Rosario)

Microsoft has provided the first look at its new development platform Visual Studio 2010 which is based on the new .NET Framework 4.0.

Microsoft described the next release through the following five focus areas:

  • riding the next-generation platform wave
  • inspiring developer delight
  • powering breakthrough departmental applications
  • enabling emerging trends such as cloud computing
  • democratizing application life-cycle management (ALM)

Their efforts in the area of ALM is the next step after their launch of Team Foundation Server (TFS) in 2005 and their efforts to combine Management, Analysis, Design, Testing, and Deployment all together under one platform.

The new announced features includes enhanced modeling with new diagram types such as use case, activity, and sequence beside the tightly close integration of modeling with existing and new code.

My favorite in the new features is the new testing capabilities which includes a stand-alone Test Runner that allows for running manual test, and at the same time take system snapshots with pertinent information and can be even used to take video captures of what was done during the test and report a bug to TFS directly with the captured data as an attachment.

Another favorite is the Test Impact View, which allows the developer to view the code changes made and the impacted tests that needs to re-run before checking in the latest modification.

For more info you can check the Visual Studio Team System 2010 Overview page.

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 في المائة منها إعلانات و ردود الية...

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

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

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