Hiển thị các bài đăng có nhãn Software Development Management. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Software Development Management. Hiển thị tất cả bài đăng

Thứ Ba, 19 tháng 6, 2012

Software Architects Need Not Apply

I saw an online job posting several years ago that listed a set of desired software development and programming skills and concluded with the statement, "Architects Need Not Apply." Joe Winchester has written that Those Who Can, Code; Those Who Can't, Architect (beware an extremely obnoxious Flash-based popup) and has stated that part of his proposed Hippocratic Oath for Programmers would be to "swear that my desire to enter the computing profession is not to become an architect." Andriy Solovey has written the post Do We Need Software Architects? 10 Reasons Why Not and Sergey Mikhanov has proclaimed Why I don’t believe in software architects. More recent posts have talked of Frustration with the Role and Purpose of Architects on Software Projects and The frustrated architect. In this post, I look at some of the reasons software architects are often held in low esteem in the software development community.

I have been (and am) a software architect at times and a software developer at times. Often, I must move rapidly between the two roles. This has allowed me to see both sides of the issue and I believe that the best software architects are those who do architecture work, design work, and lower level implementation coding and testing.

In Chapter 5 ("The Second-System Effect") The Mythical Man-Month, Frederick P. Brooks, Jr., wrote of the qualities and characteristics of a successful architect. These are listed next:

  • An architect "suggests" ("not dictates") implementation because the programmer/coder/builder has the "inventive and creative responsibility."
  • An architect should have an idea of how to implement his or her architecture, but should be "prepared to accept any other way that meets the objectives as well."
  • An architect should be "ready to forego credit for suggested improvements."
  • An architect should "listen to the builder's suggestions for architecture improvements."
  • An architect should strive for work to be "spare and clean," avoiding "functional ornamentation" and "extrapolation of functions that are obviated by changes in assumptions and purposes."

Although the first edition of The Mythical Man-Month was published more than 35 years ago in 1975, violations of Brooks's suggestions for being a successful architect remain, in my opinion, the primary reason why software architecture as a discipline has earned some disrespect in the software development community.

One of the problems developers often have with software architects is the feeling that the software architect is micromanaging their technical decisions. As Brooks suggests, successful architects need to listen to the developers' alternative suggestions and recommendations for improvements. Indeed, in some cases, the open-minded architect might even be willing to go with a significant architectural change if the benefits outweigh the costs. In my opinion, good architects (like good software developers) should be willing to learn and even expect to learn from others (including developers).

A common complaint among software developers regarding architects is that architects are so high-level that they miss important details or ignore important concerns with their idealistic architectures. I have found that I'm a better architect when I have recently worked with low-level software implementation. The farther and longer removed I am from design and implementation, the less successful I can be in helping architect the best solutions. Software developers are more confident in the architect's vision when they know that the architect is capable of implementing the architecture himself or herself if needed. An architect needs to be working among the masses and not lounging in the ivory tower. Indeed, it would be nice if the title "software architect" was NOT frequently seen as an euphemism for "can no longer code."

The longer I work in the software development industry, the more convinced I am that "spare and clean" should be the hallmarks of all good designs and architectures. Modern software principles seem to support this. Concepts like Don't Repeat Yourself (DRY) and You Ain't Gonna Need It (YAGNI) have become popular for good reason.

Some software architects have an inflated opinion of their own value due to their title or other recognition. For these types, it is very difficult to follow Brooks's recommendation to "forego credit" for architecture and implementation improvements. Software developers are much more likely to embrace the architect who shares credit as appropriate and does not take credit for the developers' ideas and work.

I think there is a place for software architecture, but a portion of our fellow software architects have harmed the reputation of the discipline. Following Brooks's suggestions can begin to improve the reputation of software architects and their discipline, but, more importantly, can lead to better and more efficient software solutions.

Thứ Bảy, 19 tháng 5, 2012

The Developer/Non-Developer Impedance Mismatch

Most software developers have probably heard of and even had experiences with the object-relational impedance mismatch (often addressed with ORM tools), the object-XML impedance mismatch (often addressed with OXM tools), and even the developer-DBA impedance mismatch. I don't believe that these impedance mismatches are as difficult as they are sometimes made out to be, but for those wishing to mitigate them, we have tools such as Java Persistence API implementations and JDO implementations for dealing with the object-relational mismatch (and some of the developer-DBA impedance mismatch) and similarly have approaches such as JAXB, XMLBeans, JiBX and Apache Commons Digester for dealing with the object-XML mismatch (and .NET's LINQ deals with both ORM and OXM mismatches). At this point in my career, I believe the developer/non-developer impedance mismatch is perhaps the most frustrating impedance mismatch I have run into.

Although there are numerous tools and approaches for dealing with these other types of impedance mismatches, it seems we're woefully short on similarly powerful tools, approaches, and proven practices (my new preferred term for what I think "best practices" was originally intended to mean) for dealing with the developer/non-developer mismatch. In this post, I look at some of the most common areas of developer/non-developer mismatch and speculate as to why they occur and what can be done to address these specific areas of developer/non-developer impedance mismatch.

Sadly, we have much less control over the developer/non-developer impedance mismatch than we do over object-relational or object-XML impedance mismatches. Although in general things like improved communication and education can help, these answers are not as tangible as the ones we're used to for dealing with other types of software development impedance mismatches. As difficult as it is to deal with the developer/non-developer impedance mismatch, we must do so because there are numerous significant stakeholders in the software development process that are not necessarily developers (managers, clients, testers, customers, business analysts, sales people, and more).

DRY Principle / Modularity

Almost to a fault, developers have generally adopted (at least in a theory if not always in practice) the DRY (Don't Repeat Yourself) principles coined in the often-referenced book The Pragmatic Programmer: From Journeyman to Master. Although the term was coined in this 1999 book, the practice had been one that developers for decades had understood to some degree. Regardless of native spoken language or favorite programming language, developers today widely recognize virtues of some degree of DRY-ness. There may be some debate as to what level this should be taken (I've seen it taken past the point of common sense), but most of us agree with the perils of repeated documentation at different levels of the software product or of repeated code (copy-and-paste development).

Benjamin Denckla, in the post "Faith in DRY; no hope for software," writes, "Today we produce software through a laborious, undisciplined process that combines the low quality work of many with the heroic high quality work of a few. ... Not enough people believe in DRY and other good practices like it." I believe this is especially true when one considers the non-developers involved in a software development project. In my experience, the developers generally do see the value in some significant degree of DRY, but non-developer stakeholders see little value in DRY principles.

For purposes of this discussion, I'm including modularity in what I'm calling DRY practices. Most developers know there are numerous reasons to not copy-and-paste the same code into multiple places. For many decades, developers have known to place reusable code in methods, functions, modules, or other constructs that allow the same code to be used in multiple contexts and situations. It doesn't take long for this to become second nature to the experienced developer. Sadly, many non-developers seem to not acknowledge the risks and problems associated with redundant information copied from place to place or believe these risks and problems are more theoretical than real. Although it may not be code we're talking about when we discuss non-developers (it may be documentation, requirements, specifications, test procedures, or a host of other non-code things), the principle still applies: reproducing anything in multiple places leads to problems down the road in terms of maintenance and keeping the many versions synchronized with the latest and greatest. Developers seem to almost intrinsically "get it," but I see it less well received from many non-developers.

Readable and Maintainable Code

Many new software developers and even more non-developers do not recognize the value of code that is more readable and more maintainable. Perhaps the best experience a young developer can have is to maintain and reuse someone else's code. Doing so helps a young developer to recognize the value of writing code as cleanly as possible. Because non-developers never really get this experience, it is not surprising that they don't value cleanness, maintainability, and readability to the same degree as the experienced developer. Many legitimate cries for time to refactor a code base to improve its future maintainability and readability are ignored or promptly dismissed because such efforts' value is not obvious to those making the decisions.

Overbearing Processes and Management Decisions

I have occasionally seen non-developers in management roles trying to coerce developers into very narrow and specific behaviors that they (the managers) believe is best (or worse, that they perceive as giving them the power). These folks rarely have the experience to know the full ramifications of their decisions. Good managers listen to their developers (particularly those with significant experience and in technical leadership roles) before pushing out every "good idea" they have. Experienced developers usually know what it takes to write high-quality software, but it almost takes another experienced software developer to appreciate what they argue for. Alternatively, a manager lacking software development experience can sometimes make better decisions by choosing an experienced developer that he or she trusts with technical decisions. The best non-technical managers recognize their own lack of technical knowledge and work with a trusted technical expert to make good decisions.

Bean Counting and Pencil Pushing

Most software development is done as part of a business venture and it is often inevitable that some degree of bean counting and pencil-pushing will be required.. Clients or consumers directly or indirectly finance the creation of software. It can be difficult for developers to recognize and appreciate the legitimate management and metrics collection that goes on during these business-oriented phases. It can be equally difficult for managers and other non-developers to understand that some things are more subtle than the apparent "bottom line." Non-developers may over-emphasize short-term "bottom line" considerations at the expense of long-term quality and maintainability of the product while developers may overly neglect bottom line considerations and create software products that require too much time and investment to justify their likely return on investment.

The bean counter wants nothing more than to be able to count things like beans. He or she wants to use lines of code, number of defects in various states, number of requirements, and so forth to feel like he or she has a handle on the software development progress being made. It doesn't really matter that these are not created equally and should not be counted as if they are equal.

Battle for Control

It seems to be human nature and common in many relationships between humans to have battles for control. Tension can increase in the relationship between developers and non-developers as each group tries to exert control. Many non-developers, especially if they don't understand development or coding well, resent not being able to control what is added to the baseline. Many developers resent being told what they can put into the baseline, especially when they strongly believe that the non-developer is making arbitrary calls while lacking sufficient knowledge and background to make that call.

The battle for control can become very onerous when both sides are "know-it-alls." When either side is convinced of its superiority, it can be very difficult to get either to budge. Developers often feel their experience and skillset best qualifies them for making all software decisions while clients, managers, and others often feel their position does the same for them.

Coding: Job for a Craftsman or for a Technician?

Good software development managers recognize that software development can be a highly creative and challenging effort and requires skilled people who take pride in their work. Other not-so-good software managers consider software development to be a technician's job. To them, the software developer is not much more than a typist who speaks a programming language. To these managers, a good enough set of requirements and high-level design should and can be implemented by the lowest paid software developers. Some software development is easier than other software development, but the simple technician work has been largely replaced by automation and code generation at this point.

Perhaps the perceptions of technician versus craftsman explain why non-developers tend to be more likely to believe that all developers are plug-and-play while experienced developers realize that there can be a wide disparity in skillsets and knowledge between any two developers.

Appreciation of Software Development Nuances and Subtleties

It usually does not take long for a developer to realize that relatively little in software development is cut and dry. Software development often has a large amount of creativity to it and there are numerous judgment calls to be made. We sometimes call these design decisions or architecture trade-offs. Unfortunately, many who are not software developers do not understand that there are nuances and subtleties and even large amounts of creativity involved in software development. Without lack of these subtle shades, it's not surprising that many of these people without development experience can only think in extremes (technique "A" is good and must be be used by everyone all of the time or technique "A" is always wrong and should be absolutely avoided no matter what). New developers often exhibit this trait as well, but experience usually teaches them to be more willing to judge approaches and techniques against particular contexts and reduce the amount of generalization and assumptions.

Developers Aren't So Different from Others, But Then They Are

The Mythical Man-Month is one of the most often-quoted books in the areas of software development and software development management. One of its great quotes is made early in the work (first sentence of Preface to the First Edition): "In many ways, managing a large computer programming project is like managing any other large undertaking—in more ways than most programmers believe. But in many other ways it is different—in more ways than most professional managers expect." One of the key explanations of the impedance mismatch between developers and non-developer managers seems to lie in this profound statement. Developers, as a group, probably should be more willing to buy into certain proven "traditional" management approaches, but managers need to avoid falling into the trap of thinking that the tactics outlined in the latest business management book will be sufficient for managing software developers.

Opinions on What Values Most

Software developers are people too. As such, they do exhibit the same behaviors as other people. However, there are gross stereotypes of software developers that are not completely without some basis because of the high frequency of those stereotyped traits among software developers. There is great diversity in the software development community in terms of political opinions, interests, and so forth, but the idea of what is most important (quality design and code, work to be proud of, etc.) are fairly common across the industry. On the other hand, software developers (similarly to engineers in various engineering disciplines) seem to overly trivialize the need to respect the bottom line. They often cannot understand when an arguably adequate but not "best" or "perfect" solution is chosen over a better technical solution for non-technical reasons.

Conclusion

We in the software development community tend to deal with mismatches all the time. We often spend significant energy and time "gluing" things together that weren't necessarily designed to go together. Despite all of this technical experience we have making incongruent pieces work together, we still seem to have difficulty resolving perhaps the most difficult and most important mismatch of all: the mismatch between software developers and people who are not software developers. Although there are some positives that come from this (such as checks-and-balances on "science fair projects"), there is significant dysfunction, angst, resentment, and demoralization caused by this impedance mismatch.

Thứ Bảy, 10 tháng 9, 2011

Book Review: The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition

Frederick P. Brooks, Jr.'s The Mythical Man-Month (MM-M) is one of the most famous books in all of software development literature and is arguably THE most famous book on software development management. There are already innumerable reviews of this classic, but I review it again in this post for those software developers who have not read it and want a small overview of what's to like about it. After all, it is PC World's #1 title in the list of Top Ten IT Books Never To Admit You Haven't Read. The full title of the edition I am reviewing in this post is The Mythical Man-Month: Essays on Software Engineering, Anniversary Edition.

The "Anniversary Edition" of The Mythical Man-Month (published in 1995) adds significant content above and beyond what was published in the original edition in 1975. The "Anniversary Edition" contains the original book in its original form (albeit with the inclusion of corrections added in the 1982 reprint) and adds four new chapters. The first fifteen chapters in the Anniversary Edition are the chapters from the original book. The added chapters include Brooks's separate but equally famous IFIPS (1986) / IEEE Computer Magazine (1987) paper No Silver Bullet: Essence and Accidents of Software Engineering and a follow-up called No Silver Bullet ReFired. Chapters 18 and 19 of the Anniversary Edition focus on Brooks's 1995 self-perspective on what he wrote in 1975. Brooks points out what he got wrong and what he got right (there are far more cases of the latter than the former).

There are numerous reviews of The Mythical Man-Month that include exhaustive coverage of the topics and quotes from this book (Wikipedia article, Bernard I. Ng's The Mythical Man-Month summary, Some insights from The Mythical Man Month starting from Chapter 11, The Mythical Man-Month – Extracts I, The Mythical Man-Month – Extracts II, The Mythical Man-Month Lecture, and Review/Summary of The Mythical Man-Month, for example). Rather than repeat an overview of the book's content as a whole, I focus in this post on a few key points and in light of some modern day software best practices and ideologies.

Chapter 19 ("Propositions of The Mythical Man-Month: True or False?") of the "Anniversary Edition" will especially appeal to the reader who is impatient or lacks the time to read the entire book, but wants to get an overall view of Brooks's assertions. Because Brooks uses this chapter to present "the essence of the 1975 book" in "outline form," Brooks's assertions ("facts and rule-of-thumb-type generalizations from experience") from his original book are presented in "stark form" (approximately 20 pages). The presence of this chapter in the "Anniversary Edition" is another reason I don't break the book down chapter-by-chapter here. This chapter does more than simply summarize the assertions from the original book; it also includes some of Brooks's 1995 comments based on 20 more years of observation and the benefit of hindsight.

In his post The Mythical Man Month: Book Review, Mark Needham concludes his review of this book with the statement, "I really enjoyed reading this book and seeing how a lot of the ideas in more modern methodologies were already known about in the 1980s and aren’t in essence new ideas." I wholeheartedly agree with this statement, though the truth of it is possibly even more staggering: these were observations in a book published in 1975 based on Brooks's experiences working on OS/360 development in the mid-1960s and on follow-on conversations in the late 1960s. In other words, some of the things we might think are "new" or "trendy" today have been around and known for 45 years or more! As a side note, this reminds me of an Alan M. Davis presentation to the Denver Java Users Group ("What's New About New Methods of Software Development?") in late 2006 in which he demonstrated how many of the "new" methodologies and tactics of today have very similar predecessors in years past and how we seem to cycle between them over decades.

The following points made by Brooks are especially interesting when one keeps the thought in the back of his or her mind that this book was published in 1975 based on experiences in the mid- to late- 1960s (these quotes are from the Chapter 19 summarization but are based on text in the 1975 edition):

  • "Very good professional programmers are ten times as productive as poor ones..." [craftsmanship]
  • ""A small sharp team is best - as few minds as possible." [agile]
  • "Fixing a defect has a substantial (20 to 50 percent) chance of introducing another. After each fix, one must run the entire bank of test cases previously run against a system to ensure that it has not been damaged in an obscure way." [regression testing]
  • "It is worthwhile to build lots of debugging scaffolding and test code, perhaps even 50 percent as much as the product being debugged." [unit testing]
  • "To keep documentation maintained, it is crucial that it be incorporated in the source program, rather than kept as a separate document ... even high-level language syntax does not at all convey purpose." [DRY principle]

There are many more observations in The Mythical Man-Month that demonstrate that Brooks and other developers of the time understood many of the same basics of software development that we understand (and sometimes "discover" again) today. Many of these are more well-known and are called out in other reviews and so I don't list them here except for these must-list quotes:

  • "More software projects have gone awry for lack of calendar time than for all other causes combined."
  • Brooke's Law: "Adding manpower to a late software project makes it later."
  • "Hence the man-month as a unit for measuring the size of a job is a dangerous and deceptive myth."

One of the sections I found particularly timely (especially for a 1975 book in 2011) was Brooks's coverage of how a software architect can influence implementation. This can be especially sensitive when the architect's vision is not implemented by the developer in the way the architect desired. Brooks's tips seem very practical. He states that the architect must come to terms with the fact that the person implementing the code has "creative responsibility" for that implementation. He further advises that the architect should always have an idea of how to implement any of his or her designs, but must at the same time be willing to accept an equally good alternative approach proposed by the person implementing the code. Brooks further recommends that the architect make all suggestions regarding implementation "quietly and privately," be "ready to forego credit," and be willing to listen to the implementer's "suggestions for architecture improvements." This seems like sound advice to me based on my experiences on both sides of this relationship.

In the 2005 article Quoted Often, Followed Rarely, Brooks states:

The book is really more about management than about technology. The technology has changed immensely, so some of the old chapters are totally out of sync. On the other hand, people haven't changed much. That's why Homer and Shakespeare and the Bible are still relevant, because they're all dealing with human nature. I think that's part of the explanation for this book: The problems of managing people in teams have not changed, though the medium in which people are designing and the tools they are using have. Some people have called the book the "bible of software engineering." I would agree with that in one respect: that is, everybody quotes it, some people read it, and a few people go by it.

The concepts contained in this quote may be the most important thing to convey in a review of The Mythical Man-Month. The appeal of the book is its coverage of and focus on management of people. That has remained timeless and unchanged over the decades. The technologies have definitely changed significantly and that may be the biggest negative about this book. Brooks's examples based on specific products, tools, and languages in 1975 were certainly more illustrative then than they are today for the typical reader. For example, his 1975 book calls PL/I "the only reasonable candidate for system programming today." At times, some of the reading can be a little more challenging with lack of direct experience with the products of which Brooks mentions. However, in most cases, this is not much of a hindrance in the end because of the human element is the focus of the book and this is mostly unchanged even now. In Chapter 19 of the Anniversary Edition, Brooks reflects on the continuing popularity of his book and states: "to the extent that The MM-M is about people and teams, obsolescence should be slow."

The Mythical Man-Month is really about very large enterprise software development projects. This is important to bear in mind when reading things that may seem obvious to someone working on a small project. The last part of the quote above is famous: "Some people have called the book the 'bible of software engineering.' I would agree with that in one respect: that is, everybody quotes it, some people read it, and a few people go by it." Brooks's book is filled with Biblical references and he is obviously acquainted with the Holy Bible. Sadly, Brooks's quote "everybody quotes it, some people read it, and a few people go by it" is all too true today. We'll keep reading it, but it'd be nice to do more to change things in large-scale software development projects.

Some people feel that The Mythical Man-Month is defeatist and even depressing. I don't get the same feeling from reading it. Rather, I feel that it reminds us that certain behaviors are detrimental and dysfunctional. It also reminds us that we shouldn't wait for the "next big thing," but should instead continue to improve our craft as best we can. Many practical tips and suggestions are provided. Brooks obviously loves being in the software development field and this is shown again and again in his book. Brooks concludes the book's "Epilogue: Fifty Years of Wonder, Excitement, and Joy," talking about how he used to be able to "read all the journals and conference proceedings," but eventually had to give up specific interests one by one as the knowledge exploded. He concludes, "Too many interests, too many exciting opportunities for learning, research, and thought. What a marvelous predicament! Not only is the end not in sight, the pace is not slackening. We have many future joys." I definitely agree.