What makes software so hard

  • یوسف مهرداد بی‌بالان

ماهنامه The Rational Edge در شماره اخير خود مقاله‏ای با عنوان What makes software so hard دارد که به نکات جالبی اشاره کرده است.
هر چند اين موضوع در مراجع مختلف و از ديدگاههای مختلف بررسی شده است، اما مرور آن خالی از لطف نيست.
در اين مقاله به مقايسه مهندسی نرم‏افزار با ساير حوزه‏های رايج مهندسی پرداخته است.
بخش جمع‏بندی و نتيجه‏گيری مقاله را در زير آورده‏ام.

Software is hard for a number of fundamental reasons:
* Software projects are design projects, not production projects.
* Because software is pure mindware, software development is more of an art or craft than a science or engineering discipline, making the “doing” disciplines of software development difficult to perform, monitor, and measure. Productivity differences between individuals are huge.
* Software lacks laws and first principles.
* Software lacks a measurable standard unit of work.
* Given software’s flexibility, the “supporting” disciplines of software projects — planning, estimation, prediction and observation — are quite difficult.
* Moore’s law makes the foundations of software ever changing — there’s no “permanent” platform to build on.
Even though it might be tempting to consider software engineering as “just another engineering discipline,” and thus jump to the conclusion that software can be developed using the same business, management, and engineering principles as traditional engineering, there are some unique characteristics that make software and software development not only special, but also more difficult to estimate and monitor than traditional engineering projects.
Software development, with its inherent characteristics, existing in a very dynamic world governed only by Moore’s law, will remain more art than a science for a long time to come. We can only hope to tackle the problems in software development by acknowledging that software is different, and understanding the consequences of these differences.
Any attempts to regard software development as just another form of traditional engineering will generally not deliver the desired results. Only by having a good understanding of what makes software different, can we start addressing the unique issues associated with software development. Iterative development, modeling, requirements management, and early-and-often stakeholder involvement are among the techniques available to software teams who recognize this critical difference and are looking for a new way forward.

گزيده:
لغت نامه مهندسين در جلسات كارفرما
پروژه بدليل بعضى مشكلات ديده نشده، كمى از برنامه ريزى عقب است. يعنى: تاكنون روى پروژه ديگرى كار مى كرديم!
ما تصحيحاتى روى سيستم انجام داديم تا آن را ارتقا دهيم. يعنى: تمام طراحى ما اشتباه بوده و ما از اول شروع كرده ايم!

تشکر و قدردانی

  • یوسف مهرداد بی‌بالان

از همه دوستانی که لطف نموده و تولد سماموس را تبریک گفتند، صمیمانه تشکر و قدردانی می‏نمایم.
نيوشا، صبا، آقای علی نوبر، علی آقای عبدالهی ازگمی، آقای بهروز بختیاری، نرگس، علی آقای اعرابی، مهدی، آقای طاهری راد، خانم کراری، حامد، آقای مسعود علی‏اکبرزاده

گزیده:
آرزو داشتم روزي ناپلئون بناپارت شوم.ناپلئون را فردي با سينه و بازواني ستبر و عضلاني مجسم مي‏كردم كه شهرت و قدرتش نيرومند و عظيم است. بعد ها وقتي دريافتم كه او قامتي كوتاه و چاق داشته است به خود اميدوار شدم، چرا كه به آساني پذيرفتم كه تواناييهاي يك فرد به داشتن هيكل ورزيده، قد بلند و بازوي عضلاني نيست، بلكه تاثيري كه بر تاريخ به جاي مي گذارد اهميت دارد. هوندا

تولدت مبارک

  • یوسف مهرداد بی‌بالان

دیروز وبلاگ سماموس یک ساله شد.
صبح روز جمعه سیزدهم مردادماه سال 1385 ساعت 9 صیح، چیزی که مدتها طرحش را در ذهنم مرور کرده بودم، انجامش دادم. ایجاد وبلاگ و نوشتن در آن.
فکر نمی‏کردم بتوانم یک سال این کار را به صورت مستمر ادامه بدهم. ولی الان حس خوبی دارم و حتی تجربه بسیار زیادی. هر چند ماحصل کار آن چه که دلم می‏خواست نشده است، ولی از هیچ، جلوترم. تجربه خوبی است، شما هم امتحان کنید.

سماموس، تولدت مبارک.

گزیده:

I don’t regret the things I’ve done, but those I did not do.
– From Empire Records

چند مطلب خواندنی

  • یوسف مهرداد بی‌بالان

لینک مطالب زیر را از وبلاگ رادمان که هر چند وقت یک بار آن را مطالعه می‏کنم، پیدا کرده‏ام.

1- نزول به رتبه 69 جهان در حوزه IT
“دكتر منصور كبگانيان، معاون پژوهشي و فن‌آوري وزارت علوم، تحقيقات و فن‌آوري در گفت‌وگو با خبرنگار «فن‌آوري» خبرگزاري دانشجويان ايران (ايسنا) اظهار كرد: متاسفانه خبري مبني بر رتبه IT ايران دريافت كرديم كه براساس گزارش نشريه اكونوميست در ميان 69 كشور جهان رتبه آخر را كسب كرده‌ايم و اين مساله را از ديد شوراي عالي عتف كه به توسعه علم و فن‌آوري و حركت در حوزه‌هاي دانش توجه دارد، نگران كننده است.”

2- نقدي بر دستمزد كارشناسان نرم افزار
“چند سالي است كه شركت ثناراي به سفارش سازمان‌هاي دولتي مربوط نرم افزاري مانند شوراي عالي داده ورزي يا قرينه آن در وزرت ارتباطات اقدام به آمار گيري از چند شركتي مي‌نمايد كه حاضر به همكاري و اطلاع رساني مي‌شوند. ساير شركت‌هايي كه در اين همه پرسي شركت نمي‌كنند دلايلي براي خود دارند كه خارج از بحث ما است. آخرين گزارش تهيه شده مربوط به سال 1384 است و هنوز خبري از گزارش سال 1385 و آمار گيري آن نشده است.
از قيمت‌هاي ارايه شده و ظاهر موارد ارايه شده برمي‌آيد كه اين قيمت‌ها هم به سرنوشت قيمت‌هاي بعضي از نظام‌هاي صنفي مانند پزشكي دچار شده و براي كنترل قيمت‌ها چيز ديگري هم با واقعيت مخلوط شده است. به عنوان نمونه به چند مورد زير كه ميانگين قيمت‌ها قبل از كسورات مختلف مانند ماليات و بيمه است دقت فرماييد:


ارقام بالا كليه درآمد كارشناس از شركت قبل از كسورات است و كليه كسورات قانوني نيز از آن كسر خواهد كرديد. معلوم نيست مدير پروژه‌اي كه ساعتي 10 هزار تومان مي‌گيرد يا مشاوري كه ساعتي 12 هزار تومان مي‌گيرد داراي چه مدرك و تجربه‌اي هستند. طراحي كه ماهانه 783 هزار توام حقوق بگيرد يا داراي مدرك نامربوط است يا كمتر از 5 سال تجربه دارد كه در اين صورت طراح نمي‌شود يا طراح ميشود ولي نتيجه كار براي كارفرما فاجعه آميز خواهد بود. وضعيت كارشناس شبكه درجه 1 بدتر از بقيه است. اگر به هزينه‌هاي ارايه شده از طرف نظام صنفي رايانه براي خدمات شبكه توجه نماييم چند برابر بيش از ارقام شركت ثناراي است.
متاسفانه اين ارقام ممكن است براي پروژه‌هاي دولتي استفاده شوند و هزينه پيمانكاران حرفه‌اي با آن سنجيده شود. اگر چنين شود، انتظار نداشته باشيم كارها با كيفيت انجام شوند. مثال ما ايراني‌ها است كه هر چه پول بدهي آش مي‌خوري. مشكل فرار نيروي‌هاي تخصصي از كشور نيز مزيد بر علت مي‌شود. آقايان بنشينند و منصفانه و عميق به قيمت‌ها توجه كنند. ديگر زمان اول انقلاب گذشته است كه انتظار داشته باشيم همه براي رضاي خدايي كه ما تعريف مي‌كنيم جان بدهند و براي آزادي قدس همه چيز خود را فدا كنند. اكثر قريب به اتفاق نيروي‌هاي كارشناسي ما حتي كساني كه سوابق مذهبي هم دارند ديگر از اين فكرها نمي‌كنند و اگر بتوانند براي مهاجرت اقدام مي‌كنند.
اگر اين ارقام را بخواهيم رعايت كنيم، هيچ كارشناس نرم‌افزار را نمي‌توانيم بيش از چند سال در جايگاه خود حفظ نماييم و بايد از بي‌تجربه‌ها يا كم تجربه‌ها يا ساير رشته‌هاي نامربوط استفاده نماييم كه نتيجه كار براي كارفرماي بدبخت از ابتدا معلوم است. و اگر شخصي به سواد و تجربه كافي يا زياد دست پيدا كرد ديگر قابل تحمل نيست و بايد بجاي او يك كارنشناس قرار داد.
اگر مي‌خواهيم واقيت را بدانيم بايد نهادي واقعا بي‌طرف براي هر رشته از اين صنعت قيمت‌هاي جداگانه استخراج كند و به تاييد تك تك اعضاي آمار گرفته شده برساند. آمارهاي فرمايشي و رتوش شده خيانت به مردم اين كشور است. اگر نظام صنفي رايانه بتواند بدون تاثير پذيري از دولت و هر سازمان ديگري اين كار را انجام دهد، شايد بهترين گزينه باشد. با توجه به هزينه اندك اين آمار گيري خوب است كه خود راسا عمل نمايد و كاري كه در زمينه شبكه انجام داده است در ساير موارد نيز به انجام رساند. بالاخره هزينه عضويت اعضا در اين زمينه هم مي‌تواند خرج شود و چه چيزي بهتر از اين كار؟ “

عریضه: هی بازم بگین می‏خوایم بریم عروسک‏ فروش، گاودار، گل فروشومیوه فروش بشیم !

گزیده:

Forever is a long time and time has a way of changing things.
– “The Fox and The Hound

بازنویسی نرم‏افزار

  • یوسف مهرداد بی‌بالان

To rewrite or not to rewrite, that is the question
People seem to have given up completely on the notion of rewriting software. This is a shame since so much software needs rewritten, but it’s understandable since so many software rewrites fail. The decision on whether or not to rewrite is a complex one, and most companies will usually take the easy short-term path of attempting to fix the software in a piecemeal fashion. Unfortunately, this also fails most of the time, but at least companies don’t feel so bad about it since they usually end up only slightly worse off than when they started. Although I discussed this a bit in my “Fear of code” article, I decided go ahead and put together a more elaborate set of decision points on whether or not to rewrite a major piece of software.

Can it be rewritten in less than 2 months? If the answer is yes, you’re not within my definition of a “major piece of software”. Read on to help give you some perspective, but go ahead and rewrite if you think it will make your life a lot easier and treat the other rules with a grain of salt.
Do you honestly believe that if you rewrote it without adding any features the resulting code would be 33% smaller than the current code? If the answer is no, it’s not a candidate for a rewrite. Things are not so hopelessly wrong that they can’t be improved in-place. Things must be horribly bad before a complete rewrite is in order. Look for pieces of the code that can be rewritten (again looking for that magical 33% smaller boundary). Sometimes a piece of code makes every additional piece of code that much harder to write, but if the new code is dramatically harder to write then it’s probably getting badly bloated as a result. While there are kinds of complexity that do not create code bloat, these are the exception and not the rule and most of them can be dealt with via wrapping (hiding) the complex code in a layer.
The types of situations that require a full rewrite are the ones where a critical tool was used that was completely wrong for the job, or where key assumptions were made (possibly many of them) that later turned out wrong, or where complex business logic has become so hopelessly spread out through the edges of the application that every new feature requires massive cut and paste. If it feels like a project is hopelessly broken but you don’t see your rewritten version being 33% smaller then think harder about the WAY you would rewrite it and try to find a way to make it cleaner. Once you’ve found a way to drastically reduce the fat in the application you have understood the root cause of your problems well enough to justify a rewrite.
If you can envision doing away with half the code or more then you have an excellent candidate for a rewrite. Work hard to get the rest of the factors in line.
Can the code be done in less than 10 months? If the answer is no then you can’t do it. Almost no organization will keep a project alive for longer than about 10 months without seeing very strong evidence that it will succeed. If you believe it can be done in 10 months then it might take 16, but after 10 you’ll be close enough to get people believing. Notice I didn’t specify a team size, just a duration. You might be able to have a team of 20 working on a project for 10 months but you’ll never get a team of 2 for 100 months. One solution to this dilemma is to build a framework for the rewrite on a skunkworks basis in spare time or off hours. People only count the time from when they start investing in a project. You can also quietly bake some of this work in to the existing product so that some of the code will be in place and tested before the core reworking even gets discussed. Another solution is to think harder and find a way to get the value you need with less work.
Do you have a very senior sponsor who understands and believes in the project? If the answer is no then you can’t rewrite. There is no getting around this. I’ve tried. It can’t be done. You need a sponsor!
Can you get enough resources (even on a temporary basis) to support development on the old code base while the new code is written? If the answer is no you can’t rewrite. If the code is important enough to rewrite it’s important enough to need ongoing support. You can’t do both with the same people or the project will stretch to unacceptable lengths.
Is the project critically important to the company’s future? If the answer is no you can’t rewrite. Other projects will interject if this project is not vital. Large, nasty, but relatively unimportant software almost never gets rewritten. Of course larger companies consider MANY things critical to their future and are able to invest in rewriting them, but at some level people must believe the software is critical. It can’t just be an annoyance to developers.
Can the company go without a major release of the product for half the planned coding duration? If the answer is no you will probably (my first probably) fail. Even with parallel teams there will need to be a stoppage of major releases for a while as the new version gets shaken out.
Do you have anyone on the team who has successfully rewritten a major piece of software before? If the answer is no, get one or you can’t rewrite. Rewriting is not the same as other projects. It’s a specialized skill that balances design, code and testing with economics and politics. You need someone who has done it successfully before (even if they weren’t in charge).
This list is laughably oversimplified, but hopefully it gives you a few things to take in to account when considering a rewrite. How to rewrite is a topic I’ll leave for another day.

Reference: To rewrite or not to rewrite, that is the question

گزیده:

“When a defining moment comes along, you can do one of two things. Define the moment, or let the moment define you.”
– From Tin Cup

علی آقا بادی بلدینگ

  • یوسف مهرداد بی‌بالان

همه چیزی رو در مورد علی‏آقا که حکم بزرگتر، معلم و استاد را برایم دارند، فکر می‏کردیم الا دیدن علی‏آقا در برنامه قویترین مردان ایران سال ۸۶.

علی آقا قلباً خوشحالم که ورزش را شروع کردی.

گزیده:

ز ورزش بود مرد را راستی زسستی، کژی آید و کاستی

دشواری نوشتن

  • یوسف مهرداد بی‌بالان

Watts Humphrey ازچهره‏های بسیار معروف در دنیای مهندسی نرم‏افزار به خصوص در حوزه فرآیندهای تولید نرم‏افزار است. ویرهبر TSP:Team Software Process , PSP:Personal Software Processدر انستیتو مهندسی نرم‏افزار دانشگاه کارنگی ملون است. وی نوشتن دروبلاگی را شروع کرده بود که متأسفانه از ادامه نوشتن در آن منصرف شده است. علت آن را در زیر بخوانید که به نکات ظریفی در مورد نوشتن وبلاگ آن هم در حوزه تخصصی اشاره دارد. نوشته زیر مرا به یاد صحبتهای علیرضا انداخت.

This is my final weblog entry.
After several months of writing this weblog, I have concluded that it would take a great deal of effort to make the material interesting enough to attrack a reasonable number of readers. Unfortunately, I do not have the time to do that and so must regretfully sign off. My thanks to those of you who have contributed comments or read my rather limited efforts to produce a useful weblog.
Life is a learning process and I have learned that making the kind of contribution that would really attrack a broad readership is not a minor task. It would require a level of commitment that I simply cannot muster at this time.

Goodby and my thanks to you, my readers.
Watts Humphrey
July 30, 2007

گزیده:

We walk away from our dreams afraid we may fail, or worse yet, afraid we may succeed.
– Sean Connery in Finding Forrester

برای خروج از جستجو کلید ESC را بفشارید