Going to Extremes

Going to Extremes

xtreme Programming (XP) is not some nerd bungee jumping off a bridge with a laptop. It is not a geek writing code while doing back flips on a skateboard. Nothing nearly so exciting. Extreme Programming is simply a software development methodology. I’m not saying that XPers are fanatical or cultish, but I bought my copy of “Extreme Programming Explained” (Addison Wesley Longman, 2000) by noted programmer and Smalltalk guru Kent Beck from a guy in an orange robe at the L.A. airport.

Some of the main tenets of XP are simple, common-sense ideas practiced to extremes:

  • Keep it simple.
  • Code in small iterations and fast release cycles.
  • Design as you go, with no big, up-front design.
  • Put unit and functional testing at the core of the project goal posts, not as an optional add-on.
  • Work directly with the customer and/or the user and make them a part of the programming team.
  • Make the entire development team owners of the entire project; don’t portion out code to individual experts.
  • Refactor, that is, rewrite and improve code, constantly.
  • Sleep well, lead a balanced healthy lifestyle except for required eating of junk food for team spirit, and remember, it’s a jungle out there, so always program in pairs.

One Head is Better than Two
Pair programming, where ALL production code is written with two programmers sharing one computer, is the most controversial of all the ideas put forth in XP. While it does lessen the chances of producing poor code, it doesn’t seem to make sense that two competent, experienced programmers working together could produce the same amount of code as they could working separately. To this XPers say, it may be counter-intuitive (and XPers love to say that things are counter-intuitive), but just try it and you’ll see.

Other mitigating factors for pair programming are the often different physical locations for people on the same project, different work schedules, and the fact that many programmers are just ornery, anti-social prima donnas, which iss why they are programmers in the first place. To all this, the peers say, “Try it, you’ll like it.”

Pair programming promotes overlapping knowledge of the application. You are no longer held hostage by a sociopathic?albeit talented?developer who is singularly aware of how a particular part of the code works. And pair programming builds constant communication and feedback directly into the development process.

Pair programming also spotlights XP at its most dogmatic. Certainly, extremely (no pun intended) good code can be written by individuals. Many creative or just plain competent people prefer to work alone and produce good results. But XP says there is no room for a solo programmer. There is an inflexibility to XP that does not account for different personality types and work styles, which may alienate valuable members of your staff.

Design and Code in Small Iterations
In his book, Beck makes some admissions that you don’t often hear from software developers:

  • Writing code is hard.
  • Many software projects fail.
These are not the projects that people go trumpeting about at conferences and user groups. Sometimes they fail due to bad management (well, that you’ll hear from developers) and sometimes they fail because of bad coding (and that you don’t hear). Sometimes they fail because of a bad initial concept or design, sometimes from trying to do too much with too few resources.

XP attempts to address all these pitfalls. If a project is doomed to fail, you need to find out fast before large sums of money are wasted. Instead of spending time creating an all-encompassing design and sending the programmers off for six months to implement it, design and code in small iterations and deliver the simplest thing that could possibly work.

XP also espouses constant integration of new code into development versions of an application. It advocates small, frequent production releases for customers and end users. Because of this, customers and users also take a more active role in an XP project. With small, frequent design iterations, customers are constantly involved in the design process. XP advocates having a person in the role of the end user on the project team. It also encourages real-world feedback by getting a project into production with real end users as quickly as possible.

Sometimes XP takes the myopic view that everybody finds software as fascinating as developers. Many end users don’t want their applications to look and work differently each time they use them and would not favor frequent small releases. Most people are not interested in using beta versions of software and may, in fact, get an irreversible bad impression.

Some people might argue that if your design is changing too much for an up-front specification, your project is already in trouble. While technology may be changing rapidly, it’s not changing significantly every three weeks. Also, there is a tremendous overhead (can you say “meetings”?) in perpetually tweaking the design of an application. XPers rebut that experience shows that applications rarely look like their initial specifications, and those that do lack flexibility. If you are sailing to India, you need to lay out a general course. But you can’t possibly anticipate all the changes in currents and winds along the way, so don’t bother trying. XP says don’t commit until you absolutely have to.

XP vs. OOP
XP says don’t design and code for reuse until reuse is needed. Don’t spend money for something until you need it and until you know just what you really need. This goes against one of the holy grails of object oriented programming (OOP), but it is a reflection of how things work in the real world. This is in line with XP’s basic philosophy of simplicity: Do the simplest thing that works; and don’t design or code for possible future requirements.

Another sacred cow of OOP is the ability to delegate responsibility to an isolated modular object or API, and hence, the ability to delegate work to an isolated, modular, cubby-holed programmer. In XP, however, not only are programmers required to work in pairs, they are required to eat in groups, sleep well, develop basic social skills, and, one would assume, bathe. In addition, all team members are free to mess with others’ code. While individual areas of expertise may be thinner, groups no longer find themselves overly dependent on any one individual.

Then there is bad code. Bad, untested, overly complex, buggy, inefficient, unformatted code. Code written by “the other guy.” In the world of XP, tests are written before functional code is written, code is written in pairs, and anyone on the development team is free to refactor and/or rewrite anybody else’s code. So there is no longer an “other guy” and, as a result, no bad code. One can only hope.

Refactoring and Testing
If XP ultimately goes the way of the Pet Rock, one aspect that is sure to stick is refactoring. Refactoring refers to a group of codified techniques used to identify and improve bad code written by the other guy and occasionally by the programmers themselves (programmers will always be referred to in the plural in the world of pair programming). It relies on unit tests to maintain confidence that the refactoring has not broken something else and small incremental changes.

In the first example in his book, “Refactoring: Improving the Design of Existing Code” (Addison Wesley Longman, 1999), Martin Fowler decomposes one “smelly” method in one class into a total of 10 methods spread over seven classes. He goes so far as to bad-mouth comments in code, one of the first rules of Programming 101. While refactoring makes a lot of sense, so did comments, designing for reuse, and separate modular programming just a few months ago. It makes me wonder if we’ll be reading “Defactoring” in a few years with an example of how to combine everything back into one method.

While XP is quite specific about unit testing of code at the method and class level, it is a bit vague about other testing. It does require (XP doesn’t recommend anything) a tester on the project. XP advocates functional testing by customers and/or users to make sure new releases produce the same answers, but it does so with far less zeal than unit testing. XP also gives short shrift to GUI testing, stress testing, and testing in multiple platforms. These can be difficult, time-consuming activities and are often difficult to automate. These tests can also create a large overhead in an environment that advocates frequent releases. But most managers recognize these are high-risk areas that can make or break a software project.

All or Nothing
So why in the world is there such hysteria over something so seemingly sedate as a development methodology (see Egroups.com), and from where is it coming? The answer to the second question may give us the answer to the first: It’s coming from developers. Programmers who are burned out by heroic efforts to save poorly managed projects, isolated in cubicles where they are fed gruel through a slot in the modular wall, then castigated for not satisfying customers they never see. Programmers in the new dotconomy who have seen the balance of labor power tilt in their direction, and now see themselves as inmates with the chance to run the institution.

For project managers, deciding to use Extreme Programming on your next project may in fact feel like bungee jumping off a bridge with a laptop. As a manager, you must be confident enough to give up a large amount of control. You no longer get to say: “I want these features by this date completed by this staff. Make it so.” But convincing upper management that two programmers working together on one task can produce more than two programmers working separately will be difficult.

XP does not cost anything in and of itself, but you must be prepared to make some up-front investments in your project. You have to recognize that quality means more than writing with different colored markers at meetings. It means taking the time to write test cases and refactor code whenever necessary.

The temptation is to pick and choose the features you like about XP?to use the short release cycles, for instance, but not pair programming. To this, XPers give a vociferous “No way, dude.” It’s all the way or not at all.

At first and perhaps even second blush, XP seems dogmatic and fanatical. It espouses lifestyle changes and attitude adjustments and elicits strong responses from its proponents. It demands rigid conformance to all its principles. It would be a mistake to dismiss XP for those reasons. XP is grounded in the hard realities and pitfalls of software development and offers many common-sense solutions. It may not be the final word in the evolution of software development methodology, but it is certainly a big step in the right direction.



Share the Post:
5G Innovations

GPU-Accelerated 5G in Japan

NTT DOCOMO, a global telecommunications giant, is set to break new ground in the industry as it prepares to launch a GPU-accelerated 5G network in

AI Ethics

AI Journalism: Balancing Integrity and Innovation

An op-ed, produced using Microsoft’s Bing Chat AI software, recently appeared in the St. Louis Post-Dispatch, discussing the potential concerns surrounding the employment of artificial

Savings Extravaganza

Big Deal Days Extravaganza

The highly awaited Big Deal Days event for October 2023 is nearly here, scheduled for the 10th and 11th. Similar to the previous year, this

5G Innovations

GPU-Accelerated 5G in Japan

NTT DOCOMO, a global telecommunications giant, is set to break new ground in the industry as it prepares to launch a GPU-accelerated 5G network in Japan. This innovative approach will

AI Ethics

AI Journalism: Balancing Integrity and Innovation

An op-ed, produced using Microsoft’s Bing Chat AI software, recently appeared in the St. Louis Post-Dispatch, discussing the potential concerns surrounding the employment of artificial intelligence (AI) in journalism. These

Savings Extravaganza

Big Deal Days Extravaganza

The highly awaited Big Deal Days event for October 2023 is nearly here, scheduled for the 10th and 11th. Similar to the previous year, this autumn sale has already created

Cisco Splunk Deal

Cisco Splunk Deal Sparks Tech Acquisition Frenzy

Cisco’s recent massive purchase of Splunk, an AI-powered cybersecurity firm, for $28 billion signals a potential boost in tech deals after a year of subdued mergers and acquisitions in the

Iran Drone Expansion

Iran’s Jet-Propelled Drone Reshapes Power Balance

Iran has recently unveiled a jet-propelled variant of its Shahed series drone, marking a significant advancement in the nation’s drone technology. The new drone is poised to reshape the regional

Solar Geoengineering

Did the Overshoot Commission Shoot Down Geoengineering?

The Overshoot Commission has recently released a comprehensive report that discusses the controversial topic of Solar Geoengineering, also known as Solar Radiation Modification (SRM). The Commission’s primary objective is to

Remote Learning

Revolutionizing Remote Learning for Success

School districts are preparing to reveal a substantial technological upgrade designed to significantly improve remote learning experiences for both educators and students amid the ongoing pandemic. This major investment, which

Revolutionary SABERS Transforming

SABERS Batteries Transforming Industries

Scientists John Connell and Yi Lin from NASA’s Solid-state Architecture Batteries for Enhanced Rechargeability and Safety (SABERS) project are working on experimental solid-state battery packs that could dramatically change the

Build a Website

How Much Does It Cost to Build a Website?

Are you wondering how much it costs to build a website? The approximated cost is based on several factors, including which add-ons and platforms you choose. For example, a self-hosted

Battery Investments

Battery Startups Attract Billion-Dollar Investments

In recent times, battery startups have experienced a significant boost in investments, with three businesses obtaining over $1 billion in funding within the last month. French company Verkor amassed $2.1

Copilot Revolution

Microsoft Copilot: A Suit of AI Features

Microsoft’s latest offering, Microsoft Copilot, aims to revolutionize the way we interact with technology. By integrating various AI capabilities, this all-in-one tool provides users with an improved experience that not

AI Girlfriend Craze

AI Girlfriend Craze Threatens Relationships

The surge in virtual AI girlfriends’ popularity is playing a role in the escalating issue of loneliness among young males, and this could have serious repercussions for America’s future. A

AIOps Innovations

Senser is Changing AIOps

Senser, an AIOps platform based in Tel Aviv, has introduced its groundbreaking AI-powered observability solution to support developers and operations teams in promptly pinpointing the root causes of service disruptions

Bebop Charging Stations

Check Out The New Bebob Battery Charging Stations

Bebob has introduced new 4- and 8-channel battery charging stations primarily aimed at rental companies, providing a convenient solution for clients with a large quantity of batteries. These wall-mountable and

Malyasian Networks

Malaysia’s Dual 5G Network Growth

On Wednesday, Malaysia’s Prime Minister Anwar Ibrahim announced the country’s plan to implement a dual 5G network strategy. This move is designed to achieve a more equitable incorporation of both

Advanced Drones Race

Pentagon’s Bold Race for Advanced Drones

The Pentagon has recently unveiled its ambitious strategy to acquire thousands of sophisticated drones within the next two years. This decision comes in response to Russia’s rapid utilization of airborne

Important Updates

You Need to See the New Microsoft Updates

Microsoft has recently announced a series of new features and updates across their applications, including Outlook, Microsoft Teams, and SharePoint. These new developments are centered around improving user experience, streamlining

Price Wars

Inside Hyundai and Kia’s Price Wars

South Korean automakers Hyundai and Kia are cutting the prices on a number of their electric vehicles (EVs) in response to growing price competition within the South Korean market. Many

Solar Frenzy Surprises

Solar Subsidy in Germany Causes Frenzy

In a shocking turn of events, the German national KfW bank was forced to discontinue its home solar power subsidy program for charging electric vehicles (EVs) after just one day,

Electric Spare

Electric Cars Ditch Spare Tires for Efficiency

Ira Newlander from West Los Angeles is thinking about trading in his old Ford Explorer for a contemporary hybrid or electric vehicle. However, he has observed that the majority of

Solar Geoengineering Impacts

Unraveling Solar Geoengineering’s Hidden Impacts

As we continue to face the repercussions of climate change, scientists and experts seek innovative ways to mitigate its impacts. Solar geoengineering (SG), a technique involving the distribution of aerosols

Razer Discount

Unbelievable Razer Blade 17 Discount

On September 24, 2023, it was reported that Razer, a popular brand in the premium gaming laptop industry, is offering an exceptional deal on their Razer Blade 17 model. Typically

Innovation Ignition

New Fintech Innovation Ignites Change

The fintech sector continues to attract substantial interest, as demonstrated by a dedicated fintech stage at a recent event featuring panel discussions and informal conversations with industry professionals. The gathering,

Import Easing

Easing Import Rules for Big Tech

India has chosen to ease its proposed restrictions on imports of laptops, tablets, and other IT hardware, allowing manufacturers like Apple Inc., HP Inc., and Dell Technologies Inc. more time